![]() |
TrustCore SDK NanoSec API reference
version 7.0
|
Provides EAP-SIM (EAP-subscriber identity module) and EAP-AKA (EAP-authentication and key agreement) authentication. More...
Functions | |
MOC_EXTERN MSTATUS | EAP_AKAProcessPkt (eapSimCb *eapSim, ubyte *pkt, ubyte2 pktLen, ubyte **resp, ubyte4 *respLen, eapSimStatus *state) |
Process received EAP-AKA packet. More... | |
MOC_EXTERN MSTATUS | EAP_AKASendChallengeReq (eapSimCb *eapSim, ubyte **pkt, ubyte4 *pktLen, ubyte *rand, ubyte *autn, ubyte *ck, ubyte *ik, ubyte *res, ubyte2 resLen, ubyte *at_next_psuedo, ubyte2 at_psuedo_len, ubyte *at_next_reauthid, ubyte2 at_reauthid_len, ubyte id) |
Send EAP-AKA Challenge Request. More... | |
MOC_EXTERN MSTATUS | EAP_AKASendIdentityReq (eapSimCb *eapSim, ubyte **pkt, ubyte4 *pktLen, ubyte id_type, ubyte id) |
Send EAP-AKA Start Request. More... | |
MOC_EXTERN MSTATUS | EAP_SIMDeleteSession (eapSimCb *eapSim) |
Delete an EAP-SIM connection. More... | |
MOC_EXTERN MSTATUS | EAP_SIMGetClientErrorCode (eapSimCb *eapSim, ubyte2 *clCode) |
Get the client error code returned by the peer. More... | |
MOC_EXTERN MSTATUS | EAP_SIMGetIdentity (eapSimCb *eapSim, ubyte **identity, ubyte4 *len) |
Get the EAP-SIM session ID returned by the peer. More... | |
MOC_EXTERN MSTATUS | EAP_SIMgetKey (eapSimCb *eapSim, eapSimKeyType keyType, ubyte **key, ubyte4 *keyLen) |
Get an EAP-SIM session key. More... | |
MOC_EXTERN MSTATUS | EAP_SIMGetNotification (eapSimCb *eapSim, ubyte2 *notifCode) |
Get the authenticator's notification code. More... | |
MOC_EXTERN MSTATUS | EAP_SIMGetResultInd (void *eap_sim, ubyte *rInd) |
Determine whether a challenge negotiation included a RESULT_IND attribute. More... | |
MOC_EXTERN MSTATUS | EAP_SIMGetSelectedVersion (void *eap_sim, ubyte2 *rVer) |
Get the version selected during negotiation. More... | |
MOC_EXTERN MSTATUS | EAP_SIMGetSessionStatus (void *eap_sim, eapSimStatus *status) |
Get an EAP-SIM session's session status. More... | |
MOC_EXTERN MSTATUS | EAP_SIMGetSuccessNotifCode (void *eap_sim, ubyte *rCode) |
Determine whether an authenticator Notification's S Bit is set. More... | |
MOC_EXTERN MSTATUS | EAP_SIMInitSession (void *appCb, void **eapSim, eapSimConfig eapSimCfg) |
Create and initialize an EAP-SIM or EAP-AKA session. More... | |
MOC_EXTERN MSTATUS | EAP_SIMProcessPkt (eapSimCb *eapSim, ubyte *pkt, ubyte2 pktLen, ubyte **resp, ubyte4 *respLen, eapSimStatus *state) |
Process a received packet and build a response. More... | |
MOC_EXTERN MSTATUS | EAP_SIMSendChallengeReq (eapSimCb *eapSim, ubyte **pkt, ubyte4 *pktLen, ubyte *rand, ubyte2 num_rand, ubyte *kC, ubyte *sRes, ubyte *at_next_psuedo, ubyte2 at_psuedo_len, ubyte *at_next_reauthid, ubyte2 at_reauthid_len, ubyte id) |
Build a Sim Challenge Request packet. More... | |
MOC_EXTERN MSTATUS | EAP_SIMSendNotificationReq (eapSimCb *eapSim, ubyte **pkt, ubyte4 *pktLen, ubyte2 at_counter, ubyte4 notification_code, ubyte id) |
Build a Sim Notification Request packet. More... | |
MSTATUS | EAP_SIMSendReauthReq (eapSimCb *eapSim, ubyte **pkt, ubyte4 *pktLen, ubyte *at_next_reauthid, ubyte2 at_reauthid_len, ubyte id) |
Build a SIM FAST Reauthentication Request packet. More... | |
MOC_EXTERN MSTATUS | EAP_SIMSendStartReq (eapSimCb *eapSim, ubyte **pkt, ubyte4 *pktLen, ubyte id_type, ubyte id) |
Build a Sim Start Request packet. More... | |
MOC_EXTERN MSTATUS | EAP_SIMSetIdentity (eapSimCb *eapSim, ubyte *id, ubyte2 idLen) |
Set the EAP-SIM session's final identity. More... | |
MOC_EXTERN MSTATUS | EAP_SIMSetImplementedVersion (eapSimCb *eapSim, ubyte2 *versionList, ubyte2 numVersion) |
Add version(s) to an EAP-SIM session's supported versions list. More... | |
MOC_EXTERN MSTATUS | EAP_SIMSetPermIdentity (eapSimCb *eapSim, ubyte *id, ubyte2 idLen) |
Set the EAP-SIM session's permanent identity. More... | |
MOC_EXTERN MSTATUS EAP_AKAProcessPkt | ( | eapSimCb * | eapSim, |
ubyte * | pkt, | ||
ubyte2 | pktLen, | ||
ubyte ** | resp, | ||
ubyte4 * | respLen, | ||
eapSimStatus * | state | ||
) |
Process received packet and do SM functions.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_SIM__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
eapSim | EAP SIM Session Handle. |
pkt | Received EAP packet. |
pktLen | Received EAP packet length. |
resp | Pointer to EAP packet formed <EAPHdr ,Type,SubType,Payload>. |
respLen | EAP payload length. |
state | EAP SM state returned. |
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.MOC_EXTERN MSTATUS EAP_AKASendChallengeReq | ( | eapSimCb * | eapSim, |
ubyte ** | pkt, | ||
ubyte4 * | pktLen, | ||
ubyte * | rand, | ||
ubyte * | autn, | ||
ubyte * | ck, | ||
ubyte * | ik, | ||
ubyte * | res, | ||
ubyte2 | resLen, | ||
ubyte * | at_next_psuedo, | ||
ubyte2 | at_psuedo_len, | ||
ubyte * | at_next_reauthid, | ||
ubyte2 | at_reauthid_len, | ||
ubyte | id | ||
) |
Generate EAP-AKA Challenge Request packet to send to the Peer.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_SIM__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
eapSim | EAP SIM Session Handle. |
pkt | Pointer to EAP packet formed <EAPHdr ,Type,SubType,Payload>. |
pktLen | EAP payload length. |
rand | Random bytes 16 bytes received from AuC. |
autn | Autn value received from AuC 16 Bytes. |
ck | CK value received from AuC 16 Bytes. |
ik | IK value received from AuC 16 Bytes. |
res | RES value received from AuC (32 to 128 Bits). |
resLen | RES length (32 to 128 Bits). |
at_next_psuedo | Pseudo identity to send to the peer. |
at_psuedo_len | Number of bytes in pseudo identity (at_next_psuedo ). |
at_next_reauthid | Next reauth ID. |
at_reauthid_len | Next reauth ID length. |
id | EAP packet ID. |
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.MOC_EXTERN MSTATUS EAP_AKASendIdentityReq | ( | eapSimCb * | eapSim, |
ubyte ** | pkt, | ||
ubyte4 * | pktLen, | ||
ubyte | id_type, | ||
ubyte | id | ||
) |
Generate EAP-AKA Identity Request Packet to send to the Peer.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_SIM__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
eapSim | EAP SIM Session Handle. |
pkt | Pointer to EAP packet formed <EAPHdr ,Type,SubType,Payload>. |
pktLen | EAP payload length. |
id_type | ID type to send (PERM,FULL,ANY ID) |
id | EAP packet ID. |
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.MOC_EXTERN MSTATUS EAP_SIMDeleteSession | ( | eapSimCb * | eapSim | ) |
This function deletes an EAP-SIM connection.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_SIM__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
eapSim | EAP-SIM session handle returned from EAP_SIMInitSession. |
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.MOC_EXTERN MSTATUS EAP_SIMGetClientErrorCode | ( | eapSimCb * | eapSim, |
ubyte2 * | clCode | ||
) |
This function (typically called by the authenticator) retrieves the client error code returned by the peer for the specified EAP-SIM session.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_SIM__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
eapSim | EAP-SIM session handle returned from EAP_SIMInitSession. |
clCode | On return, pointer to the client error code value. |
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.MOC_EXTERN MSTATUS EAP_SIMGetIdentity | ( | eapSimCb * | eapSim, |
ubyte ** | identity, | ||
ubyte4 * | len | ||
) |
This function (typically called by the authenticator) retrieves the identity returned by the peer for the specified EAP-SIM session. That returned identity can then be used by the authenticator's application-specific logic to decide whether to process the identity, to get the tuple (the RAND, SRES and Kc), or to ask for a different identity from the peer.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_SIM__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
eapSim | EAP-SIM session handle returned from EAP_SIMInitSession. |
identity | On return, pointer to peer's identity. |
len | On return, pointer to number of bytes in peer's ideneity (identity ). |
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.MOC_EXTERN MSTATUS EAP_SIMgetKey | ( | eapSimCb * | eapSim, |
eapSimKeyType | keyType, | ||
ubyte ** | key, | ||
ubyte4 * | keyLen | ||
) |
This function (called by the authenticator or peer) retrieves the specified type of EAP-SIM session key.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_SIM__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
eapSim | EAP-SIM session handle returned from EAP_SIMInitSession. |
keyType | Any of the eapSimKeyType enumerated values (defined in eap_sim.h). |
key | On return, pointer to the key. |
keyLen | On return, pointer to the number of bytes in the key (key ). |
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.MOC_EXTERN MSTATUS EAP_SIMGetNotification | ( | eapSimCb * | eapSim, |
ubyte2 * | notifCode | ||
) |
This function (typically called by the peer) retrieves the notification code received from the authenticator for the specified EAP-SIM session.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_SIM__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
eapSim | EAP-SIM session handle returned from EAP_SIMInitSession. |
notifCode | On return, pointer to notification code value. |
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.MOC_EXTERN MSTATUS EAP_SIMGetResultInd | ( | void * | eap_sim, |
ubyte * | rInd | ||
) |
This function, called by the authenticator or peer, determines whether the peer or authenticator, respectively, sent the RESULT_IND
attribute during challenge negotiation. If the result indication attribute is sent by either side, SUCCESS/
sent by the authenticator in a Notification Request.FALURE
is
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_SIM__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
eap_sim | EAP-SIM session handle returned from EAP_SIMInitSession. |
rInd | On return, pointer to determination value: 1 if the other side sent a RESULT_IND attribute; otherwise 0 . |
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.MOC_EXTERN MSTATUS EAP_SIMGetSelectedVersion | ( | void * | eap_sim, |
ubyte2 * | rVer | ||
) |
This function (called by the peer) retrieves the version that was selected during authenticator-peer version negotiation for the specified EAP-SIM session.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_SIM__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
eap_sim | EAP-SIM session handle returned from EAP_SIMInitSession. |
rVer | On return, pointer to selected version value. |
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.MOC_EXTERN MSTATUS EAP_SIMGetSessionStatus | ( | void * | eap_sim, |
eapSimStatus * | status | ||
) |
This function retrieves an EAP-SIM session's session status.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_SIM__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
eap_sim | EAP-SIM session handle returned from EAP_SIMInitSession. |
status | On return, pointer to the session's status: an eapSimStatus enumeration (see eap_sim.h). |
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.MOC_EXTERN MSTATUS EAP_SIMGetSuccessNotifCode | ( | void * | eap_sim, |
ubyte * | rCode | ||
) |
This function (called by the peer) determines whether the Notification received from the authenticator has the S
Bit set (which indicates a Success Notification).
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_SIM__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
eap_sim | EAP-SIM session handle returned from EAP_SIMInitSession. |
rCode | On return, pointer to determination value: 1 if the S Bit is set; otherwise 0 . |
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.MOC_EXTERN MSTATUS EAP_SIMInitSession | ( | void * | appCb, |
void ** | eapSim, | ||
eapSimConfig | eapSimCfg | ||
) |
This function creates and initializes an EAP-SIM or EAP-AKA session.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_SIM__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
appCb | Application session handle (cookie given by the application to identify the session). |
eapSim | On return, pointer to EAP-SIM/EAP-AKA session handle. |
eapSimCfg | Parameters for the SIM/AKA session to be created. |
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.MOC_EXTERN MSTATUS EAP_SIMProcessPkt | ( | eapSimCb * | eapSim, |
ubyte * | pkt, | ||
ubyte2 | pktLen, | ||
ubyte ** | resp, | ||
ubyte4 * | respLen, | ||
eapSimStatus * | state | ||
) |
This function processes a packet received by the specified EAP-SIM session, builds a response (which is returned through the resp
parameter), and informs the calling application of the current state (the EAP-SIM state machine's state).
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_SIM__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
eapSim | EAP-SIM session handle returned from EAP_SIMInitSession. |
pkt | Pointer to packet to process. |
pktLen | Number of bytes in packet to process (pkt ). |
resp | On return, pointer to response packet to be transmitted. |
respLen | On return, pointer to number of bytes in response packet (resp ). |
state | On return, pointer to eapSimStatus enumerated value (refer to eap_sim.h). |
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.MOC_EXTERN MSTATUS EAP_SIMSendChallengeReq | ( | eapSimCb * | eapSim, |
ubyte ** | pkt, | ||
ubyte4 * | pktLen, | ||
ubyte * | rand, | ||
ubyte2 | num_rand, | ||
ubyte * | kC, | ||
ubyte * | sRes, | ||
ubyte * | at_next_psuedo, | ||
ubyte2 | at_psuedo_len, | ||
ubyte * | at_next_reauthid, | ||
ubyte2 | at_reauthid_len, | ||
ubyte | id | ||
) |
This function (typically called by the authenticator) builds a Sim Challenge Request packet based on the specified parameters. (For details about how the random numbers and keys are used, refer to the following Web page: http://www.gsm-security.net/faq/gsm-ki-kc-rand-sres.shtml .)
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_SIM__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
eapSim | EAP-SIM session handle returned from EAP_SIMInitSession. |
pkt | On return, pointer to generated EAP-SIM Challenge Request packet. |
pktLen | On return, pointer to umber of bytes in generated packet (pkt ). |
rand | Pointer to 16-byte random number to send to the peer. |
num_rand | Number of 16-byte random numbers to send, from 1 to 3. (Recommended values are 2 or 3.) |
kC | 64-bit ciphering key used as a session key. |
sRes | 32-bit SRES (signed response) generated by the SIM device. |
at_next_psuedo | Pseudo identity to send to the peer. |
at_psuedo_len | Number of bytes in pseudo identity (at_next_psuedo ). |
at_next_reauthid | Reauthorization ID to send to the peer. |
at_reauthid_len | Number of bytes in reauthorization ID (at_next_reauthid ). |
id | EAP request header ID (unique to this session). |
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.MOC_EXTERN MSTATUS EAP_SIMSendNotificationReq | ( | eapSimCb * | eapSim, |
ubyte ** | pkt, | ||
ubyte4 * | pktLen, | ||
ubyte2 | at_counter, | ||
ubyte4 | notification_code, | ||
ubyte | id | ||
) |
This function (typically called by the authenticator) builds a Sim Notification Request packet based on the specified parameters.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_SIM__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
eapSim | EAP-SIM session handle returned from EAP_SIMInitSession. |
pkt | On return, pointer to generated EAP-SIM Notification Request packet. |
pktLen | On return, pointer to umber of bytes in generated packet (pkt ). |
at_counter | AT_COUNTER value to send to the peer; once the counter reaches the configurable maximum value, a full authentication instead of a FAST reauthentication is required. |
notification_code | Notification code as defined in RFC 4186 (refer to sections 6 and 10.18). |
id | EAP request header ID (unique to this session). |
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.MSTATUS EAP_SIMSendReauthReq | ( | eapSimCb * | eapSim, |
ubyte ** | pkt, | ||
ubyte4 * | pktLen, | ||
ubyte * | at_next_reauthid, | ||
ubyte2 | at_reauthid_len, | ||
ubyte | id | ||
) |
This function builds a SIM FAST Reauthentication Request packet based on the specified parameters. It is used by the SIM authenticator for fast (quick) reauthentication.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_SIM__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
eapSim | EAP-SIM session handle returned from EAP_SIMInitSession. |
pkt | On return, pointer to generated EAP-SIM Reauthorization Request packet. |
pktLen | On return, pointer to umber of bytes in generated packet (pkt ). |
at_next_reauthid | Pointer to reauthorization ID to send to the peer. |
at_reauthid_len | Number of bytes in reauthorization ID (at_next_reauthid ). |
id | EAP request header ID (unique to this session). |
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.MOC_EXTERN MSTATUS EAP_SIMSendStartReq | ( | eapSimCb * | eapSim, |
ubyte ** | pkt, | ||
ubyte4 * | pktLen, | ||
ubyte | id_type, | ||
ubyte | id | ||
) |
This function (typically called by the authenticator) builds a Sim Start Request packet based on the specified identity. The resultant packet, returned through the pkt
parameter, can then be transmitted by making a call to EAP_ulTransmit.
To enable this function, the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_SIM__
__ENABLE_MOCANA_EAP_AUTH__
eapSim | EAP-SIM session handle returned from EAP_SIMInitSession. |
pkt | On return, pointer to generated EAP-SIM Notification Request packet. |
pktLen | On return, pointer to umber of bytes in generated packet (pkt ). |
id_type | Any of the eapSimIdType enumeration values (defined in eap_sim.h):
|
id | EAP request header ID (unique to this session). |
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.MOC_EXTERN MSTATUS EAP_SIMSetIdentity | ( | eapSimCb * | eapSim, |
ubyte * | id, | ||
ubyte2 | idLen | ||
) |
This function (called by the authenticator or peer) assigns the specified identity value to the specified EAP-SIM session's final identity (used after identity negotiation is complete). The final identity is typically the IMSI (International Mobile Subscriber Identity) or the reauthorization ID negotiated between the peer and authenticator.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_SIM__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
eapSim | EAP-SIM session handle returned from EAP_SIMInitSession. |
id | Pointer to desired final identity. |
idLen | Number of bytes in final identity (id ). |
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.MOC_EXTERN MSTATUS EAP_SIMSetImplementedVersion | ( | eapSimCb * | eapSim, |
ubyte2 * | versionList, | ||
ubyte2 | numVersion | ||
) |
This function (called by the authenticator or peer) adds the specified version(s) to the specified EAP-SIM session's list of supported versions. This version information is required during the EAP-SIM Identity phase negotiation, where the first version found to be common to the peer and authenticator is used for communication.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_SIM__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
eapSim | EAP-SIM session handle returned from EAP_SIMInitSession. |
versionList | Pointer to array containing list of versions that the node (calling authenticator or peer) is to support. |
numVersion | Number of entries in the versionList array. |
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.MOC_EXTERN MSTATUS EAP_SIMSetPermIdentity | ( | eapSimCb * | eapSim, |
ubyte * | id, | ||
ubyte2 | idLen | ||
) |
This function (typically called by the peer) assigns the specified value to the EAP-SIM session's permanent identity. (The IMSI — International Mobile Subscriber Identity — is commonly used as the permanent identity.)
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_SIM__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
eapSim | EAP-SIM session handle returned from EAP_SIMInitSession. |
id | Pointer to desired permanent identity. |
idLen | Number of bytes in permanent identity (id ). |
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.