HP-UX C SIP Stack Programmer's Guide (Novembery 2007)
Authentication 187
Client Authentication Implementation
WORKING WITH THE
A
UTHENTICATOR
To work with the authenticator, you should first get the authenticator handle
from the SIP Stack. RvSipAuthenticatorHandle defines the handle to the
authenticator. You can receive this handle by calling
RvSipStackGetAuthenticatorHandle(). You use this handle to set your
application callbacks, and to activate other authenticator functions. The
authenticator is responsible for both client and server authentication.
CLIENT
A
UTHENTICATION
I
MPLEMENTATION
The authenticator performs the client authentication process independently but
still requires your application to do the following:
Supply the user name and password.
Apply the MD5 hash function on a given string according to the
requirements of the authenticator.
Apply the MD5 hash result calculated on the message body for
qop=auth-int authentication.
The application handles all of these tasks by implementing the callback
functions that the authenticator will call whenever one of these tasks needs to be
performed.
CLIENT
AUTHENTICATOR
CALLBACKS
The Authenticator API supplies several callback functions that your application
must implement for the authentication process to succeed. You should
implement these callbacks and set the callback pointers to the authenticator. The
authenticator calls these callbacks during the authentication process as required.
The following callbacks are supplied with the Authenticator API:
RvSipAuthenticatorMD5ExEv()
Notifies the application that use of the MD5 algorithm is required. This event
supplies the application with the input string for the algorithm and the
application returns the output string of the MD5 algorithm.
RvSipAuthenticatorGetSharedSecretEv()
Notifies the application that the shared user name and password are required.
The event also supplies the Realm parameter that the UAS sent.