version 1.57, 2005/08/14 00:28:19
|
version 1.58, 2005/08/14 00:37:06
|
|
|
notBefore, notAfter, depth, errorCode, errorStr, preVerifyOk); | notBefore, notAfter, depth, errorCode, errorStr, preVerifyOk); |
| |
// | // |
// Call the application callback. |
// Call the user-specified application callback if it is specified. If it is null, return OpenSSL's verification code. |
// Note that the verification result does not automatically get set to X509_V_OK if the callback is successful. | // Note that the verification result does not automatically get set to X509_V_OK if the callback is successful. |
// This is because OpenSSL retains the original default error in case we want to use it later. | // This is because OpenSSL retains the original default error in case we want to use it later. |
// To set the error, we could use X509_STORE_CTX_set_error(ctx, verifyError); but there is no real benefit to doing that here. | // To set the error, we could use X509_STORE_CTX_set_error(ctx, verifyError); but there is no real benefit to doing that here. |
// | // |
|
if (exData->_rep->verifyCertificateCallback == NULL) |
|
{ |
|
return preVerifyOk; |
|
|
|
} else |
|
{ |
if (exData->_rep->verifyCertificateCallback(*exData->_rep->peerCertificate)) | if (exData->_rep->verifyCertificateCallback(*exData->_rep->peerCertificate)) |
{ | { |
Tracer::trace(TRC_SSL, Tracer::LEVEL4, | Tracer::trace(TRC_SSL, Tracer::LEVEL4, |
|
|
return 0; | return 0; |
} | } |
} | } |
|
} |
| |
// | // |
// Callback function called by OpenSSL. This request is merely forwarded to the static | // Callback function called by OpenSSL. This request is merely forwarded to the static |