private static void detectTlsEngineAndDumpOpenSslInfo() {

        final Boolean useOpenSsl = getUserValue(FlagsProvider::useOpenSsl, "useOpenSsl",
                                                ignored -> true);
        final TlsEngineType tlsEngineTypeValue = getUserValue(FlagsProvider::tlsEngineType,
                                                              "tlsEngineType", ignored -> true);

        if (useOpenSsl != null && (useOpenSsl != (tlsEngineTypeValue == TlsEngineType.OPENSSL))) {
            logger.warn("useOpenSsl({}) and tlsEngineType({}) are incompatible, tlsEngineType will be used",
                        useOpenSsl, tlsEngineTypeValue);
        }

        TlsEngineType preferredTlsEngineType = null;
        if (tlsEngineTypeValue != null) {
            preferredTlsEngineType = tlsEngineTypeValue;
        } else if (useOpenSsl != null) {
            preferredTlsEngineType = useOpenSsl ? TlsEngineType.OPENSSL : TlsEngineType.JDK;
        }
        if (preferredTlsEngineType == TlsEngineType.OPENSSL) {
            if (!OpenSsl.isAvailable()) {
                final Throwable cause = Exceptions.peel(OpenSsl.unavailabilityCause());
                logger.info("OpenSSL not available: {}", cause.toString());
                preferredTlsEngineType = TlsEngineType.JDK;
            }
        }
        if (preferredTlsEngineType == null) {
            preferredTlsEngineType = OpenSsl.isAvailable() ? TlsEngineType.OPENSSL : TlsEngineType.JDK;
        }
        tlsEngineType = preferredTlsEngineType;

        if (tlsEngineType != TlsEngineType.OPENSSL) {
            dumpOpenSslInfo = false;
            logger.info("Using TLS engine: {}", tlsEngineType);
            return;
        }

        logger.info("Using Tls engine: OpenSSL {}, 0x{}", OpenSsl.versionString(),
                    Long.toHexString(OpenSsl.version() & 0xFFFFFFFFL));
        dumpOpenSslInfo = getValue(FlagsProvider::dumpOpenSslInfo, "dumpOpenSslInfo");
        if (dumpOpenSslInfo) {
            final SSLEngine engine = SslContextUtil.createSslContext(
                    SslContextBuilder::forClient,
                    /* forceHttp1 */ false,
                    tlsEngineType,
                    /* tlsAllowUnsafeCiphers */ false,
                    null, null).newEngine(ByteBufAllocator.DEFAULT);
            logger.info("All available SSL protocols: {}",
                        ImmutableList.copyOf(engine.getSupportedProtocols()));
            logger.info("Default enabled SSL protocols: {}", SslContextUtil.DEFAULT_PROTOCOLS);
            ReferenceCountUtil.release(engine);
            logger.info("All available SSL ciphers: {}", OpenSsl.availableJavaCipherSuites());
            logger.info("Default enabled SSL ciphers: {}", SslContextUtil.DEFAULT_CIPHERS);
        }
    }
Returns the {@link TlsEngineType} that will be used for processing TLS connections.

<p>The default value of this flag is {@link TlsEngineType#OPENSSL}.
Specify the {@code -Dcom.linecorp.armeria.tlsEngineType=<jdk|openssl>} JVM option to override
the default value.
core/src/main/java/com/linecorp/armeria/common/Flags.java