maskit commented on code in PR #13318:
URL: https://github.com/apache/trafficserver/pull/13318#discussion_r3468452069
##########
src/iocore/net/OCSPStapling.cc:
##########
@@ -1435,7 +1437,11 @@ ssl_callback_ocsp_stapling(SSL *ssl, void *)
}
memcpy(p, cinf->resp_der, cinf->resp_derlen);
ink_mutex_release(&cinf->stapling_mutex);
- SSL_set_tlsext_status_ocsp_resp(ssl, p, cinf->resp_derlen);
+ if (SSL_set_tlsext_status_ocsp_resp(ssl, p, cinf->resp_derlen) == 0) {
+ // On success the call takes ownership of p and frees it; on failure it
does not.
+ OPENSSL_free(p);
Review Comment:
This is a right thing to do. We need this fix.
However, with BoringSSL, `SSL_set_ocsp_response` may work nicer. No need for
`OPENSSL_malloc`.
`SSL_set_tlsext_status_ocsp_resp`:
https://commondatastorage.googleapis.com/chromium-boringssl-docs/ssl.h.html#SSL_set_tlsext_status_ocsp_resp
`SSL_set_ocsp_response`:
https://commondatastorage.googleapis.com/chromium-boringssl-docs/ssl.h.html#SSL_set_ocsp_response
Just a suggestion. Not a blocker.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]