mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-10 10:05:19 -04:00
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:
parent
2059e102bf
commit
d8def217fa
3 changed files with 0 additions and 36 deletions
|
@ -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;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -75,7 +75,6 @@ virtual std::string SaveCertificateToString(std::string id);
|
|||
virtual bool AuthCertificate(std::string id, std::string code);
|
||||
virtual bool SignCertificate(std::string id);
|
||||
virtual bool TrustCertificate(std::string id, bool trust);
|
||||
virtual bool certToFile(void);
|
||||
|
||||
private:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue