make cert names more consistent with str type that openssl uses
This commit is contained in:
parent
c545202de0
commit
10a3f8ead3
@ -4266,12 +4266,16 @@ static int SetName(byte* output, CertName* name)
|
||||
}
|
||||
else {
|
||||
/* joint id */
|
||||
byte bType = GetNameId(i);
|
||||
names[i].encoded[idx++] = 0x55;
|
||||
names[i].encoded[idx++] = 0x04;
|
||||
/* id type */
|
||||
names[i].encoded[idx++] = GetNameId(i);
|
||||
names[i].encoded[idx++] = bType;
|
||||
/* str type */
|
||||
names[i].encoded[idx++] = 0x13;
|
||||
if (bType == ASN_COUNTRY_NAME)
|
||||
names[i].encoded[idx++] = 0x13; /* printable */
|
||||
else
|
||||
names[i].encoded[idx++] = 0x0c; /* utf8 */
|
||||
}
|
||||
/* second length */
|
||||
XMEMCPY(names[i].encoded + idx, secondLen, secondSz);
|
||||
|
Loading…
Reference in New Issue
Block a user