diff options
author | tb <> | 2023-05-08 05:37:36 +0000 |
---|---|---|
committer | tb <> | 2023-05-08 05:37:36 +0000 |
commit | dbacc95dab05b2f7f5be580c37bd7087b740fa0a (patch) | |
tree | de374429ff3a622298b678a22ecf23bbbcfdf9e7 /src/lib | |
parent | e94901686eee3ed454b13711dad402696c298bc0 (diff) | |
download | openbsd-dbacc95dab05b2f7f5be580c37bd7087b740fa0a.tar.gz openbsd-dbacc95dab05b2f7f5be580c37bd7087b740fa0a.tar.bz2 openbsd-dbacc95dab05b2f7f5be580c37bd7087b740fa0a.zip |
X509_verify_cert(): Garbage collect the unused roots variable
roots was used to store the trusted stack or pull the roots out of the
X509_STORE before beck unmooned Ethel in x509_vfy.c r1.88. Since then
this variable is effectively unused. It seems the STACK_OF(3) madness
is too complicated for -Wunused-but-set-variable to notice.
ok miod
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/x509/x509_vfy.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/lib/libcrypto/x509/x509_vfy.c b/src/lib/libcrypto/x509/x509_vfy.c index bb94d55dab..461e1d2ef2 100644 --- a/src/lib/libcrypto/x509/x509_vfy.c +++ b/src/lib/libcrypto/x509/x509_vfy.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509_vfy.c,v 1.120 2023/04/30 14:59:52 tb Exp $ */ | 1 | /* $OpenBSD: x509_vfy.c,v 1.121 2023/05/08 05:37:36 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -592,7 +592,6 @@ X509_verify_cert_legacy(X509_STORE_CTX *ctx) | |||
592 | int | 592 | int |
593 | X509_verify_cert(X509_STORE_CTX *ctx) | 593 | X509_verify_cert(X509_STORE_CTX *ctx) |
594 | { | 594 | { |
595 | STACK_OF(X509) *roots = NULL; | ||
596 | struct x509_verify_ctx *vctx = NULL; | 595 | struct x509_verify_ctx *vctx = NULL; |
597 | int chain_count = 0; | 596 | int chain_count = 0; |
598 | 597 | ||
@@ -656,8 +655,6 @@ X509_verify_cert(X509_STORE_CTX *ctx) | |||
656 | } | 655 | } |
657 | x509_verify_ctx_free(vctx); | 656 | x509_verify_ctx_free(vctx); |
658 | 657 | ||
659 | sk_X509_pop_free(roots, X509_free); | ||
660 | |||
661 | /* if we succeed we have a chain in ctx->chain */ | 658 | /* if we succeed we have a chain in ctx->chain */ |
662 | return (chain_count > 0 && ctx->chain != NULL); | 659 | return (chain_count > 0 && ctx->chain != NULL); |
663 | } | 660 | } |