FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/wolfcrypt/src/wc_pkcs11.c
/**
 * Check if mechanism is available in session on token.
 *
 * @param  session  [in]  Session object.
 * @param  mech     [in]  Mechanism to look for.
 * @return  NOT_COMPILED_IN when mechanism not available.
 *          0 when mechanism is available.
 */
Check if mechanism is available in session on token.
@param  session  [in]  Session object.
@param  mech     [in]  Mechanism to look for.
@return  NOT_COMPILED_IN when mechanism not available.
0 when mechanism is available.
Check if mechanism is available in session on token . @param session [ in ] Session object . @param mech [ in ] Mechanism to look for . @return NOT_COMPILED_IN when mechanism not available . 0 when mechanism is available .
static int Pkcs11MechAvail(Pkcs11Session* session, CK_MECHANISM_TYPE mech)
{
    int               ret = 0;
    CK_RV             rv;
    CK_MECHANISM_INFO mechInfo;
    rv = session->func->C_GetMechanismInfo(session->slotId, mech, &mechInfo);
    if (rv != CKR_OK)
        ret = NOT_COMPILED_IN;
    return ret;
}
static int Pkcs11MechAvail ( Pkcs11Session * session , CK_MECHANISM_TYPE mech ) { int ret = 0 ; CK_RV rv ; CK_MECHANISM_INFO mechInfo ; rv = session -> func -> C_GetMechanismInfo ( session -> slotId , mech , & mechInfo ) ; if ( rv != CKR_OK ) ret = NOT_COMPILED_IN ; return ret ; }
Check if mechanism is available in session on token.
Check if mechanism is available in session on token .