TrustCore SDK NanoSec API reference  version 7.0
EAP-FAST Functions

Provides EAP-FAST (EAP-flexible authentication via secure tunnelling) authentication. More...

Functions

MOC_EXTERN MSTATUS EAP_FASTAuthGetSessionHdl (ubyte *eapCb, ubyte **eapAuthSessionHdl)
 Get an EAP-FAST session's second stage EAP session handle. More...
 
MOC_EXTERN MSTATUS EAP_FASTAuthInit2 (ubyte *eapCb)
 Send an Identity request to the peer. More...
 
MOC_EXTERN MSTATUS EAP_FASTauthSendCryptoBindingTlv (ubyte *appSessionHdl, ubyte *cmk, ubyte *nonce)
 Transmits Result and crypto binding TLVs to the peer. More...
 
MOC_EXTERN MSTATUS EAP_FASTauthSendMethodResult (ubyte *appSessionHdl, ubyte sendCryptoBinding, ubyte *compoundKey, ubyte2 result, ubyte *nonce)
 Buld a Method Result packet. More...
 
MOC_EXTERN MSTATUS EAP_FASTauthSendPAC_ResultTlv (ubyte *eapFastSessionHdl, EAP_FAST_pac_t *pac)
 Transmits Result and PAC Provisioning TLVs to the peer. More...
 
MOC_EXTERN MSTATUS EAP_FASTbuildAuthId (ubyte flags, ubyte *authId, ubyte2 authIdLen, ubyte **eapReqData, ubyte4 *eapReqLen)
 Build an Authority ID Requeest packet. More...
 
MOC_EXTERN MSTATUS EAP_FASTdeleteSession (ubyte *eapFASTSession)
 Delete a second stage EAP-FAST session. More...
 
MOC_EXTERN MSTATUS EAP_FASTEncapEAPPkt (ubyte *eapFastCb, ubyte *eapPkt, ubyte4 eapPktLen)
 Build an EAP payload TLV from an input second stage EAP packet and then pass the packet to the first stage. More...
 
MOC_EXTERN MSTATUS EAP_FASTFormSendPacket (void *eapFASTCb, ubyte *pkt, ubyte4 pktLen, ubyte **eapResponse, ubyte4 *eapRespLen)
 Build an EAP-FAST packet from the specified encrypted second stage payload. More...
 
MOC_EXTERN MSTATUS EAP_FASTgetAuthId (ubyte *pkt, ubyte4 pktLen, ubyte **authId, ubyte2 *authIdLen)
 Extract the authority ID (if any) from an EAP-FAST packet. More...
 
MOC_EXTERN MSTATUS EAP_FASTgetTLVEncapEAPPkt (ubyte *eapPkt, ubyte4 eapPktLen, ubyte **response, ubyte4 *responseLen)
 Encapsulate an EAP packet into an EAP payload TLV packet. More...
 
MOC_EXTERN MSTATUS EAP_FASTinitSession (ubyte *appSessionCB, ubyte **eapFASTSession, EAP_FAST_params *eapFASTparams)
 Create and initialize an EAP-FAST session. More...
 
MOC_EXTERN MSTATUS EAP_FASTPeerGetSessionHdl (ubyte *eapCb, ubyte **eapSessionHdl)
 Get an EAP-FAST session's second stage EAP session handle. More...
 
MOC_EXTERN MSTATUS EAP_FASTProcessTLV (ubyte *fastHdl, ubyte *pPkt, ubyte4 pktLen)
 Process a decrypted EAP packet's TLVs. More...
 
MOC_EXTERN MSTATUS EAP_FASTreceiveLLPacket (void *eapFASTCb, ubyte *pkt, ubyte4 pktLen)
 Process a packet's TLVs, managing fragmentation, and send the packet on for second stage negotiation. More...
 
MOC_EXTERN MSTATUS EAP_FASTulAuthSessionDelete (ubyte *eapFASTCb)
 Delete an EAP-FAST authenticator second stage stack. More...
 
MOC_EXTERN MSTATUS EAP_FASTulAuthTransmit (ubyte *eapSessionHdl, ubyte4 instanceId, eapMethodType methodType, eapCode code, eapMethodDecision methodDecision, eapMethodState methodState, ubyte *eap_data, ubyte4 eap_data_len)
 Transmit packets from authenticator to peer during second stage negotiation. More...
 
MOC_EXTERN MSTATUS EAP_FASTulPeerSessionDelete (ubyte *eapFASTCb)
 Delete an EAP-FAST peer second stage stack. More...
 
MOC_EXTERN MSTATUS EAP_FASTulPeerTransmit (ubyte *eapSessionHdl, ubyte4 instanceId, eapMethodType methodType, eapCode code, eapMethodDecision methodDecision, eapMethodState methodState, ubyte *eap_data, ubyte4 eap_data_len)
 Transmit packets from peer to authenticator during second stage negotiation. More...
 

Detailed Description

Function Documentation

◆ EAP_FASTAuthGetSessionHdl()

MOC_EXTERN MSTATUS EAP_FASTAuthGetSessionHdl ( ubyte *  eapCb,
ubyte **  eapAuthSessionHdl 
)

This function retrieves the specified EAP-FAST session's second stage EAP session handle.

Since
1.41
Version
1.41 and later

To enable this function, the following flag must be defined in moptions.h:

  • __ENABLE_MOCANA_EAP_AUTH__

Additionally, at least one of the following flags (or set of flags) must be defined in moptions.h:

  • __ENABLE_MOCANA_EAP_FAST__ and one of the asynchronous SSL flags (__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__ or __ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__)
  • __ENABLE_MOCANA_EAP_PEAPV2__

eap_fast.h

Parameters
eapCbEAP-FAST session handle returned from EAP_FASTinitSession.
eapAuthSessionHdlOn return, pointer to EAP-FAST second stage session handle.
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.

eap_fast.h

◆ EAP_FASTAuthInit2()

MOC_EXTERN MSTATUS EAP_FASTAuthInit2 ( ubyte *  eapCb)

This function (called by the authenticator) sends an identity request to the peer during the second phase of EAP-FAST.

Since
1.41
Version
1.41 and later

To enable this function, the following flag must be defined in moptions.h:

  • __ENABLE_MOCANA_EAP_AUTH__

Additionally, at least one of the following flags (or set of flags) must be defined in moptions.h:

  • __ENABLE_MOCANA_EAP_FAST__ and one of the asynchronous SSL flags (__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__ or __ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__)
  • __ENABLE_MOCANA_EAP_PEAPV2__

eap_fast.h

Parameters
eapCbEAP-FAST session handle returned from EAP_FASTinitSession.
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.

eap_fast.h

◆ EAP_FASTauthSendCryptoBindingTlv()

MOC_EXTERN MSTATUS EAP_FASTauthSendCryptoBindingTlv ( ubyte *  appSessionHdl,
ubyte *  cmk,
ubyte *  nonce 
)

This function (called by the authenticator) transmits the intermediate result and crypto binding TLVs (type-length-values) to the peer using the specified compound key and nonce.

This function enables the authenticator to negotiate additional methods. Once the Result TLV is sent (by a call to EAP_FASTauthSendMethodResult), the authenticator ceases negotiating additional methods.

Since
1.41
Version
1.41 and later

To enable this function, at least one flag in each of the following flag pairs must be defined in moptions.h:

  • Enable EAP peer/authenticator (__ENABLE_MOCANA_EAP_PEER__, __ENABLE_MOCANA_EAP_AUTH__)
  • Enable asynchronous SSL client/server (__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__, __ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__)
  • Enable an EAP FAST method (__ENABLE_MOCANA_EAP_FAST__, __ENABLE_MOCANA_EAP_PEAPV2__)

eap_fast.h

Parameters
appSessionHdlApplication session handle (cookie given by the application to identify the session).
cmkCompound key (derived by using the FAST TLS algorithms provided by the TLS layer).
nonce32-byte random number to incorporate into the crypto binding TLV and to use for calculating the crypto MAC (message authentication code).
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.

eap_fast.h

◆ EAP_FASTauthSendMethodResult()

MOC_EXTERN MSTATUS EAP_FASTauthSendMethodResult ( ubyte *  appSessionHdl,
ubyte  sendCryptoBinding,
ubyte *  compoundKey,
ubyte2  result,
ubyte *  nonce 
)

This function builds a Method Result packet to pass the specified intermediate method crypto binding, compound key (if any) and result TLVs to the peer's upper layer.

Since
1.41
Version
1.41 and later

To enable this function, at least one flag in each of the following flag pairs must be defined in moptions.h:

  • Enable EAP peer/authenticator (__ENABLE_MOCANA_EAP_PEER__, __ENABLE_MOCANA_EAP_AUTH__)
  • Enable asynchronous SSL client/server (__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__, __ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__)
  • Enable an EAP FAST method (__ENABLE_MOCANA_EAP_FAST__, __ENABLE_MOCANA_EAP_PEAPV2__)

eap_fast.h

Parameters
appSessionHdlApplication session handle (cookie given by the application to identify the session).
sendCryptoBinding1 to specify that the crypto-binding TLV be sent; any other value to specify that it not be sent.
compoundKeyPointer to compound intermediate method key (derived by using the FAST TLS algorithms provided by the TLS layer; may be NULL).
resultResult to transmit: EAP_FAST_RESULT_TLV_SUCCESS or EAP_FAST_RESULT_TLV_FAILURE.
noncePointer to 32-byte random number to incorporate into the crypto binding TLV and to use for calculating the crypto MAC (message authentication code).
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.

eap_fast.h

◆ EAP_FASTauthSendPAC_ResultTlv()

MOC_EXTERN MSTATUS EAP_FASTauthSendPAC_ResultTlv ( ubyte *  eapFastSessionHdl,
EAP_FAST_pac_t *  pac 
)

This function (called by the authenticator) transmits the result and PAC Provisioning TLVs (type-length-values) to the peer using the specified Key / A-ID and Other parameters specified by the User/.

This function enables the authenticator to provision PAC on the Peer

Since
5.0
Version
5.0 and later

To enable this function, at least one flag in each of the following flag pairs must be defined in moptions.h:

  • Enable EAP peer/authenticator (__ENABLE_MOCANA_EAP_PEER__, __ENABLE_MOCANA_EAP_AUTH__)
  • Enable asynchronous SSL client/server (__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__, __ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__)
  • Enable an EAP FAST method (__ENABLE_MOCANA_EAP_FAST__, __ENABLE_MOCANA_EAP_PEAPV2__)

eap_fast.h

Parameters
eapFastSessionHdlApplication session handle (cookie given by the application to identify the session).
pacPAC Structure with the Relevant information.
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.

eap_fast.h

◆ EAP_FASTbuildAuthId()

MOC_EXTERN MSTATUS EAP_FASTbuildAuthId ( ubyte  flags,
ubyte *  authId,
ubyte2  authIdLen,
ubyte **  eapReqData,
ubyte4 *  eapReqLen 
)

This function (called by an EAP-TLS authenticator) builds an Authority ID Request packet that includes the specified flags values. The resultant data will ultimately be sent to the peer to provide hints about the authenticator's identity during a TLS Start message transmission.

Since
1.41
Version
1.41
Deprecated:
For applications using version 2.02 and later, you should not use this function. Instead, call the EAP_TLSSetAuthId function.

To enable this function, at least one flag in each of the following flag pairs must be defined in moptions.h:

  • Enable EAP peer/authenticator (__ENABLE_MOCANA_EAP_PEER__, __ENABLE_MOCANA_EAP_AUTH__)
  • Enable asynchronous SSL client/server (__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__, __ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__)
  • Enable an EAP FAST method (__ENABLE_MOCANA_EAP_FAST__, __ENABLE_MOCANA_EAP_PEAPV2__)

eap_fast.h

Parameters
flagsSum of bitmasks indicating the TLS Start bit status and the TLS version.
authIdPointer to authority ID (often set by calling EAP_TLSSetAuthId before calling EAP_TLSstartRequest).
authIdLenNumber of bytes in authority ID (authId).
eapReqDataOn return, pointer to resultant EAP-FAST/TLS request payload.
eapReqLenOn return, pointer to number of bytes in EAP request payload (eapReqData).
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.

eap_fast.h

◆ EAP_FASTdeleteSession()

MOC_EXTERN MSTATUS EAP_FASTdeleteSession ( ubyte *  eapFASTSession)

This function deletes a second stage EAP-FAST session.

Since
1.41
Version
1.41 and later

To enable this function, at least one flag in each of the following flag pairs must be defined in moptions.h:

  • Enable EAP peer/authenticator (__ENABLE_MOCANA_EAP_PEER__, __ENABLE_MOCANA_EAP_AUTH__)
  • Enable asynchronous SSL client/server (__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__, __ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__)
  • Enable an EAP FAST method (__ENABLE_MOCANA_EAP_FAST__, __ENABLE_MOCANA_EAP_PEAPV2__)

eap_fast.h

Parameters
eapFASTSessionEAP-FAST session handle returned from EAP_FASTinitSession.
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.

eap_fast.h

◆ EAP_FASTEncapEAPPkt()

MOC_EXTERN MSTATUS EAP_FASTEncapEAPPkt ( ubyte *  eapFastCb,
ubyte *  eapPkt,
ubyte4  eapPktLen 
)

This function builds an EAP payload TLV from the input second stage EAP packet and then passes the packet to the first stage using the registered upper layer callback. This packet can later be encrypted by the TLS session and passed to the EAP lower layer.

Since
1.41
Version
1.41 and later

To enable this function, at least one flag in each of the following flag pairs must be defined in moptions.h:

  • Enable EAP peer/authenticator (__ENABLE_MOCANA_EAP_PEER__, __ENABLE_MOCANA_EAP_AUTH__)
  • Enable asynchronous SSL client/server (__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__, __ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__)
  • Enable an EAP FAST method (__ENABLE_MOCANA_EAP_FAST__, __ENABLE_MOCANA_EAP_PEAPV2__)

eap_fast.h

Parameters
eapFastCbEAP-FAST session handle returned from EAP_FASTinitSession.
eapPktPointer to input EAP packet.
eapPktLenNumber of bytes in input EAP packet (eapPkt).
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.

eap_fast.h

◆ EAP_FASTFormSendPacket()

MOC_EXTERN MSTATUS EAP_FASTFormSendPacket ( void *  eapFASTCb,
ubyte *  pkt,
ubyte4  pktLen,
ubyte **  eapResponse,
ubyte4 *  eapRespLen 
)

This function builds an EAP-FAST packet from the specified encrypted second stage payload, prepending the header and performing any required fragmentation, and returning the resultant packet through the eapResponse parameter. Typically your application passes the resulting packet to EAP for transmission from authenticator to peer or from peer to authenticator.

Since
1.41
Version
1.41 and later

To enable this function, at least one flag in each of the following flag pairs must be defined in moptions.h:

  • Enable EAP peer/authenticator (__ENABLE_MOCANA_EAP_PEER__, __ENABLE_MOCANA_EAP_AUTH__)
  • Enable asynchronous SSL client/server (__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__, __ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__)
  • Enable an EAP FAST method (__ENABLE_MOCANA_EAP_FAST__, __ENABLE_MOCANA_EAP_PEAPV2__)

eap_fast.h

Parameters
eapFASTCbEAP-FAST session handle returned from EAP_FASTinitSession.
pktPointer to payload to include in the EAP-FAST packet.
pktLenNumber of bytes in the payload data (pkt).
eapResponseOn return, pointer to resultant EAP-FAST response packet.
eapRespLenOn return, number of bytes in EAP-FAST response payload (eapResponse).
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.

eap_fast.h

◆ EAP_FASTgetAuthId()

MOC_EXTERN MSTATUS EAP_FASTgetAuthId ( ubyte *  pkt,
ubyte4  pktLen,
ubyte **  authId,
ubyte2 *  authIdLen 
)

This function extracts the authority ID (if any) from an EAP-FAST packet, returning it through the authId parameter.

Since
1.41
Version
1.41 and later

To enable this function, at least one flag in each of the following flag pairs must be defined in moptions.h:

  • Enable EAP peer/authenticator (__ENABLE_MOCANA_EAP_PEER__, __ENABLE_MOCANA_EAP_AUTH__)
  • Enable asynchronous SSL client/server (__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__, __ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__)
  • Enable an EAP FAST method (__ENABLE_MOCANA_EAP_FAST__, __ENABLE_MOCANA_EAP_PEAPV2__)

eap_fast.h

Parameters
pktPointer to EAP-FAST packet.
pktLenNumber of bytes in EAP-FAST packet (pkt).
authIdOn return, pointer to authority ID.
authIdLenOn return, pointer to number of bytes in authority ID (authId).
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.

eap_fast.h

◆ EAP_FASTgetTLVEncapEAPPkt()

MOC_EXTERN MSTATUS EAP_FASTgetTLVEncapEAPPkt ( ubyte *  eapPkt,
ubyte4  eapPktLen,
ubyte **  response,
ubyte4 *  responseLen 
)

This function encapsulates an EAP packet into an EAP payload TLV, returning the resultant packet through the response parameter.

Since
1.41
Version
1.41 and later

To enable this function, at least one flag in each of the following flag pairs must be defined in moptions.h:

  • Enable EAP peer/authenticator (__ENABLE_MOCANA_EAP_PEER__, __ENABLE_MOCANA_EAP_AUTH__)
  • Enable asynchronous SSL client/server (__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__, __ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__)
  • Enable an EAP FAST method (__ENABLE_MOCANA_EAP_FAST__, __ENABLE_MOCANA_EAP_PEAPV2__)

eap_fast.h

Parameters
eapPktPointer to input EAP packet.
eapPktLenNumber of bytes in input EAP packet (eapPkt).
responseOn return, pointer to response packet.
responseLenOn return, pointer to number of bytes in response packet (response).
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.

eap_fast.h

◆ EAP_FASTinitSession()

MOC_EXTERN MSTATUS EAP_FASTinitSession ( ubyte *  appSessionCB,
ubyte **  eapFASTSession,
EAP_FAST_params eapFASTparams 
)

This function creates and initializes an EAP-FAST session based on the specified parameters, returning the resultant session handle through the eapFastSession parameter.

Since
1.41
Version
1.41 and later

To enable this function, at least one flag in each of the following flag pairs must be defined in moptions.h:

  • Enable EAP peer/authenticator (__ENABLE_MOCANA_EAP_PEER__, __ENABLE_MOCANA_EAP_AUTH__)
  • Enable asynchronous SSL client/server (__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__, __ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__)
  • Enable an EAP FAST method (__ENABLE_MOCANA_EAP_FAST__, __ENABLE_MOCANA_EAP_PEAPV2__)

eap_fast.h

Parameters
appSessionCBApplication session handle (cookie given by the application to identify the session).
eapFASTSessionOn return, pointer to EAP-FAST session handle.
eapFASTparamsPointer to desired EAP-FAST session parameters.
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.

eap_fast.h

◆ EAP_FASTPeerGetSessionHdl()

MOC_EXTERN MSTATUS EAP_FASTPeerGetSessionHdl ( ubyte *  eapCb,
ubyte **  eapSessionHdl 
)

This function retrieves the EAP-FAST second stage handle. (In the first stage, TLS is negotiated with EAP payload messaging. In the second stage, the method, such as MS-CHAP-V2, is negotiated over the already secure TLS channel.)

Since
1.41
Version
1.41 and later

To enable this function, the following flag must be defined in moptions.h:

  • __ENABLE_MOCANA_EAP_PEER__

Additionally, at least one of the following flags must be defined in moptions.h:

  • __ENABLE_MOCANA_EAP_FAST__
  • __ENABLE_MOCANA_EAP_PEAPV2__

eap_fast.h

Parameters
eapCbEAP-FAST session handle returned from EAP_FASTinitSession.
eapSessionHdlOn return, pointer to EAP-FAST second stage session handle.
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.

eap_fast.h

◆ EAP_FASTProcessTLV()

MOC_EXTERN MSTATUS EAP_FASTProcessTLV ( ubyte *  fastHdl,
ubyte *  pPkt,
ubyte4  pktLen 
)

This function parses a decrypted EAP packet for TLVs and processes each according to its type.

Since
1.41
Version
1.41 and later

To enable this function, at least one flag in each of the following flag pairs must be defined in moptions.h:

  • Enable EAP peer/authenticator (__ENABLE_MOCANA_EAP_PEER__, __ENABLE_MOCANA_EAP_AUTH__)
  • Enable asynchronous SSL client/server (__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__, __ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__)
  • Enable an EAP FAST method (__ENABLE_MOCANA_EAP_FAST__, __ENABLE_MOCANA_EAP_PEAPV2__)

eap_fast.h

Parameters
fastHdlEAP-FAST session handle returned from EAP_FASTinitSession.
pPktPointer to input packet.
pktLenNumber of bytes in input packet (pPkt).
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.

eap_fast.h

◆ EAP_FASTreceiveLLPacket()

MOC_EXTERN MSTATUS EAP_FASTreceiveLLPacket ( void *  eapFASTCb,
ubyte *  pkt,
ubyte4  pktLen 
)

This function processes a packet's TLVs, performs any required reassembly, and passes the packet to the EAP-FAST lower layer for second stage (method) negotiation.

Since
1.41
Version
1.41 and later

To enable this function, at least one flag in each of the following flag pairs must be defined in moptions.h:

  • Enable EAP peer/authenticator (__ENABLE_MOCANA_EAP_PEER__, __ENABLE_MOCANA_EAP_AUTH__)
  • Enable asynchronous SSL client/server (__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__, __ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__)
  • Enable an EAP FAST method (__ENABLE_MOCANA_EAP_FAST__, __ENABLE_MOCANA_EAP_PEAPV2__)

eap_fast.h

Parameters
eapFASTCbEAP-FAST session handle returned from EAP_FASTinitSession.
pktPointer to input packet (received from lower layer).
pktLenNumber of bytes in input packet (pkt).
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.

eap_fast.h

◆ EAP_FASTulAuthSessionDelete()

MOC_EXTERN MSTATUS EAP_FASTulAuthSessionDelete ( ubyte *  eapFASTCb)

This function deletes an EAP-FAST authenticator second stage stack.

Since
1.41
Version
1.41 and later

To enable this function, the following flag must be defined in moptions.h:

  • __ENABLE_MOCANA_EAP_AUTH__

Additionally, at least one of the following flags (or set of flags) must be defined in moptions.h:

  • __ENABLE_MOCANA_EAP_FAST__ and one of the asynchronous SSL flags (__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__ or __ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__)
  • __ENABLE_MOCANA_EAP_PEAPV2__

eap_fast.h

Parameters
eapFASTCbEAP-FAST session handle returned from EAP_FASTinitSession.
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.

eap_fast.h

◆ EAP_FASTulAuthTransmit()

MOC_EXTERN MSTATUS EAP_FASTulAuthTransmit ( ubyte *  eapSessionHdl,
ubyte4  instanceId,
eapMethodType  methodType,
eapCode  code,
eapMethodDecision  methodDecision,
eapMethodState  methodState,
ubyte *  eap_data,
ubyte4  eap_data_len 
)

This function transmits packets from the authenticator to the peer during second stage negotiation.

Since
1.41
Version
1.41 and later

To enable this function, the following flag must be defined in moptions.h:

  • __ENABLE_MOCANA_EAP_AUTH__

Additionally, at least one of the following flags (or set of flags) must be defined in moptions.h:

  • __ENABLE_MOCANA_EAP_FAST__ and one of the asynchronous SSL flags (__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__ or __ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__)
  • __ENABLE_MOCANA_EAP_PEAPV2__

eap_fast.h

Parameters
eapSessionHdlEAP-FAST session handle returned from EAP_FASTinitSession.
instanceIdInstance ID.
methodTypeeapMethodType enumerated value for the second phase (see eap_proto.h).
codeAny of the following eapCode enumerated values (defined in eap_proto.h):
  • EAP_CODE_REQUEST
  • EAP_CODE_SUCCESS
  • EAP_CODE_FAILURE
methodDecisioneapMethodDecision enumerated value (see eap_proto.h).
methodStateeapMethodState enumerated value (see eap_proto.h).
eap_dataPointer to EAP packet to be transmitted.
eap_data_lenNumber of bytes in EAP packet to be transmitted (eap_data).
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.

eap_fast.h

◆ EAP_FASTulPeerSessionDelete()

MOC_EXTERN MSTATUS EAP_FASTulPeerSessionDelete ( ubyte *  eapFASTCb)

This function deletes an EAP-FAST peer second stage stack.

Since
1.41
Version
1.41 and later

To enable this function, the following flag must be defined in moptions.h:

  • __ENABLE_MOCANA_EAP_PEER__

Additionally, at least one of the following flags must be defined in moptions.h:

  • __ENABLE_MOCANA_EAP_FAST__
  • __ENABLE_MOCANA_EAP_PEAPV2__

eap_fast.h

Parameters
eapFASTCbEAP-FAST session handle returned from EAP_FASTinitSession.
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.

eap_fast.h

◆ EAP_FASTulPeerTransmit()

MOC_EXTERN MSTATUS EAP_FASTulPeerTransmit ( ubyte *  eapSessionHdl,
ubyte4  instanceId,
eapMethodType  methodType,
eapCode  code,
eapMethodDecision  methodDecision,
eapMethodState  methodState,
ubyte *  eap_data,
ubyte4  eap_data_len 
)

This function transmits packets from the peer to the authenticator during second stage negotiation.

Since
1.41
Version
1.41 and later

To enable this function, the following flag must be defined in moptions.h:

  • __ENABLE_MOCANA_EAP_PEER__

Additionally, at least one of the following flags must be defined in moptions.h:

  • __ENABLE_MOCANA_EAP_FAST__
  • __ENABLE_MOCANA_EAP_PEAPV2__

eap_fast.h

Parameters
eapSessionHdlEAP-FAST session handle returned from EAP_FASTinitSession.
instanceIdInstance ID.
methodTypeeapMethodType enumerated value for the second phase (see eap_proto.h).
codeEAP_CODE_RESPONSE (an eapCode enumerated values defined in eap_proto.h).
methodDecisioneapMethodDecision enumerated value (see eap_proto.h).
methodStateeapMethodState enumerated value (see eap_proto.h).
eap_dataPointer to EAP packet to be transmitted.
eap_data_lenNumber of bytes in EAP packet to be transmitted (eap_data).
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.

eap_fast.h