aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2016-04-19 15:22:33 +0900
committerKazuki Yamaguchi <k@rhe.jp>2016-04-19 18:48:22 +0900
commit4e35e83d561145a11ec839b1e21946f1c1cc69b3 (patch)
treef5b9e24d55bb0a22a1b3f59177e4c92983f65193
parent76f2554a10abdc340b9bbc0782260a411b4d2045 (diff)
downloadopenssl-fix/x509-store-remove-old.tar.gz
Remove code duplicationfix/x509-store-remove-old
Remove duplicated ctx->verify_cb = store->verify_cb; in X509_STORE_CTX_init(). Remove duplicated function prototype of X509_STORE_CTX_set_verify_cb().
-rw-r--r--crypto/x509/x509_vfy.c7
-rw-r--r--include/openssl/x509_vfy.h2
2 files changed, 3 insertions, 6 deletions
diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c
index efa6bcaa67..8f8847da91 100644
--- a/crypto/x509/x509_vfy.c
+++ b/crypto/x509/x509_vfy.c
@@ -2161,11 +2161,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));
- if (store) {
- ctx->verify_cb = store->verify_cb;
- /* Seems to always be 0 in OpenSSL, else must be idempotent */
+ /* Seems to always be 0 in OpenSSL, else must be idempotent */
+ if (store && ctx->cleanup)
ctx->cleanup = store->cleanup;
- } else
+ else
ctx->cleanup = 0;
if (store && store->check_issued)
diff --git a/include/openssl/x509_vfy.h b/include/openssl/x509_vfy.h
index fa186a09d9..06232fb600 100644
--- a/include/openssl/x509_vfy.h
+++ b/include/openssl/x509_vfy.h
@@ -373,8 +373,6 @@ int X509_STORE_CTX_purpose_inherit(X509_STORE_CTX *ctx, int def_purpose,
void X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, unsigned long flags);
void X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, unsigned long flags,
time_t t);
-void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx,
- int (*verify_cb) (int, X509_STORE_CTX *));
X509_POLICY_TREE *X509_STORE_CTX_get0_policy_tree(X509_STORE_CTX *ctx);
int X509_STORE_CTX_get_explicit_policy(X509_STORE_CTX *ctx);