Extend x509.c so it can parse SSL certs issued by my departmental CA (who I believe to be using openssl). The issue is that some, but not all, of the name components in the certificate I was issued are UTF8String rather than PrintableString. This patch adds UTF8String in the obvious way. Reference: /n/sources/patch/applied/x509-utf8string Date: Tue Sep 19 06:19:04 CES 2006 Signed-off-by: davide+p9@cs.cmu.edu --- /sys/src/libsec/port/x509.c Tue Sep 19 06:18:55 2006 +++ /sys/src/libsec/port/x509.c Tue Sep 19 06:18:53 2006 @@ -40,6 +40,7 @@ #define REAL 9 #define ENUMERATED 10 #define EMBEDDED_PDV 11 +#define UTF8String 12 #define SEQUENCE 16 /* also SEQUENCE OF */ #define SETOF 17 /* also SETOF OF */ #define NumericString 18 @@ -516,7 +517,7 @@ pval->u.setval = vl; } break; - + case UTF8String: case NumericString: case PrintableString: case TeletexString: @@ -1018,6 +1019,7 @@ } break; + case UTF8String: case NumericString: case PrintableString: case TeletexString: @@ -1248,6 +1250,7 @@ { if(pe->tag.class == Universal) { switch(pe->tag.num) { + case UTF8String: case NumericString: case PrintableString: case TeletexString: @@ -2450,6 +2453,7 @@ case EMBEDDED_PDV: return "EMBEDDED PDV"; case SEQUENCE: return "SEQUENCE"; case SETOF: return "SETOF"; + case UTF8String: return "UTF8String"; case NumericString: return "NumericString"; case PrintableString: return "PrintableString"; case TeletexString: return "TeletexString";