Drop duplicate ctx->verify_cb assignment
authorViktor Dukhovni <openssl-users@dukhovni.org>
Fri, 29 Apr 2016 20:36:32 +0000 (16:36 -0400)
committerViktor Dukhovni <openssl-users@dukhovni.org>
Tue, 3 May 2016 14:50:40 +0000 (10:50 -0400)
The right variant is ~18 lines below.

Reviewed-by: Matt Caswell <matt@openssl.org>
crypto/x509/x509_vfy.c

index 2b17b29f1d23905488f79ff4db7475e7fc847c8e..6fc08c4a26897d2de3391807e0ae00771425e4b8 100644 (file)
@@ -2171,11 +2171,10 @@ int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509,
     /* Zero ex_data to make sure we're cleanup-safe */
     memset(&ctx->ex_data, 0, sizeof(ctx->ex_data));
 
     /* Zero ex_data to make sure we're cleanup-safe */
     memset(&ctx->ex_data, 0, sizeof(ctx->ex_data));
 
-    if (store) {
-        ctx->verify_cb = store->verify_cb;
-        /* Seems to always be 0 in OpenSSL, else must be idempotent */
+    /* store->cleanup is always 0 in OpenSSL, if set must be idempotent */
+    if (store)
         ctx->cleanup = store->cleanup;
         ctx->cleanup = store->cleanup;
-    else
+    else
         ctx->cleanup = 0;
 
     if (store && store->check_issued)
         ctx->cleanup = 0;
 
     if (store && store->check_issued)