When calling the verify callback we need to ensure we supply the user SSL
object, and not any internal SSL object.
Fixes #27830
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27838)
(cherry picked from commit
4b148ebb66cdac8a095f22cbdfa475d68c947f7a)
/* Set suite B flags if needed */
X509_STORE_CTX_set_flags(ctx, tls1_suiteb(s));
if (!X509_STORE_CTX_set_ex_data(ctx,
- SSL_get_ex_data_X509_STORE_CTX_idx(), s)) {
+ SSL_get_ex_data_X509_STORE_CTX_idx(),
+ SSL_CONNECTION_GET_USER_SSL(s)))
goto end;
- }
/* Verify via DANE if enabled */
if (DANETLS_ENABLED(&s->dane))