Fix for no certificates and calling DoVerifyCallback.

pull/1775/head
Sean Parkinson 2018-08-22 10:57:19 +10:00
parent 776fd51720
commit fff5cff273
1 changed files with 1 additions and 1 deletions

View File

@ -8539,7 +8539,7 @@ static int DoVerifyCallback(WOLFSSL* ssl, int ret, ProcPeerCertArgs* args)
domain[0] = '\0';
/* build subject CN as string to return in store */
if (args->dCert && args->dCert->subjectCN) {
if (args->dCertInit && args->dCert && args->dCert->subjectCN) {
int subjectCNLen = args->dCert->subjectCNLen;
if (subjectCNLen > ASN_NAME_MAX-1)
subjectCNLen = ASN_NAME_MAX-1;