added read/write of trust database in private format

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-OpenPGP@5237 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2012-06-20 21:59:04 +00:00
parent 1b4a963b78
commit 9357a228a6
5 changed files with 125 additions and 10 deletions

View file

@ -86,7 +86,7 @@ std::string pgp_pwd_callback(void * /*hook*/, const char *uid_hint, const char *
return password ;
}
void AuthGPG::init(const std::string& path_to_public_keyring,const std::string& path_to_secret_keyring,const std::string& pgp_lock_file)
void AuthGPG::init(const std::string& path_to_public_keyring,const std::string& path_to_secret_keyring,const std::string& path_to_trustdb,const std::string& pgp_lock_file)
{
if(_instance != NULL)
{
@ -95,7 +95,7 @@ void AuthGPG::init(const std::string& path_to_public_keyring,const std::string&
}
PGPHandler::setPassphraseCallback(pgp_pwd_callback) ;
_instance = new AuthGPG(path_to_public_keyring,path_to_secret_keyring,pgp_lock_file) ;
_instance = new AuthGPG(path_to_public_keyring,path_to_secret_keyring,path_to_trustdb,pgp_lock_file) ;
}
void AuthGPG::exit()
@ -108,9 +108,9 @@ void AuthGPG::exit()
}
}
AuthGPG::AuthGPG(const std::string& path_to_public_keyring,const std::string& path_to_secret_keyring,const std::string& pgp_lock_file)
AuthGPG::AuthGPG(const std::string& path_to_public_keyring,const std::string& path_to_secret_keyring,const std::string& path_to_trustdb,const std::string& pgp_lock_file)
:p3Config(CONFIG_TYPE_AUTHGPG),
PGPHandler(path_to_public_keyring,path_to_secret_keyring,pgp_lock_file),
PGPHandler(path_to_public_keyring,path_to_secret_keyring,path_to_trustdb,pgp_lock_file),
gpgMtxEngine("AuthGPG-engine"),
gpgMtxData("AuthGPG-data"),
gpgKeySelected(false),
@ -1048,6 +1048,8 @@ int AuthGPG::privateTrustCertificate(const std::string &id, int trustlvl)
std::cerr << __PRETTY_FUNCTION__ << ": to be implemented!" << std::endl;
PGPHandler::privateTrustCertificate(PGPIdType(id),trustlvl) ;
// {
// gpgcert trustCert;
// {