add NID_domainComponent

This commit is contained in:
Takashi Kojo
2017-02-26 10:50:17 +09:00
committed by Jacob Barthelmeh
parent 289ad7a42c
commit 2fc494f66b
3 changed files with 15 additions and 2 deletions

View File

@@ -3895,7 +3895,17 @@ static int GetName(DecodedCert* cert, int nameType)
dName->snLen = strLen;
#endif /* OPENSSL_EXTRA */
}
else if (id == ASN_DOMAIN_COMPONENT) {
if (!tooBig) {
XMEMCPY(&full[idx], "/domainComponent=", 17);
idx += 17;
copy = TRUE;
}
#ifdef OPENSSL_EXTRA
dName->snIdx = cert->srcIdx;
dName->snLen = strLen;
#endif /* OPENSSL_EXTRA */
}
if (copy && !tooBig) {
XMEMCPY(&full[idx], &cert->source[cert->srcIdx], strLen);
idx += strLen;

View File

@@ -557,6 +557,8 @@ typedef WOLFSSL_X509_NAME_ENTRY X509_NAME_ENTRY;
#define NID_commonName 0x03 /* matchs ASN_COMMON_NAME in asn.h */
#define NID_domainComponent 0x10
/* matchs ASN_DOMAIN_COMPONENT in asn.h */
/* matchs ASN_..._NAME in asn.h */
#define NID_commonName 0x03 /* CN */

View File

@@ -104,6 +104,7 @@ enum DN_Tags {
ASN_STATE_NAME = 0x08, /* ST */
ASN_ORG_NAME = 0x0a, /* O */
ASN_ORGUNIT_NAME = 0x0b, /* OU */
ASN_DOMAIN_COMPONENT = 0x10, /* DC */
ASN_EMAIL_NAME = 0x98 /* not oid number there is 97 in 2.5.4.0-97 */
};