protected void configureSsl ( SslContextFactory factory , Ssl ssl , SslStoreProvider sslStoreProvider ) { factory . setProtocol ( ssl . getProtocol ( ) ) ; configureSslClientAuth ( factory , ssl ) ; configureSslPasswords ( factory , ssl ) ; factory . setCertAlias ( ssl . getKeyAlias ( ) ) ; if ( ! ObjectUtils . isEmpty ( ssl . getCiphers ( ) ) ) { factory . setIncludeCipherSuites ( ssl . getCiphers ( ) ) ; factory . setExcludeCipherSuites ( ) ; } if ( ssl . getEnabledProtocols ( ) != null ) { factory . setIncludeProtocols ( ssl . getEnabledProtocols ( ) ) ; } if ( sslStoreProvider != null ) { try { factory . setKeyStore ( sslStoreProvider . getKeyStore ( ) ) ; factory . setTrustStore ( sslStoreProvider . getTrustStore ( ) ) ; } catch ( Exception ex ) { throw new IllegalStateException ( "Unable to set SSL store" , ex ) ; } } else { configureSslKeyStore ( factory , ssl ) ; configureSslTrustStore ( factory , ssl ) ; } }
Configure the SSL connection .