attempt to add SSL-only friends in FriendList - does not work yet

This commit is contained in:
csoler 2019-06-20 23:09:40 +02:00
parent 6114d97c36
commit e132ce7072
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
2 changed files with 30 additions and 2 deletions

View file

@ -592,7 +592,8 @@ void FriendList::insertPeers()
std::list<RsPgpId>::iterator gpgIt;
rsPeers->getGPGAcceptedList(gpgFriends);
//add own gpg id, if we have more than on node (ssl client)
// add own gpg id, if we have more than on node (ssl client)
std::list<RsPeerId> ownSslContacts;
RsPgpId ownId = rsPeers->getGPGOwnId();
rsPeers->getAssociatedSSLIds(ownId, ownSslContacts);
@ -600,6 +601,22 @@ void FriendList::insertPeers()
gpgFriends.push_back(ownId);
}
// Also add SSL peers which PGP key is not available yet.
std::list<RsPeerId> ssl_friends ;
rsPeers->getFriendList(ssl_friends);
std::cerr << "List of accepted ssl peers: " << std::endl;
for(auto it(ssl_friends.begin());it!=ssl_friends.end();++it)
{
RsPeerDetails pd;
if(rsPeers->getPeerDetails(*it,pd) && pd.skip_signature_validation)
{
std::cerr << " adding " << *it << " - " << pd.gpg_id << std::endl;
gpgFriends.push_back(pd.gpg_id);
}
}
/* get a link to the table */
QTreeWidget *peerTreeWidget = ui->peerTreeWidget;