|
libzypp 17.38.15
|
Gpg key handling. More...
#include <zypp/KeyRing.h>

Classes | |
| struct | Impl |
Friends | |
| std::ostream & | operator<< (std::ostream &str, const KeyRing &obj) |
| relates: KeyRing Stream output | |
Default answers in verification workflow. | |
Per default all answers are | |
| enum | DefaultAcceptBits { ACCEPT_NOTHING = 0x0000 , ACCEPT_UNSIGNED_FILE = 0x0001 , ACCEPT_UNKNOWNKEY = 0x0002 , TRUST_KEY_TEMPORARILY = 0x0004 , TRUST_AND_IMPORT_KEY = 0x0008 , ACCEPT_VERIFICATION_FAILED = 0x0010 } |
| DefaultAccept flags ( More... | |
| RW_pointer< Impl > | _pimpl |
| Pointer to implementation. | |
| ZYPP_DECLARE_FLAGS (DefaultAccept, DefaultAcceptBits) | |
| KeyRing (const Pathname &baseTmpDir) | |
| Default ctor. | |
| void | importKey (const PublicKey &key, bool trusted=false) |
| imports a key from a file. | |
| void | multiKeyImport (const Pathname &keyfile_r, bool trusted_r=false) |
| Initial import from RpmDb. | |
| 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) |
| PublicKey | exportPublicKey (const PublicKeyData &keyData) |
| Export a public key identified by its key data. | |
| PublicKey | exportTrustedPublicKey (const PublicKeyData &keyData) |
| Export a trusted public key identified by its key data. | |
| 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 (incl. | |
| std::list< PublicKey > | trustedPublicKeys () |
| Get a list of trusted public keys in the keyring (incl. | |
| std::list< PublicKeyData > | publicKeyData () |
| Get a list of public key data in the keyring (key data only) | |
| std::list< PublicKeyData > | trustedPublicKeyData () |
| Get a list of trusted public key data in the keyring (key data only) | |
| PublicKeyData | publicKeyData (const std::string &id) |
| Get a public key's data in the keyring (key data only) | |
| PublicKeyData | trustedPublicKeyData (const std::string &id) |
| Get a trusted public key's data in the keyring (key data only) | |
| bool | verifyFileSignature (const Pathname &file, const Pathname &signature) ZYPP_API |
| Verifies a file against a signature, with no user interaction. | |
| bool | verifyFileTrustedSignature (const Pathname &file, const Pathname &signature) ZYPP_API |
| ~KeyRing () override | |
| Dtor. | |
| KeyRing::Impl & | pimpl () |
| Access to private functions for the KeyRingWorkflow implementations. | |
| void | allowPreload (bool yesno_r) |
| The general keyring may be populated with known keys stored on the system. | |
| void | setTrustedKeyRingInit (std::function< void()> init_r) |
| Populate the trusted keyring on demand by init_r (nullptr to unset). | |
| static DefaultAccept | defaultAccept () |
| Get the active accept bits. | |
| static void | setDefaultAccept (DefaultAccept value_r) |
| Set the active accept bits. | |
Additional Inherited Members | |
| Public Member Functions inherited from zypp::base::ReferenceCounted | |
| ReferenceCounted () | |
| Default ctor. | |
| ReferenceCounted (const ReferenceCounted &rhs) | |
| Copy ctor. | |
| virtual | ~ReferenceCounted () |
| Dtor. | |
| ReferenceCounted & | operator= (const ReferenceCounted &) |
| Assignment. | |
| unsigned | refCount () const |
| Return reference counter value. | |
| void | ref () const |
| Add a reference. | |
| void | unref () const |
| Release a reference. | |
| Static Public Member Functions inherited from zypp::base::ReferenceCounted | |
| static void | add_ref (const ReferenceCounted *ptr_r) |
| Called by zypp::intrusive_ptr to add a reference. | |
| static void | release (const ReferenceCounted *ptr_r) |
| Called by zypp::intrusive_ptr to add a reference. | |
| Protected Member Functions inherited from zypp::base::ReferenceCounted | |
| virtual std::ostream & | dumpOn (std::ostream &str) const |
| Overload to realize std::ostream & operator<<. | |
| virtual void | ref_to (unsigned) const |
| Trigger derived classes after refCount was increased. | |
| virtual void | unref_to (unsigned) const |
| Trigger derived classes after refCount was decreased. | |
DefaultAccept flags (
| Enumerator | |
|---|---|
| ACCEPT_NOTHING | |
| ACCEPT_UNSIGNED_FILE | |
| ACCEPT_UNKNOWNKEY | |
| TRUST_KEY_TEMPORARILY | |
| TRUST_AND_IMPORT_KEY | |
| ACCEPT_VERIFICATION_FAILED | |
| zypp::KeyRing::KeyRing | ( | const Pathname & | baseTmpDir | ) |
Default ctor.
Definition at line 174 of file KeyRing.cc.
|
override |
Dtor.
Definition at line 178 of file KeyRing.cc.
| zypp::KeyRing::ZYPP_DECLARE_FLAGS | ( | DefaultAccept | , |
| DefaultAcceptBits | ) |
|
static |
Get the active accept bits.
Definition at line 53 of file KeyRing.cc.
|
static |
Set the active accept bits.
Definition at line 56 of file KeyRing.cc.
Initial import from RpmDb.
Definition at line 196 of file KeyRing.cc.
|
inline |
|
inline |
Definition at line 228 of file KeyRing.cc.
| PublicKey zypp::KeyRing::exportPublicKey | ( | const PublicKeyData & | keyData | ) |
Export a public key identified by its key data.
Definition at line 231 of file KeyRing.cc.
| PublicKey zypp::KeyRing::exportTrustedPublicKey | ( | const PublicKeyData & | keyData | ) |
Export a trusted public key identified by its key data.
Definition at line 234 of file KeyRing.cc.
| std::string zypp::KeyRing::readSignatureKeyId | ( | const Pathname & | signature | ) |
reads the public key id from a signature
Definition at line 199 of file KeyRing.cc.
| bool zypp::KeyRing::isKeyTrusted | ( | const std::string & | id | ) |
true if the key id is trusted
Definition at line 237 of file KeyRing.cc.
| bool zypp::KeyRing::isKeyKnown | ( | const std::string & | id | ) |
true if the key id is knows, that means at least exist on the untrusted keyring
Definition at line 240 of file KeyRing.cc.
removes a key from the keyring.
If trusted is true, Remove it from trusted keyring too.
Definition at line 202 of file KeyRing.cc.
| std::list< PublicKey > zypp::KeyRing::publicKeys | ( | ) |
Get a list of public keys in the keyring (incl.
ASCII armored keys in tmpfiles)
Definition at line 205 of file KeyRing.cc.
| std::list< PublicKey > zypp::KeyRing::trustedPublicKeys | ( | ) |
Get a list of trusted public keys in the keyring (incl.
ASCII armored keys in tmpfiles)
Definition at line 208 of file KeyRing.cc.
| std::list< PublicKeyData > zypp::KeyRing::publicKeyData | ( | ) |
Get a list of public key data in the keyring (key data only)
Definition at line 211 of file KeyRing.cc.
| std::list< PublicKeyData > zypp::KeyRing::trustedPublicKeyData | ( | ) |
Get a list of trusted public key data in the keyring (key data only)
Definition at line 214 of file KeyRing.cc.
| PublicKeyData zypp::KeyRing::publicKeyData | ( | const std::string & | id | ) |
Get a public key's data in the keyring (key data only)
Definition at line 217 of file KeyRing.cc.
| PublicKeyData zypp::KeyRing::trustedPublicKeyData | ( | const std::string & | id | ) |
Get a trusted public key's data in the keyring (key data only)
Definition at line 220 of file KeyRing.cc.
Verifies a file against a signature, with no user interaction.
| file | Path of the file to be verified |
| signature | Signature to verify the file against |
Definition at line 223 of file KeyRing.cc.
| bool zypp::KeyRing::verifyFileTrustedSignature | ( | const Pathname & | file, |
| const Pathname & | signature ) |
Definition at line 226 of file KeyRing.cc.
| KeyRing::Impl & zypp::KeyRing::pimpl | ( | ) |
Access to private functions for the KeyRingWorkflow implementations.
Definition at line 181 of file KeyRing.cc.
The general keyring may be populated with known keys stored on the system.
Definition at line 186 of file KeyRing.cc.
Populate the trusted keyring on demand by init_r (nullptr to unset).
Building the trusted keyring executes gpg, so commands which never look at it should not pay for it.
Definition at line 189 of file KeyRing.cc.
|
friend |
|
private |