FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/wolfcrypt/src/asn.c
/* Free an individual trusted peer cert */
Free an individual trusted peer cert
Free an individual trusted peer cert
void FreeTrustedPeer(TrustedPeerCert* tp, void* heap)
{
    if (tp == NULL) {
        return;
    }
    if (tp->name) {
        XFREE(tp->name, heap, DYNAMIC_TYPE_SUBJECT_CN);
    }
    if (tp->sig) {
        XFREE(tp->sig, heap, DYNAMIC_TYPE_SIGNATURE);
    }
#ifndef IGNORE_NAME_CONSTRAINTS
    if (tp->permittedNames)
        FreeNameSubtrees(tp->permittedNames, heap);
    if (tp->excludedNames)
        FreeNameSubtrees(tp->excludedNames, heap);
#endif
    XFREE(tp, heap, DYNAMIC_TYPE_CERT);
    (void)heap;
}
void FreeTrustedPeer ( TrustedPeerCert * tp , void * heap ) { if ( tp == NULL ) { return ; } if ( tp -> name ) { XFREE ( tp -> name , heap , DYNAMIC_TYPE_SUBJECT_CN ) ; } if ( tp -> sig ) { XFREE ( tp -> sig , heap , DYNAMIC_TYPE_SIGNATURE ) ; } #ifndef IGNORE_NAME_CONSTRAINTS if ( tp -> permittedNames ) FreeNameSubtrees ( tp -> permittedNames , heap ) ; if ( tp -> excludedNames ) FreeNameSubtrees ( tp -> excludedNames , heap ) ; #endif XFREE ( tp , heap , DYNAMIC_TYPE_CERT ) ; ( void ) heap ; }
Free an individual trusted peer cert
Free an individual trusted peer cert