summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authortb <>2023-12-22 13:45:28 +0000
committertb <>2023-12-22 13:45:28 +0000
commit6612855f556c7e41edd82187faf3aea2b969af2d (patch)
tree298a6ad67168c5305eb0da6fafdb5a2c511c16ec /src/lib
parent8e158caa1a1fad0bca8fdc9c1f27e279af084525 (diff)
downloadopenbsd-6612855f556c7e41edd82187faf3aea2b969af2d.tar.gz
openbsd-6612855f556c7e41edd82187faf3aea2b969af2d.tar.bz2
openbsd-6612855f556c7e41edd82187faf3aea2b969af2d.zip
Replace check_trust() with its x509_vfy_ prefixed wrapper
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/x509/x509_vfy.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/lib/libcrypto/x509/x509_vfy.c b/src/lib/libcrypto/x509/x509_vfy.c
index 674ef1df04..b54f95fa84 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.132 2023/12/22 13:42:18 tb Exp $ */ 1/* $OpenBSD: x509_vfy.c,v 1.133 2023/12/22 13:45:28 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 *
@@ -124,7 +124,6 @@ static int check_issued(X509_STORE_CTX *ctx, X509 *subject, X509 *issuer);
124static X509 *find_issuer(X509_STORE_CTX *ctx, STACK_OF(X509) *sk, X509 *x, 124static X509 *find_issuer(X509_STORE_CTX *ctx, STACK_OF(X509) *sk, X509 *x,
125 int allow_expired); 125 int allow_expired);
126static int check_name_constraints(X509_STORE_CTX *ctx); 126static int check_name_constraints(X509_STORE_CTX *ctx);
127static int check_trust(X509_STORE_CTX *ctx);
128static int check_cert(X509_STORE_CTX *ctx, STACK_OF(X509) *chain, int depth); 127static int check_cert(X509_STORE_CTX *ctx, STACK_OF(X509) *chain, int depth);
129 128
130static int get_crl_score(X509_STORE_CTX *ctx, X509 **pissuer, 129static int get_crl_score(X509_STORE_CTX *ctx, X509 **pissuer,
@@ -425,7 +424,7 @@ X509_verify_cert_legacy_build_chain(X509_STORE_CTX *ctx, int *bad, int *out_ok)
425 } 424 }
426 425
427 /* we now have our chain, lets check it... */ 426 /* we now have our chain, lets check it... */
428 trust = check_trust(ctx); 427 trust = x509_vfy_check_trust(ctx);
429 428
430 /* If explicitly rejected error */ 429 /* If explicitly rejected error */
431 if (trust == X509_TRUST_REJECTED) { 430 if (trust == X509_TRUST_REJECTED) {
@@ -858,8 +857,8 @@ x509_vfy_lookup_cert_match(X509_STORE_CTX *ctx, X509 *x)
858 return lookup_cert_match(ctx, x); 857 return lookup_cert_match(ctx, x);
859} 858}
860 859
861static int 860int
862check_trust(X509_STORE_CTX *ctx) 861x509_vfy_check_trust(X509_STORE_CTX *ctx)
863{ 862{
864 size_t i; 863 size_t i;
865 int ok; 864 int ok;
@@ -914,12 +913,6 @@ check_trust(X509_STORE_CTX *ctx)
914} 913}
915 914
916int 915int
917x509_vfy_check_trust(X509_STORE_CTX *ctx)
918{
919 return check_trust(ctx);
920}
921
922int
923x509_vfy_check_revocation(X509_STORE_CTX *ctx) 916x509_vfy_check_revocation(X509_STORE_CTX *ctx)
924{ 917{
925 int i, last, ok; 918 int i, last, ok;