JDK-8190449 : [TEST_BUG] sun/security/pkcs11/KeyPairGenerator/TestDH2048.java fails on Solaris x64 5.10
  • Type: Bug
  • Component: security-libs
  • Sub-Component: javax.crypto
  • Affected Version: 8u171
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_10
  • CPU: x86
  • Submitted: 2017-11-01
  • Updated: 2018-03-21
  • Resolved: 2017-11-07
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
8u161Fixed openjdk7uFixed
Related Reports
Relates :  
Description
STDOUT:
Beginning test run TestDH2048...
Running test with provider SunPKCS11-Solaris...
4096-bit DH key pair generation: java.security.InvalidParameterException: DH key must be at most 4096 bits. The specific key size 6144 is not supported
STDERR:
java.security.InvalidParameterException: DH key must be at most 4096 bits. The specific key size 6144 is not supported
	at sun.security.pkcs11.P11KeyPairGenerator.initialize(P11KeyPairGenerator.java:150)
	at java.security.KeyPairGenerator$Delegate.initialize(KeyPairGenerator.java:640)
	at java.security.KeyPairGenerator.initialize(KeyPairGenerator.java:351)
	at TestDH2048.main(TestDH2048.java:78)
	at PKCS11Test.premain(PKCS11Test.java:88)
	at PKCS11Test.testDefault(PKCS11Test.java:149)
	at PKCS11Test.main(PKCS11Test.java:97)
	at TestDH2048.main(TestDH2048.java:98)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.sun.javatest.regtest.agent.MainActionHelper$SameVMRunnable.run(MainActionHelper.java:226)
	at java.lang.Thread.run(Thread.java:748)

Comments
I have created bug JDK-8191175 for below 6u181 b05 issue. The P11KeyPairGenerator throws "java.security.ProviderException: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_TEMPLATE_INCOMPLETE" instead of java.security.InvalidParameterException. 7u throws java.security.InvalidParameterException when unsupported keysize is passed to P11KeyPairGenerator.
15-11-2017