mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-13 09:03:33 -04:00
Revert "Ad a friend right upon connection when necessary. Removed two core mutex to do that, it might be dangerous, we will see"
This reverts commit 430b13ab7d12b0911e072887c8347b6855d173af. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2042 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
1c23a2fb2c
commit
5349ab101a
4 changed files with 18 additions and 23 deletions
|
@ -2185,10 +2185,10 @@ int AuthSSL::VerifyX509Callback(int preverify_ok, X509_STORE_CTX *ctx)
|
|||
//sslcert *cert = NULL;
|
||||
std::string certId;
|
||||
getX509id(X509_STORE_CTX_get_current_cert(ctx), certId);
|
||||
// if (!mConnMgr->isFriend(certId)) {
|
||||
// //we've got a new ssl id
|
||||
// preverify_ok = false;
|
||||
// }
|
||||
if (!mConnMgr->isFriend(certId)) {
|
||||
//we've got a new ssl id
|
||||
preverify_ok = false;
|
||||
}
|
||||
|
||||
//is the connection was initiated by us, then it was for a specific peer id wich is stored is in the context
|
||||
//check that the peerid in the context is the same as the cert one
|
||||
|
@ -2211,13 +2211,13 @@ int AuthSSL::VerifyX509Callback(int preverify_ok, X509_STORE_CTX *ctx)
|
|||
}
|
||||
}
|
||||
|
||||
//Add, even if it might already be added
|
||||
//just to be sure
|
||||
mConnMgr->addFriend(certId, getX509CNString(X509_STORE_CTX_get_current_cert(ctx)->cert_info->issuer));
|
||||
|
||||
//set location
|
||||
mConnMgr->setLocation(certId, getX509LocString(X509_STORE_CTX_get_current_cert(ctx)->cert_info->subject));
|
||||
|
||||
//Check if peer isn't already connected
|
||||
//Cgheck if peer isn't already connected
|
||||
peerConnectState detail;
|
||||
if (mConnMgr->getFriendNetStatus(certId, detail)) {
|
||||
if (detail.state & RS_PEER_CONNECTED && detail.connecttype & RS_NET_CONN_TUNNEL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue