Corrected check for valid ASN1 types in rdn_enumerate.

Because of the range of u_char the comparison was always TRUE before.
This commit is contained in:
Tobias Brunner
2009-07-14 12:09:22 +02:00
parent 0b5f2a81da
commit fd0df7ec75
+3 -2
View File
@@ -147,9 +147,10 @@ static bool rdn_enumerate(rdn_enumerator_t *this, chunk_t *oid,
if (asn1_unwrap(&rdn, oid) == ASN1_OID)
{
/* and a specific string type */
*type = asn1_unwrap(&rdn, data);
if (*type != ASN1_INVALID)
int t = asn1_unwrap(&rdn, data);
if (t != ASN1_INVALID)
{
*type = t;
return TRUE;
}
}