diff options
author | Dr. Stephen Henson <steve@openssl.org> | 1999-11-16 00:56:03 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 1999-11-16 00:56:03 +0000 |
commit | e947f3968926b2ab2b2de895b7a0e2fe3730beb8 (patch) | |
tree | 6a599a9b4e261a40d0020d2b3362bcdad2157211 /crypto/x509v3/v3_purp.c | |
parent | b7cfcfb7f8e17c17f457b3384010eb027f3aad72 (diff) |
New function X509_cmp().
Diffstat (limited to 'crypto/x509v3/v3_purp.c')
-rw-r--r-- | crypto/x509v3/v3_purp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/x509v3/v3_purp.c b/crypto/x509v3/v3_purp.c index d7e561e58e..6ec5f957e9 100644 --- a/crypto/x509v3/v3_purp.c +++ b/crypto/x509v3/v3_purp.c @@ -103,12 +103,13 @@ int X509_check_purpose(X509 *x, int id, int ca) x509v3_cache_extensions(x); CRYPTO_w_unlock(CRYPTO_LOCK_X509); } + if(id == -1) return 1; idx = x509_purpose_get_idx(id); if(idx == -1) return -1; pt = sk_X509_PURPOSE_value(xptable, idx); return pt->check_purpose(pt, x,ca); } - + @@ -199,6 +200,7 @@ static void x509v3_cache_extensions(X509 *x) STACK_OF(ASN1_OBJECT) *extusage; int i; if(x->ex_flags & EXFLAG_SET) return; + X509_digest(x, EVP_sha1(), x->sha1_hash, NULL); /* Does subject name match issuer ? */ if(X509_NAME_cmp(X509_get_subject_name(x), X509_get_issuer_name(x))) x->ex_flags |= EXFLAG_SS; |