diff --git a/native/src/main/java/io/ballerina/stdlib/http/transport/contractimpl/common/ssl/SSLHandlerFactory.java b/native/src/main/java/io/ballerina/stdlib/http/transport/contractimpl/common/ssl/SSLHandlerFactory.java index b04607e8fc..921d9f9988 100644 --- a/native/src/main/java/io/ballerina/stdlib/http/transport/contractimpl/common/ssl/SSLHandlerFactory.java +++ b/native/src/main/java/io/ballerina/stdlib/http/transport/contractimpl/common/ssl/SSLHandlerFactory.java @@ -353,6 +353,9 @@ public SslContext createHttp2TLSContextForClient(boolean enableOcsp) throws SSLE } else { sslContextBuilder = clientContextBuilderWithCerts(provider); } + if (sslConfig.getClientKeyFile() != null) { + sslContextBuilder = clientContextBuilderWithCerts(provider); + } setCiphers(sslContextBuilder, ciphers); setSslProtocol(sslContextBuilder); setAlpnConfigs(sslContextBuilder);