implemented export of identity (to create additional locations easily). Import still to do...

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-OpenPGP@5285 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2012-07-10 21:40:53 +00:00
parent 2ca0bf71d0
commit c9eb267165
11 changed files with 263 additions and 88 deletions

View file

@ -292,14 +292,30 @@ bool AuthGPG::VerifySignature(const void *data, int datalen, const void *sig, un
{
if(withfingerprint.length() != 40)
{
std::cerr << "WARNING: Still need to implement signature verification from complete keyring." << std::endl;
std::cerr << "AuthGPG::VerifySignature(): no (or dammaged) fingerprint. Nor verifying signature. This is likely to be an unknown peer. fingerprint=\"" << withfingerprint << "\"." << std::endl;
return false ;
}
return PGPHandler::VerifySignBin((unsigned char*)data,datalen,(unsigned char*)sig,siglen,PGPFingerprintType(withfingerprint)) ;
}
bool AuthGPG::exportProfile(const std::string& fname,const std::string& exported_id)
{
return PGPHandler::exportGPGKeyPair(fname,PGPIdType(exported_id)) ;
}
bool AuthGPG::importProfile(const std::string& fname,std::string& imported_id)
{
PGPIdType id ;
if(PGPHandler::importGPGKeyPair(fname,id))
{
imported_id = id.toStdString() ;
return true ;
}
else
return false ;
}
bool AuthGPG::active()