8312383: Log X509ExtendedKeyManager implementation class name in TLS/SSL connection

Reviewed-by: coffeys
This commit is contained in:
Prajwal Kumaraswamy 2024-03-08 09:04:16 +00:00 committed by Sean Coffey
parent fb4610e6b7
commit bdd1aebea3

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -201,6 +201,10 @@ enum X509Authentication implements SSLAuthentication {
private static SSLPossession createClientPossession(
ClientHandshakeContext chc, String[] keyTypes) {
X509ExtendedKeyManager km = chc.sslContext.getX509KeyManager();
if (SSLLogger.isOn && SSLLogger.isOn("ssl")) {
SSLLogger.finest("X509KeyManager class: " +
km.getClass().getName());
}
String clientAlias = null;
if (chc.conContext.transport instanceof SSLSocketImpl socket) {
clientAlias = km.chooseClientAlias(
@ -270,6 +274,10 @@ enum X509Authentication implements SSLAuthentication {
private static SSLPossession createServerPossession(
ServerHandshakeContext shc, String[] keyTypes) {
X509ExtendedKeyManager km = shc.sslContext.getX509KeyManager();
if (SSLLogger.isOn && SSLLogger.isOn("ssl")) {
SSLLogger.finest("X509KeyManager class: " +
km.getClass().getName());
}
String serverAlias = null;
for (String keyType : keyTypes) {
if (shc.conContext.transport instanceof SSLSocketImpl socket) {