mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-02-06 04:04:01 -05:00
OpenSSL: Fix memory leak in OCSP parsing
The result from OCSP_cert_to_id() needs to be freed. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
29bc76e3d3
commit
d9a0f69747
@ -3852,10 +3852,12 @@ static int ocsp_resp_cb(SSL *s, void *arg)
|
|||||||
wpa_printf(MSG_INFO, "OpenSSL: Could not find current server certificate from OCSP response%s",
|
wpa_printf(MSG_INFO, "OpenSSL: Could not find current server certificate from OCSP response%s",
|
||||||
(conn->flags & TLS_CONN_REQUIRE_OCSP) ? "" :
|
(conn->flags & TLS_CONN_REQUIRE_OCSP) ? "" :
|
||||||
" (OCSP not required)");
|
" (OCSP not required)");
|
||||||
|
OCSP_CERTID_free(id);
|
||||||
OCSP_BASICRESP_free(basic);
|
OCSP_BASICRESP_free(basic);
|
||||||
OCSP_RESPONSE_free(rsp);
|
OCSP_RESPONSE_free(rsp);
|
||||||
return (conn->flags & TLS_CONN_REQUIRE_OCSP) ? 0 : 1;
|
return (conn->flags & TLS_CONN_REQUIRE_OCSP) ? 0 : 1;
|
||||||
}
|
}
|
||||||
|
OCSP_CERTID_free(id);
|
||||||
|
|
||||||
if (!OCSP_check_validity(this_update, next_update, 5 * 60, -1)) {
|
if (!OCSP_check_validity(this_update, next_update, 5 * 60, -1)) {
|
||||||
tls_show_errors(MSG_INFO, __func__,
|
tls_show_errors(MSG_INFO, __func__,
|
||||||
|
@ -1216,6 +1216,7 @@ static int ocsp_resp_cb(SSL *s, void *arg)
|
|||||||
wpa_printf(MSG_INFO, "OpenSSL: Could not find current server certificate from OCSP response%s",
|
wpa_printf(MSG_INFO, "OpenSSL: Could not find current server certificate from OCSP response%s",
|
||||||
(ctx->ocsp == MANDATORY_OCSP) ? "" :
|
(ctx->ocsp == MANDATORY_OCSP) ? "" :
|
||||||
" (OCSP not required)");
|
" (OCSP not required)");
|
||||||
|
OCSP_CERTID_free(id);
|
||||||
OCSP_BASICRESP_free(basic);
|
OCSP_BASICRESP_free(basic);
|
||||||
OCSP_RESPONSE_free(rsp);
|
OCSP_RESPONSE_free(rsp);
|
||||||
if (ctx->ocsp == MANDATORY_OCSP)
|
if (ctx->ocsp == MANDATORY_OCSP)
|
||||||
@ -1223,6 +1224,7 @@ static int ocsp_resp_cb(SSL *s, void *arg)
|
|||||||
ctx->last_err = "Could not find current server certificate from OCSP response";
|
ctx->last_err = "Could not find current server certificate from OCSP response";
|
||||||
return (ctx->ocsp == MANDATORY_OCSP) ? 0 : 1;
|
return (ctx->ocsp == MANDATORY_OCSP) ? 0 : 1;
|
||||||
}
|
}
|
||||||
|
OCSP_CERTID_free(id);
|
||||||
|
|
||||||
if (!OCSP_check_validity(this_update, next_update, 5 * 60, -1)) {
|
if (!OCSP_check_validity(this_update, next_update, 5 * 60, -1)) {
|
||||||
tls_show_errors(__func__, "OpenSSL: OCSP status times invalid");
|
tls_show_errors(__func__, "OpenSSL: OCSP status times invalid");
|
||||||
|
Loading…
Reference in New Issue
Block a user