#include <KeyRing.h>
Public Member Functions | |
| KeyRing (const Pathname &baseTmpDir) | |
| Default ctor. | |
| void | importKey (const PublicKey &key, bool trusted=false) |
| imports a key from a file. | |
| void | dumpTrustedPublicKey (const std::string &id, std::ostream &stream) |
| void | dumpUntrustedPublicKey (const std::string &id, std::ostream &stream) |
| void | dumpPublicKey (const std::string &id, bool trusted, std::ostream &stream) |
| std::string | readSignatureKeyId (const Pathname &signature) |
| reads the public key id from a signature | |
| bool | isKeyTrusted (const std::string &id) |
| true if the key id is trusted | |
| bool | isKeyKnown (const std::string &id) |
| true if the key id is knows, that means at least exist on the untrusted keyring | |
| void | deleteKey (const std::string &id, bool trusted=false) |
| removes a key from the keyring. | |
| std::list< PublicKey > | publicKeys () |
| Get a list of public keys in the keyring. | |
| std::list< PublicKey > | trustedPublicKeys () |
| Get a list of trusted public keys in the keyring. | |
| std::list< std::string > | publicKeyIds () |
| Get a list of public key ids in the keyring. | |
| std::list< std::string > | trustedPublicKeyIds () |
| Get a list of trusted public key ids in the keyring. | |
| bool | verifyFileSignatureWorkflow (const Pathname &file, const std::string filedesc, const Pathname &signature) |
| Follows a signature verification interacting with the user. | |
| bool | verifyFileSignature (const Pathname &file, const Pathname &signature) |
| bool | verifyFileTrustedSignature (const Pathname &file, const Pathname &signature) |
| ~KeyRing () | |
| Dtor. | |
Private Attributes | |
| RWCOW_pointer< Impl > | _pimpl |
| Synonym for text. | |
Friends | |
| std::ostream & | operator<< (std::ostream &str, const KeyRing &obj) |
| Stream output. | |
Classes | |
| struct | Impl |
| KeyRing implementation. More... | |
Definition at line 97 of file KeyRing.h.
| zypp::KeyRing::KeyRing | ( | const Pathname & | baseTmpDir | ) |
| zypp::KeyRing::~KeyRing | ( | ) |
| void zypp::KeyRing::importKey | ( | const PublicKey & | key, | |
| bool | trusted = false | |||
| ) |
imports a key from a file.
throw if key was not imported
Definition at line 672 of file KeyRing.cc.
References _pimpl, and zypp::PublicKey::path().
| void zypp::KeyRing::dumpTrustedPublicKey | ( | const std::string & | id, | |
| std::ostream & | stream | |||
| ) | [inline] |
| void zypp::KeyRing::dumpUntrustedPublicKey | ( | const std::string & | id, | |
| std::ostream & | stream | |||
| ) | [inline] |
| void zypp::KeyRing::dumpPublicKey | ( | const std::string & | id, | |
| bool | trusted, | |||
| std::ostream & | stream | |||
| ) |
Referenced by dumpTrustedPublicKey(), and dumpUntrustedPublicKey().
| string zypp::KeyRing::readSignatureKeyId | ( | const Pathname & | signature | ) |
reads the public key id from a signature
Definition at line 677 of file KeyRing.cc.
References _pimpl.
| bool zypp::KeyRing::isKeyTrusted | ( | const std::string & | id | ) |
true if the key id is trusted
| bool zypp::KeyRing::isKeyKnown | ( | const std::string & | id | ) |
true if the key id is knows, that means at least exist on the untrusted keyring
| void zypp::KeyRing::deleteKey | ( | const std::string & | id, | |
| bool | trusted = false | |||
| ) |
removes a key from the keyring.
If trusted is true, Remove it from trusted keyring too.
| list< PublicKey > zypp::KeyRing::publicKeys | ( | ) |
Get a list of public keys in the keyring.
Definition at line 687 of file KeyRing.cc.
References _pimpl.
| list< PublicKey > zypp::KeyRing::trustedPublicKeys | ( | ) |
Get a list of trusted public keys in the keyring.
Definition at line 692 of file KeyRing.cc.
References _pimpl.
| list< string > zypp::KeyRing::publicKeyIds | ( | ) |
Get a list of public key ids in the keyring.
Definition at line 697 of file KeyRing.cc.
References _pimpl.
| list< string > zypp::KeyRing::trustedPublicKeyIds | ( | ) |
Get a list of trusted public key ids in the keyring.
Definition at line 702 of file KeyRing.cc.
References _pimpl.
| bool zypp::KeyRing::verifyFileSignatureWorkflow | ( | const Pathname & | file, | |
| const std::string | filedesc, | |||
| const Pathname & | signature | |||
| ) |
Follows a signature verification interacting with the user.
The bool returned depends on user decision to trust or not.
| bool zypp::KeyRing::verifyFileSignature | ( | const Pathname & | file, | |
| const Pathname & | signature | |||
| ) |
| bool zypp::KeyRing::verifyFileTrustedSignature | ( | const Pathname & | file, | |
| const Pathname & | signature | |||
| ) |
| std::ostream & operator<< | ( | std::ostream & | str, | |
| const KeyRing & | obj | |||
| ) | [friend] |
RWCOW_pointer<Impl> zypp::KeyRing::_pimpl [private] |
Synonym for text.
Pointer to implementation
Definition at line 186 of file KeyRing.h.
Referenced by importKey(), publicKeyIds(), publicKeys(), readSignatureKeyId(), trustedPublicKeyIds(), trustedPublicKeys(), verifyFileSignature(), and verifyFileTrustedSignature().
1.5.3