dsoumis commented on code in PR #1098:
URL: https://github.com/apache/tomcat/pull/1098#discussion_r4402557877
##########
java/org/apache/tomcat/util/net/jsse/JSSESSLContext.java:
##########
@@ -89,6 +90,22 @@ public X509Certificate[] getCertificateChain(String alias) {
return result;
}
+
+ @Override
+ public String getServedAlias(SSLHostConfigCertificate certificate) {
+ if (kms != null) {
+ for (KeyManager km : kms) {
+ if (km instanceof X509KeyManager x509KeyManager) {
+ String alias =
certificate.chooseServerAlias(x509KeyManager);
+ if (alias != null) {
+ return alias;
+ }
+ }
+ }
+ }
+ return SSLContext.super.getServedAlias(certificate);
+ }
+
Review Comment:
OpenSSL and Panama don't need this since the in memory store hols only the
resolved alias and can't load non-exportable keys.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]