summaryrefslogtreecommitdiff
path: root/lib/x509/dn.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2012-11-18 19:31:54 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2012-11-18 19:31:54 +0100
commit9e02a17f503668551356bdd10489b93c447834e4 (patch)
tree3ab0e52f14dca48efc1d56317a4cb2a259deb456 /lib/x509/dn.c
parent96c38a6c89fe0b6f7d826c3588479ec861811054 (diff)
downloadgnutls-9e02a17f503668551356bdd10489b93c447834e4.tar.gz
Added functions to parse the certificate policies extention.
Added gnutls_x509_crt_get_policy() etc. In addition several updated in the handling of strings in X.509 structures.
Diffstat (limited to 'lib/x509/dn.c')
-rw-r--r--lib/x509/dn.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/x509/dn.c b/lib/x509/dn.c
index 9c6096193d..9506969f5a 100644
--- a/lib/x509/dn.c
+++ b/lib/x509/dn.c
@@ -834,8 +834,10 @@ _gnutls_x509_decode_and_read_attribute (ASN1_TYPE asn1_struct,
if (multi)
_gnutls_str_cat (tmpbuffer, sizeof (tmpbuffer), "s.?1"); /* .values.?1 */
- result =
- _gnutls_x509_read_value (asn1_struct, tmpbuffer, value, octet_string);
+ if (octet_string)
+ result = _gnutls_x509_read_string (asn1_struct, tmpbuffer, value, RV_OCTET_STRING);
+ else
+ result = _gnutls_x509_read_value (asn1_struct, tmpbuffer, value);
if (result < 0)
{
gnutls_assert ();