Incorporate latest logging changes

This commit is contained in:
Artur Barashev 2026-02-12 13:20:17 -05:00
parent 28ebd405a9
commit 378d91bb11
3 changed files with 16 additions and 12 deletions

View File

@ -241,7 +241,7 @@ final class CompressCertExtension {
HandshakeContext hc = (HandshakeContext) context;
// Is it a supported and enabled extension?
if (!hc.sslConfig.isAvailable(extension)) {
if (SSLLogger.isOn() && SSLLogger.isOn("ssl,handshake")) {
if (SSLLogger.isOn() && SSLLogger.isOn(SSLLogger.Opt.HANDSHAKE)) {
SSLLogger.fine("Ignore unavailable " +
"compress_certificate extension");
}
@ -255,7 +255,7 @@ final class CompressCertExtension {
}
if (hc.certInflaters.isEmpty()) {
if (SSLLogger.isOn() && SSLLogger.isOn("ssl,handshake")) {
if (SSLLogger.isOn() && SSLLogger.isOn(SSLLogger.Opt.HANDSHAKE)) {
SSLLogger.fine("Ignore unsupported " +
"compress_certificate extension");
}
@ -284,7 +284,7 @@ final class CompressCertExtension {
HandshakeContext hc = (HandshakeContext) context;
// Is it a supported and enabled extension?
if (!hc.sslConfig.isAvailable(extension)) {
if (SSLLogger.isOn() && SSLLogger.isOn("ssl,handshake")) {
if (SSLLogger.isOn() && SSLLogger.isOn(SSLLogger.Opt.HANDSHAKE)) {
SSLLogger.fine("Ignore unavailable " +
"compress_certificate extension");
}
@ -293,7 +293,7 @@ final class CompressCertExtension {
if (hc.sslConfig.certDeflaters == null ||
hc.sslConfig.certDeflaters.isEmpty()) {
if (SSLLogger.isOn() && SSLLogger.isOn("ssl,handshake")) {
if (SSLLogger.isOn() && SSLLogger.isOn(SSLLogger.Opt.HANDSHAKE)) {
SSLLogger.fine("Ignore unsupported " +
"compress_certificate extension");
}
@ -307,7 +307,7 @@ final class CompressCertExtension {
hc.certDeflater = CompressionAlgorithm.selectDeflater(
hc.sslConfig, spec.compressionAlgorithms);
if (hc.certDeflater == null) {
if (SSLLogger.isOn() && SSLLogger.isOn("ssl,handshake")) {
if (SSLLogger.isOn() && SSLLogger.isOn(SSLLogger.Opt.HANDSHAKE)) {
SSLLogger.fine("Ignore, no supported " +
"certificate compression algorithms");
}

View File

@ -176,7 +176,8 @@ final class CompressedCertificate {
compressedCertMsg =
hc.certDeflater.getValue().apply(certMsg);
if (SSLLogger.isOn() && SSLLogger.isOn("ssl,handshake")) {
if (SSLLogger.isOn()
&& SSLLogger.isOn(SSLLogger.Opt.HANDSHAKE)) {
SSLLogger.fine("Caching CompressedCertificate message");
}
@ -193,7 +194,7 @@ final class CompressedCertificate {
hc.certDeflater.getKey(), certMsg.length,
compressedCertMsg);
if (SSLLogger.isOn() && SSLLogger.isOn("ssl,handshake")) {
if (SSLLogger.isOn() && SSLLogger.isOn(SSLLogger.Opt.HANDSHAKE)) {
SSLLogger.fine(
"Produced CompressedCertificate handshake message",
ccm);
@ -230,7 +231,7 @@ final class CompressedCertificate {
// Parse the handshake message
CompressedCertMessage ccm = new CompressedCertMessage(hc, message);
if (SSLLogger.isOn() && SSLLogger.isOn("ssl,handshake")) {
if (SSLLogger.isOn() && SSLLogger.isOn(SSLLogger.Opt.HANDSHAKE)) {
SSLLogger.fine(
"Consuming CompressedCertificate handshake message",
ccm);

View File

@ -78,7 +78,7 @@ enum CompressionAlgorithm {
static Map<Integer, Function<byte[], byte[]>> findInflaters(
SSLConfiguration config) {
if (config.certInflaters == null || config.certInflaters.isEmpty()) {
if (SSLLogger.isOn() && SSLLogger.isOn("ssl,handshake")) {
if (SSLLogger.isOn() && SSLLogger.isOn(SSLLogger.Opt.HANDSHAKE)) {
SSLLogger.finest(
"No supported certificate compression algorithms");
}
@ -93,7 +93,8 @@ enum CompressionAlgorithm {
CompressionAlgorithm ca =
CompressionAlgorithm.nameOf(entry.getKey());
if (ca == null) {
if (SSLLogger.isOn() && SSLLogger.isOn("ssl,handshake")) {
if (SSLLogger.isOn()
&& SSLLogger.isOn(SSLLogger.Opt.HANDSHAKE)) {
SSLLogger.finest("Ignore unsupported certificate " +
"compression algorithm: " + entry.getKey());
}
@ -148,7 +149,8 @@ enum CompressionAlgorithm {
return outputStream.toByteArray();
} catch (Exception e) {
if (SSLLogger.isOn() && SSLLogger.isOn("ssl,handshake")) {
if (SSLLogger.isOn()
&& SSLLogger.isOn(SSLLogger.Opt.HANDSHAKE)) {
SSLLogger.warning("Exception during certificate "
+ "compression: ", e);
}
@ -173,7 +175,8 @@ enum CompressionAlgorithm {
return outputStream.toByteArray();
} catch (Exception e) {
if (SSLLogger.isOn() && SSLLogger.isOn("ssl,handshake")) {
if (SSLLogger.isOn()
&& SSLLogger.isOn(SSLLogger.Opt.HANDSHAKE)) {
SSLLogger.warning(
"Exception during certificate decompression: ", e);
}