8211227: Inconsistent TLS protocol version in debug output

Reviewed-by: xuelei, rhalade
This commit is contained in:
Evan Whelan 2021-02-22 21:12:04 +00:00 committed by Rajan Halade
parent 7b924d8a28
commit a86728850e
6 changed files with 162 additions and 11 deletions

View file

@ -271,7 +271,7 @@ final class DTLSOutputRecord extends OutputRecord implements DTLSRecord {
if (SSLLogger.isOn && SSLLogger.isOn("record")) {
SSLLogger.fine(
"WRITE: " + protocolVersion + " " +
"WRITE: " + protocolVersion.name + " " +
ContentType.APPLICATION_DATA.name +
", length = " + destination.remaining());
}
@ -499,7 +499,7 @@ final class DTLSOutputRecord extends OutputRecord implements DTLSRecord {
if (SSLLogger.isOn && SSLLogger.isOn("record")) {
SSLLogger.fine(
"WRITE: " + protocolVersion + " " +
"WRITE: " + protocolVersion.name + " " +
ContentType.nameOf(memo.contentType) +
", length = " + dstBuf.remaining());
}

View file

@ -297,13 +297,13 @@ abstract class HandshakeContext implements ConnectionContext {
} else if (SSLLogger.isOn && SSLLogger.isOn("verbose")) {
SSLLogger.fine(
"Ignore unsupported cipher suite: " + suite +
" for " + protocol);
" for " + protocol.name);
}
}
if (!found && (SSLLogger.isOn) && SSLLogger.isOn("handshake")) {
SSLLogger.fine(
"No available cipher suite for " + protocol);
"No available cipher suite for " + protocol.name);
}
}

View file

@ -269,7 +269,7 @@ final class SSLEngineOutputRecord extends OutputRecord implements SSLRecord {
if (SSLLogger.isOn && SSLLogger.isOn("record")) {
SSLLogger.fine(
"WRITE: " + protocolVersion + " " +
"WRITE: " + protocolVersion.name + " " +
ContentType.APPLICATION_DATA.name +
", length = " + destination.remaining());
}
@ -509,7 +509,7 @@ final class SSLEngineOutputRecord extends OutputRecord implements SSLRecord {
if (SSLLogger.isOn && SSLLogger.isOn("record")) {
SSLLogger.fine(
"WRITE: " + protocolVersion + " " +
"WRITE: " + protocolVersion.name + " " +
ContentType.nameOf(memo.contentType) +
", length = " + dstBuf.remaining());
}

View file

@ -68,7 +68,7 @@ final class SSLSocketOutputRecord extends OutputRecord implements SSLRecord {
write(level);
write(description);
if (SSLLogger.isOn && SSLLogger.isOn("record")) {
SSLLogger.fine("WRITE: " + protocolVersion +
SSLLogger.fine("WRITE: " + protocolVersion.name +
" " + ContentType.ALERT.name +
"(" + Alert.nameOf(description) + ")" +
", length = " + (count - headerSize));
@ -179,7 +179,7 @@ final class SSLSocketOutputRecord extends OutputRecord implements SSLRecord {
if (SSLLogger.isOn && SSLLogger.isOn("record")) {
SSLLogger.fine(
"WRITE: " + protocolVersion +
"WRITE: " + protocolVersion.name +
" " + ContentType.HANDSHAKE.name +
", length = " + (count - headerSize));
}
@ -254,7 +254,7 @@ final class SSLSocketOutputRecord extends OutputRecord implements SSLRecord {
if (SSLLogger.isOn && SSLLogger.isOn("record")) {
SSLLogger.fine(
"WRITE: " + protocolVersion +
"WRITE: " + protocolVersion.name +
" " + ContentType.HANDSHAKE.name +
", length = " + (count - headerSize));
}
@ -327,7 +327,7 @@ final class SSLSocketOutputRecord extends OutputRecord implements SSLRecord {
if (SSLLogger.isOn && SSLLogger.isOn("record")) {
SSLLogger.fine(
"WRITE: " + protocolVersion +
"WRITE: " + protocolVersion.name +
" " + ContentType.APPLICATION_DATA.name +
", length = " + (count - position));
}