public SSLEngine createClientModeSSLEngine() throws UnrecoverableKeyException, NoSuchAlgorithmException, KeyStoreException, KeyManagementException
    {
        final SSLEngine sslEngine = createSSLEngine();
        sslEngine.setUseClientMode( true );
        final Set<String> protocols = new LinkedHashSet<>( Arrays.asList( sslEngine.getEnabledProtocols() ) );
        protocols.remove( "SSLv2Hello" );
        sslEngine.setEnabledProtocols( protocols.toArray( new String[ protocols.size() ] ) );

        return sslEngine;
    }
Creates an SSL Engine that is configured to use client mode when handshaking.

For Openfire, an engine of this mode is typically used when the server tries to connect to another server.

These SSLEngines never send SSLV2 ClientHello messages.

@return An initialized SSLEngine instance (never null).
@throws UnrecoverableKeyException if the key could not be recovered
@throws NoSuchAlgorithmException if the algorithm is not supported
@throws KeyStoreException if there was a problem accessing the keystore
@throws KeyManagementException if there was problem manging the ket
xmppserver/src/main/java/org/jivesoftware/openfire/spi/EncryptionArtifactFactory.java