summaryrefslogtreecommitdiffstats
path: root/crypto/x509
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2006-07-24 12:39:22 +0000
committerDr. Stephen Henson <steve@openssl.org>2006-07-24 12:39:22 +0000
commitedc540211c4852c57c01743a068aecc0e0a97b5c (patch)
treeaf526d91c0c1e04d4e3f46cf36c238c29d4e920e /crypto/x509
parent2eed3a3cc87be91ee56a9961abcee5ea43901e56 (diff)
Cache some CRL related extensions.
Diffstat (limited to 'crypto/x509')
-rw-r--r--crypto/x509/x509.h10
-rw-r--r--crypto/x509/x509_cmp.c7
2 files changed, 16 insertions, 1 deletions
diff --git a/crypto/x509/x509.h b/crypto/x509/x509.h
index 51d8baf82e..ac5e4b60e4 100644
--- a/crypto/x509/x509.h
+++ b/crypto/x509/x509.h
@@ -288,8 +288,9 @@ struct x509_st
unsigned long ex_xkusage;
unsigned long ex_nscert;
ASN1_OCTET_STRING *skid;
- struct AUTHORITY_KEYID_st *akid;
+ AUTHORITY_KEYID *akid;
X509_POLICY_CACHE *policy_cache;
+ STACK_OF(DIST_POINT) *crldp;
#ifndef OPENSSL_NO_SHA
unsigned char sha1_hash[SHA_DIGEST_LENGTH];
#endif
@@ -449,6 +450,13 @@ struct X509_crl_st
X509_ALGOR *sig_alg;
ASN1_BIT_STRING *signature;
int references;
+ int flags;
+ /* Copies of various extensions */
+ AUTHORITY_KEYID *akid;
+ ISSUING_DIST_POINT *idp;
+#ifndef OPENSSL_NO_SHA
+ unsigned char sha1_hash[SHA_DIGEST_LENGTH];
+#endif
} /* X509_CRL */;
DECLARE_STACK_OF(X509_CRL)
diff --git a/crypto/x509/x509_cmp.c b/crypto/x509/x509_cmp.c
index 4f157ba807..180dedc7fa 100644
--- a/crypto/x509/x509_cmp.c
+++ b/crypto/x509/x509_cmp.c
@@ -116,6 +116,13 @@ int X509_CRL_cmp(const X509_CRL *a, const X509_CRL *b)
return(X509_NAME_cmp(a->crl->issuer,b->crl->issuer));
}
+#ifndef OPENSSL_NO_SHA
+int X509_CRL_match(const X509_CRL *a, const X509_CRL *b)
+ {
+ return memcmp(a->sha1_hash, b->sha1_hash, 20);
+ }
+#endif
+
X509_NAME *X509_get_issuer_name(X509 *a)
{
return(a->cert_info->issuer);