From e9a2c24ab14bdce0cf39f4598a54a5035a0afb90 Mon Sep 17 00:00:00 2001 From: drbob Date: Wed, 8 Jul 2009 20:58:58 +0000 Subject: [PATCH] Added Authentication update... for cases where auth fails the first time, but is okay the second. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1335 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/pqi/authssl.cc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/libretroshare/src/pqi/authssl.cc b/libretroshare/src/pqi/authssl.cc index 221fea559..a7f7c5d39 100644 --- a/libretroshare/src/pqi/authssl.cc +++ b/libretroshare/src/pqi/authssl.cc @@ -1624,6 +1624,26 @@ bool AuthSSL::ProcessX509(X509 *x509, std::string &id) /* we accepted it! */ id = xid; + + if (!cert->authed) + { + cert->authed = valid; +#ifdef AUTHSSL_DEBUG + std::cerr << "AuthSSL::ProcessX509() "; + std::cerr << "Updating Unauthed duplicate: "; + std::cerr << (valid ? "true" : "false"); + std::cerr << std::endl; +#endif + } + else + { +#ifdef AUTHSSL_DEBUG + std::cerr << "AuthSSL::ProcessX509() "; + std::cerr << "Original already Valid"; + std::cerr << std::endl; +#endif + } + #ifdef AUTHSSL_DEBUG std::cerr << "AuthSSL::ProcessX509() Accepted Dup"; std::cerr << std::endl;