mirror of
				https://github.com/RetroShare/RetroShare.git
				synced 2025-10-31 14:49:14 -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
					
				
					 1 changed files with 3 additions and 14 deletions
				
			
		|  | @ -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…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 joss17
						joss17