add NID_domainComponent in X509_NAME_get_text_by_NID

This commit is contained in:
Takashi Kojo
2017-02-26 11:00:01 +09:00
committed by Jacob Barthelmeh
parent 2fc494f66b
commit e2a16190a6
3 changed files with 8 additions and 2 deletions

View File

@@ -14931,6 +14931,10 @@ static void ExternalFreeX509(WOLFSSL_X509* x509)
text = name->fullName.fullName + name->fullName.ouIdx;
textSz = name->fullName.ouLen;
break;
case ASN_DOMAIN_COMPONENT:
text = name->fullName.fullName + name->fullName.dcIdx;
textSz = name->fullName.dcLen;
break;
default:
WOLFSSL_MSG("Unknown NID value");
return -1;

View File

@@ -3902,8 +3902,8 @@ static int GetName(DecodedCert* cert, int nameType)
copy = TRUE;
}
#ifdef OPENSSL_EXTRA
dName->snIdx = cert->srcIdx;
dName->snLen = strLen;
dName->dcIdx = cert->srcIdx;
dName->dcLen = strLen;
#endif /* OPENSSL_EXTRA */
}
if (copy && !tooBig) {

View File

@@ -440,6 +440,8 @@ struct DecodedName {
int uidLen;
int serialIdx;
int serialLen;
int dcIdx;
int dcLen;
};
enum SignatureState {