removed duplicate function p3peers::CertToFile().

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@619 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2008-06-20 13:16:39 +00:00
parent 2059e102bf
commit d8def217fa
3 changed files with 0 additions and 36 deletions

View file

@ -791,32 +791,3 @@ uint32_t RsPeerTranslateTrust(uint32_t trustLvl)
return RS_TRUST_LVL_UNKNOWN;
}
bool p3Peers::certToFile(void)
{
std::string invite = GetRetroshareInvite();
const int SIZE = 400;
char certStore[SIZE]; // enough store to reach certification part of string
std::ofstream cert_file; // to help with counting non cert part of string
std::istringstream certFind(invite); // tie invite to stream
/* find out how long it takes to reach certification part of string */
certFind.get(certStore, SIZE, '=');
invite.erase(0, certFind.gcount()); // delete all characters before certificate part
#ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::certToFile() : certificate" << invite;
#endif
std::string usrId = getPeerName(getOwnId()); // replace with actual textual id
usrId += ".pqi";
cert_file.open(usrId.c_str());
cert_file << invite; //store cert to file
cert_file.close();
return true;
}