FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/wolfcrypt/src/asn.c
/* Set cert dates from DER buffer */
Set cert dates from DER buffer
Set cert dates from DER buffer
int wc_SetDatesBuffer(Cert* cert, const byte* der, int derSz)
{
    int ret = 0;
    if (cert == NULL) {
     ret = BAD_FUNC_ARG;
    }
    else {
        if (cert->der != der) {
            ret = wc_SetCert_LoadDer(cert, der, derSz);
        }
        if (ret >= 0) {
            ret = SetDatesFromDcert(cert, (DecodedCert*)cert->decodedCert);
#ifndef WOLFSSL_CERT_GEN_CACHE
            wc_SetCert_Free(cert);
#endif
        }
    }
    return(ret);
}
int wc_SetDatesBuffer ( Cert * cert , const byte * der , int derSz ) { int ret = 0 ; if ( cert == NULL ) { ret = BAD_FUNC_ARG ; } else { if ( cert -> der != der ) { ret = wc_SetCert_LoadDer ( cert , der , derSz ) ; } if ( ret >= 0 ) { ret = SetDatesFromDcert ( cert , ( DecodedCert * ) cert -> decodedCert ) ; #ifndef WOLFSSL_CERT_GEN_CACHE wc_SetCert_Free ( cert ) ; #endif } } return ( ret ) ; }
Set cert dates from DER buffer
Set cert dates from DER buffer
/* Check if decodedCert is cached */ /* Allocate cache for the decoded cert */