Skip to content

Commit

Permalink
Return ref to this in SimpleSslContextBuilder (#322)
Browse files Browse the repository at this point in the history
* Return ref to this in SimpleSslContextBuilder

* make netty-shaded api dependency
  • Loading branch information
vitarb authored Jan 27, 2021
1 parent b3797d6 commit 2d9ef36
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
3 changes: 1 addition & 2 deletions temporal-serviceclient/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ dependencies {
api group: 'com.google.protobuf', name: 'protobuf-java-util', version: '3.14.0'
api group: 'com.uber.m3', name: 'tally-core', version: '0.6.1'
api group: 'org.slf4j', name: 'slf4j-api', version: '1.7.30'

implementation 'io.grpc:grpc-netty-shaded:1.35.0'
api 'io.grpc:grpc-netty-shaded:1.35.0'
if (!JavaVersion.current().isJava8()) {
implementation 'javax.annotation:javax.annotation-api:1.3.2'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,23 +94,31 @@ public SslContext build() throws SSLException {
/**
* @param trustManager - custom trust manager that should be used with the SSLContext for
* verifying server CA authority.
* @return builder instance.
*/
public void setTrustManager(TrustManager trustManager) {
public SimpleSslContextBuilder setTrustManager(TrustManager trustManager) {
this.trustManager = trustManager;
return this;
}

/**
* @param useInsecureTrustManager - if set to true then insecure trust manager is going to be used
* instead of the system default one. Note that this makes client vulnerable to man in the
* middle attack. Use with caution.
* @return builder instance.
*/
public void setUseInsecureTrustManager(boolean useInsecureTrustManager) {
public SimpleSslContextBuilder setUseInsecureTrustManager(boolean useInsecureTrustManager) {
this.useInsecureTrustManager = useInsecureTrustManager;
return this;
}

/** @param keyPassword - the password of the key, or null if it's not password-protected. */
public void setKeyPassword(String keyPassword) {
/**
* @param keyPassword - the password of the key, or null if it's not password-protected.
* @return builder instance.
*/
public SimpleSslContextBuilder setKeyPassword(String keyPassword) {
this.keyPassword = keyPassword;
return this;
}

/**
Expand Down

0 comments on commit 2d9ef36

Please sign in to comment.