summaryrefslogtreecommitdiffstats
path: root/crypto/x509
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2010-01-12 17:29:34 +0000
committerDr. Stephen Henson <steve@openssl.org>2010-01-12 17:29:34 +0000
commit0e0c6821fab18a7d180d3c8dfe18e34fdd2afc54 (patch)
treeee03d9c49d86abec367ce5f68242900a72d17168 /crypto/x509
parent423c66f10e3762643020601bf76cec3309f1474d (diff)
PR: 2136
Submitted by: Willy Weisz <weisz@vcpc.univie.ac.at> Add options to output hash using older algorithm compatible with OpenSSL versions before 1.0.0
Diffstat (limited to 'crypto/x509')
-rw-r--r--crypto/x509/x509.h5
-rw-r--r--crypto/x509/x509_cmp.c14
2 files changed, 19 insertions, 0 deletions
diff --git a/crypto/x509/x509.h b/crypto/x509/x509.h
index 25f536d068..a2383b387a 100644
--- a/crypto/x509/x509.h
+++ b/crypto/x509/x509.h
@@ -961,6 +961,11 @@ unsigned long X509_issuer_name_hash(X509 *a);
int X509_subject_name_cmp(const X509 *a, const X509 *b);
unsigned long X509_subject_name_hash(X509 *x);
+#ifndef OPENSSL_NO_MD5
+unsigned long X509_issuer_name_hash_old(X509 *a);
+unsigned long X509_subject_name_hash_old(X509 *x);
+#endif
+
int X509_cmp(const X509 *a, const X509 *b);
int X509_NAME_cmp(const X509_NAME *a, const X509_NAME *b);
unsigned long X509_NAME_hash(X509_NAME *x);
diff --git a/crypto/x509/x509_cmp.c b/crypto/x509/x509_cmp.c
index dd55b6e165..a75876edbb 100644
--- a/crypto/x509/x509_cmp.c
+++ b/crypto/x509/x509_cmp.c
@@ -138,6 +138,13 @@ unsigned long X509_issuer_name_hash(X509 *x)
return(X509_NAME_hash(x->cert_info->issuer));
}
+#ifndef OPENSSL_NO_MD5
+unsigned long X509_issuer_name_hash_old(X509 *x)
+ {
+ return(X509_NAME_hash_old(x->cert_info->issuer));
+ }
+#endif
+
X509_NAME *X509_get_subject_name(X509 *a)
{
return(a->cert_info->subject);
@@ -153,6 +160,13 @@ unsigned long X509_subject_name_hash(X509 *x)
return(X509_NAME_hash(x->cert_info->subject));
}
+#ifndef OPENSSL_NO_MD5
+unsigned long X509_subject_name_hash_old(X509 *x)
+ {
+ return(X509_NAME_hash_old(x->cert_info->subject));
+ }
+#endif
+
#ifndef OPENSSL_NO_SHA
/* Compare two certificates: they must be identical for
* this to work. NB: Although "cmp" operations are generally