diff options
author | Tobias Brunner <tobias@strongswan.org> | 2009-07-14 11:55:09 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2009-07-14 12:09:22 +0200 |
commit | fd0df7ec75db392e89c3bd6e59a6a8669463a3c7 (patch) | |
tree | 6b306b8eb056fce85cb93c0856f3882fada7f7d3 | |
parent | 0b5f2a81da79b4477dbb405bd8591235e7ee24b6 (diff) | |
download | strongswan-fd0df7ec75db392e89c3bd6e59a6a8669463a3c7.tar.bz2 strongswan-fd0df7ec75db392e89c3bd6e59a6a8669463a3c7.tar.xz |
Corrected check for valid ASN1 types in rdn_enumerate.
Because of the range of u_char the comparison was always TRUE before.
-rw-r--r-- | src/libstrongswan/utils/identification.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libstrongswan/utils/identification.c b/src/libstrongswan/utils/identification.c index 6816a7d8c..f006b40a7 100644 --- a/src/libstrongswan/utils/identification.c +++ b/src/libstrongswan/utils/identification.c @@ -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; } } |