mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-09 19:38:45 -05:00
fixed stupid mistake in commit 7858 in SSL error handling causing impossibility to connect
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7866 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
0e3cd003ad
commit
352d8413c0
@ -1099,19 +1099,16 @@ int AuthSSLimpl::VerifyX509Callback(int preverify_ok, X509_STORE_CTX *ctx)
|
|||||||
int err, depth;
|
int err, depth;
|
||||||
|
|
||||||
err_cert = X509_STORE_CTX_get_current_cert(ctx);
|
err_cert = X509_STORE_CTX_get_current_cert(ctx);
|
||||||
|
#ifdef AUTHSSL_DEBUG
|
||||||
err = X509_STORE_CTX_get_error(ctx);
|
err = X509_STORE_CTX_get_error(ctx);
|
||||||
depth = X509_STORE_CTX_get_error_depth(ctx);
|
depth = X509_STORE_CTX_get_error_depth(ctx);
|
||||||
|
#endif
|
||||||
|
|
||||||
if(err_cert == NULL)
|
if(err_cert == NULL)
|
||||||
{
|
{
|
||||||
std::cerr << "AuthSSLimpl::VerifyX509Callback(): Cannot get certificate. Error!" << std::endl;
|
std::cerr << "AuthSSLimpl::VerifyX509Callback(): Cannot get certificate. Error!" << std::endl;
|
||||||
return false ;
|
return false ;
|
||||||
}
|
}
|
||||||
if(err != X509_V_OK)
|
|
||||||
{
|
|
||||||
std::cerr << "AuthSSLimpl::VerifyX509Callback(): get certificate returned error code =" << err << ", error depth=" << depth << std::endl;
|
|
||||||
return false ;
|
|
||||||
}
|
|
||||||
#ifdef AUTHSSL_DEBUG
|
#ifdef AUTHSSL_DEBUG
|
||||||
std::cerr << "AuthSSLimpl::VerifyX509Callback(preverify_ok: " << preverify_ok
|
std::cerr << "AuthSSLimpl::VerifyX509Callback(preverify_ok: " << preverify_ok
|
||||||
<< " Err: " << err << " Depth: " << depth << std::endl;
|
<< " Err: " << err << " Depth: " << depth << std::endl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user