public static TlsKeyPair of(InputStream keyInputStream, @Nullable String keyPassword,
                                InputStream certificateChainInputStream) {
        requireNonNull(keyInputStream, "keyInputStream");
        requireNonNull(certificateChainInputStream, "certificateChainInputStream");
        try {
            final List<X509Certificate> certs = toX509Certificates(certificateChainInputStream);
            final PrivateKey key = toPrivateKey(keyInputStream, keyPassword);
            return of(key, certs);
        } catch (CertificateException | KeyException e) {
            throw new IllegalArgumentException(e);
        }
    }
Creates a new {@link TlsKeyPair} from the specified key {@link InputStream}, key password
{@link InputStream} and certificate chain {@link InputStream}.
core/src/main/java/com/linecorp/armeria/common/TlsKeyPair.java