SSLUtils (Apache CXF JavaDoc 3.6.11 API)

Package org.apache.cxf.configuration.jsse

## Class SSLUtils

- java.lang.Object
- - org.apache.cxf.configuration.jsse.SSLUtils

-     public final class SSLUtils
      extends Object

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

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static String[]` | `getCiphersuitesToInclude​(List<String> cipherSuitesList, org.apache.cxf.configuration.security.FiltersType filters, String[] defaultCipherSuites, String[] supportedCipherSuites, Logger log)` |
    `static KeyManager[]` | `getDefaultKeyStoreManagers​(Logger log)` |
    `static TrustManager[]` | `getDefaultTrustStoreManagers​(Logger log)` |
    `static String[]` | `getFilteredCiphersuites​(org.apache.cxf.configuration.security.FiltersType filters, String[] supportedCipherSuites, Logger log, boolean exclude)` |
    `static String` | `getKeyPassword​(String keyPassword, Logger log)` |
    `static String` | `getKeystore​(String keyStoreLocation, Logger log)` |
    `static String` | `getKeystoreAlgorithm​(String keyStoreMgrFactoryAlgorithm, Logger log)` |
    `static String` | `getKeystorePassword​(String keyStorePassword, Logger log)` |
    `static String` | `getKeystoreProvider​(String keyStoreProvider, Logger log)` |
    `static String` | `getKeystoreType​(String keyStoreType, Logger log)` |
    `static String` | `getKeystoreType​(String keyStoreType, Logger log, String def)` |
    `static String[]` | `getServerSupportedCipherSuites​(SSLContext context)` |
    `static SSLContext` | `getSSLContext​(String protocol, KeyManager[] keyStoreManagers, TrustManager[] trustStoreManagers)` |
    `static String[]` | `getSupportedCipherSuites​(SSLContext context)` |
    `static String` | `getTruststore​(String trustStoreLocation, Logger log)` |
    `static String` | `getTrustStoreAlgorithm​(String trustStoreMgrFactoryAlgorithm, Logger log)` |
    `static String` | `getTruststorePassword​(String trustStorePassword, Logger log)` |
    `static String` | `getTruststoreProvider​(String trustStoreProvider, Logger log)` |
    `static String` | `getTrustStoreType​(String trustStoreType, Logger log)` |
    `static String` | `getTrustStoreType​(String trustStoreType, Logger log, String def)` |
    `protected static byte[]` | `loadFile​(String fileName)` |
    `static KeyManager[]` | `loadKeyStore​(KeyManagerFactory kmf, KeyStore ks, InputStream is, String keyStoreLocation, String keyStorePassword, Logger log)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getDefaultKeyStoreManagers

          public static KeyManager[] getDefaultKeyStoreManagers​(Logger log)

    - #### getDefaultTrustStoreManagers

          public static TrustManager[] getDefaultTrustStoreManagers​(Logger log)

    - #### loadKeyStore

          public static KeyManager[] loadKeyStore​(KeyManagerFactory kmf,
                                                  KeyStore ks,
                                                  InputStream is,
                                                  String keyStoreLocation,
                                                  String keyStorePassword,
                                                  Logger log)

    - #### loadFile

          protected static byte[] loadFile​(String fileName)
                                    throws IOException

      Throws:
        `IOException`

    - #### getKeystore

          public static String getKeystore​(String keyStoreLocation,
                                           Logger log)

    - #### getKeystoreType

          public static String getKeystoreType​(String keyStoreType,
                                               Logger log)

    - #### getKeystoreType

          public static String getKeystoreType​(String keyStoreType,
                                               Logger log,
                                               String def)

    - #### getKeystoreProvider

          public static String getKeystoreProvider​(String keyStoreProvider,
                                                   Logger log)

    - #### getKeystorePassword

          public static String getKeystorePassword​(String keyStorePassword,
                                                   Logger log)

    - #### getKeyPassword

          public static String getKeyPassword​(String keyPassword,
                                              Logger log)

    - #### getKeystoreAlgorithm

          public static String getKeystoreAlgorithm​(String keyStoreMgrFactoryAlgorithm,
                                                    Logger log)

    - #### getTrustStoreAlgorithm

          public static String getTrustStoreAlgorithm​(String trustStoreMgrFactoryAlgorithm,
                                                      Logger log)

    - #### getSSLContext

          public static SSLContext getSSLContext​(String protocol,
                                                 KeyManager[] keyStoreManagers,
                                                 TrustManager[] trustStoreManagers)
                                          throws NoSuchAlgorithmException,
                                                 KeyManagementException

      Throws:
        `NoSuchAlgorithmException`
        `KeyManagementException`

    - #### getSupportedCipherSuites

          public static String[] getSupportedCipherSuites​(SSLContext context)

    - #### getServerSupportedCipherSuites

          public static String[] getServerSupportedCipherSuites​(SSLContext context)

    - #### getCiphersuitesToInclude

          public static String[] getCiphersuitesToInclude​(List<String> cipherSuitesList,
                                                          org.apache.cxf.configuration.security.FiltersType filters,
                                                          String[] defaultCipherSuites,
                                                          String[] supportedCipherSuites,
                                                          Logger log)

    - #### getFilteredCiphersuites

          public static String[] getFilteredCiphersuites​(org.apache.cxf.configuration.security.FiltersType filters,
                                                         String[] supportedCipherSuites,
                                                         Logger log,
                                                         boolean exclude)

    - #### getTruststore

          public static String getTruststore​(String trustStoreLocation,
                                             Logger log)

    - #### getTrustStoreType

          public static String getTrustStoreType​(String trustStoreType,
                                                 Logger log)

    - #### getTrustStoreType

          public static String getTrustStoreType​(String trustStoreType,
                                                 Logger log,
                                                 String def)

    - #### getTruststorePassword

          public static String getTruststorePassword​(String trustStorePassword,
                                                     Logger log)

    - #### getTruststoreProvider

          public static String getTruststoreProvider​(String trustStoreProvider,
                                                     Logger log)