mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-04 23:25:32 -04:00
small update of connct mgr and ssl connection
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2489 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
f57b4c7b64
commit
aa7bed984f
5 changed files with 40 additions and 87 deletions
|
@ -1137,6 +1137,7 @@ int pqissl::Authorise_SSL_Connection()
|
|||
reset();
|
||||
return -1;
|
||||
}
|
||||
|
||||
std::string certPeerId;
|
||||
getX509id(peercert, certPeerId);
|
||||
if (certPeerId != PeerId()) {
|
||||
|
@ -1153,39 +1154,6 @@ int pqissl::Authorise_SSL_Connection()
|
|||
|
||||
accept(ssl_connection, sockfd, remote_addr);
|
||||
return 1;
|
||||
|
||||
// save certificate... (and ip locations)
|
||||
// false for outgoing....
|
||||
// we actually connected to remote_addr,
|
||||
// which could be
|
||||
// (pqissl's case) sslcert->serveraddr or sslcert->localaddr.
|
||||
|
||||
// bool certCorrect = false;
|
||||
// certCorrect = AuthSSL::getAuthSSL()->CheckCertificate(PeerId(), peercert);
|
||||
//
|
||||
// // check it's the right one.
|
||||
// if (certCorrect)
|
||||
// {
|
||||
// // then okay...
|
||||
// std::ostringstream out;
|
||||
// out << "pqissl::Authorise_SSL_Connection() Accepting Conn. Peer: " << PeerId();
|
||||
// rslog(RSL_WARNING, pqisslzone, out.str());
|
||||
//
|
||||
// accept(ssl_connection, sockfd, remote_addr);
|
||||
// return 1;
|
||||
// }
|
||||
//
|
||||
// {
|
||||
// std::ostringstream out;
|
||||
// out << "pqissl::Authorise_SSL_Connection() Something Wrong ... ";
|
||||
// out << " Shutdown. Peer: " << PeerId();
|
||||
// rslog(RSL_WARNING, pqisslzone, out.str());
|
||||
// }
|
||||
|
||||
// else shutdown ssl connection.
|
||||
|
||||
reset();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pqissl::accept(SSL *ssl, int fd, struct sockaddr_in foreign_addr) // initiate incoming connection.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue