@@ -54,50 +54,29 @@ static Consumer<String> getDefaultLog() {
5454 interface TLS {
5555 String PREFIX = GrpcConfigKeys .PREFIX + ".tls" ;
5656
57- String ENABLED_KEY = PREFIX + ".enabled" ;
58- boolean ENABLED_DEFAULT = false ;
59- static boolean enabled (RaftProperties properties ) {
60- return getBoolean (properties ::getBoolean , ENABLED_KEY , ENABLED_DEFAULT , getDefaultLog ());
61- }
57+ @ Deprecated
6258 static void setEnabled (RaftProperties properties , boolean enabled ) {
63- setBoolean ( properties :: setBoolean , ENABLED_KEY , enabled );
59+ LOG . warn ( "This method has no effect. Use setConf(Parameters, GrpcTlsConfig) instead." );
6460 }
6561
66- String MUTUAL_AUTHN_ENABLED_KEY = PREFIX + ".mutual_authn.enabled" ;
67- boolean MUTUAL_AUTHN_ENABLED_DEFAULT = false ;
68- static boolean mutualAuthnEnabled (RaftProperties properties ) {
69- return getBoolean (properties ::getBoolean ,
70- MUTUAL_AUTHN_ENABLED_KEY , MUTUAL_AUTHN_ENABLED_DEFAULT , getDefaultLog ());
71- }
62+ @ Deprecated
7263 static void setMutualAuthnEnabled (RaftProperties properties , boolean mutualAuthnEnabled ) {
73- setBoolean ( properties :: setBoolean , MUTUAL_AUTHN_ENABLED_KEY , mutualAuthnEnabled );
64+ LOG . warn ( "This method has no effect. Use setConf(Parameters, GrpcTlsConfig) instead." );
7465 }
7566
76- String PRIVATE_KEY_FILE_NAME_KEY = PREFIX + ".private.key.file.name" ;
77- String PRIVATE_KEY_FILE_NAME_DEFAULT = "private.pem" ;
78- static String privateKeyFileName (RaftProperties properties ) {
79- return get (properties ::get , PRIVATE_KEY_FILE_NAME_KEY , PRIVATE_KEY_FILE_NAME_DEFAULT , getDefaultLog ());
80- }
67+ @ Deprecated
8168 static void setPrivateKeyFileName (RaftProperties properties , String privateKeyFileName ) {
82- set ( properties :: set , PRIVATE_KEY_FILE_NAME_KEY , privateKeyFileName );
69+ LOG . warn ( "This method has no effect. Use setConf(Parameters, GrpcTlsConfig) instead." );
8370 }
8471
85- String CERT_CHAIN_FILE_NAME_KEY = PREFIX + ".cert.chain.file.name" ;
86- String CERT_CHAIN_FILE_NAME_DEFAULT = "certificate.crt" ;
87- static String certChainFileName (RaftProperties properties ) {
88- return get (properties ::get , CERT_CHAIN_FILE_NAME_KEY , CERT_CHAIN_FILE_NAME_DEFAULT , getDefaultLog ());
89- }
72+ @ Deprecated
9073 static void setCertChainFileName (RaftProperties properties , String certChainFileName ) {
91- set ( properties :: set , CERT_CHAIN_FILE_NAME_KEY , certChainFileName );
74+ LOG . warn ( "This method has no effect. Use setConf(Parameters, GrpcTlsConfig) instead." );
9275 }
9376
94- String TRUST_STORE_KEY = PREFIX + ".trust.store" ;
95- String TRUST_STORE_DEFAULT = "ca.crt" ;
96- static String trustStore (RaftProperties properties ) {
97- return get (properties ::get , TRUST_STORE_KEY , TRUST_STORE_DEFAULT , getDefaultLog ());
98- }
77+ @ Deprecated
9978 static void setTrustStore (RaftProperties properties , String trustStore ) {
100- set ( properties :: set , TRUST_STORE_KEY , trustStore );
79+ LOG . warn ( "This method has no effect. Use setConf(Parameters, GrpcTlsConfig) instead." );
10180 }
10281
10382 String CONF_PARAMETER = PREFIX + ".conf" ;
0 commit comments