Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8259402

AlgorithmId cleanup

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • None
    • security-libs
    • None

      Some cleanup and various improvements could be made to sun.security.x509.AlgorithmId:

      - serialization does not work if any optional parameters are specified, since the fields holding the parameters are not serializable. We could try to fix this, but it may be easier to simply stop implementing Serializable. This is an internal class, and the serialization doesn't seem to be necessary or used anywhere in the JDK.

      - parameters can be specified as DER-encoded parameters or AlgorithmParameters. This dichotomy causes the code to be more complex than necessary as it needs to check which type the parameters are and convert one to another depending on what methods are called. I think it might be simpler to treat this as a DER class and decouple the AlgorithmParameters part, possibly into another class.

      - various other miscellaneous issues, ex: there is a block of commented out code which can probably be deleted. A good scrubbing of the code would be useful.

            mullan Sean Mullan
            mullan Sean Mullan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: