added a signature add/remove button in connect wizard, only when gpgme-1.3.1 or greater is used, based on the availability of the GPGME_EXPORT_MODE_MINIMAL option.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4372 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2011-07-01 20:47:58 +00:00
parent 28e5f1b8f3
commit e9853b655c
7 changed files with 80 additions and 23 deletions

View file

@ -129,6 +129,15 @@ p3Peers::p3Peers(p3ConnectMgr *cm)
return;
}
bool p3Peers::hasExportMinimal()
{
#ifdef GPGME_EXPORT_MODE_MINIMAL
return true ;
#else
return false ;
#endif
}
/* Updates ... */
bool p3Peers::FriendsChanged()
{
@ -858,13 +867,13 @@ p3Peers::setVisState(const std::string &id, uint32_t extVisState)
//===========================================================================
/* Auth Stuff */
std::string
p3Peers::GetRetroshareInvite()
p3Peers::GetRetroshareInvite(bool include_signatures)
{
return GetRetroshareInvite(getOwnId());
return GetRetroshareInvite(getOwnId(),include_signatures);
}
std::string
p3Peers::GetRetroshareInvite(const std::string& ssl_id)
p3Peers::GetRetroshareInvite(const std::string& ssl_id,bool include_signatures)
{
#ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::GetRetroshareInvite()" << std::endl;
@ -876,7 +885,7 @@ p3Peers::GetRetroshareInvite(const std::string& ssl_id)
if (getPeerDetails(ssl_id, Detail))
{
invite = AuthGPG::getAuthGPG()->SaveCertificateToString(Detail.gpg_id);
invite = AuthGPG::getAuthGPG()->SaveCertificateToString(Detail.gpg_id,include_signatures);
if(!Detail.isOnlyGPGdetail)
{

View file

@ -89,9 +89,10 @@ virtual bool getAllowTunnelConnection() ;
/* Auth Stuff */
// Get the invitation (GPG cert + local/ext address + SSL id for the given peer)
virtual std::string GetRetroshareInvite(const std::string& ssl_id);
virtual std::string GetRetroshareInvite(const std::string& ssl_id,bool include_signatures);
// same but for own id
virtual std::string GetRetroshareInvite();
virtual std::string GetRetroshareInvite(bool include_signatures);
virtual bool hasExportMinimal() ;
virtual bool loadCertificateFromFile(const std::string &fname, std::string &id, std::string &gpg_id);
virtual bool loadDetailsFromStringCert(const std::string &cert, RsPeerDetails &pd, std::string& error_string);