diff options
author | tb <> | 2023-12-22 13:36:20 +0000 |
---|---|---|
committer | tb <> | 2023-12-22 13:36:20 +0000 |
commit | c1690c8aac8d59ac83cb18c8874b181260876365 (patch) | |
tree | 2032321ca9496d08d646050b8717dc2f4224958e /src/lib | |
parent | c12667858f367f66314e662114468f3ec7d5a28a (diff) | |
download | openbsd-c1690c8aac8d59ac83cb18c8874b181260876365.tar.gz openbsd-c1690c8aac8d59ac83cb18c8874b181260876365.tar.bz2 openbsd-c1690c8aac8d59ac83cb18c8874b181260876365.zip |
Replace check_id() with its x509_vfy_check_id() wrapper
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/x509/x509_vfy.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/lib/libcrypto/x509/x509_vfy.c b/src/lib/libcrypto/x509/x509_vfy.c index fb6c4167c1..ba5f92c87b 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.130 2023/12/22 13:31:35 tb Exp $ */ | 1 | /* $OpenBSD: x509_vfy.c,v 1.131 2023/12/22 13:36:20 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 | * |
@@ -196,8 +196,8 @@ check_hosts(X509 *x, X509_VERIFY_PARAM *vpm) | |||
196 | return n == 0; | 196 | return n == 0; |
197 | } | 197 | } |
198 | 198 | ||
199 | static int | 199 | int |
200 | check_id(X509_STORE_CTX *ctx) | 200 | x509_vfy_check_id(X509_STORE_CTX *ctx) |
201 | { | 201 | { |
202 | X509_VERIFY_PARAM *vpm = ctx->param; | 202 | X509_VERIFY_PARAM *vpm = ctx->param; |
203 | X509 *x = ctx->cert; | 203 | X509 *x = ctx->cert; |
@@ -218,11 +218,6 @@ check_id(X509_STORE_CTX *ctx) | |||
218 | return 1; | 218 | return 1; |
219 | } | 219 | } |
220 | 220 | ||
221 | int | ||
222 | x509_vfy_check_id(X509_STORE_CTX *ctx) { | ||
223 | return check_id(ctx); | ||
224 | } | ||
225 | |||
226 | /* | 221 | /* |
227 | * This is the effectively broken legacy OpenSSL chain builder. It | 222 | * This is the effectively broken legacy OpenSSL chain builder. It |
228 | * might find an unvalidated chain and leave it sitting in | 223 | * might find an unvalidated chain and leave it sitting in |
@@ -557,7 +552,7 @@ X509_verify_cert_legacy(X509_STORE_CTX *ctx) | |||
557 | goto end; | 552 | goto end; |
558 | #endif | 553 | #endif |
559 | 554 | ||
560 | ok = check_id(ctx); | 555 | ok = x509_vfy_check_id(ctx); |
561 | if (!ok) | 556 | if (!ok) |
562 | goto end; | 557 | goto end; |
563 | 558 | ||