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
This commit is contained in:
thunder2 2010-05-31 19:20:52 +00:00
parent bed4cb1d4a
commit c23ea03190
2 changed files with 70 additions and 69 deletions

View File

@ -531,74 +531,74 @@ bool AuthGPG::storeAllKeys_locked()
} }
// update trust on all available keys. Not used anymore // update trust on all available keys. Not used anymore
bool AuthGPG::updateTrustAllKeys_locked() //bool AuthGPG::updateTrustAllKeys_locked()
{ //{
gpg_error_t ERR; // gpg_error_t ERR;
if (!gpgmeInit) // if (!gpgmeInit)
{ // {
std::cerr << "Error since GPG is not initialised" << std::endl; // std::cerr << "Error since GPG is not initialised" << std::endl;
return false; // return false;
} // }
//
//
/* have to do this the hard way! */ // /* have to do this the hard way! */
std::map<std::string, gpgcert>::iterator it; // std::map<std::string, gpgcert>::iterator it;
//
for(it = mKeyList.begin(); it != mKeyList.end(); it++) // for(it = mKeyList.begin(); it != mKeyList.end(); it++)
{ // {
/* check for trust items associated with key */ // /* check for trust items associated with key */
std::string peerid = it->second.email; // std::string peerid = it->second.email;
#ifdef GPG_DEBUG //#ifdef GPG_DEBUG
std::cerr << "Searching GPGme for TrustInfo on: " << peerid << std::endl; // std::cerr << "Searching GPGme for TrustInfo on: " << peerid << std::endl;
#endif //#endif
//
/* Initiates a key listing. NB: maxlevel is ignored!*/ // /* Initiates a key listing. NB: maxlevel is ignored!*/
if (GPG_ERR_NO_ERROR != (ERR = gpgme_op_trustlist_start (CTX, peerid.c_str(), 0))) // if (GPG_ERR_NO_ERROR != (ERR = gpgme_op_trustlist_start (CTX, peerid.c_str(), 0)))
{ // {
std::cerr << "Error Starting Trust List" << std::endl; // std::cerr << "Error Starting Trust List" << std::endl;
ProcessPGPmeError(ERR); // ProcessPGPmeError(ERR);
continue; // continue;
} // }
//
//
/* Loop until end of key */ // /* Loop until end of key */
#ifdef GPG_DEBUG //#ifdef GPG_DEBUG
gpgme_trust_item_t ti = NULL; // gpgme_trust_item_t ti = NULL;
//
for(int i = 0;(GPG_ERR_NO_ERROR == (ERR = gpgme_op_trustlist_next (CTX, &ti))); i++) // for(int i = 0;(GPG_ERR_NO_ERROR == (ERR = gpgme_op_trustlist_next (CTX, &ti))); i++)
{ // {
std::string keyid = ti->keyid; // std::string keyid = ti->keyid;
int type = ti->type; // int type = ti->type;
int level = ti->level; // int level = ti->level;
//
/* identify the peers, and add trust level */ // /* identify the peers, and add trust level */
std::cerr << "GPGme Trust Item for: " << keyid; // std::cerr << "GPGme Trust Item for: " << keyid;
std::cerr << std::endl; // std::cerr << std::endl;
//
std::cerr << "\t Type: " << type; // std::cerr << "\t Type: " << type;
std::cerr << " Level: " << level; // std::cerr << " Level: " << level;
std::cerr << std::endl; // std::cerr << std::endl;
//
std::cerr << "\t Owner Trust: " << ti->owner_trust; // std::cerr << "\t Owner Trust: " << ti->owner_trust;
std::cerr << " Validity: " << ti->validity; // std::cerr << " Validity: " << ti->validity;
std::cerr << " Name: " << ti->name; // std::cerr << " Name: " << ti->name;
std::cerr << std::endl; // std::cerr << std::endl;
} // }
std::cerr << "End of TrustList Iteration." << std::endl; // std::cerr << "End of TrustList Iteration." << std::endl;
#endif //#endif
ProcessPGPmeError(ERR); // ProcessPGPmeError(ERR);
//
if (GPG_ERR_NO_ERROR != gpgme_op_trustlist_end(CTX)) // if (GPG_ERR_NO_ERROR != gpgme_op_trustlist_end(CTX))
{ // {
std::cerr << "Error ending TrustList" << std::endl; // std::cerr << "Error ending TrustList" << std::endl;
//
ProcessPGPmeError(ERR); // ProcessPGPmeError(ERR);
} // }
} // }
//
return true; // return true;
//
} //}
bool AuthGPG::printAllKeys_locked() bool AuthGPG::printAllKeys_locked()
{ {

View File

@ -109,7 +109,8 @@ class AuthGPG : public p3Config
// store all keys in map mKeyList to avoid calling gpgme exe repeatedly // store all keys in map mKeyList to avoid calling gpgme exe repeatedly
bool storeAllKeys_locked(); bool storeAllKeys_locked();
bool storeAllKeys_timed(); bool storeAllKeys_timed();
bool updateTrustAllKeys_locked(); // Not used anymore
// bool updateTrustAllKeys_locked();
bool printAllKeys_locked(); bool printAllKeys_locked();
bool printOwnKeys_locked(); bool printOwnKeys_locked();