Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Work on PROTON-182 exposed the following defect in proton-j.
proton_tests.ssl.SslTest.test_allow_unsecured_client ....................java.lang.ClassCastException: java.security.KeyPair cannot be cast to java.security.Key at org.apache.qpid.proton.engine.impl.ssl.SslEngineFacadeFactory.createKeyStoreFrom(SslEngineFacadeFactory.java:188) at org.apache.qpid.proton.engine.impl.ssl.SslEngineFacadeFactory.createSslContext(SslEngineFacadeFactory.java:126) at org.apache.qpid.proton.engine.impl.ssl.SslEngineFacadeFactory.createSslEngine(SslEngineFacadeFactory.java:94) at org.apache.qpid.proton.engine.impl.ssl.SslEngineFacadeFactory.createSslEngineFacade(SslEngineFacadeFactory.java:86) at org.apache.qpid.proton.engine.impl.ssl.SimpleSslTransportWrapper.<init>(SimpleSslTransportWrapper.java:95) at org.apache.qpid.proton.engine.impl.ssl.SimpleSslTransportWrapper.<init>(SimpleSslTransportWrapper.java:84) at org.apache.qpid.proton.engine.impl.ssl.SslImpl$UnsecureClientAwareTransportWrapper.initTransportWrapperOnFirstIO(SslImpl.java:209) at org.apache.qpid.proton.engine.impl.ssl.SslImpl$UnsecureClientAwareTransportWrapper.output(SslImpl.java:175) at org.apache.qpid.proton.engine.impl.TransportImpl.output(TransportImpl.java:174) at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:186) at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:204) at org.python.core.PyObject.__call__(PyObject.java:441)
The implementation (SslEngineFacadeFactory) currently requires that the private key file provide a Key. It ignores that possibility that the PEM may legitimately contain a key-pair, containing the private-key.
Attachments
Issue Links
- relates to
-
PROTON-182 [proton-j] SSL tests fail with org.bouncycastle.openssl.PEMException: problem parsing ENCRYPTED PRIVATE KEY: java.security.InvalidKeyException: Illegal key size
- Closed