org.apache.cxf.transport.https
Class SSLUtils

java.lang.Object
  extended by org.apache.cxf.transport.https.SSLUtils

public final class SSLUtils
extends java.lang.Object

Holder for utility methods related to manipulating SSL settings, common to the connection and listener factories (previously duplicated).


Method Summary
static java.lang.String[] getCiphersuites(java.util.List<java.lang.String> cipherSuitesList, java.lang.String[] supportedCipherSuites, FiltersType filters, java.util.logging.Logger log, boolean exclude)
           
static java.lang.String getKeyPassword(java.lang.String keyPassword, java.util.logging.Logger log)
           
static java.lang.String getKeystore(java.lang.String keyStoreLocation, java.util.logging.Logger log)
           
static java.lang.String getKeystoreAlgorithm(java.lang.String keyStoreMgrFactoryAlgorithm, java.util.logging.Logger log)
           
static javax.net.ssl.KeyManager[] getKeyStoreManagers(java.lang.String keyStoreLocation, java.lang.String keyStoreType, java.lang.String keyStorePassword, java.lang.String keyPassword, java.lang.String keyStoreMgrFactoryAlgorithm, java.lang.String secureSocketProtocol, java.util.logging.Logger log)
           
static java.lang.String getKeystorePassword(java.lang.String keyStorePassword, java.util.logging.Logger log)
           
static java.lang.String getKeystoreType(java.lang.String keyStoreType, java.util.logging.Logger log)
           
static boolean getRequireClientAuthentication(boolean isSetRequireClientAuthentication, java.lang.Boolean isRequireClientAuthentication, java.util.logging.Logger log)
           
static java.lang.String getSecureSocketProtocol(java.lang.String secureSocketProtocol, java.util.logging.Logger log)
           
static java.lang.String[] getServerSupportedCipherSuites(javax.net.ssl.SSLContext context)
           
static javax.net.ssl.SSLContext getSSLContext(java.lang.String protocol, javax.net.ssl.KeyManager[] keyStoreManagers, javax.net.ssl.TrustManager[] trustStoreManagers)
           
static java.lang.String[] getSupportedCipherSuites(javax.net.ssl.SSLContext context)
           
static java.lang.String getTrustStore(java.lang.String trustStoreLocation, java.util.logging.Logger log)
           
static java.lang.String getTrustStoreAlgorithm(java.lang.String trustStoreMgrFactoryAlgorithm, java.util.logging.Logger log)
           
static javax.net.ssl.TrustManager[] getTrustStoreManagers(boolean pkcs12, java.lang.String trustStoreType, java.lang.String trustStoreLocation, java.lang.String trustStoreMgrFactoryAlgorithm, java.util.logging.Logger log)
           
static java.lang.String getTrustStoreType(java.lang.String trustStoreType, java.util.logging.Logger log)
           
static boolean getWantClientAuthentication(boolean isSetWantClientAuthentication, java.lang.Boolean isWantClientAuthentication, java.util.logging.Logger log)
           
protected static byte[] loadCACert(java.lang.String fileName)
           
protected static byte[] loadClientCredential(java.lang.String fileName)
           
static javax.net.ssl.KeyManager[] loadKeyStore(javax.net.ssl.KeyManagerFactory kmf, java.security.KeyStore ks, java.io.ByteArrayInputStream bin, java.lang.String keyStoreLocation, java.lang.String keyStorePassword, java.util.logging.Logger log)
           
static void logUnSupportedPolicies(java.lang.Object policy, boolean client, java.lang.String[] unsupported, java.util.logging.Logger log)
           
static void propogateSecureSession(javax.servlet.http.HttpServletRequest request, Message message)
          Propogate in the message a TLSSessionInfo instance representative of the TLS-specific information in the HTTP request.
static boolean testAllDataHasSetupMethod(java.lang.Object policy, java.lang.String[] unsupported, java.lang.String[] derivative)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getKeyStoreManagers

public static javax.net.ssl.KeyManager[] getKeyStoreManagers(java.lang.String keyStoreLocation,
                                                             java.lang.String keyStoreType,
                                                             java.lang.String keyStorePassword,
                                                             java.lang.String keyPassword,
                                                             java.lang.String keyStoreMgrFactoryAlgorithm,
                                                             java.lang.String secureSocketProtocol,
                                                             java.util.logging.Logger log)
                                                      throws java.lang.Exception
Throws:
java.lang.Exception

loadKeyStore

public static javax.net.ssl.KeyManager[] loadKeyStore(javax.net.ssl.KeyManagerFactory kmf,
                                                      java.security.KeyStore ks,
                                                      java.io.ByteArrayInputStream bin,
                                                      java.lang.String keyStoreLocation,
                                                      java.lang.String keyStorePassword,
                                                      java.util.logging.Logger log)

getTrustStoreManagers

public static javax.net.ssl.TrustManager[] getTrustStoreManagers(boolean pkcs12,
                                                                 java.lang.String trustStoreType,
                                                                 java.lang.String trustStoreLocation,
                                                                 java.lang.String trustStoreMgrFactoryAlgorithm,
                                                                 java.util.logging.Logger log)
                                                          throws java.lang.Exception
Throws:
java.lang.Exception

loadClientCredential

protected static byte[] loadClientCredential(java.lang.String fileName)
                                      throws java.io.IOException
Throws:
java.io.IOException

loadCACert

protected static byte[] loadCACert(java.lang.String fileName)
                            throws java.io.IOException
Throws:
java.io.IOException

getKeystore

public static java.lang.String getKeystore(java.lang.String keyStoreLocation,
                                           java.util.logging.Logger log)

getKeystoreType

public static java.lang.String getKeystoreType(java.lang.String keyStoreType,
                                               java.util.logging.Logger log)

getKeystorePassword

public static java.lang.String getKeystorePassword(java.lang.String keyStorePassword,
                                                   java.util.logging.Logger log)

getKeyPassword

public static java.lang.String getKeyPassword(java.lang.String keyPassword,
                                              java.util.logging.Logger log)

getKeystoreAlgorithm

public static java.lang.String getKeystoreAlgorithm(java.lang.String keyStoreMgrFactoryAlgorithm,
                                                    java.util.logging.Logger log)

getTrustStoreAlgorithm

public static java.lang.String getTrustStoreAlgorithm(java.lang.String trustStoreMgrFactoryAlgorithm,
                                                      java.util.logging.Logger log)

getSSLContext

public static javax.net.ssl.SSLContext getSSLContext(java.lang.String protocol,
                                                     javax.net.ssl.KeyManager[] keyStoreManagers,
                                                     javax.net.ssl.TrustManager[] trustStoreManagers)
                                              throws java.security.NoSuchAlgorithmException,
                                                     java.security.KeyManagementException
Throws:
java.security.NoSuchAlgorithmException
java.security.KeyManagementException

getSupportedCipherSuites

public static java.lang.String[] getSupportedCipherSuites(javax.net.ssl.SSLContext context)

getServerSupportedCipherSuites

public static java.lang.String[] getServerSupportedCipherSuites(javax.net.ssl.SSLContext context)

getCiphersuites

public static java.lang.String[] getCiphersuites(java.util.List<java.lang.String> cipherSuitesList,
                                                 java.lang.String[] supportedCipherSuites,
                                                 FiltersType filters,
                                                 java.util.logging.Logger log,
                                                 boolean exclude)

getTrustStore

public static java.lang.String getTrustStore(java.lang.String trustStoreLocation,
                                             java.util.logging.Logger log)

getTrustStoreType

public static java.lang.String getTrustStoreType(java.lang.String trustStoreType,
                                                 java.util.logging.Logger log)

getSecureSocketProtocol

public static java.lang.String getSecureSocketProtocol(java.lang.String secureSocketProtocol,
                                                       java.util.logging.Logger log)

getRequireClientAuthentication

public static boolean getRequireClientAuthentication(boolean isSetRequireClientAuthentication,
                                                     java.lang.Boolean isRequireClientAuthentication,
                                                     java.util.logging.Logger log)

getWantClientAuthentication

public static boolean getWantClientAuthentication(boolean isSetWantClientAuthentication,
                                                  java.lang.Boolean isWantClientAuthentication,
                                                  java.util.logging.Logger log)

propogateSecureSession

public static void propogateSecureSession(javax.servlet.http.HttpServletRequest request,
                                          Message message)
Propogate in the message a TLSSessionInfo instance representative of the TLS-specific information in the HTTP request.

Parameters:
req - the Jetty request
message - the Message

logUnSupportedPolicies

public static void logUnSupportedPolicies(java.lang.Object policy,
                                          boolean client,
                                          java.lang.String[] unsupported,
                                          java.util.logging.Logger log)

testAllDataHasSetupMethod

public static boolean testAllDataHasSetupMethod(java.lang.Object policy,
                                                java.lang.String[] unsupported,
                                                java.lang.String[] derivative)


Apache CXF