diff --git a/libretroshare/src/pqi/authxpgp.cc b/libretroshare/src/pqi/authxpgp.cc index 2eaabf6ec..1c292a45c 100644 --- a/libretroshare/src/pqi/authxpgp.cc +++ b/libretroshare/src/pqi/authxpgp.cc @@ -579,6 +579,11 @@ bool AuthXPGP::LoadCertificateFromFile(std::string filename, std::string &id) return ProcessXPGP(xpgp, id); } +//============================================================================ + +//! Saves something to filename + +//! \returns true on success, false on failure bool AuthXPGP::SaveCertificateToFile(std::string id, std::string filename) { #ifdef AUTHXPGP_DEBUG diff --git a/libretroshare/src/pqi/cleanupxpgp.h b/libretroshare/src/pqi/cleanupxpgp.h index e8bf39b19..d3eecaab1 100644 --- a/libretroshare/src/pqi/cleanupxpgp.h +++ b/libretroshare/src/pqi/cleanupxpgp.h @@ -28,6 +28,23 @@ #include +//! Converts invitation to clean XPGP certificate + +//! This function was used for extracting XPGP certificates from invitation +//!letters. Typical input was something like +//! You have been invited to join the retroshare community by: beardog-unstable-02 +//! +//! Retroshare is a Friend-2-Friend network that enables you to communicate securely and privately .... +//! ... text stuff ..... +//! +//!-----BEGIN XPGP CERTIFICATE----- +//!MIICxQIBADCCAUkCAQAwHhcNMDkwMjI4MTgzODIyWhcNMTQwMjI3MTgzODIyWjCC +//! ...more ines here... +//!mEuhG8UmDIzC1jeTu8rTMnO+DO3FH/cek1vlfFl4t9g/xktG9U4SPLg= +//!-----END XPGP CERTIFICATE----- +//! +//! In the newer gui version, users send each other almost clean certificates, +//! so this functon is used only to avoid possible bugs with line endings std::string cleanUpCertificate(std::string badCertificate); #endif diff --git a/libretroshare/src/rsserver/p3peers.cc b/libretroshare/src/rsserver/p3peers.cc index b6b6a1ac1..bf7d7af9f 100644 --- a/libretroshare/src/rsserver/p3peers.cc +++ b/libretroshare/src/rsserver/p3peers.cc @@ -543,7 +543,8 @@ bool p3Peers::setNetworkMode(std::string id, uint32_t extNetMode) } -bool p3Peers::setVisState(std::string id, uint32_t extVisState) +bool +p3Peers::setVisState(std::string id, uint32_t extVisState) { #ifdef P3PEERS_DEBUG std::cerr << "p3Peers::setVisState() " << id; @@ -559,8 +560,10 @@ bool p3Peers::setVisState(std::string id, uint32_t extVisState) return mConnMgr->setVisState(id, visState); } +//=========================================================================== /* Auth Stuff */ -std::string p3Peers::GetRetroshareInvite() +std::string +p3Peers::GetRetroshareInvite() { #ifdef P3PEERS_DEBUG std::cerr << "p3Peers::GetRetroshareInvite()"; @@ -584,32 +587,14 @@ std::string p3Peers::GetRetroshareInvite() std::string name = mAuthMgr->getName(ownId); std::ostringstream out; - out << "You have been invited to join the retroshare"; - out << " community by: " << name; - out << std::endl; - out << std::endl; - out << "Retroshare is a Friend-2-Friend network that enables you to"; - out << " communicate securely and"; - out << std::endl; - out << "privately with your friends. "; - out << "You can use it for chat, messages, "; - out << "channels, and file-sharing. "; - out << std::endl; - out << std::endl; - out << "Download it from: "; - out << "http://retroshare.sf.net"; - out << std::endl; - out << std::endl; - out << "Thanks, "; - out << " " << name << ", DrBob and the RetroShare Team!"; - out << std::endl; - out << std::endl; out << certstr; out << std::endl; return out.str(); } +//=========================================================================== + bool p3Peers::LoadCertificateFromFile(std::string fname, std::string &id) { #ifdef P3PEERS_DEBUG