Skip to content

Commit e94c54d

Browse files
committed
Updated constant and usage details
1 parent 771d323 commit e94c54d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clients/src/main/java/org/apache/kafka/common/config/SslConfigs.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ public class SslConfigs {
9090
+ "This is optional for client and can be used for two-way authentication for client.";
9191

9292
public static final String SSL_KEYSTORE_ALIAS_CONFIG = "ssl.keystore.alias";
93-
public static final String SSL_KEYSTORE_ALIAS_DOC = "The Alias of key in the key store file. "
94-
+ "This is optional for client and can be used for two-way authentication for client.";
93+
public static final String SSL_KEYSTORE_ALIAS_DOC = "This is config is used to pick named alias from the keystore to build the SSL engine and authenticate the client with broker. " +
94+
"This is an optional config and used only when you have multiple keys in the keystore and you need to control which key needs to be presented to server.";
9595

9696

9797
public static final String SSL_KEYSTORE_PASSWORD_CONFIG = "ssl.keystore.password";

clients/src/main/java/org/apache/kafka/common/security/ssl/DefaultSslEngineFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ private SSLContext createSSLContext(SecurityStore keystore, SecurityStore trusts
286286
String tmfAlgorithm = this.tmfAlgorithm != null ? this.tmfAlgorithm : TrustManagerFactory.getDefaultAlgorithm();
287287
TrustManager[] trustManagers = getTrustManagers(truststore, tmfAlgorithm);
288288

289-
sslContext.init(applyAliasToKM(keyManagers, (String)configs.get("ssl.keystore.alias")), trustManagers, this.secureRandomImplementation);
289+
sslContext.init(applyAliasToKM(keyManagers, (String)configs.get(SslConfigs.SSL_KEYSTORE_ALIAS_CONFIG)), trustManagers, this.secureRandomImplementation);
290290
log.debug("Created SSL context with keystore {}, truststore {}, provider {}.",
291291
keystore, truststore, sslContext.getProvider().getName());
292292
return sslContext;

0 commit comments

Comments
 (0)