Skip to content

Commit c19b057

Browse files
committed
Follow-up to PR #912
1 parent cf94b36 commit c19b057

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

java/org/apache/tomcat/util/net/openssl/OpenSSLCertificateVerifier.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
public class OpenSSLCertificateVerifier implements CertificateVerifier {
2929

3030
private static final Log log = LogFactory.getLog(OpenSSLCertificateVerifier.class);
31-
private static final StringManager sm = StringManager.getManager(OpenSSLContext.class);
31+
private static final StringManager sm = StringManager.getManager(OpenSSLCertificateVerifier.class);
3232

3333
private final X509TrustManager x509TrustManager;
3434

@@ -43,7 +43,9 @@ public boolean verify(long ssl, byte[][] chain, String auth) {
4343
x509TrustManager.checkClientTrusted(peerCerts, auth);
4444
return true;
4545
} catch (Exception e) {
46-
log.debug(sm.getString("openssl.certificateVerificationFailed"), e);
46+
if (log.isDebugEnabled()) {
47+
log.debug(sm.getString("openssl.certificateVerificationFailed"), e);
48+
}
4749
}
4850
return false;
4951
}

webapps/docs/changelog.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,10 @@
218218
<fix>
219219
Graceful failure for OCSP on BoringSSL in the FFM code. (remm)
220220
</fix>
221+
<fix>
222+
<bug>69866</bug>: Fix a memory leak when using a trust store with the
223+
OpenSSL provider. Pull request <pr>912</pr> by aogburn. (markt)
224+
</fix>
221225
</changelog>
222226
</subsection>
223227
<subsection name="Jasper">

0 commit comments

Comments
 (0)