FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/wolfcrypt/src/wc_port.c
/* return success value is the same as wolfCrypt_Init */
return success value is the same as wolfCrypt_Init
return success value is the same as wolfCrypt_Init
int wolfCrypt_Cleanup(void)
{
    int ret = 0;
    initRefCount--;
    if (initRefCount < 0)
        initRefCount = 0;
    if (initRefCount == 0) {
        WOLFSSL_ENTER("wolfCrypt_Cleanup");
#ifdef HAVE_ECC
    #ifdef FP_ECC
        wc_ecc_fp_free();
    #endif
    #ifdef ECC_CACHE_CURVE
        wc_ecc_curve_cache_free();
    #endif
#endif 
    #if defined(OPENSSL_EXTRA) || defined(DEBUG_WOLFSSL_VERBOSE)
        ret = wc_LoggingCleanup();
    #endif
    #if defined(WOLFSSL_TRACK_MEMORY) && !defined(WOLFSSL_STATIC_MEMORY)
        ShowMemoryTracker();
    #endif
    #ifdef WOLFSSL_ASYNC_CRYPT
        wolfAsync_HardwareStop();
    #endif
    #ifdef WOLFSSL_SCE
        WOLFSSL_SCE_GSCE_HANDLE.p_api->close(WOLFSSL_SCE_GSCE_HANDLE.p_ctrl);
    #endif
    #if defined(WOLFSSL_IMX6_CAAM) || defined(WOLFSSL_IMX6_CAAM_RNG) || \
        defined(WOLFSSL_IMX6_CAAM_BLOB)
        wc_caamFree();
    #endif
    #if defined(WOLFSSL_CRYPTOCELL)
        cc310_Free();
    #endif
    #if defined(WOLFSSL_RENESAS_TSIP_CRYPT)
        tsip_Close();
    #endif
    #if defined(WOLFSSL_DSP) && !defined(WOLFSSL_DSP_BUILD)
        rpcmem_deinit();
        wolfSSL_CleanupHandle();
    #endif
    }
    return ret;
}
int wolfCrypt_Cleanup ( void ) { int ret = 0 ; initRefCount -- ; if ( initRefCount < 0 ) initRefCount = 0 ; if ( initRefCount == 0 ) { WOLFSSL_ENTER ( " " ) ; #ifdef HAVE_ECC #ifdef FP_ECC wc_ecc_fp_free ( ) ; #endif #ifdef ECC_CACHE_CURVE wc_ecc_curve_cache_free ( ) ; #endif #endif #if defined ( OPENSSL_EXTRA ) || defined ( DEBUG_WOLFSSL_VERBOSE ) ret = wc_LoggingCleanup ( ) ; #endif #if defined ( WOLFSSL_TRACK_MEMORY ) && ! defined ( WOLFSSL_STATIC_MEMORY ) ShowMemoryTracker ( ) ; #endif #ifdef WOLFSSL_ASYNC_CRYPT wolfAsync_HardwareStop ( ) ; #endif #ifdef WOLFSSL_SCE WOLFSSL_SCE_GSCE_HANDLE . p_api -> close ( WOLFSSL_SCE_GSCE_HANDLE . p_ctrl ) ; #endif #if defined ( WOLFSSL_IMX6_CAAM ) || defined ( WOLFSSL_IMX6_CAAM_RNG ) || defined ( WOLFSSL_IMX6_CAAM_BLOB ) wc_caamFree ( ) ; #endif #if defined ( WOLFSSL_CRYPTOCELL ) cc310_Free ( ) ; #endif #if defined ( WOLFSSL_RENESAS_TSIP_CRYPT ) tsip_Close ( ) ; #endif #if defined ( WOLFSSL_DSP ) && ! defined ( WOLFSSL_DSP_BUILD ) rpcmem_deinit ( ) ; wolfSSL_CleanupHandle ( ) ; #endif } return ret ; }
return success value is the same as wolfCrypt_Init
return success value is the same as wolfCrypt_Init
/* HAVE_ECC */