HP-UX C SIP Stack Programmer's Guide (Novembery 2007)
208 HP-UX C SIP Stack Programmer’s Guide
Server Authentication Implementation
printf("Error in RespondUnauthenticatedDigest");
}
}
else
{
/*------------------------------------------------------------------------------------
The authentication procedure was completed with success. Accepts the Invite request.
-----------------------------------------------------------------------------------/
if(hTransc != NULL)
{
rv = RvSipCallLegTranscResponse(hCallLeg, hTransc, 200);
}
else
{
rv = RvSipCallLegAccept(hCallLeg);
}
if(rv != RV_OK)
{
printf("Error in accepting the request");
}
}
}
/*=========================================================================================*/
AUTHENTICATOR
F
UNCTIONS FOR
SERVER USAGE
Server applications, such as stateless proxy, may want to use the authenticator
functions directly to verify credentials, and not to use them through the
Transaction functions. Such applications should use the following authenticator
functions:
RvSipAuthenticatorCredentialsSupported()
Checks whether or not the SIP Stack is capable of authenticating the given
Authenticator header. Supporting requirements are MD5 algorithm, Digest
scheme, and qop = auth. Another requirement is that the
RvSipAuthenticatorMD5Ev callback function is implemented.
RvSipAuthenticatorVerifyCredentialsExt()
Gets an Authorization header and password, and generates a hash value using
the MD5 algorithm. Checks if the generated value is equal to the value in the
Authorization header. If it is equal, the credentials are verified.