From 731d9c5fb5d0535e3c84866e3c355cbf21a92a67 Mon Sep 17 00:00:00 2001 From: Ulf Möller Date: Fri, 21 Jan 2000 00:03:51 +0000 Subject: Some more ifdefs for no-xxx options. --- crypto/x509/x509_cmp.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crypto/x509/x509_cmp.c') 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) { -- cgit v1.2.3