Authentication Challenge Hook

The secGenerateChallenge Authentication Challenge hook is a user-supplied function that is called when authentication is enabled on a server-capable node. The secGenerateChallenge function has the following format.

secGenerateChallenge(DskParam *pChallenge);

The Jade RPC module is responsible for calling the authentication challenge hook every time a connection is established. This challenge is sent to the client connection in the form of a special RPC server-to-client callback request. The RPC module saves the challenge as part of connection administration, to save your user library from having to retain each connection state and to provide increased security. The connection state is set to "waiting for authentication response". If this authentication response is not received within a finite period or a message other than an authentication response is received, the connection is dropped immediately.

Your user routine should generate a random challenge in the form of binary data, which must fit into the data part of the DskParam (approximately 512 bytes).

As an optimization only, if a Jade client-side connection receives a challenge request and authentication is not enabled at the client, the client RPC fails (and drops) the connection and raises an exception.