mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-20 21:34:31 -05:00
update, during the GUI for invitation changes
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1084 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
f36e0ba3ae
commit
efd9a2f056
@ -579,6 +579,11 @@ bool AuthXPGP::LoadCertificateFromFile(std::string filename, std::string &id)
|
|||||||
return ProcessXPGP(xpgp, 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)
|
bool AuthXPGP::SaveCertificateToFile(std::string id, std::string filename)
|
||||||
{
|
{
|
||||||
#ifdef AUTHXPGP_DEBUG
|
#ifdef AUTHXPGP_DEBUG
|
||||||
|
@ -28,6 +28,23 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
//! 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);
|
std::string cleanUpCertificate(std::string badCertificate);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -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
|
#ifdef P3PEERS_DEBUG
|
||||||
std::cerr << "p3Peers::setVisState() " << id;
|
std::cerr << "p3Peers::setVisState() " << id;
|
||||||
@ -559,8 +560,10 @@ bool p3Peers::setVisState(std::string id, uint32_t extVisState)
|
|||||||
return mConnMgr->setVisState(id, visState);
|
return mConnMgr->setVisState(id, visState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//===========================================================================
|
||||||
/* Auth Stuff */
|
/* Auth Stuff */
|
||||||
std::string p3Peers::GetRetroshareInvite()
|
std::string
|
||||||
|
p3Peers::GetRetroshareInvite()
|
||||||
{
|
{
|
||||||
#ifdef P3PEERS_DEBUG
|
#ifdef P3PEERS_DEBUG
|
||||||
std::cerr << "p3Peers::GetRetroshareInvite()";
|
std::cerr << "p3Peers::GetRetroshareInvite()";
|
||||||
@ -584,32 +587,14 @@ std::string p3Peers::GetRetroshareInvite()
|
|||||||
std::string name = mAuthMgr->getName(ownId);
|
std::string name = mAuthMgr->getName(ownId);
|
||||||
|
|
||||||
std::ostringstream out;
|
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 << certstr;
|
||||||
out << std::endl;
|
out << std::endl;
|
||||||
|
|
||||||
return out.str();
|
return out.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//===========================================================================
|
||||||
|
|
||||||
bool p3Peers::LoadCertificateFromFile(std::string fname, std::string &id)
|
bool p3Peers::LoadCertificateFromFile(std::string fname, std::string &id)
|
||||||
{
|
{
|
||||||
#ifdef P3PEERS_DEBUG
|
#ifdef P3PEERS_DEBUG
|
||||||
|
Loading…
Reference in New Issue
Block a user