Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-187

Proton-j SSL implement should accept client certificate from a private key of a keypair

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • proton-0.3
    • proton-j
    • 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

          Activity

            People

              philharveyonline Phil Harvey
              kwall Keith Wall
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: