fix a bug wich stops multiple connection against the same peer

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2201 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
joss17 2010-02-05 20:39:01 +00:00
parent ef8cf1d8a6
commit faa1e15db2
3 changed files with 19 additions and 1 deletions

View file

@ -1124,6 +1124,16 @@ int pqissl::Authorise_SSL_Connection()
reset();
return -1;
}
std::string certPeerId;
getX509id(peercert, certPeerId);
if (certPeerId != PeerId()) {
rslog(RSL_WARNING, pqisslzone,
"pqissl::Authorise_SSL_Connection() the cert Id doesn't match the Peer id we're trying to connect to.");
// Failed completely
reset();
return -1;
}
rslog(RSL_DEBUG_BASIC, pqisslzone,
"pqissl::Authorise_SSL_Connection() Have Peer Cert");