diff options
author | Ulf Möller <ulf@openssl.org> | 2000-01-21 00:03:51 +0000 |
---|---|---|
committer | Ulf Möller <ulf@openssl.org> | 2000-01-21 00:03:51 +0000 |
commit | 731d9c5fb5d0535e3c84866e3c355cbf21a92a67 (patch) | |
tree | 8e94b4b35c0ef3b4993c0db6e16df5606e766a6e /crypto/x509 | |
parent | 4699af98e69a7400be1a2d1e21c02007e1d86b4d (diff) | |
download | openssl-731d9c5fb5d0535e3c84866e3c355cbf21a92a67.tar.gz |
Some more ifdefs for no-xxx options.
Diffstat (limited to 'crypto/x509')
-rw-r--r-- | crypto/x509/x509.h | 2 | ||||
-rw-r--r-- | crypto/x509/x509_cmp.c | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/crypto/x509/x509.h b/crypto/x509/x509.h index 849633a3ec..6b2c290bc5 100644 --- a/crypto/x509/x509.h +++ b/crypto/x509/x509.h @@ -260,7 +260,9 @@ typedef struct x509_st unsigned long ex_kusage; unsigned long ex_xkusage; unsigned long ex_nscert; +#ifndef NO_SHA unsigned char sha1_hash[SHA_DIGEST_LENGTH]; +#endif X509_CERT_AUX *aux; } X509; diff --git a/crypto/x509/x509_cmp.c b/crypto/x509/x509_cmp.c index 62d8013360..200682fd3e 100644 --- a/crypto/x509/x509_cmp.c +++ b/crypto/x509/x509_cmp.c @@ -136,6 +136,8 @@ unsigned long X509_subject_name_hash(X509 *x) { return(X509_NAME_hash(x->cert_info->subject)); } + +#ifndef NO_SHA /* Compare two certificates: they must be identical for * this to work. */ @@ -144,8 +146,10 @@ int X509_cmp(X509 *a, X509 *b) /* ensure hash is valid */ X509_check_purpose(a, -1, 0); X509_check_purpose(b, -1, 0); + return memcmp(a->sha1_hash, b->sha1_hash, SHA_DIGEST_LENGTH); } +#endif int X509_NAME_cmp(X509_NAME *a, X509_NAME *b) { |