JDK-7194075 : Various classes of sunec.jar are duplicated in rt.jar
  • Type: Bug
  • Component: security-libs
  • Sub-Component: java.security
  • Affected Version: 7,8
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-08-25
  • Updated: 2019-07-17
  • Resolved: 2013-05-16
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 Other
8 b91Fixed openjdk7uFixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
Currently there are 5 classes of sunec.jar are duplicated in rt.jar.

There is another bug/fix for the ECKeyFactory duplicated in rt.jar, so only the 4 classes below will be addressed in CR 6995421.

  sun.security.ec.ECKeyFactory
  sun.security.ec.ECParameters
  sun.security.ec.ECPrivateKeyImpl
  sun.security.ec.ECPublicKeyImpl
  sun.security.ec.NamedCurve

Comments
not verified since it is noreg-cleanup
20-06-2013

SUGGESTED FIX To remove the dependency on ECParameters and NamedCurve, instead of exposing static methods in NamedCurve and ECParameters, use the ECGenParameterSpec and a new ECKeySizeParameterSpec class with AlgorithmParameters.init. Also move the decodePoint and encodePoint methods from ECParameters to a new ECUtil class in rt.jar. Since JSSE and PKCS11 only want to work with ECParameterSpecs and not AlgorithmParameters, create utility methods in ECUtil that hide use of AlgorithmParameters and SunEC provider. To remove the dependency on ECKeyPublicImpl and ECKeyPrivateImpl, instead of exposing the constructors, use X509EncodedKeySpec and the PKCS8EncodedKeySpec with KeyFactory.init. To remove the dependency of the TestCurves unit test on NamedCurves, have the unit test parse the property "AlgorithimParameters.EC Supported Curves" from the SunEC provider's map to get a list of object IDs of supported curves and then test can use the ECParameters.init(ECGenParameters()) to get the curves. Move NamedCurve maps and map access methods (also the access methods in ECParameters) into a new class such as CurvesDB.
25-08-2012

EVALUATION sun.security.pkcs11.P11ECKeyFactory depends on: sun.security.ec.ECPrivateKeyImpl byte[] constructor sun.security.ec.ECPublicKeyImpl byte[] constructor getEncodedPublicValue() sun.security.ec.ECParameters getNamedCurve() decodeParameters() encodeParameters() decodePoint() encodePoint() sun.security.ec.NamedCurve getECParameterSpec(String) getECParameterSpec(int) sun.security.ssl.JsseJce depends on: sun.security.ec.ECParameters getNamedCurve() decodePoint() encodePoint() sun.security.ec.NamedCurve getECParameterSpec(String) test/sun/security/ec/TestCurves sun.security.ec.NamedCurve knownECParameterSpecs
25-08-2012