Uploaded image for project: 'HttpComponents HttpCore'
  1. HttpComponents HttpCore
  2. HTTPCORE-396

PrivateKeyStrategy does not work with async (NIO) components

    XMLWordPrintableJSON

Details

    Description

      I tried using httpclient-4.3.6's SSLContextBuilder to build a SSLContext, which I then fed to my AsyncHttpClient connection pool.

      It worked just fine for configuring the cipher suites, TLS/SSL protocols and trust stores, however it did not work for the key managers.

      The reason being that it did not implement a key manager that extended X509ExtendedKeyManager.
      As far as I saw the differences between the X509ExtendedKeyManager abstract class and X509KeyManager interface are:

      • X509ExtendedKeyManager (for async [and sync]) takes in SSLEngine as argument for its chooseEngineClientAlias method
      • X509KeyManager (for sync only) takes in Socket as argument for its chooseServerAlias method

      For the while being, I've copied and adjusted the SSLContextBuilder and PrivateKeyStrategy classes to suite my needs for a KeyManager implementation when going async. See the attached files for my copy.

      Attachments

        1. ApacheAsyncPrivateKeyStrategy.java
          2 kB
          Chris Kistner
        2. ApacheAsyncSSLContextBuilder.java
          10 kB
          Chris Kistner

        Activity

          People

            Unassigned Unassigned
            pada Chris Kistner
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: