Commit 7dd08a7
Free server certificate (x509cert) after SSL_CTX_use_certificate in OpenSSLContext
SSL_CTX_use_certificate makes an internal copy, so the caller should free
the original. This is the same class of bug fixed by commit 8ef5efc for
client CA certificates after SSL_CTX_add_client_CA.
X509_free is added on:
- early return when private key parsing fails (x509cert already allocated)
- error path when SSL_CTX_use_certificate fails
- success path after SSL_CTX_use_certificate (copy already made internally)
Co-authored-by: markt-asf <markt@apache.org>1 parent df55361 commit 7dd08a7
File tree
1 file changed
+3
-0
lines changed- java/org/apache/tomcat/util/net/openssl/panama
1 file changed
+3
-0
lines changedLines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1248 | 1248 | | |
1249 | 1249 | | |
1250 | 1250 | | |
| 1251 | + | |
1251 | 1252 | | |
1252 | 1253 | | |
1253 | 1254 | | |
1254 | 1255 | | |
| 1256 | + | |
1255 | 1257 | | |
1256 | 1258 | | |
| 1259 | + | |
1257 | 1260 | | |
1258 | 1261 | | |
1259 | 1262 | | |
| |||
0 commit comments