mirror of
https://github.com/openssl/openssl.git
synced 2025-01-30 14:01:55 +08:00
Return success in custom_ext_parse_old_cb_wrap if parse_cb is NULL
This fixes a segfault if a NULL parse_cb is passed to SSL_CTX_add_{client,server}_custom_ext, which was supported in the pre-1.1.1 implementation. This behaviour is consistent with the other custom_ext_*_old_cb_wrap functions, and with the new SSL_CTX_add_custom_ext function. CLA: trivial Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3310)
This commit is contained in:
parent
8ed9a26616
commit
e596c68c31
@ -64,6 +64,9 @@ static int custom_ext_parse_old_cb_wrap(SSL *s, unsigned int ext_type,
|
||||
custom_ext_parse_cb_wrap *parse_cb_wrap =
|
||||
(custom_ext_parse_cb_wrap *)parse_arg;
|
||||
|
||||
if (parse_cb_wrap->parse_cb == NULL)
|
||||
return 1;
|
||||
|
||||
return parse_cb_wrap->parse_cb(s, ext_type, in, inlen, al,
|
||||
parse_cb_wrap->parse_arg);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user