Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-6354

Non java keystore exceptions about incorrect format of private key or certificates are swallowed and ignored

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.30
    • 0.31
    • Broker-J
    • None

    Description

      If private key is provided in incorrect format that keystore is created and exception is ignored. On broker opening the following is logged

      2015-02-02 13:55:29,635 ERROR [main] (security.NonJavaKeyStoreImpl) - Error attempting to create KeyStore from private key and certificates
      java.security.spec.InvalidKeySpecException: Unable to parse key as PKCS#1 format
              at org.apache.qpid.server.security.NonJavaKeyStoreImpl.getRSAKeySpec(NonJavaKeyStoreImpl.java:426)
              at org.apache.qpid.server.security.NonJavaKeyStoreImpl.readPrivateKey(NonJavaKeyStoreImpl.java:395)
              at org.apache.qpid.server.security.NonJavaKeyStoreImpl.updateKeyManagers(NonJavaKeyStoreImpl.java:271)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at org.apache.qpid.server.model.AbstractConfiguredObject.automatedSetValue(AbstractConfiguredObject.java:396)
              at org.apache.qpid.server.model.AbstractConfiguredObject.resolveAutomatedAttribute(AbstractConfiguredObject.java:874)
              at org.apache.qpid.server.model.AbstractConfiguredObject.onResolve(AbstractConfiguredObject.java:829)
              at org.apache.qpid.server.model.AbstractConfiguredObject.doResolution(AbstractConfiguredObject.java:689)
              at org.apache.qpid.server.model.AbstractConfiguredObject$5.performAction(AbstractConfiguredObject.java:701)
              at org.apache.qpid.server.model.AbstractConfiguredObject.applyToChildren(AbstractConfiguredObject.java:753)
              at org.apache.qpid.server.model.AbstractConfiguredObject.doResolution(AbstractConfiguredObject.java:691)
              at org.apache.qpid.server.model.AbstractConfiguredObject.open(AbstractConfiguredObject.java:437)
              at org.apache.qpid.server.model.AbstractSystemConfig.activate(AbstractSystemConfig.java:238)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at org.apache.qpid.server.model.AbstractConfiguredObject.attainState(AbstractConfiguredObject.java:910)
              at org.apache.qpid.server.model.AbstractConfiguredObject.doAttainState(AbstractConfiguredObject.java:626)
              at org.apache.qpid.server.model.AbstractConfiguredObject.open(AbstractConfiguredObject.java:440)
              at org.apache.qpid.server.Broker.startupImpl(Broker.java:193)
              at org.apache.qpid.server.Broker.access$000(Broker.java:53)
              at org.apache.qpid.server.Broker$1.run(Broker.java:139)
              at java.security.AccessController.doPrivileged(Native Method)
              at javax.security.auth.Subject.doAs(Subject.java:415)
              at org.apache.qpid.server.Broker.startup(Broker.java:134)
              at org.apache.qpid.server.Main.startBroker(Main.java:474)
              at org.apache.qpid.server.Main.execute(Main.java:315)
              at org.apache.qpid.server.Main.<init>(Main.java:148)
              at org.apache.qpid.server.Main.main(Main.java:139)
      

      Attachments

        Activity

          People

            kwall Keith Wall
            orudyy Alex Rudyy
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: