22 lines
661 B
Diff
22 lines
661 B
Diff
|
Make X509_NAME_cmp transitive.
|
||
|
--- openssl-0.9.8b/crypto/x509/x509_cmp.c.name-cmp 2004-12-01 02:45:30.000000000 +0100
|
||
|
+++ openssl-0.9.8b/crypto/x509/x509_cmp.c 2006-11-23 21:21:40.000000000 +0100
|
||
|
@@ -287,7 +287,16 @@
|
||
|
nbbit = ASN1_tag2bit(nb->value->type);
|
||
|
if (!(nabit & STR_TYPE_CMP) ||
|
||
|
!(nbbit & STR_TYPE_CMP))
|
||
|
- return j;
|
||
|
+ {
|
||
|
+ if (!(nabit & STR_TYPE_CMP) &&
|
||
|
+ (nbbit & STR_TYPE_CMP))
|
||
|
+ return -1;
|
||
|
+ else if ((nabit & STR_TYPE_CMP) &&
|
||
|
+ !(nbbit & STR_TYPE_CMP))
|
||
|
+ return 1;
|
||
|
+ else
|
||
|
+ return j;
|
||
|
+ }
|
||
|
j = asn1_string_memcmp(na->value, nb->value);
|
||
|
}
|
||
|
else if (na->value->type == V_ASN1_PRINTABLESTRING)
|