fixed showup of self signatures in certificates that are not in the keyring already

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5438 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2012-08-17 19:05:22 +00:00
parent 8b7f71b284
commit 9f7d54f91d
3 changed files with 49 additions and 7 deletions

View file

@ -1,8 +1,11 @@
#include <fstream>
#include <string.h>
#include "argstream.h"
//#include <pqi/cleanupxpgp.h>
#include <retroshare/rspeers.h>
#include <pgp/rscertificate.h>
#include <pgp/pgphandler.h>
int main(int argc,char *argv[])
{
@ -64,6 +67,21 @@ int main(int argc,char *argv[])
std::cerr << "Output from certificate (new format):" << std::endl;
std::cerr << cert.toStdString() << std::endl ;
std::string key_id ;
std::string name ;
std::list<std::string> signers ;
PGPHandler handler("toto1","toto2","toto3","toto4") ;
handler.getGPGDetailsFromBinaryBlock(cert.pgp_key(),cert.pgp_key_size(),key_id,name,signers) ;
std::cerr << "Details loaded from certificate:" << std::endl;
std::cerr << "PGP id\t: " << key_id << std::endl;
std::cerr << "Key name\t: " << name << std::endl;
std::cerr << "Signers\t:" << std::endl;
for(std::list<std::string>::const_iterator it(signers.begin());it!=signers.end();++it)
std::cerr << " " << *it << std::endl;
return 0;
}
catch(std::exception& e)