mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-26 09:41:29 -05:00
attempt to add SSL-only friends in FriendList - does not work yet
This commit is contained in:
parent
6114d97c36
commit
e132ce7072
@ -295,7 +295,18 @@ bool p3Peers::getPeerDetails(const RsPeerId& id, RsPeerDetails &d)
|
||||
|
||||
/* get from gpg (first), to fill in the sign and trust details */
|
||||
/* don't return now, we've got fill in the ssl and connection info */
|
||||
getGPGDetails(ps.gpg_id, d);
|
||||
|
||||
if(!getGPGDetails(ps.gpg_id, d))
|
||||
{
|
||||
if(!ps.skip_pgp_signature_validation)
|
||||
return false;
|
||||
|
||||
d.gpg_id = ps.gpg_id ;
|
||||
d.skip_signature_validation = true;
|
||||
}
|
||||
else
|
||||
d.skip_signature_validation = false;
|
||||
|
||||
d.isOnlyGPGdetail = false;
|
||||
|
||||
//get the ssl details
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user