From fcb92631fb0c5009e7818dfcc93648506273e0b7 Mon Sep 17 00:00:00 2001 From: joss17 Date: Tue, 19 Jan 2010 22:06:42 +0000 Subject: [PATCH] clean the cert only when manually inserted git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2092 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/pqi/authgpg.cc | 3 ++- libretroshare/src/rsserver/p3peers.cc | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libretroshare/src/pqi/authgpg.cc b/libretroshare/src/pqi/authgpg.cc index b1046c4bd..140534d0b 100644 --- a/libretroshare/src/pqi/authgpg.cc +++ b/libretroshare/src/pqi/authgpg.cc @@ -1202,7 +1202,8 @@ bool AuthGPG::LoadCertificateFromString(std::string str, std::string &gpg_id) RsStackMutex stack(pgpMtx); /******* LOCKED ******/ - std::string cleancert = cleanUpCertificate(str); + //std::string cleancert = cleanUpCertificate(str); disable for p3disc message on windows system. Move the clean cert in p3peers + std::string cleancert = str; std::cerr << "AuthGPG::LoadCertificateFromString() cleancert : " << cleancert; diff --git a/libretroshare/src/rsserver/p3peers.cc b/libretroshare/src/rsserver/p3peers.cc index 456c91c6c..1f1b254a3 100644 --- a/libretroshare/src/rsserver/p3peers.cc +++ b/libretroshare/src/rsserver/p3peers.cc @@ -29,6 +29,7 @@ #include "pqi/authssl.h" #include "pqi/authgpg.h" #include +#include "pqi/cleanupxpgp.h" #include @@ -912,7 +913,8 @@ bool p3Peers::loadDetailsFromStringCert(std::string certstr, RsPeerDetails &pd) parsePosition += pgpend.length(); std::string pgpCert = certstr.substr(0, parsePosition); std::string gpg_id; - AuthGPG::getAuthGPG()->LoadCertificateFromString(pgpCert, gpg_id); + std::string cleancert = cleanUpCertificate(pgpCert); + AuthGPG::getAuthGPG()->LoadCertificateFromString(cleancert, gpg_id); AuthGPG::getAuthGPG()->getGPGDetails(gpg_id, pd); if (gpg_id == "") { return false;