diff options
author | beck <> | 2020-09-13 15:06:17 +0000 |
---|---|---|
committer | beck <> | 2020-09-13 15:06:17 +0000 |
commit | a328631fddec2556ad8af08ce4de240790c537c9 (patch) | |
tree | 4e2deda0db62092481ad6901c374736e60f249a2 /src/lib/libcrypto/x509/x509_purp.c | |
parent | 4f04d3f588f91c98b4b1cdfcffe028a036c96283 (diff) | |
download | openbsd-a328631fddec2556ad8af08ce4de240790c537c9.tar.gz openbsd-a328631fddec2556ad8af08ce4de240790c537c9.tar.bz2 openbsd-a328631fddec2556ad8af08ce4de240790c537c9.zip |
Add new x509 certificate chain validator in x509_verify.c
The new validator finds multiple validated chains to handle the modern
PKI cases which may frequently have multiple paths via different
intermediates to different roots. It is loosely based on golang's x509
validator
This includes integration so that the new validator can be used via
X509_verify_cert() as well as a new api x509_verify() which will
return multiple chains (similar to go).
The new validator is not enabled by default with this commit, this
will be changed in a follow on commit.
The new public API is not yet exposed, and will be finalized and
exposed with a man page and a library minor bump later.
ok tb@ inoguchi@ jsing@
Diffstat (limited to 'src/lib/libcrypto/x509/x509_purp.c')
-rw-r--r-- | src/lib/libcrypto/x509/x509_purp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/x509/x509_purp.c b/src/lib/libcrypto/x509/x509_purp.c index 62b3bcfe3a..f2d46658f6 100644 --- a/src/lib/libcrypto/x509/x509_purp.c +++ b/src/lib/libcrypto/x509/x509_purp.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509_purp.c,v 1.1 2020/06/04 15:19:32 jsing Exp $ */ | 1 | /* $OpenBSD: x509_purp.c,v 1.2 2020/09/13 15:06:17 beck Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 2001. | 3 | * project 2001. |
4 | */ | 4 | */ |
@@ -73,7 +73,7 @@ | |||
73 | #define ns_reject(x, usage) \ | 73 | #define ns_reject(x, usage) \ |
74 | (((x)->ex_flags & EXFLAG_NSCERT) && !((x)->ex_nscert & (usage))) | 74 | (((x)->ex_flags & EXFLAG_NSCERT) && !((x)->ex_nscert & (usage))) |
75 | 75 | ||
76 | static void x509v3_cache_extensions(X509 *x); | 76 | void x509v3_cache_extensions(X509 *x); |
77 | 77 | ||
78 | static int check_ssl_ca(const X509 *x); | 78 | static int check_ssl_ca(const X509 *x); |
79 | static int check_purpose_ssl_client(const X509_PURPOSE *xp, const X509 *x, | 79 | static int check_purpose_ssl_client(const X509_PURPOSE *xp, const X509 *x, |
@@ -426,7 +426,7 @@ setup_crldp(X509 *x) | |||
426 | setup_dp(x, sk_DIST_POINT_value(x->crldp, i)); | 426 | setup_dp(x, sk_DIST_POINT_value(x->crldp, i)); |
427 | } | 427 | } |
428 | 428 | ||
429 | static void | 429 | void |
430 | x509v3_cache_extensions(X509 *x) | 430 | x509v3_cache_extensions(X509 *x) |
431 | { | 431 | { |
432 | BASIC_CONSTRAINTS *bs; | 432 | BASIC_CONSTRAINTS *bs; |