HP-UX C SIP Stack Programmer's Guide (Novembery 2007)
188 HP-UX C SIP Stack Programmer’s Guide
Client Authentication Implementation
RvSipAuthenticatorMD5EntityBodyEv()
Notifies the application that it should supply the hash result on the message
body (MD5(entity-body)). The body hash value is needed when the required
quality of protection (qop) was set to “auth-int”.
Note This callback supplies the message as a parameter. However, it is called
before the msgToSend() callback of any SIP Stack object. If your code adds the
message body in the msgToSend callback, the body will not be available when this
callback is called. If you wish the message to include the body in this callback,
you must use the outbound message mechanism to add the body.
RvSipAuthenticatorUnsupportedChallengeEv()
Notifies the application about a challenge whose credentials cannot be prepared
by the SIP Stack. An example of such a challenge is one with a non-MRD
algorithm. When the authenticator encounters such a challenge, it gives the
application a chance to build the credentials. The
RvSipAuthenticatorUnsupportedChallengeEv() is called and the application
should calculate the credentials by itself, build the Authorization header in the
message—using RvSipAuthorizationHeaderConstructInMsg()—and set the
calculated credential into it.
RvSipAuthenticatorNonceCountUsageEv()
Notifies the application about the value of the nonceCount parameter that the
SIP Stack is going to use when calculating credentials. The application can
change this value to fit more precise management of the nonceCount. The SIP
Stack does not check the uniqueness of the used NONCE for a specific realm
when the same realm is used by different objects.
RvSipAuthenticatorAuthorizationReadyEv()
Notifies the application that an Authorization header was built, and is ready to
be sent in the outgoing message. In this callback the application can set
additional information in the header.
S
AMPLE CODE The following code demonstrates the implementation and registration of the
client authentication callbacks.