]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
(_oid2str): Mark UID as a CHOICE-field (i.e., DirectoryString).
authorSimon Josefsson <simon@josefsson.org>
Wed, 27 Dec 2006 18:23:17 +0000 (18:23 +0000)
committerSimon Josefsson <simon@josefsson.org>
Wed, 27 Dec 2006 18:23:17 +0000 (18:23 +0000)
(_gnutls_x509_oid_data2string): Handle ia5String in CHOICEs.
Fixes problem reported by Max Kellermann <max@duempel.org>.

lib/x509/common.c

index 4e2bbc1bf13351944ec92bd6c202b69b0cc8dce2..ddcb378c97f0fcabbe6d0f5acd5d01dde0fd0088 100644 (file)
@@ -74,7 +74,7 @@ static const oid2string _oid2str[] = {
   {"2.5.4.46", "dnQualifier", 0, 1},
 
   {"0.9.2342.19200300.100.1.25", "DC", 0, 1},
-  {"0.9.2342.19200300.100.1.1", "UID", 0, 1},
+  {"0.9.2342.19200300.100.1.1", "UID", 1, 1},
 
   /* PKCS #9
    */
@@ -254,6 +254,7 @@ _gnutls_x509_oid_data2string (const char *oid, void *value,
        * UTF-8 (thus ASCII as well).
        */
       if (strcmp (str, "printableString") != 0 &&
+         strcmp (str, "ia5String") != 0 &&
          strcmp (str, "utf8String") != 0)
        {
          non_printable = 1;