Alex Rudyy created QPID-8255: -------------------------------- Summary: [JMS AMQP 0-x] Connection failure with connection option 'client_cert_priv_key_path' and java 11 Key: QPID-8255 URL: https://issues.apache.org/jira/browse/QPID-8255 Project: Qpid Issue Type: Bug Components: JMS AMQP 0-x Affects Versions: qpid-java-client-0-x-6.3.3 Environment: java11 Reporter: Alex Rudyy
Connection establishment fails with java 11 when connection option 'client_cert_priv_key_path' is used: {noformat} javax.jms.JMSException: Error creating connection: Key protection algorithm not found: java.security.UnrecoverableKeyException: Encrypt Private Key failed: getSecretKey failed: Password is not ASCII at org.apache.qpid.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:169) at org.apache.qpid.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:143) at org.apache.qpid.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:57) at org.apache.qpid.systests.QpidJmsClient0xConnectionBuilder.build(QpidJmsClient0xConnectionBuilder.java:270) at org.apache.qpid.systests.jms_1_1.extensions.tls.TlsTest.testCreateSSLWithCertFileAndPrivateKey(TlsTest.java:508) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55) at org.junit.rules.RunRules.evaluate(RunRules.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.apache.qpid.tests.utils.QpidTestRunner.runChild(QpidTestRunner.java:84) at org.apache.qpid.tests.utils.QpidTestRunner.runChild(QpidTestRunner.java:28) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.apache.qpid.tests.utils.QpidTestRunner.run(QpidTestRunner.java:59) at org.junit.runner.JUnitCore.run(JUnitCore.java:160) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68) at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70) Caused by: org.apache.qpid.AMQConnectionFailureException: Key protection algorithm not found: java.security.UnrecoverableKeyException: Encrypt Private Key failed: getSecretKey failed: Password is not ASCII at org.apache.qpid.client.AMQConnection.makeConnection(AMQConnection.java:672) at org.apache.qpid.client.AMQConnection.<init>(AMQConnection.java:522) at org.apache.qpid.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:164) ... 32 more Caused by: org.apache.qpid.transport.TransportException: Error creating SSL Context at org.apache.qpid.transport.network.security.SecurityLayerFactory$SSLSecurityLayer.<init>(SecurityLayerFactory.java:100) at org.apache.qpid.transport.network.security.SecurityLayerFactory.newInstance(SecurityLayerFactory.java:59) at org.apache.qpid.client.AMQConnectionDelegate_8_0.makeBrokerConnection(AMQConnectionDelegate_8_0.java:142) at org.apache.qpid.client.AMQConnection.makeBrokerConnection(AMQConnection.java:816) at org.apache.qpid.client.AMQConnection.makeConnection(AMQConnection.java:583) ... 34 more Caused by: java.security.KeyStoreException: Key protection algorithm not found: java.security.UnrecoverableKeyException: Encrypt Private Key failed: getSecretKey failed: Password is not ASCII at java.base/sun.security.pkcs12.PKCS12KeyStore.setKeyEntry(PKCS12KeyStore.java:704) at java.base/sun.security.pkcs12.PKCS12KeyStore.engineSetKeyEntry(PKCS12KeyStore.java:601) at java.base/sun.security.util.KeyStoreDelegator.engineSetKeyEntry(KeyStoreDelegator.java:111) at java.base/java.security.KeyStore.setKeyEntry(KeyStore.java:1174) at org.apache.qpid.transport.ConnectionSettings.getKeyManagers(ConnectionSettings.java:666) at org.apache.qpid.transport.ConnectionSettings.getKeyManagers(ConnectionSettings.java:610) at org.apache.qpid.transport.network.security.SecurityLayerFactory$SSLSecurityLayer.<init>(SecurityLayerFactory.java:93) ... 38 more Caused by: java.security.UnrecoverableKeyException: Encrypt Private Key failed: getSecretKey failed: Password is not ASCII at java.base/sun.security.pkcs12.PKCS12KeyStore.encryptPrivateKey(PKCS12KeyStore.java:951) at java.base/sun.security.pkcs12.PKCS12KeyStore.setKeyEntry(PKCS12KeyStore.java:641) ... 44 more Caused by: java.io.IOException: getSecretKey failed: Password is not ASCII at java.base/sun.security.pkcs12.PKCS12KeyStore.getPBEKey(PKCS12KeyStore.java:868) at java.base/sun.security.pkcs12.PKCS12KeyStore.encryptPrivateKey(PKCS12KeyStore.java:932) ... 45 more Caused by: java.security.spec.InvalidKeySpecException: Password is not ASCII at java.base/com.sun.crypto.provider.PBEKey.<init>(PBEKey.java:67) at java.base/com.sun.crypto.provider.PBEKeyFactory.engineGenerateSecret(PBEKeyFactory.java:219) at java.base/javax.crypto.SecretKeyFactory.generateSecret(SecretKeyFactory.java:344) at java.base/sun.security.pkcs12.PKCS12KeyStore.getPBEKey(PKCS12KeyStore.java:864) ... 46 more {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org