Commit b5304662 authored by David Benjamin's avatar David Benjamin Committed by Anto Aravinth
Browse files

tls: fix malloc mismatch in SSL_set_tlsext_status_ocsp_resp call

SSL_set_tlsext_status_ocsp_resp expects the data to be allocated with
OPENSSL_malloc, not libc malloc, so use OpenSSLMalloc.

Additionally, though OpenSSL doesn't type-check due to it being a macro,
the function is documented to take an unsigned char pointer:
https://www.openssl.org/docs/man1.1.0/ssl/SSL_set_tlsext_status_ocsp_resp.html

(By default, OPENSSL_malloc is the same as libc malloc, but it is
possible to customize this.)

PR-URL: https://github.com/nodejs/node/pull/25706


Reviewed-By: default avatarSam Roberts <vieuxtech@gmail.com>
Reviewed-By: default avatarAli Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent c3fd5046
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment