public SslContextBuilder withKeyStore(List<X509CertificateWithKey> clientCertificatesAndKeys) {
        if (clientCertificatesAndKeys.isEmpty()) {
            throw new IllegalArgumentException("clientCertificatesAndKeys cannot be empty");
        }
        this.keyStoreSupplier = () -> {
            KeyStoreBuilder keyStore = KeyStoreBuilder.withType(KeyStoreType.JKS);
            for (int i = 0; i < clientCertificatesAndKeys.size(); i++) {
                X509CertificateWithKey certWithKey = clientCertificatesAndKeys.get(i);
                keyStore = keyStore.withKeyEntry("key"+i, certWithKey.privateKey(), certWithKey.certificateWithIntermediates());
            }
            return keyStore.build();
        };
        this.keyStorePassword = new char[0];
        return this;
    }
A builder for {@link SSLContext}.

@author bjorncs
security-utils/src/main/java/com/yahoo/security/SslContextBuilder.java