public SslContext getOrCreate(SslContextMode mode, String hostname) {
        lock.lock();
        try {
            final TlsKeyPair tlsKeyPair = findTlsKeyPair(mode, hostname);
            final List<X509Certificate> trustedCertificates = findTrustedCertificates(hostname);
            final CacheKey cacheKey = new CacheKey(mode, tlsKeyPair, trustedCertificates);
            final SslContextHolder contextHolder = cache.computeIfAbsent(cacheKey, this::create);
            contextHolder.retain();
            reverseCache.putIfAbsent(contextHolder.sslContext(), cacheKey);
            return contextHolder.sslContext();
        } finally {
            lock.unlock();
        }
    }
Returns an {@link SslContext} for the specified {@link SslContextMode} and {@link TlsKeyPair}.
Note that the returned {@link SslContext} should be released via
{@link ReferenceCountUtil#release(Object)} when it is no longer used.
core/src/main/java/com/linecorp/armeria/internal/common/SslContextFactory.java