mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-05 21:29:23 -04:00
restriction to only accept self-signed certificates for friend keys
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6928 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
68138fc1c8
commit
b2bea751aa
2 changed files with 43 additions and 6 deletions
|
@ -85,6 +85,7 @@ int main(int argc,char *argv[])
|
|||
std::string name ;
|
||||
std::list<std::string> signers ;
|
||||
|
||||
PGPHandler::setPassphraseCallback(pgp_pwd_cb) ;
|
||||
PGPHandler handler("toto1","toto2","toto3","toto4") ;
|
||||
handler.getGPGDetailsFromBinaryBlock(cert.pgp_key(),cert.pgp_key_size(),key_id,name,signers) ;
|
||||
|
||||
|
@ -114,10 +115,7 @@ int main(int argc,char *argv[])
|
|||
std::string error_string ;
|
||||
PGPIdType found_id ;
|
||||
|
||||
PGPHandler::setPassphraseCallback(pgp_pwd_cb) ;
|
||||
PGPHandler pgph("pubring.pgp","secring.pgp","trustdb.pgp","lock") ;
|
||||
|
||||
bool result = pgph.LoadCertificateFromString(res,found_id,error_string) ;
|
||||
bool result = handler.LoadCertificateFromString(res,found_id,error_string) ;
|
||||
|
||||
if(!result)
|
||||
std::cerr << "Certificate error: " << error_string << std::endl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue