![]() |
TrustCore SDK NanoSec API reference
version 7.0
|
Provides EAP-SRP (EAP-secure remote password) authentication. More...
Functions | |
MOC_EXTERN MSTATUS | EAP_SRPbuildChallenge (ubyte *eapSessionHdl, ubyte4 instanceId, ubyte *username, ubyte4 usernameLen, ubyte *password, ubyte4 passwordLen, eapMethodType *method_type, ubyte **reqData, ubyte4 *reqLen) |
Generate an SRP challenge packet. More... | |
MOC_EXTERN MSTATUS | EAP_SRPbuildLightweightChallenge (ubyte *eapSessionHdl, ubyte4 instanceId, eapMethodType *method_type, ubyte **reqData, ubyte4 *reqLen) |
Build an EAP-SRP lightweight challenge packet for reauthentication. More... | |
MOC_EXTERN MSTATUS | EAP_SRPprocessAuth (ubyte *appSessionHdl, ubyte *eapSessionHdl, ubyte4 instanceId, ubyte id, ubyte *data, ubyte4 len, ubyte *passwordString, ubyte4 passLen, ubyte **eapRespData, ubyte4 *eapRespLen, ubyte *code) |
Get the EAP payload from a message received by an SRP authenticator. More... | |
MOC_EXTERN MSTATUS | EAP_SRPprocessPeer (ubyte *appSessionHdl, ubyte *eapSessionHdl, ubyte4 instanceId, ubyte id, ubyte *data, ubyte4 len, ubyte *username, ubyte4 usernameLen, ubyte *passwordString, ubyte4 passLen, ubyte **eapRespData, ubyte4 *eapRespLen) |
Get the EAP payload from an SRP-SHA1 message received by an SRP peer. More... | |
MOC_EXTERN MSTATUS EAP_SRPbuildChallenge | ( | ubyte * | eapSessionHdl, |
ubyte4 | instanceId, | ||
ubyte * | username, | ||
ubyte4 | usernameLen, | ||
ubyte * | password, | ||
ubyte4 | passwordLen, | ||
eapMethodType * | method_type, | ||
ubyte ** | reqData, | ||
ubyte4 * | reqLen | ||
) |
This function generates an SRP challenge and builds an EAP_SRP_CHALLENGE
packet (which is returned through the reqData
parameter). The SRP authenticator uses this function after it receives an identity response from the peer.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_SRP__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
eapSessionHdl | EAP session handle returned from EAP_sessionCreate. |
instanceId | EAP instance ID returned from EAP_initInstance. |
username | User name. |
usernameLen | Number of bytes in user name. |
password | Session password for the response. |
passwordLen | Number of bytes in password . |
method_type | On return, pointer to method type to include in response packet (see eapMethodType enumerated values in eap_proto.h). |
reqData | On return, pointer to generated EAP packet. |
reqLen | On return, pointer to number of bytes in generated EAP packet (reqData ). |
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_SRPbuildLightweightChallenge | ( | ubyte * | eapSessionHdl, |
ubyte4 | instanceId, | ||
eapMethodType * | method_type, | ||
ubyte ** | reqData, | ||
ubyte4 * | reqLen | ||
) |
This function builds an EAP-SRP lightweight challenge packet at the authenticator for reauthentication. (For information about lightweight challenges, refer to the following RFC Draft: http://www3.ietf.org/proceedings/01dec/I-D/draft-ietf-pppext-eap-srp-03.txt )
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_SRP__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
eapSessionHdl | EAP session handle returned from EAP_sessionCreate. |
instanceId | EAP instance ID returned from EAP_initInstance. |
method_type | On return, pointer to method type to include in response packet (see eapMethodType enumerated values in eap_proto.h). |
reqData | On return, pointer to generated EAP packet. |
reqLen | On return, pointer to number of bytes in generated EAP packet (reqData ). |
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_SRPprocessAuth | ( | ubyte * | appSessionHdl, |
ubyte * | eapSessionHdl, | ||
ubyte4 | instanceId, | ||
ubyte | id, | ||
ubyte * | data, | ||
ubyte4 | len, | ||
ubyte * | passwordString, | ||
ubyte4 | passLen, | ||
ubyte ** | eapRespData, | ||
ubyte4 * | eapRespLen, | ||
ubyte * | code | ||
) |
This function processes a message received by an SRP authenticator and returns the resultant EAP payload through the eapRespData
parameter. Additionally, the response status is returned (through the code
parameter), which your application should use to update the EAP processing state machine variables, methodState
and decision
, according to application requirements.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_SRP__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
appSessionHdl | Cookie given by the application to identify the session. |
eapSessionHdl | EAP session handle returned from EAP_sessionCreate. |
instanceId | EAP instance ID returned from EAP_initInstance. |
id | EAP packet ID. |
data | EAP payload to process. |
len | Number of bytes in EAP payload (data ). |
passwordString | Session password for the response. |
passLen | Number of bytes in session password (passwordString ). |
eapRespData | On return, pointer to EAP response payload. |
eapRespLen | On return, pointer to number of bytes in EAP response payload (eapRespData ). |
code | On return, pointer to response status to include in response packet (one of the eapCode enumerated values in eap_proto.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_SRPprocessPeer | ( | ubyte * | appSessionHdl, |
ubyte * | eapSessionHdl, | ||
ubyte4 | instanceId, | ||
ubyte | id, | ||
ubyte * | data, | ||
ubyte4 | len, | ||
ubyte * | username, | ||
ubyte4 | usernameLen, | ||
ubyte * | passwordString, | ||
ubyte4 | passLen, | ||
ubyte ** | eapRespData, | ||
ubyte4 * | eapRespLen | ||
) |
This function processes a message received by an SRP peer and returns the resultant EAP payload through the eapRespData
parameter.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_SRP__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
appSessionHdl | Cookie given by the application to identify the session. |
eapSessionHdl | EAP session handle returned from EAP_sessionCreate. |
instanceId | EAP instance ID returned from EAP_initInstance. |
id | EAP packet ID. |
data | EAP payload to process. |
len | Number of bytes in EAP payload (data ). |
username | User name. |
usernameLen | Number of bytes in user name (username ). |
passwordString | Session password for the response. |
passLen | Number of bytes in session password (passwordString ). |
eapRespData | On return, pointer to EAP response payload. |
eapRespLen | On return, pointer to number of bytes in EAP response payload (eapRespData ). |
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.