mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
stop ssl listening when already connected
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1923 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
1bb1f4575b
commit
bc27e188f9
@ -245,6 +245,7 @@ int pqissl::reset()
|
||||
n_read_zero = 0;
|
||||
total_len = 0 ;
|
||||
mTimeoutTS = 0;
|
||||
listen();
|
||||
|
||||
if (neededReset)
|
||||
{
|
||||
@ -1120,20 +1121,15 @@ int pqissl::Authorise_SSL_Connection()
|
||||
return err;
|
||||
}
|
||||
|
||||
stoplistening();
|
||||
|
||||
rslog(RSL_DEBUG_BASIC, pqisslzone,
|
||||
"pqissl::Authorise_SSL_Connection() SSL_Connection_Complete");
|
||||
|
||||
// reset switch.
|
||||
waiting = WAITING_NOT;
|
||||
|
||||
/**************** PQI_USE_XPGP ******************/
|
||||
#if defined(PQI_USE_XPGP)
|
||||
XPGP *peercert = SSL_get_peer_pgp_certificate(ssl_connection);
|
||||
#else /* X509 Certificates */
|
||||
/**************** PQI_USE_XPGP ******************/
|
||||
X509 *peercert = SSL_get_peer_certificate(ssl_connection);
|
||||
#endif /* X509 Certificates */
|
||||
/**************** PQI_USE_XPGP ******************/
|
||||
|
||||
if (peercert == NULL)
|
||||
{
|
||||
@ -1155,14 +1151,7 @@ int pqissl::Authorise_SSL_Connection()
|
||||
// (pqissl's case) sslcert->serveraddr or sslcert->localaddr.
|
||||
|
||||
bool certCorrect = false;
|
||||
/**************** PQI_USE_XPGP ******************/
|
||||
#if defined(PQI_USE_XPGP)
|
||||
certCorrect = mAuthMgr->CheckCertificateXPGP(PeerId(), peercert);
|
||||
#else /* X509 Certificates */
|
||||
/**************** PQI_USE_XPGP ******************/
|
||||
certCorrect = mAuthMgr->CheckCertificate(PeerId(), peercert);
|
||||
#endif /* X509 Certificates */
|
||||
/**************** PQI_USE_XPGP ******************/
|
||||
|
||||
// check it's the right one.
|
||||
if (certCorrect)
|
||||
|
Loading…
Reference in New Issue
Block a user