mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-29 02:51:45 -04:00
* Enabled Relays by default.
- This will only effect people who upgrade from a very old version. - Other people will have to switch it on manually. - Default is 0 friends, 1 FOF & 1 General @ 1kb/s... max 4kb/s usage per peer. * Switched off lots of debugging. * Bugfix for natassist (zeroconf returns 0.0.0.0:0 when its doesn't work). * Logged IP Addresses for Failed incoming connections. * Hacked IP address into the NewsFeed notifications (ugly). git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4827 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
f08bcc153e
commit
87944f251e
11 changed files with 69 additions and 25 deletions
|
@ -830,7 +830,10 @@ static int verify_x509_callback(int preverify_ok, X509_STORE_CTX *ctx)
|
|||
{
|
||||
/* Process as FAILED Certificate */
|
||||
/* Start as INCOMING, as outgoing is already captured */
|
||||
AuthSSL::getAuthSSL()->FailedCertificate(X509_STORE_CTX_get_current_cert(ctx), true);
|
||||
struct sockaddr_in addr;
|
||||
sockaddr_clear(&addr);
|
||||
|
||||
AuthSSL::getAuthSSL()->FailedCertificate(X509_STORE_CTX_get_current_cert(ctx), addr, true);
|
||||
}
|
||||
|
||||
return verify;
|
||||
|
@ -1142,7 +1145,7 @@ bool AuthSSLimpl::decrypt(void *&out, int &outlen, const void *in, int inlen)
|
|||
/********************************************************************************/
|
||||
|
||||
/* store for discovery */
|
||||
bool AuthSSLimpl::FailedCertificate(X509 *x509, bool incoming)
|
||||
bool AuthSSLimpl::FailedCertificate(X509 *x509, const struct sockaddr_in &addr, bool incoming)
|
||||
{
|
||||
std::string peerId = "UnknownSSLID";
|
||||
if(!getX509id(x509, peerId))
|
||||
|
@ -1167,6 +1170,13 @@ bool AuthSSLimpl::FailedCertificate(X509 *x509, bool incoming)
|
|||
std::cerr << "GpgId: " << gpgid << " SSLcn: " << sslcn << " peerId: " << peerId;
|
||||
std::cerr << std::endl;
|
||||
|
||||
{
|
||||
// Hacky - adding IpAddress to SSLId.
|
||||
std::ostringstream out;
|
||||
out << "/" << rs_inet_ntoa(addr.sin_addr) << ":" << ntohs(addr.sin_port);
|
||||
peerId += out.str();
|
||||
}
|
||||
|
||||
uint32_t notifyType = 0;
|
||||
|
||||
/* if auths -> store */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue