Following is an example of a SSL validation callback:
CS_RETCODE CS_PUBLIC
validate_srvname_cb(CS_VOID *userdata, CS_SSLCERT *certptr,
CS_INT certcount, CS_INT valid)
{
if (valid == CS_SSL_INVALID_MISMATCHNAME)
{
return CS_SSL_VALID_CERT;
}
else
{
return valid;
}
}