From c23ea031902ef82384a4ff92d39d7197cff3815d Mon Sep 17 00:00:00 2001 From: thunder2 Date: Mon, 31 May 2010 19:20:52 +0000 Subject: [PATCH] comment out unused method AuthGPG::updateTrustAllKeys_locked git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3042 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/pqi/authgpg.cc | 136 +++++++++++++++---------------- libretroshare/src/pqi/authgpg.h | 3 +- 2 files changed, 70 insertions(+), 69 deletions(-) diff --git a/libretroshare/src/pqi/authgpg.cc b/libretroshare/src/pqi/authgpg.cc index 60aea8686..ad920911a 100644 --- a/libretroshare/src/pqi/authgpg.cc +++ b/libretroshare/src/pqi/authgpg.cc @@ -531,74 +531,74 @@ bool AuthGPG::storeAllKeys_locked() } // update trust on all available keys. Not used anymore -bool AuthGPG::updateTrustAllKeys_locked() -{ - gpg_error_t ERR; - if (!gpgmeInit) - { - std::cerr << "Error since GPG is not initialised" << std::endl; - return false; - } - - - /* have to do this the hard way! */ - std::map::iterator it; - - for(it = mKeyList.begin(); it != mKeyList.end(); it++) - { - /* check for trust items associated with key */ - std::string peerid = it->second.email; -#ifdef GPG_DEBUG - std::cerr << "Searching GPGme for TrustInfo on: " << peerid << std::endl; -#endif - - /* Initiates a key listing. NB: maxlevel is ignored!*/ - if (GPG_ERR_NO_ERROR != (ERR = gpgme_op_trustlist_start (CTX, peerid.c_str(), 0))) - { - std::cerr << "Error Starting Trust List" << std::endl; - ProcessPGPmeError(ERR); - continue; - } - - - /* Loop until end of key */ -#ifdef GPG_DEBUG - gpgme_trust_item_t ti = NULL; - - for(int i = 0;(GPG_ERR_NO_ERROR == (ERR = gpgme_op_trustlist_next (CTX, &ti))); i++) - { - std::string keyid = ti->keyid; - int type = ti->type; - int level = ti->level; - - /* identify the peers, and add trust level */ - std::cerr << "GPGme Trust Item for: " << keyid; - std::cerr << std::endl; - - std::cerr << "\t Type: " << type; - std::cerr << " Level: " << level; - std::cerr << std::endl; - - std::cerr << "\t Owner Trust: " << ti->owner_trust; - std::cerr << " Validity: " << ti->validity; - std::cerr << " Name: " << ti->name; - std::cerr << std::endl; - } - std::cerr << "End of TrustList Iteration." << std::endl; -#endif - ProcessPGPmeError(ERR); - - if (GPG_ERR_NO_ERROR != gpgme_op_trustlist_end(CTX)) - { - std::cerr << "Error ending TrustList" << std::endl; - - ProcessPGPmeError(ERR); - } - } - - return true; - -} +//bool AuthGPG::updateTrustAllKeys_locked() +//{ +// gpg_error_t ERR; +// if (!gpgmeInit) +// { +// std::cerr << "Error since GPG is not initialised" << std::endl; +// return false; +// } +// +// +// /* have to do this the hard way! */ +// std::map::iterator it; +// +// for(it = mKeyList.begin(); it != mKeyList.end(); it++) +// { +// /* check for trust items associated with key */ +// std::string peerid = it->second.email; +//#ifdef GPG_DEBUG +// std::cerr << "Searching GPGme for TrustInfo on: " << peerid << std::endl; +//#endif +// +// /* Initiates a key listing. NB: maxlevel is ignored!*/ +// if (GPG_ERR_NO_ERROR != (ERR = gpgme_op_trustlist_start (CTX, peerid.c_str(), 0))) +// { +// std::cerr << "Error Starting Trust List" << std::endl; +// ProcessPGPmeError(ERR); +// continue; +// } +// +// +// /* Loop until end of key */ +//#ifdef GPG_DEBUG +// gpgme_trust_item_t ti = NULL; +// +// for(int i = 0;(GPG_ERR_NO_ERROR == (ERR = gpgme_op_trustlist_next (CTX, &ti))); i++) +// { +// std::string keyid = ti->keyid; +// int type = ti->type; +// int level = ti->level; +// +// /* identify the peers, and add trust level */ +// std::cerr << "GPGme Trust Item for: " << keyid; +// std::cerr << std::endl; +// +// std::cerr << "\t Type: " << type; +// std::cerr << " Level: " << level; +// std::cerr << std::endl; +// +// std::cerr << "\t Owner Trust: " << ti->owner_trust; +// std::cerr << " Validity: " << ti->validity; +// std::cerr << " Name: " << ti->name; +// std::cerr << std::endl; +// } +// std::cerr << "End of TrustList Iteration." << std::endl; +//#endif +// ProcessPGPmeError(ERR); +// +// if (GPG_ERR_NO_ERROR != gpgme_op_trustlist_end(CTX)) +// { +// std::cerr << "Error ending TrustList" << std::endl; +// +// ProcessPGPmeError(ERR); +// } +// } +// +// return true; +// +//} bool AuthGPG::printAllKeys_locked() { diff --git a/libretroshare/src/pqi/authgpg.h b/libretroshare/src/pqi/authgpg.h index 12d29a770..c943fba13 100644 --- a/libretroshare/src/pqi/authgpg.h +++ b/libretroshare/src/pqi/authgpg.h @@ -109,7 +109,8 @@ class AuthGPG : public p3Config // store all keys in map mKeyList to avoid calling gpgme exe repeatedly bool storeAllKeys_locked(); bool storeAllKeys_timed(); - bool updateTrustAllKeys_locked(); +// Not used anymore +// bool updateTrustAllKeys_locked(); bool printAllKeys_locked(); bool printOwnKeys_locked();