diff options
author | Dr. Stephen Henson <steve@openssl.org> | 1999-11-27 19:43:10 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 1999-11-27 19:43:10 +0000 |
commit | 51630a37069a0792f2d6ad6ce33e9c5cca27b69c (patch) | |
tree | 295ee6e11fede84a1ac1cf5404b1c3edfe2e7ba8 /crypto/x509v3/v3_lib.c | |
parent | 74ecf9e2bbff8bb85b8da313b2ea44df487ef550 (diff) |
Add trust setting support to the verify code. It now checks the
trust settings of the root CA.
After a few fixes it seems to work OK.
Still need to add support to SSL and S/MIME code though.
Diffstat (limited to 'crypto/x509v3/v3_lib.c')
-rw-r--r-- | crypto/x509v3/v3_lib.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/x509v3/v3_lib.c b/crypto/x509v3/v3_lib.c index edf7a960b3..d6aeaabccd 100644 --- a/crypto/x509v3/v3_lib.c +++ b/crypto/x509v3/v3_lib.c @@ -128,10 +128,13 @@ int X509V3_EXT_add_alias(int nid_to, int nid_from) return 1; } +static int added_exts = 0; + void X509V3_EXT_cleanup(void) { sk_pop_free(ext_list, ext_list_free); ext_list = NULL; + added_exts = 0; } static void ext_list_free(X509V3_EXT_METHOD *ext) @@ -147,6 +150,7 @@ extern X509V3_EXT_METHOD v3_crl_num, v3_crl_reason, v3_cpols, v3_crld; int X509V3_add_standard_extensions(void) { + if(added_exts) return 1; X509V3_EXT_add_list(v3_ns_ia5_list); X509V3_EXT_add_list(v3_alt); X509V3_EXT_add(&v3_bcons); @@ -162,6 +166,7 @@ int X509V3_add_standard_extensions(void) X509V3_EXT_add(&v3_crl_reason); X509V3_EXT_add(&v3_cpols); X509V3_EXT_add(&v3_crld); + added_exts = 1; return 1; } |