![]() |
TrustCore SDK NanoSec API reference
version 7.0
|
Provides EAP-MSCHAPv2 (EAP-Microsoft Challenge-handshake Authentication Protocol, version 2) authentication. More...
Functions | |
MOC_EXTERN void | EAP_MSCHAPbin2hex (const ubyte *szBin, sbyte *szHex, ubyte4 len) |
Get a hexadecimal representation of binary data. More... | |
MOC_EXTERN MSTATUS | EAP_MSCHAPChallengeResponse (ubyte *Challenge, ubyte *PasswordHash, ubyte *Response) |
Build an MSCHAP v0 response to the specified challenge and password hash. More... | |
MOC_EXTERN MSTATUS | EAP_MSCHAPcheckAuthenticatorResponse (ubyte *Password, ubyte2 PasswordLen, ubyte *NtResponse, ubyte *PeerChallenge, ubyte *AuthenticatorChallenge, ubyte *UserName, ubyte2 UserNameLen, ubyte *ReceivedResponse, byteBoolean *ResponseOK) |
Determine an MSCHAP authenticator response's status and include it in a new EAP response. More... | |
MOC_EXTERN MSTATUS | EAP_MSCHAPgenerateAuthenticatorResponse (ubyte *Password, ubyte2 PasswordLen, ubyte *NtResponse, ubyte *PeerChallenge, ubyte *AuthenticatorChallenge, ubyte *UserName, ubyte2 UserNameLen, ubyte *AuthenticatorResponse) |
Generate an authenticator response. More... | |
MOC_EXTERN MSTATUS | EAP_MSCHAPgenerateMasterKey (ubyte *Password, ubyte2 PasswordLen, ubyte *NtResponse, ubyte *MasterKey) |
Generate an MSK (master session key). More... | |
MOC_EXTERN MSTATUS | EAP_MSCHAPgenerateNTResponse (ubyte *AuthenticatorChallenge, ubyte *PeerChallenge, ubyte *UserName, ubyte2 UserNameLen, ubyte *Password, ubyte2 PasswordLen, ubyte *Response) |
Build an MS-CHAP-V2 NT response. More... | |
MOC_EXTERN MSTATUS | EAP_MSCHAPgenerateSessionKey (ubyte *masterKey, ubyte *sessionKey, ubyte2 sessionKeyLen, byteBoolean send, byteBoolean server) |
Generate a send/receive client/server session key. More... | |
MOC_EXTERN MSTATUS | EAP_MSCHAPHashNtPasswordHash (ubyte *PasswordHash, ubyte *PasswordHashHash) |
Get an irreversible hash of a password hash (using MD4). More... | |
MOC_EXTERN MSTATUS | EAP_MSCHAPNtPasswordHash (ubyte *Password, ubyte2 PasswordLen, ubyte *PasswordHash) |
Get a password hash (using MD4). More... | |
MOC_EXTERN MSTATUS | EAP_MSCHAPpeerResponse (ubyte *appSessionHdl, ubyte *data, ubyte2 datalen, ubyte *passwordString, ubyte2 passLen, ubyte *peerResponse, ubyte *peerChallenge, ubyte *authChallenge, ubyte *UserName, ubyte2 UserNameLen, ubyte **eapRespData, ubyte4 *eapRespLen, byteBoolean *cmp) |
Determine whether an authenticator response to a peer challenge is valid and build the resultant SUCCESS/FAIL response. More... | |
MOC_EXTERN MSTATUS | EAP_MSCHAPProcessAuth (ubyte *appSessionHdl, ubyte *data, ubyte4 datalen, ubyte *UserName, ubyte4 UserNameLen, ubyte *succMsg, ubyte4 succMsgLen, ubyte *failMsg, ubyte4 failMsgLen, ubyte *passwordString, ubyte4 passLen, ubyte *authChallenge, ubyte *NtResponse, ubyte **eapReqData, ubyte4 *eapReqLen) |
Determine whether a peer response is valid, build the resultant SUCCESS/FAIL response, and if SUCCESS, send the response. More... | |
MOC_EXTERN MSTATUS | EAP_MSCHAPProcessPeer (ubyte *appSessionHdl, ubyte *data, ubyte4 datalen, ubyte *UserName, ubyte4 UserNameLen, ubyte *passwordString, ubyte4 passLen, ubyte *peerChallenge, ubyte *authChallenge, ubyte *NtAuthenticator, ubyte **eapRespData, ubyte4 *eapRespLen) |
Build a response to send to the authenticator. More... | |
MOC_EXTERN MSTATUS | EAP_MSCHAPstartRequest (ubyte *appSessionHdl, ubyte *identity, ubyte2 identityLen, ubyte *challenge, ubyte **eapReqData, ubyte4 *eapReqLen) |
Build a challenge request. More... | |
MOC_EXTERN MSTATUS | EAP_MSCHAPv0generateNTResponse (ubyte *AuthenticatorChallenge, ubyte *Password, ubyte2 PasswordLen, ubyte *Response) |
Build an MS-CHAP-V0 NT response. More... | |
MOC_EXTERN MSTATUS | EAP_MSCHAPV2_getChallenge (ubyte *buf) |
Get a 16-byte challenge value for an MSCHAPv2 exchange. More... | |
MOC_EXTERN void EAP_MSCHAPbin2hex | ( | const ubyte * | szBin, |
sbyte * | szHex, | ||
ubyte4 | len | ||
) |
This function creates a hexadecimal representation of binary data.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_MSCHAPv2__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
szBin | Pointer to binary data to represent as hexadecimal. |
szHex | On return, pointer to hexadecimal representation of the szBin data. |
len | Number of bytes of binary data (szBin ). |
MOC_EXTERN MSTATUS EAP_MSCHAPChallengeResponse | ( | ubyte * | Challenge, |
ubyte * | PasswordHash, | ||
ubyte * | Response | ||
) |
This function builds an MSCHAP v0 response to the specified challenge and password hash.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_MSCHAPv2__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
Challenge | Pointer to challenge value. |
PasswordHash | Pointer to password hash. |
Response | On return, pointer to response. |
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_MSCHAPcheckAuthenticatorResponse | ( | ubyte * | Password, |
ubyte2 | PasswordLen, | ||
ubyte * | NtResponse, | ||
ubyte * | PeerChallenge, | ||
ubyte * | AuthenticatorChallenge, | ||
ubyte * | UserName, | ||
ubyte2 | UserNameLen, | ||
ubyte * | ReceivedResponse, | ||
byteBoolean * | ResponseOK | ||
) |
This function (called by the peer) validates an MSCHAP authenticator response (by calling EAP_MSCHAPgenerateAuthenticatorResponse) and in turn builds an EAP response indicating the authenticator's response status.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_MSCHAPv2__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
Password | Pointer to MS-CHAP-V2 session password to use for response. |
PasswordLen | Number of bytes in session password (Password ). |
NtResponse | Calculated NT Authenticator value (returned from EAP_MSCHAPProcessPeer). |
PeerChallenge | Pointer to original peer challenge sent by EAP_MSCHAPProcessPeer. |
AuthenticatorChallenge | Pointer to original authenticator challenge built by EAP_MSCHAPProcessPeer. |
UserName | Pointer to MS-CHAP-V2 session username to use for response. |
UserNameLen | Number of bytes in session username (Username ). |
ReceivedResponse | Pointer to response sent by the authenticator to the peer in the challenge Success message. (If the challenge fails, this value doesn't change.) |
ResponseOK | On return, pointer to result to return to peer: TRUE if the challenge succeeded, FALSE otherwise. |
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_MSCHAPgenerateAuthenticatorResponse | ( | ubyte * | Password, |
ubyte2 | PasswordLen, | ||
ubyte * | NtResponse, | ||
ubyte * | PeerChallenge, | ||
ubyte * | AuthenticatorChallenge, | ||
ubyte * | UserName, | ||
ubyte2 | UserNameLen, | ||
ubyte * | AuthenticatorResponse | ||
) |
This function (used by Mocana internal code) generates an authenticator response.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_MSCHAPv2__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
Password | Pointer to MS-CHAP-V2 session password to use for response. |
PasswordLen | Number of bytes in MS-CHAP-V2 session password (Password ). |
NtResponse | Calculated NT Authenticator value (returned from EAP_MSCHAPProcessPeer). |
PeerChallenge | Pointer to original peer challenge sent by EAP_MSCHAPProcessPeer. |
AuthenticatorChallenge | Pointer to original authenticator challenge built by EAP_MSCHAPProcessPeer. |
UserName | Pointer to MS-CHAP-V2 session username to use for EAP response. |
UserNameLen | Number of bytes in MS-CHAP-V2 session username (Username ). |
AuthenticatorResponse | On return, pointer to response sent by the authenticator to the peer in the challenge Success message, in the format "S=" followed by 40 ASCII hexadecimal digits. |
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_MSCHAPgenerateMasterKey | ( | ubyte * | Password, |
ubyte2 | PasswordLen, | ||
ubyte * | NtResponse, | ||
ubyte * | MasterKey | ||
) |
This function generates an MSK (master session key).
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_MSCHAPv2__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
Password | Pointer to MS-CHAP-V2 session password to use for response. |
PasswordLen | Number of bytes in MS-CHAP-V2 session password (Password ). |
NtResponse | Calculated NT Authenticator value (returned from EAP_MSCHAPProcessPeer). |
MasterKey | On return, pointer to MSK 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_MSCHAPgenerateNTResponse | ( | ubyte * | AuthenticatorChallenge, |
ubyte * | PeerChallenge, | ||
ubyte * | UserName, | ||
ubyte2 | UserNameLen, | ||
ubyte * | Password, | ||
ubyte2 | PasswordLen, | ||
ubyte * | Response | ||
) |
This function builds an NT Response for MS-CHAP-V2 based on the specified authenticator and peer challenges, peer username, and peer password.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_MSCHAPv2__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
AuthenticatorChallenge | Pointer to original authenticator challenge built by EAP_MSCHAPProcessPeer. |
PeerChallenge | Pointer to original peer challenge sent by EAP_MSCHAPProcessPeer. |
UserName | Pointer to peer username. |
UserNameLen | Number of bytes in peer username (UserName ). |
Password | Pointer to MS-CHAP-V2 session password to use for response. |
PasswordLen | Number of bytes in MS-CHAP-V2 session password (Password ). |
Response | On return, pointer to resultant response. |
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_MSCHAPgenerateSessionKey | ( | ubyte * | masterKey, |
ubyte * | sessionKey, | ||
ubyte2 | sessionKeyLen, | ||
byteBoolean | send, | ||
byteBoolean | server | ||
) |
This function generates a session key for send/receive and client/server, as specified, from the specified MSK (master session key). The combination of the send and server parameter values determine which keys are generated. The send-side key on the server (authenticator) must match the receive-side key on the client (peer).
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_MSCHAPv2__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
masterKey | Pointer to MSK value. |
sessionKey | On return, pointer to resultant session key. |
sessionKeyLen | Length (number of bytes) of session key to generate. |
send | 0 to specify a receive session key; non-zero for a send session key. |
server | 0 to specify a server-side (authenticator) key; non-zero for a client-side (peer) 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_MSCHAPHashNtPasswordHash | ( | ubyte * | PasswordHash, |
ubyte * | PasswordHashHash | ||
) |
This function generates an irreversible hash of a password hash (using MD4).
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_MSCHAPv2__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
PasswordHash | Pointer to password hash. |
PasswordHashHash | On return, pointer to generated hash. |
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_MSCHAPNtPasswordHash | ( | ubyte * | Password, |
ubyte2 | PasswordLen, | ||
ubyte * | PasswordHash | ||
) |
This function generates a password hash (disregarding any terminating NULL
) using MD4.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_MSCHAPv2__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
Password | Pointer to peer password. |
PasswordLen | Number of bytes in peer password (Password ). |
PasswordHash | On return, pointer to generated password hash. |
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_MSCHAPpeerResponse | ( | ubyte * | appSessionHdl, |
ubyte * | data, | ||
ubyte2 | datalen, | ||
ubyte * | passwordString, | ||
ubyte2 | passLen, | ||
ubyte * | peerResponse, | ||
ubyte * | peerChallenge, | ||
ubyte * | authChallenge, | ||
ubyte * | UserName, | ||
ubyte2 | UserNameLen, | ||
ubyte ** | eapRespData, | ||
ubyte4 * | eapRespLen, | ||
byteBoolean * | cmp | ||
) |
This function (used by the peer) determines whether the authenticator response to the peer's previous challenge is valid, returns the results (TRUE
or FALSE
) through the cmp
parameter, and builds the resultant SUCCESS/FAIL response.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_MSCHAPv2__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
appSessionHdl | Application session handle (cookie given by the application to identify the session). |
data | Pointer to EAP payload containing MSCHAP authenticator response, which must be in the format <Type , MSCHAP packet>. |
datalen | Number of bytes in EAP payload (data ). |
passwordString | Pointer to MS-CHAP-V2 session password to use for response. |
passLen | Number of bytes in session password (passwordString ). |
peerResponse | Calculated NT Authenticator value (returned from EAP_MSCHAPProcessPeer) originally sent to the authenticator. |
peerChallenge | Pointer to original peer challenge that was sent to the authenticator |
authChallenge | Pointer to original challenge response received from the authenticator by EAP_MSCHAPProcessPeer. |
UserName | Pointer to MS-CHAP-V2 session username to use for EAP response. |
UserNameLen | Number of bytes in session username (UserName ). |
eapRespData | On return, pointer to EAP response message. |
eapRespLen | On return, pointer to number of bytes in EAP response message (eapRespData ). |
cmp | On return, pointer to result of authenticator-peer mutual challenge result: TRUE or FALSE . |
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_MSCHAPProcessAuth | ( | ubyte * | appSessionHdl, |
ubyte * | data, | ||
ubyte4 | datalen, | ||
ubyte * | UserName, | ||
ubyte4 | UserNameLen, | ||
ubyte * | succMsg, | ||
ubyte4 | succMsgLen, | ||
ubyte * | failMsg, | ||
ubyte4 | failMsgLen, | ||
ubyte * | passwordString, | ||
ubyte4 | passLen, | ||
ubyte * | authChallenge, | ||
ubyte * | NtResponse, | ||
ubyte ** | eapReqData, | ||
ubyte4 * | eapReqLen | ||
) |
This function (called by the authenticator) validates an MSCHAP peer response and in turn builds an EAP response indicating success or failure. In the case of success, the authenticator also sends the response to the peer's challenge.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_MSCHAPv2__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
appSessionHdl | Application session handle (cookie given by the application to identify the session). |
data | Pointer to EAP payload containing MSCHAP peer response, which must be in the format <Type , MSCHAP packet>. |
datalen | Number of bytes in EAP payload (data ). |
UserName | Pointer to MS-CHAP-V2 session username to use for EAP response. |
UserNameLen | Number of bytes in session username (UserName ). |
succMsg | Pointer to desired success message string to send to peer. |
succMsgLen | Number of bytes in desired success message (succMsg ). |
failMsg | Pointer to desired fail message string to send to peer. |
failMsgLen | Number of bytes in desired fail message (failMsg ). |
passwordString | Pointer to MS-CHAP-V2 session password to use for response. |
passLen | Number of bytes in session password (passwordString ). |
authChallenge | Pointer to original authenticator challenge that was sent to the peer by EAP_MSCHAPstartRequest. |
NtResponse | On return, pointer to NT Authenticator for this session. |
eapReqData | On return, pointer to EAP response message. |
eapReqLen | On return, pointer to number of bytes in EAP response message (eapReqData ). |
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_MSCHAPProcessPeer | ( | ubyte * | appSessionHdl, |
ubyte * | data, | ||
ubyte4 | datalen, | ||
ubyte * | UserName, | ||
ubyte4 | UserNameLen, | ||
ubyte * | passwordString, | ||
ubyte4 | passLen, | ||
ubyte * | peerChallenge, | ||
ubyte * | authChallenge, | ||
ubyte * | NtAuthenticator, | ||
ubyte ** | eapRespData, | ||
ubyte4 * | eapRespLen | ||
) |
This function builds a response to send to the authenticator based on a challenge received by a peer.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_MSCHAPv2__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
appSessionHdl | Application session handle (cookie given by the application to identify the session). |
data | Pointer to received challenge packet, which must be in the format <Type , MSCHAP packet>. |
datalen | Number of bytes in received challenge packet (data ). |
UserName | Pointer to MS-CHAP-V2 session username to use for EAP response. |
UserNameLen | Number of bytes in session username (UserName ). |
passwordString | Pointer to MS-CHAP-V2 session password to use for response. |
passLen | Number of bytes in session password (passwordString ). |
peerChallenge | On return, pointer to peer challenge sent to authenticator (piggybacked to the response to the challenge originally sent by the authenticator). |
authChallenge | On return, pointer to authenticator challenge value extracted from the data packet; returned to the application for subsequent inclusion in a call to EAP_MSCHAPpeerResponse. |
NtAuthenticator | On return, pointer to NT Authenticator (the eapRespData plus the UserName ); returned to the application for subsequent inclusion in a call to EAP_MSCHAPpeerResponse or EAP_MSCHAPcheckAuthenticatorResponse. |
eapRespData | On return, pointer to resultant authentication response. |
eapRespLen | On return, pointer to number of bytes resultant authentication response (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.MOC_EXTERN MSTATUS EAP_MSCHAPstartRequest | ( | ubyte * | appSessionHdl, |
ubyte * | identity, | ||
ubyte2 | identityLen, | ||
ubyte * | challenge, | ||
ubyte ** | eapReqData, | ||
ubyte4 * | eapReqLen | ||
) |
This function builds a challenge request based on the specified challenge data for the authenticator to transmit to the peer.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_MSCHAPv2__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
appSessionHdl | Application session handle (cookie given by the application to identify the session). |
identity | Pointer to user identity. |
identityLen | Number of bytes in user identity (identity ). |
challenge | Pointer to challenge data to use in challenge request. |
eapReqData | On return, pointer to resultant challenge request. |
eapReqLen | On return, pointer to number of bytes of resultant challenge request (eapReqData ). |
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_MSCHAPv0generateNTResponse | ( | ubyte * | AuthenticatorChallenge, |
ubyte * | Password, | ||
ubyte2 | PasswordLen, | ||
ubyte * | Response | ||
) |
This function builds an NT Response for MS-CHAP-V0 based on the specified authenticator challenge and peer password.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_MSCHAPv2__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
AuthenticatorChallenge | Pointer to original authenticator challenge built by EAP_MSCHAPProcessPeer. |
Password | Pointer to peer password to use for response. |
PasswordLen | Number of bytes in peer password (Password ). |
Response | On return, pointer to resultant response. |
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_MSCHAPV2_getChallenge | ( | ubyte * | buf | ) |
This function returns (through the buf
parameter) a 16-byte challenge value.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_EAP_MSCHAPv2__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_EAP_PEER__
__ENABLE_MOCANA_EAP_AUTH__
buf | On return, pointer to 16-byte challenge 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.