Fix inconsistent behaviour with respect to verify_callback handling.
diff --git a/ssl/ssl_cert.c b/ssl/ssl_cert.c
index 605e97e..8a53b9f 100644
--- a/ssl/ssl_cert.c
+++ b/ssl/ssl_cert.c
@@ -471,6 +471,8 @@
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
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index 3451096..f4dfdbf 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -1361,8 +1361,6 @@
{
ctx->verify_mode=mode;
ctx->default_verify_callback=cb;
- /* This needs cleaning up EAY EAY EAY */
- X509_STORE_set_verify_cb_func(ctx->cert_store,cb);
}
void SSL_CTX_set_verify_depth(SSL_CTX *ctx,int depth)