diff options
| author | beck <> | 2021-07-12 15:12:38 +0000 |
|---|---|---|
| committer | beck <> | 2021-07-12 15:12:38 +0000 |
| commit | 81c1dcbfea5420e52bde35a9471d77b260d9ac5f (patch) | |
| tree | 08dc5bc8fa65770fcc2f11208407c4718a009b39 /src | |
| parent | dbd124eb250ac72aac05539d1367e15cf129f204 (diff) | |
| download | openbsd-81c1dcbfea5420e52bde35a9471d77b260d9ac5f.tar.gz openbsd-81c1dcbfea5420e52bde35a9471d77b260d9ac5f.tar.bz2 openbsd-81c1dcbfea5420e52bde35a9471d77b260d9ac5f.zip | |
Use the x509_verify_cert_cache_extensions fuction instead of manually
calling the OpenSSL legacy cache extensions goo.
Requested by tb@
ok tb@
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/x509/x509_verify.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/lib/libcrypto/x509/x509_verify.c b/src/lib/libcrypto/x509/x509_verify.c index 21b391c76c..18d395d273 100644 --- a/src/lib/libcrypto/x509/x509_verify.c +++ b/src/lib/libcrypto/x509/x509_verify.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x509_verify.c,v 1.38 2021/07/10 15:52:59 beck Exp $ */ | 1 | /* $OpenBSD: x509_verify.c,v 1.39 2021/07/12 15:12:38 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2020-2021 Bob Beck <beck@openbsd.org> | 3 | * Copyright (c) 2020-2021 Bob Beck <beck@openbsd.org> |
| 4 | * | 4 | * |
| @@ -829,14 +829,9 @@ x509_verify_validate_constraints(X509 *cert, | |||
| 829 | static int | 829 | static int |
| 830 | x509_verify_cert_extensions(struct x509_verify_ctx *ctx, X509 *cert, int need_ca) | 830 | x509_verify_cert_extensions(struct x509_verify_ctx *ctx, X509 *cert, int need_ca) |
| 831 | { | 831 | { |
| 832 | if (!(cert->ex_flags & EXFLAG_SET)) { | 832 | if (!x509_verify_cert_cache_extensions(cert)) { |
| 833 | CRYPTO_w_lock(CRYPTO_LOCK_X509); | 833 | ctx->error = X509_V_ERR_UNSPECIFIED; |
| 834 | x509v3_cache_extensions(cert); | 834 | return 0; |
| 835 | CRYPTO_w_unlock(CRYPTO_LOCK_X509); | ||
| 836 | if (cert->ex_flags & EXFLAG_INVALID) { | ||
| 837 | ctx->error = X509_V_ERR_UNSPECIFIED; | ||
| 838 | return 0; | ||
| 839 | } | ||
| 840 | } | 835 | } |
| 841 | 836 | ||
| 842 | if (ctx->xsc != NULL) | 837 | if (ctx->xsc != NULL) |
