Fix inconsistent behaviour with respect to verify_callback handling.
[openssl.git] / ssl / ssl_cert.c
index 7f4739d10880fbf7d2d806cdf30f541681ff4b91..8a53b9fa4b750fb9bf416c22b7f535da7ac27d3a 100644 (file)
 
 #include <stdio.h>
 
-#include "openssl/e_os.h"
+#include "e_os.h"
 #ifndef NO_SYS_TYPES_H
 # include <sys/types.h>
 #endif
@@ -471,6 +471,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