moonchen commented on code in PR #13318:
URL: https://github.com/apache/trafficserver/pull/13318#discussion_r3469616142
##########
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:
Thanks for pointing out the better function to use in BoringSSL. I've
updated the PR to use this in BoringSSL. OpenSSL builds stay unchanged since
`SSL_set_ocsp_response` is not available.
--
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]