summaryrefslogtreecommitdiffstats
path: root/crypto/x509/x509_v3.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>1999-11-29 01:09:25 +0000
committerDr. Stephen Henson <steve@openssl.org>1999-11-29 01:09:25 +0000
commit13938acecae8f1b455812d0388e2891abd1c096d (patch)
treea0c899c89f6126f075ca6b88f15f3134bfe21ebe /crypto/x509/x509_v3.c
parent51630a37069a0792f2d6ad6ce33e9c5cca27b69c (diff)
Add part of chain verify SSL support code: not complete or doing anything
yet. Add a function X509_STORE_CTX_purpose_inherit() which implements the logic of "inheriting" purpose and trust from a parent structure and using a default: this will be used in the SSL code and possibly future S/MIME. Partial documentation of the 'verify' utility. Still need to document how all the extension checking works and the various error messages.
Diffstat (limited to 'crypto/x509/x509_v3.c')
-rw-r--r--crypto/x509/x509_v3.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/crypto/x509/x509_v3.c b/crypto/x509/x509_v3.c
index 5721f78510..100b08773c 100644
--- a/crypto/x509/x509_v3.c
+++ b/crypto/x509/x509_v3.c
@@ -63,6 +63,7 @@
#include <openssl/objects.h>
#include <openssl/evp.h>
#include <openssl/x509.h>
+#include <openssl/x509v3.h>
int X509v3_get_ext_count(const STACK_OF(X509_EXTENSION) *x)
{
@@ -264,3 +265,24 @@ int X509_EXTENSION_get_critical(X509_EXTENSION *ex)
if (ex == NULL) return(0);
return(ex->critical);
}
+
+/* Initialisation routine: used to initialise the X509 and X509v3 tables */
+
+static int init_done = 0;
+
+void X509_init(void)
+{
+ if(init_done) return;
+ X509V3_add_standard_extensions();
+ X509_PURPOSE_add_standard();
+ X509_TRUST_add_standard();
+ init_done = 1;
+}
+
+void X509_cleanup(void)
+{
+ X509V3_EXT_cleanup();
+ X509_PURPOSE_cleanup();
+ X509_TRUST_cleanup();
+ init_done = 0;
+}