diff options
Diffstat (limited to 'src/libstrongswan/utils/identification.c')
-rw-r--r-- | src/libstrongswan/utils/identification.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/libstrongswan/utils/identification.c b/src/libstrongswan/utils/identification.c index d9b767018..6d969ed16 100644 --- a/src/libstrongswan/utils/identification.c +++ b/src/libstrongswan/utils/identification.c @@ -456,12 +456,16 @@ static bool same_dn(chunk_t a, chunk_t b) || (type_a == ASN1_IA5STRING && known_oid(oid_a) == OID_PKCS9_EMAIL))) { if (strncasecmp(value_a.ptr, value_b.ptr, value_b.len) != 0) + { return FALSE; + } } else { - if (strncmp(value_a.ptr, value_b.ptr, value_b.len) != 0) - return FALSE; + if (!strneq(value_a.ptr, value_b.ptr, value_b.len)) + { + return FALSE; + } } } /* both DNs must have same number of RDNs */ @@ -529,12 +533,16 @@ bool match_dn(chunk_t a, chunk_t b, int *wildcards) || (type_a == ASN1_IA5STRING && known_oid(oid_a) == OID_PKCS9_EMAIL))) { if (strncasecmp(value_a.ptr, value_b.ptr, value_b.len) != 0) + { return FALSE; + } } else { - if (strncmp(value_a.ptr, value_b.ptr, value_b.len) != 0) + if (!strneq(value_a.ptr, value_b.ptr, value_b.len)) + { return FALSE; + } } } /* both DNs must have same number of RDNs */ |