make peer detail gui work for the gpg and the ssl id

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2011 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
joss17 2010-01-13 21:12:56 +00:00
parent 41600dc3cf
commit dabe44356a
6 changed files with 49 additions and 33 deletions

View file

@ -456,6 +456,11 @@ bool AuthGPG::storeAllKeys_locked()
/* store in map */
mKeyList[nu.id] = nu;
//store own key
if (nu.id == mOwnGpgId) {
mOwnGpgCert = nu;
}
}
if (GPG_ERR_NO_ERROR != gpgme_op_keylist_end(CTX))
@ -913,6 +918,19 @@ bool AuthGPG::getPGPDetails(std::string id, RsPeerDetails &d)
d.validLvl = it->second.validLvl;
d.ownsign = it->second.ownsign;
d.gpgSigners = it->second.signers;
//did the peer signed me ?
d.hasSignedMe = false;
std::list<std::string>::iterator signersIt;
for(signersIt = mOwnGpgCert.signers.begin(); signersIt != mOwnGpgCert.signers.end() ; ++signersIt) {
if (*signersIt == d.id) {
d.hasSignedMe = true;
break;
}
}
std::cerr << "AuthGPG::getPGPDetails() get details for : " << id << std::endl;
std::cerr << "AuthGPG::getPGPDetails() Name : " << it->second.name << std::endl;
return true;