From: Nikos Mavrogiannopoulos Date: Mon, 26 Nov 2012 17:51:37 +0000 (+0100) Subject: gnutls_x509_crt_get_policy() allows for a list of zero policy qualifiers. X-Git-Tag: gnutls_3_1_6~61 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=96d55b5237be54800f60610dac84e447eb94015c;p=thirdparty%2Fgnutls.git gnutls_x509_crt_get_policy() allows for a list of zero policy qualifiers. --- diff --git a/NEWS b/NEWS index d85daa3071..75eefb5d61 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,9 @@ See the end for copying conditions. ** libgnutls: Several updates in the ASN.1 string handling subsystem. +** libgnutls: gnutls_x509_crt_get_policy() allows for a list of zero +policy qualifiers. + ** API and ABI modifications: No changes since last version. diff --git a/lib/x509/x509.c b/lib/x509/x509.c index 7d00a83867..4ece362327 100644 --- a/lib/x509/x509.c +++ b/lib/x509/x509.c @@ -1967,7 +1967,7 @@ gnutls_x509_crt_get_policy (gnutls_x509_crt_t crt, int indx, len = sizeof(tmpoid); ret = asn1_read_value(c2, tmpstr, tmpoid, &len); - if (ret == ASN1_ELEMENT_NOT_FOUND && i > 0) + if (ret == ASN1_ELEMENT_NOT_FOUND) break; /* finished */ if (ret != ASN1_SUCCESS)