HTHou commented on code in PR #1462:
URL: https://github.com/apache/ratis/pull/1462#discussion_r3279121084


##########
ratis-grpc/src/main/java/org/apache/ratis/grpc/GrpcConfigKeys.java:
##########
@@ -87,6 +91,73 @@ static GrpcTlsConfig conf(Parameters parameters) {
     static void setConf(Parameters parameters, GrpcTlsConfig conf) {
       parameters.put(CONF_PARAMETER, conf, GrpcTlsConfig.class);
     }
+
+    String SSL_PROVIDER_KEY = PREFIX + ".ssl.provider";
+    SslProvider SSL_PROVIDER_DEFAULT = null;
+    static SslProvider sslProvider(RaftProperties properties) {
+      return properties.getEnum(SSL_PROVIDER_KEY, SslProvider.class, 
SSL_PROVIDER_DEFAULT);
+    }
+    static void setSslProvider(RaftProperties properties, SslProvider 
provider) {
+      properties.setEnum(SSL_PROVIDER_KEY, provider);
+    }
+
+    String JSSE_PROVIDER_NAME_KEY = PREFIX + ".jsse.provider.name";
+    String JSSE_PROVIDER_NAME_DEFAULT = null;
+    static String jsseProviderName(RaftProperties properties) {
+      return properties.get(JSSE_PROVIDER_NAME_KEY, 
JSSE_PROVIDER_NAME_DEFAULT);
+    }
+    static void setJsseProviderName(RaftProperties properties, String name) {
+      properties.set(JSSE_PROVIDER_NAME_KEY, name);
+    }
+
+    String PROTOCOLS_KEY = PREFIX + ".protocols";
+    String[] PROTOCOLS_DEFAULT = StringUtils.EMPTY_STRING_ARRAY;
+    static String[] protocols(RaftProperties properties) {
+      return StringUtils.getTrimmedStrings(properties.get(PROTOCOLS_KEY, 
null));
+    }
+    static void setProtocols(RaftProperties properties, String... protocols) {
+      properties.set(PROTOCOLS_KEY, String.join(",", protocols));
+    }
+
+    String CIPHER_SUITES_KEY = PREFIX + ".cipher.suites";
+    String[] CIPHER_SUITES_DEFAULT = StringUtils.EMPTY_STRING_ARRAY;

Review Comment:
   Thanks for the review. Addressed in 900b8776 by removing the new 
RaftProperties TLS options and using the GrpcTlsConfig objects from Parameters 
directly.



##########
ratis-grpc/src/main/java/org/apache/ratis/grpc/GrpcTlsConfig.java:
##########
@@ -34,6 +36,10 @@
  */
 public class GrpcTlsConfig extends TlsConf {
   private final boolean fileBasedConfig;
+  private final SslProvider sslProvider;
+  private final String jsseProviderName;
+  private final String[] protocols;
+  private final String[] cipherSuites;

Review Comment:
   Done in 900b8776. protocols and cipherSuites now use unmodifiable 
List<String> values, while the builder still keeps the varargs setters for 
convenience.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to