Skip to content

Commit ed970e7

Browse files
committed
Add missing WOLFSSL_HOSTNAME_VERIFY_ALT_NAME_ONLY guards
1 parent 9780137 commit ed970e7

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/internal.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16467,6 +16467,7 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
1646716467
}
1646816468
}
1646916469
else {
16470+
#ifndef WOLFSSL_HOSTNAME_VERIFY_ALT_NAME_ONLY
1647016471
if (MatchDomainName(
1647116472
args->dCert->subjectCN,
1647216473
args->dCert->subjectCNLen,
@@ -16475,6 +16476,7 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
1647516476
(word32)XSTRLEN(
1647616477
(const char *)ssl->buffers.domainName.buffer)
1647716478
), 0) == 0)
16479+
#endif
1647816480
{
1647916481
WOLFSSL_MSG("DomainName match on common name failed");
1648016482
ret = DOMAIN_NAME_MISMATCH;
@@ -16483,11 +16485,13 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
1648316485
}
1648416486
#else /* WOLFSSL_ALL_NO_CN_IN_SAN */
1648516487
/* Old behavior. */
16488+
#ifndef WOLFSSL_HOSTNAME_VERIFY_ALT_NAME_ONLY
1648616489
if (MatchDomainName(args->dCert->subjectCN,
1648716490
args->dCert->subjectCNLen,
1648816491
(char*)ssl->buffers.domainName.buffer,
1648916492
(ssl->buffers.domainName.buffer == NULL ? 0 :
1649016493
(word32)XSTRLEN(ssl->buffers.domainName.buffer)), 0) == 0)
16494+
#endif
1649116495
{
1649216496
WOLFSSL_MSG("DomainName match on common name failed");
1649316497
if (CheckForAltNames(args->dCert,

0 commit comments

Comments
 (0)