mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 06:06:10 -04:00
first code for the gui : network dialog, start dialog and certificate first generation
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2009 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
45b2287d41
commit
77b3c0afd0
12 changed files with 267 additions and 510 deletions
|
@ -549,6 +549,18 @@ bool p3Peers::getPGPAllList(std::list<std::string> &ids)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool p3Peers::getPGPDetails(std::string id, RsPeerDetails &d)
|
||||
{
|
||||
#ifdef P3PEERS_DEBUG
|
||||
std::cerr << "p3Peers::getPgpDetails()";
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
|
||||
/* get from mAuthMgr */
|
||||
AuthGPG::getAuthGPG()->getPGPDetails(id, d);
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string p3Peers::getPGPOwnId()
|
||||
{
|
||||
#ifdef P3PEERS_DEBUG
|
||||
|
@ -874,34 +886,14 @@ std::string p3Peers::SaveCertificateToString(std::string id)
|
|||
return AuthSSL::getAuthSSL()->SaveCertificateToString(id);
|
||||
}
|
||||
|
||||
bool p3Peers::AuthCertificate(std::string id, std::string code)
|
||||
{
|
||||
#ifdef P3PEERS_DEBUG
|
||||
std::cerr << "p3Peers::AuthCertificate() " << id;
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
|
||||
if (AuthSSL::getAuthSSL()->AuthCertificate(id))
|
||||
{
|
||||
#ifdef P3PEERS_DEBUG
|
||||
std::cerr << "p3Peers::AuthCertificate() OK ... Adding as Friend";
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
|
||||
/* add in as a friend */
|
||||
return mConnMgr->addFriend(id);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool p3Peers::SignCertificate(std::string id)
|
||||
bool p3Peers::SignGPGCertificate(std::string id)
|
||||
{
|
||||
#ifdef P3PEERS_DEBUG
|
||||
std::cerr << "p3Peers::SignCertificate() " << id;
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
|
||||
return AuthSSL::getAuthSSL()->SignCertificate(id);
|
||||
return AuthGPG::getAuthGPG()->SignCertificateLevel0(id);
|
||||
}
|
||||
|
||||
bool p3Peers::TrustCertificate(std::string id, bool trust)
|
||||
|
|
|
@ -57,6 +57,7 @@ virtual bool getPeerDetails(std::string id, RsPeerDetails &d);
|
|||
virtual std::string getPGPOwnId();
|
||||
virtual bool getPGPFriendList(std::list<std::string> &ids);
|
||||
virtual bool getPGPAllList(std::list<std::string> &ids);
|
||||
virtual bool getPGPDetails(std::string id, RsPeerDetails &d);
|
||||
|
||||
|
||||
/* Add/Remove Friends */
|
||||
|
@ -87,8 +88,7 @@ virtual bool LoadCertificateFromString(std::string cert, std::string &id);
|
|||
virtual bool SaveCertificateToFile(std::string id, std::string fname);
|
||||
virtual std::string SaveCertificateToString(std::string id);
|
||||
|
||||
virtual bool AuthCertificate(std::string id, std::string code);
|
||||
virtual bool SignCertificate(std::string id);
|
||||
virtual bool SignGPGCertificate(std::string id);
|
||||
virtual bool TrustCertificate(std::string id, bool trust);
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue