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:
csoler 2013-12-07 14:29:46 +00:00
parent 68138fc1c8
commit b2bea751aa
2 changed files with 43 additions and 6 deletions

View file

@ -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;