public static SSLContext getUninitializedSSLContext() throws NoSuchAlgorithmException
    {
        final String protocol = SSLCONTEXT_PROTOCOL.getValue();
        if ( protocol == null ) {
            // Use the 'highest' available protocol from the default, which happens to coincide with alphabetic ordering: SSLv1 < TLSv1 < TLSv1.3
            final String defaultProtocol = Arrays.stream( SSLContext.getDefault().getDefaultSSLParameters().getProtocols() ).max( Comparator.naturalOrder() ).orElse( "TLSv1" );
            return SSLContext.getInstance( defaultProtocol ) ;
        } else {
            return SSLContext.getInstance( protocol );
        }
    }
Generates a new, uninitialized SSLContext instance.

The SSLContext will use the protocol as defined by {@link #SSLCONTEXT_PROTOCOL}, or,
if that's null, uses the best available protocol from the default configuration
of the JVM.

@return An uninitialized SSLContext (never null)
@throws NoSuchAlgorithmException if the protocol is not supported.
xmppserver/src/main/java/org/jivesoftware/openfire/spi/EncryptionArtifactFactory.java