diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2009-02-15 12:10:39 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2009-02-15 12:10:39 +0000 |
commit | 9a6401acdf50a5c7948ced371d20d47dc4ea1226 (patch) | |
tree | 75c9ed3f8cdd23b1f913d672263ead4dbb644f52 /crypto/x509 | |
parent | c40fcc1e40771cbc2dd13e9eab2f3a4ec6c19435 (diff) |
PR: 1422
Fix return value of X509_NAME_cmp() so it works with qsort/bsearch again.
Diffstat (limited to 'crypto/x509')
-rw-r--r-- | crypto/x509/x509_cmp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/x509/x509_cmp.c b/crypto/x509/x509_cmp.c index e4c682fc44..2faf92514a 100644 --- a/crypto/x509/x509_cmp.c +++ b/crypto/x509/x509_cmp.c @@ -288,7 +288,8 @@ int X509_NAME_cmp(const X509_NAME *a, const X509_NAME *b) if (!(nabit & STR_TYPE_CMP) || !(nbbit & STR_TYPE_CMP)) return j; - j = asn1_string_memcmp(na->value, nb->value); + if (!asn1_string_memcmp(na->value, nb->value)) + j = 0; } else if (na->value->type == V_ASN1_PRINTABLESTRING) j=nocase_spacenorm_cmp(na->value, nb->value); |