Connection Authentication

Connection authentication is initiated on the listener end of the connection by generating an authentication challenge and sending it to the connection initiator. The connection initiator generates an authentication response from the received challenge, and returns this to the listener to verify. If the verification is not successful, the listener closes the connection.

Authentication data is encrypted or decrypted if data encryption has been set up.

You must specify the name of the user-supplied authentication library in the authenticationLibrary property of the TcpIpConnection class before an open, openAsynch, listen, or listenAsynch method operation.

You must specify the name of the challenge generation method in the genAuthChallengeMethod property. The challenge generation method must have the following C++ signature.

int JOMAPI generateChallenge (BYTE **ppChallenge,
                              Size *pChallengeSize);

You must specify the name of the response generation method in the genAuthResponseMethod property. The response generation method must have the following C++ signature.

int JOMAPI generateResponse (BYTE *pChallenge,
                             Size challengeSize,
                             BYTE **ppResponse,
                             Size *pResponseSize);

You must specify the name of the response verification method in the verifyAuthResponseMethod property. The response verification method must have the following C++ signature.

int JOMAPI verifyResponse (BYTE *pChallenge,
                           Size challengeSize,
                           BYTE *pResponse,
                           Size responseSize);

The authentication methods return one of the values listed in the following table.

Value Description
0 The response was successful
Non-zero The response failed