private SslContextHolder create(CacheKey key) {
        final MeterIdPrefix meterIdPrefix = meterIdPrefix(key.mode);
        final SslContext sslContext = newSslContext(key);
        final ImmutableList.Builder<X509Certificate> builder = ImmutableList.builder();
        if (key.tlsKeyPair != null) {
            builder.addAll(key.tlsKeyPair.certificateChain());
        }
        if (!key.trustedCertificates.isEmpty()) {
            builder.addAll(key.trustedCertificates);
        }
        final List<X509Certificate> certs = builder.build();
        CloseableMeterBinder meterBinder = null;
        if (!certs.isEmpty()) {
            meterBinder = MoreMeterBinders.certificateMetrics(certs, meterIdPrefix);
            meterBinder.bindTo(meterRegistry);
        }
        return new SslContextHolder(sslContext, meterBinder);
    }
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