TrustCore SDK Crypto Interface API reference  version 2.0
tap_extern.h File Reference

TAP Extern APIs. More...

Go to the source code of this file.

Functions

MOC_EXTERN sbyte4 MOCANA_TAP_EXTERN_getTapContext (TAP_Context **ppTapContext, TAP_EntityCredentialList **ppTapEntityCred, TAP_CredentialList **ppTapKeyCred, void *pKey, TapOperation op, ubyte getContext)
 TapContext callback. More...
 
MOC_EXTERN sbyte4 MOCANA_TAPExternDeinit (void **ppFuncPtrGetTapContext)
 Uninitialize TAP and the TapContext callback. More...
 
MOC_EXTERN sbyte4 MOCANA_TAPExternInit (void **ppFuncPtrGetTapContext)
 Initialize TAP and the TapContext callback. More...
 

Detailed Description

This file contains TAP Extern APIs.

tap_extern.h

Function Documentation

◆ MOCANA_TAP_EXTERN_getTapContext()

MOC_EXTERN sbyte4 MOCANA_TAP_EXTERN_getTapContext ( TAP_Context **  ppTapContext,
TAP_EntityCredentialList **  ppTapEntityCred,
TAP_CredentialList **  ppTapKeyCred,
void *  pKey,
TapOperation  op,
ubyte  getContext 
)

This function initializes/uninitializes TAP context for the given key

Parameters
ppTapContextpointer to the Tap Context
ppTapEntityCredpointer to the Tap Entity Credentials
ppTapKeyCredpointer to the Tap Key Credentials
pKeyMocAsymKey or MocSymCtx depending on the operation
opTap operation
getContextif 1, create a new Tap Context. else, destroy the Tap Context.
Returns
OK (0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR macro.

◆ MOCANA_TAPExternDeinit()

MOC_EXTERN sbyte4 MOCANA_TAPExternDeinit ( void **  ppFuncPtrGetTapContext)

This function uninitializes TAP, and sets the TapContext callback to NULL

Parameters
ppFuncPtrGetTapContextpointer to funcPtr to get the Tap Context
Returns
OK (0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR macro.

◆ MOCANA_TAPExternInit()

MOC_EXTERN sbyte4 MOCANA_TAPExternInit ( void **  ppFuncPtrGetTapContext)

This function initializes TAP and TapContext callback for applications using TAP keys and cannot modify their init sequence to initialize TAP. This function obtains TAP config values needed from environment variables. If using TAP in local mode, MOCANA_CONFIGFILE environment variable should be set to config file

If using TAP in remote mode, MOCANA_TAPSERVERNAME env variable should be set to tap servername MOCANA_TAPSERVERPORT env variable should be set to port of the tap server

Parameters
ppFuncPtrGetTapContextpointer to funcPtr to get the Tap Context
Returns
OK (0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR macro.