forked from wolfSSL/wolfssl
make cert names more consistent with str type that openssl uses
This commit is contained in:
@ -4266,12 +4266,16 @@ static int SetName(byte* output, CertName* name)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* joint id */
|
/* joint id */
|
||||||
|
byte bType = GetNameId(i);
|
||||||
names[i].encoded[idx++] = 0x55;
|
names[i].encoded[idx++] = 0x55;
|
||||||
names[i].encoded[idx++] = 0x04;
|
names[i].encoded[idx++] = 0x04;
|
||||||
/* id type */
|
/* id type */
|
||||||
names[i].encoded[idx++] = GetNameId(i);
|
names[i].encoded[idx++] = bType;
|
||||||
/* str type */
|
/* 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 */
|
/* second length */
|
||||||
XMEMCPY(names[i].encoded + idx, secondLen, secondSz);
|
XMEMCPY(names[i].encoded + idx, secondLen, secondSz);
|
||||||
|
Reference in New Issue
Block a user