Fix inconsistent behaviour with respect to verify_callback handling.
[oweals/openssl.git] / ssl / ssl_cert.c
index 27e7fcc60ae74b57ffa55d6ed44f09b856c8fe7f..38c76a9d13567c8c8115aa1ba5592763eb0e7318 100644 (file)
@@ -461,6 +461,8 @@ int ssl_verify_cert_chain(SSL *s,STACK_OF(X509) *sk)
 
        X509_STORE_CTX_purpose_inherit(&ctx, i, s->purpose, s->trust);
 
+       X509_STORE_CTX_set_verify_cb(&ctx, s->verify_callback);
+
        if (s->ctx->app_verify_callback != NULL)
                i=s->ctx->app_verify_callback(&ctx); /* should pass app_verify_arg */
        else