private SSLFactory.Builder createSSLFactoryBuilder(final Settings settings) {
        final Settings.SslSettings sslSettings = settings.ssl;

        final SSLFactory.Builder builder = SSLFactory.builder();
        try {
            if (null != sslSettings.keyStore) {
                final String keyStoreType = null == sslSettings.keyStoreType ? KeyStore.getDefaultType() : sslSettings.keyStoreType;
                final char[] password = null == sslSettings.keyStorePassword ? null : sslSettings.keyStorePassword.toCharArray();
                try (final InputStream in = new FileInputStream(sslSettings.keyStore)) {
                    builder.withIdentityMaterial(in, password, keyStoreType);
                }
            } else {
                throw new IllegalStateException("keyStore must be configured when SSL is enabled.");
            }

            // Load custom truststore for client auth certs
            if (null != sslSettings.trustStore) {
                final String trustStoreType = null != sslSettings.trustStoreType ? sslSettings.trustStoreType
                    : sslSettings.keyStoreType != null ? sslSettings.keyStoreType : KeyStore.getDefaultType();
                final char[] password = null == sslSettings.trustStorePassword ? null : sslSettings.trustStorePassword.toCharArray();
                try (final InputStream in = new FileInputStream(sslSettings.trustStore)) {
                    builder.withTrustMaterial(in, password, trustStoreType);
                }
            }
        } catch (GenericSecurityException | IOException e) {
            logger.error(e.getMessage());
            throw new RuntimeException("There was an error enabling SSL.", e);
        }

        if (null != sslSettings.sslCipherSuites && !sslSettings.sslCipherSuites.isEmpty()) {
            builder.withCiphers(sslSettings.sslCipherSuites.toArray(new String[] {}));
        }

        if (null != sslSettings.sslEnabledProtocols && !sslSettings.sslEnabledProtocols.isEmpty()) {
            builder.withProtocols(sslSettings.sslEnabledProtocols.toArray(new String[] {}));
        }

        if (null != sslSettings.needClientAuth && ClientAuth.OPTIONAL == sslSettings.needClientAuth) {
            logger.warn("needClientAuth = OPTIONAL is not a secure configuration. Setting to REQUIRE.");
            sslSettings.needClientAuth = ClientAuth.REQUIRE;
        }

        if (sslSettings.needClientAuth == ClientAuth.REQUIRE) {
            builder.withNeedClientAuthentication(true);
        }

        return builder;
    }
It is best not to override this method as it sets up some core parts to the server. Prefer implementing the
{@link #configure(ChannelPipeline)} methods to alter the pipeline.
gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java