Skip to content

Commit

Permalink
取消默认openssl
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyiyue1102 committed Apr 6, 2023
1 parent dcb1017 commit 7c5890c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class TlsConfig {
/**
* ssl provider,default OPENSSL,JDK,OPENSSL_REFCNT.
*/
private String sslProvider = "OPENSSL";
private String sslProvider = "";

/**
* enable tls.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,10 @@ private Optional<SslContext> buildSslContext() {
}
try {
SslContextBuilder builder = GrpcSslContexts.forClient();
builder.sslProvider(TlsTypeResolve.getSslProvider(tlsConfig.getSslProvider()));
if (StringUtils.isNotBlank(tlsConfig.getSslProvider())) {
builder.sslProvider(TlsTypeResolve.getSslProvider(tlsConfig.getSslProvider()));
}

if (StringUtils.isNotBlank(tlsConfig.getProtocols())) {
builder.protocols(tlsConfig.getProtocols().split(","));
}
Expand Down

0 comments on commit 7c5890c

Please sign in to comment.