Changed some WOLFSSL_ASN1_TIME handling and other fixes.

This commit is contained in:
Uriah Pollock
2022-10-14 17:09:35 -05:00
parent dc8997d4b6
commit f48b736ec3
6 changed files with 71 additions and 43 deletions

View File

@@ -35775,14 +35775,12 @@ static int ParseCRL_CertList(RevokedCert* rcert, DecodedCRL* dcrl,
if (GetNameHash(buf, &idx, dcrl->issuerHash, sz) < 0)
return ASN_PARSE_E;
if (GetBasicDate(buf, &idx, dcrl->lastDate.data,
(byte*) &dcrl->lastDate.type, sz) < 0)
if (GetBasicDate(buf, &idx, dcrl->lastDate, &dcrl->lastDateFormat, sz) < 0)
return ASN_PARSE_E;
dateIdx = idx;
if (GetBasicDate(buf, &idx, dcrl->nextDate.data,
(byte*) &dcrl->nextDate.type, sz) < 0)
if (GetBasicDate(buf, &idx, dcrl->nextDate, &dcrl->nextDateFormat, sz) < 0)
{
#ifndef WOLFSSL_NO_CRL_NEXT_DATE
(void)dateIdx;
@@ -35799,8 +35797,8 @@ static int ParseCRL_CertList(RevokedCert* rcert, DecodedCRL* dcrl,
#endif
{
#ifndef NO_ASN_TIME
if (verify != NO_VERIFY && !XVALIDATE_DATE(dcrl->nextDate.data,
dcrl->nextDate.type, AFTER)) {
if (verify != NO_VERIFY &&
!XVALIDATE_DATE(dcrl->nextDate, dcrl->nextDateFormat, AFTER)) {
WOLFSSL_MSG("CRL after date is no longer valid");
WOLFSSL_ERROR_VERBOSE(CRL_CERT_DATE_ERR);
return CRL_CERT_DATE_ERR;