summaryrefslogtreecommitdiffstats
path: root/crypto/x509/x509_trs.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2001-01-17 01:31:34 +0000
committerDr. Stephen Henson <steve@openssl.org>2001-01-17 01:31:34 +0000
commit81f169e95c86fe9b2c3a7ba51a85f7a00763a0e7 (patch)
tree9c61e9161ee5332e99d091153a4cd242160b9180 /crypto/x509/x509_trs.c
parenta068630a2038ff167d29cdaed828161719355531 (diff)
Initial OCSP certificate verify. Not complete,
it just supports a "trusted OCSP global root CA".
Diffstat (limited to 'crypto/x509/x509_trs.c')
-rw-r--r--crypto/x509/x509_trs.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/crypto/x509/x509_trs.c b/crypto/x509/x509_trs.c
index a7b1543461..0de252c65d 100644
--- a/crypto/x509/x509_trs.c
+++ b/crypto/x509/x509_trs.c
@@ -66,6 +66,7 @@ static int tr_cmp(const X509_TRUST * const *a,
static void trtable_free(X509_TRUST *p);
static int trust_1oidany(X509_TRUST *trust, X509 *x, int flags);
+static int trust_1oid(X509_TRUST *trust, X509 *x, int flags);
static int trust_compat(X509_TRUST *trust, X509 *x, int flags);
static int obj_trust(int id, X509 *x, int flags);
@@ -81,6 +82,7 @@ static X509_TRUST trstandard[] = {
{X509_TRUST_SSL_CLIENT, 0, trust_1oidany, "SSL Client", NID_client_auth, NULL},
{X509_TRUST_SSL_SERVER, 0, trust_1oidany, "SSL Client", NID_server_auth, NULL},
{X509_TRUST_EMAIL, 0, trust_1oidany, "S/MIME email", NID_email_protect, NULL},
+{X509_TRUST_OCSP_SIGN, 0, trust_1oid, "OCSP responder", NID_OCSP_sign, NULL}
};
#define X509_TRUST_COUNT (sizeof(trstandard)/sizeof(X509_TRUST))
@@ -235,6 +237,12 @@ static int trust_1oidany(X509_TRUST *trust, X509 *x, int flags)
return trust_compat(trust, x, flags);
}
+static int trust_1oid(X509_TRUST *trust, X509 *x, int flags)
+{
+ if(x->aux) return obj_trust(trust->arg1, x, flags);
+ return X509_TRUST_UNTRUSTED;
+}
+
static int trust_compat(X509_TRUST *trust, X509 *x, int flags)
{
X509_check_purpose(x, -1, 0);