Skip to content

Commit

Permalink
feat: correct behaviour for ssl private key password
Browse files Browse the repository at this point in the history
  • Loading branch information
sunng87 committed Mar 5, 2024
1 parent 9ad6fc0 commit ca530f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ingester-grpc/src/main/java/io/greptime/rpc/GrpcClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -552,10 +552,10 @@ private SslContext newSslContext(TlsOptions tlsOptions) {

if (tlsOptions.getClientCertChain().isPresent() && tlsOptions.getPrivateKey().isPresent()) {
if (tlsOptions.getPrivateKeyPassword().isPresent()) {
builder.keyManager(tlsOptions.getClientCertChain().get(), tlsOptions.getPrivateKey().get());
} else {
builder.keyManager(tlsOptions.getClientCertChain().get(), tlsOptions.getPrivateKey().get(),
tlsOptions.getPrivateKeyPassword().get());
} else {
builder.keyManager(tlsOptions.getClientCertChain().get(), tlsOptions.getPrivateKey().get());
}
}

Expand Down

0 comments on commit ca530f3

Please sign in to comment.