added keyring output

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-OpenPGP@5131 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2012-05-01 18:45:24 +00:00
parent 60fcd981c1
commit fcb202f666
5 changed files with 77 additions and 91 deletions

View file

@ -117,9 +117,11 @@ class PGPHandler
bool decryptTextFromFile(const PGPIdType& key_id,std::string& text,const std::string& inputfile) ;
bool getKeyFingerprint(const PGPIdType& id,PGPFingerprintType& fp) const ;
void setAcceptConnexion(const PGPIdType&,bool) ;
// Write keyring
bool writePublicKeyring(const std::string& filename) const ;
// Debug stuff.
virtual bool printKeys() const ;
@ -130,18 +132,15 @@ class PGPHandler
bool isGPGAccepted(const std::string &id);
static void setPassphraseCallback(PassphraseCallback cb) ;
static PassphraseCallback passphraseCallback() { return _passphrase_callback ; }
private:
static std::string makeRadixEncodedPGPKey(const ops_keydata_t *key) ;
static ops_keyring_t *allocateOPSKeyring() ;
static void addNewKeyToOPSKeyring(ops_keyring_t*, const ops_keydata_t&) ;
void initCertificateInfo(PGPCertificateInfo& cert,const ops_keydata_t *keydata,uint32_t i) ;
const ops_keydata_t *getPublicKey(const PGPIdType&) const ;
const ops_keydata_t *getSecretKey(const PGPIdType&) const ;
// Members.
//
RsMutex pgphandlerMtx ;
ops_keyring_t *_pubring ;
@ -153,6 +152,11 @@ class PGPHandler
const std::string _pubring_path ;
const std::string _secring_path ;
// Helper functions.
//
static std::string makeRadixEncodedPGPKey(const ops_keydata_t *key) ;
static ops_keyring_t *allocateOPSKeyring() ;
static void addNewKeyToOPSKeyring(ops_keyring_t*, const ops_keydata_t&) ;
static PassphraseCallback _passphrase_callback ;
};