Skip to content

Commit

Permalink
Remove options to set KeyManager and TrustManager algorithms
Browse files Browse the repository at this point in the history
  • Loading branch information
sazzad16 committed Nov 25, 2024
1 parent 884c4a5 commit 4e0173c
Showing 1 changed file with 3 additions and 29 deletions.
32 changes: 3 additions & 29 deletions src/main/java/redis/clients/jedis/SslOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ public class SslOptions {

private static final Logger logger = LoggerFactory.getLogger(SslOptions.class);

private final String keyManagerAlgorithm;
private final String keyManagerAlgorithm = KeyManagerFactory.getDefaultAlgorithm();
//private final String keyManagerAlgorithm = TrustManagerFactory.getDefaultAlgorithm(); // Lettuce

private final String trustManagerAlgorithm;
private final String trustManagerAlgorithm = TrustManagerFactory.getDefaultAlgorithm();

private final String keyStoreType;

Expand All @@ -77,8 +78,6 @@ public class SslOptions {
private final String sslContextProtocol;

private SslOptions(Builder builder) {
this.keyManagerAlgorithm = builder.keyManagerAlgorithm;
this.trustManagerAlgorithm = builder.trustManagerAlgorithm;
this.keyStoreType = builder.keyStoreType;
this.trustStoreType = builder.trustStoreType;
this.keystoreResource = builder.keystoreResource;
Expand All @@ -104,11 +103,6 @@ public static SslOptions.Builder builder() {
*/
public static class Builder {

private String keyManagerAlgorithm = KeyManagerFactory.getDefaultAlgorithm();
//private String keyManagerAlgorithm = TrustManagerFactory.getDefaultAlgorithm(); // Lettuce

private String trustManagerAlgorithm = TrustManagerFactory.getDefaultAlgorithm();

private String keyStoreType;

private String trustStoreType;
Expand All @@ -130,26 +124,6 @@ public static class Builder {
private Builder() {
}

public Builder keyManagerAlgorithm(String keyManagerAlgorithm) {
this.keyManagerAlgorithm = Objects.requireNonNull(keyManagerAlgorithm, "KeyManagerAlgorithm must not be null");
return this;
}

public Builder systemDefaultKeyManager() {
this.keyManagerAlgorithm = null;
return this;
}

public Builder trustManagerAlgorithm(String trustManagerAlgorithm) {
this.trustManagerAlgorithm = Objects.requireNonNull(trustManagerAlgorithm, "TrustManagerAlgorithm must not be null");
return this;
}

public Builder systemDefaultTrustManager() {
this.trustManagerAlgorithm = null;
return this;
}

/**
* Sets the KeyStore type. Defaults to {@link KeyStore#getDefaultType()} if not set.
*
Expand Down

0 comments on commit 4e0173c

Please sign in to comment.