libzypp: zypp::KeyRingImpl Class Reference

libzypp 17.38.5

zypp::KeyRingImpl Class Reference

KeyRing implementation, shared between zyppng and zypp. More...

`#include <zypp-common/private/keyring_p.h>`

Inheritance diagram for zypp::KeyRingImpl:

## Public Member Functions
| KeyRingImpl (const Pathname &baseTmpDir)
void | importKey (const PublicKey &key, bool trusted=false)
void | multiKeyImport (const Pathname &keyfile_r, bool trusted_r=false)
void | deleteKey (const std::string &id, bool trusted)
std::string | readSignatureKeyId (const Pathname &signature)
bool | isKeyTrusted (const std::string &id)
bool | isKeyKnown (const std::string &id)
std::list< PublicKey > | trustedPublicKeys ()
std::list< PublicKey > | publicKeys ()
const std::list< PublicKeyData > & | trustedPublicKeyData ()
const std::list< PublicKeyData > & | publicKeyData ()
void | dumpPublicKey (const std::string &id, bool trusted, std::ostream &stream)
PublicKey | exportPublicKey (const PublicKeyData &keyData)
PublicKey | exportTrustedPublicKey (const PublicKeyData &keyData)
bool | verifyFileSignature (const Pathname &file, const Pathname &signature)
bool | verifyFileTrustedSignature (const Pathname &file, const Pathname &signature)
PublicKeyData | publicKeyExists (const std::string &id)
PublicKeyData | trustedPublicKeyExists (const std::string &id)
void | allowPreload (bool yesno_r)
CachedPublicKeyData::Manip | keyRingManip (const Pathname &keyring)
| Impl helper providing on demand a KeyManagerCtx to manip a cached keyring.
bool | verifyFile (const Pathname &file, const Pathname &signature, const Pathname &keyring)
void | importKey (const Pathname &keyfile, const Pathname &keyring)
PublicKey | exportKey (const std::string &id, const Pathname &keyring)
PublicKey | exportKey (const PublicKeyData &keyData, const Pathname &keyring)
PublicKey | exportKey (const PublicKey &key, const Pathname &keyring)
void | dumpPublicKey (const std::string &id, const Pathname &keyring, std::ostream &stream)
filesystem::TmpFile | dumpPublicKeyToTmp (const std::string &id, const Pathname &keyring)
void | deleteKey (const std::string &id, const Pathname &keyring)
std::list< PublicKey > | publicKeys (const Pathname &keyring)
const std::list< PublicKeyData > & | publicKeyData (const Pathname &keyring)
PublicKeyData | publicKeyExists (const std::string &id, const Pathname &keyring)
| Get PublicKeyData for ID (`false` if ID is not found).
void | preloadCachedKeys ()
| Load key files cached on the system into the generalKeyRing.
const Pathname | generalKeyRing () const
const Pathname | trustedKeyRing () const
zyppng::SignalProxy< void(const PublicKey &)> | sigTrustedKeyAdded ()
zyppng::SignalProxy< void(const PublicKey &)> | sigTrustedKeyRemoved ()

## Private Attributes
filesystem::TmpDir | _trusted_tmp_dir
filesystem::TmpDir | _general_tmp_dir
Pathname | _base_dir
bool | _allowPreload = false
CachedPublicKeyData | cachedPublicKeyData
| Functor returning the keyrings data (cached).
zyppng::Signal< void(const PublicKey &)> | _sigTrustedKeyAdded
zyppng::Signal< void(const PublicKey &)> | _sigTrustedKeyRemoved

## Detailed Description

KeyRing implementation, shared between zyppng and zypp.

Definition at line 90 of file keyring_p.h.

## Constructor & Destructor Documentation

## ◆ KeyRingImpl()

zypp::KeyRingImpl::KeyRingImpl | ( | const Pathname & | baseTmpDir | ) |

Definition at line 110 of file keyring_p.cc.

## Member Function Documentation

## ◆ importKey() [1/2]

void zypp::KeyRingImpl::importKey | ( | const PublicKey & | key,
|  | bool | trusted = false )

Definition at line 117 of file keyring_p.cc.

## ◆ multiKeyImport()

void zypp::KeyRingImpl::multiKeyImport | ( | const Pathname & | keyfile_r,
|  | bool | trusted_r = false )

Definition at line 138 of file keyring_p.cc.

## ◆ deleteKey() [1/2]

void zypp::KeyRingImpl::deleteKey | ( | const std::string & | id,
|  | bool | trusted )

Definition at line 143 of file keyring_p.cc.

## ◆ readSignatureKeyId()

std::string zypp::KeyRingImpl::readSignatureKeyId | ( | const Pathname & | signature | ) |

Definition at line 301 of file keyring_p.cc.

## ◆ isKeyTrusted()

bool zypp::KeyRingImpl::isKeyTrusted | ( | const std::string & | id | ) |
| inline

Definition at line 101 of file keyring_p.h.

## ◆ isKeyKnown()

bool zypp::KeyRingImpl::isKeyKnown | ( | const std::string & | id | ) |
| inline

Definition at line 103 of file keyring_p.h.

## ◆ trustedPublicKeys()

std::list< PublicKey > zypp::KeyRingImpl::trustedPublicKeys | ( |  | ) |
| inline

Definition at line 106 of file keyring_p.h.

## ◆ publicKeys() [1/2]

std::list< PublicKey > zypp::KeyRingImpl::publicKeys | ( |  | ) |
| inline

Definition at line 108 of file keyring_p.h.

## ◆ trustedPublicKeyData()

const std::list< PublicKeyData > & zypp::KeyRingImpl::trustedPublicKeyData | ( |  | ) |
| inline

Definition at line 111 of file keyring_p.h.

## ◆ publicKeyData() [1/2]

const std::list< PublicKeyData > & zypp::KeyRingImpl::publicKeyData | ( |  | ) |
| inline

Definition at line 113 of file keyring_p.h.

## ◆ dumpPublicKey() [1/2]

void zypp::KeyRingImpl::dumpPublicKey | ( | const std::string & | id,
|  | bool | trusted,
|  | std::ostream & | stream )
| inline

Definition at line 116 of file keyring_p.h.

## ◆ exportPublicKey()

PublicKey zypp::KeyRingImpl::exportPublicKey | ( | const PublicKeyData & | keyData | ) |
| inline

Definition at line 119 of file keyring_p.h.

## ◆ exportTrustedPublicKey()

PublicKey zypp::KeyRingImpl::exportTrustedPublicKey | ( | const PublicKeyData & | keyData | ) |
| inline

Definition at line 121 of file keyring_p.h.

## ◆ verifyFileSignature()

bool zypp::KeyRingImpl::verifyFileSignature | ( | const Pathname & | file,
|  | const Pathname & | signature )
| inline

Definition at line 124 of file keyring_p.h.

## ◆ verifyFileTrustedSignature()

bool zypp::KeyRingImpl::verifyFileTrustedSignature | ( | const Pathname & | file,
|  | const Pathname & | signature )
| inline

Definition at line 126 of file keyring_p.h.

## ◆ publicKeyExists() [1/2]

PublicKeyData zypp::KeyRingImpl::publicKeyExists | ( | const std::string & | id | ) |
| inline

Definition at line 129 of file keyring_p.h.

## ◆ trustedPublicKeyExists()

PublicKeyData zypp::KeyRingImpl::trustedPublicKeyExists | ( | const std::string & | id | ) |
| inline

Definition at line 131 of file keyring_p.h.

## ◆ allowPreload()

void zypp::KeyRingImpl::allowPreload | ( | bool | yesno_r | ) |
| inline

Definition at line 134 of file keyring_p.h.

## ◆ keyRingManip()

CachedPublicKeyData::Manip zypp::KeyRingImpl::keyRingManip | ( | const Pathname & | keyring | ) |
| inline

Impl helper providing on demand a KeyManagerCtx to manip a cached keyring.

Definition at line 138 of file keyring_p.h.

## ◆ verifyFile()

bool zypp::KeyRingImpl::verifyFile | ( | const Pathname & | file,
|  | const Pathname & | signature,
|  | const Pathname & | keyring )

Definition at line 317 of file keyring_p.cc.

## ◆ importKey() [2/2]

void zypp::KeyRingImpl::importKey | ( | const Pathname & | keyfile,
|  | const Pathname & | keyring )

Definition at line 281 of file keyring_p.cc.

## ◆ exportKey() [1/3]

PublicKey zypp::KeyRingImpl::exportKey | ( | const std::string & | id,
|  | const Pathname & | keyring )

Definition at line 239 of file keyring_p.cc.

## ◆ exportKey() [2/3]

PublicKey zypp::KeyRingImpl::exportKey | ( | const PublicKeyData & | keyData,
|  | const Pathname & | keyring )

Definition at line 234 of file keyring_p.cc.

## ◆ exportKey() [3/3]

PublicKey zypp::KeyRingImpl::exportKey | ( | const PublicKey & | key,
|  | const Pathname & | keyring )
| inline

Definition at line 146 of file keyring_p.h.

## ◆ dumpPublicKey() [2/2]

void zypp::KeyRingImpl::dumpPublicKey | ( | const std::string & | id,
|  | const Pathname & | keyring,
|  | std::ostream & | stream )

Definition at line 251 of file keyring_p.cc.

## ◆ dumpPublicKeyToTmp()

filesystem::TmpFile zypp::KeyRingImpl::dumpPublicKeyToTmp | ( | const std::string & | id,
|  | const Pathname & | keyring )

Definition at line 256 of file keyring_p.cc.

## ◆ deleteKey() [2/2]

void zypp::KeyRingImpl::deleteKey | ( | const std::string & | id,
|  | const Pathname & | keyring )

Definition at line 294 of file keyring_p.cc.

## ◆ publicKeys() [2/2]

std::list< PublicKey > zypp::KeyRingImpl::publicKeys | ( | const Pathname & | keyring | ) |

Definition at line 267 of file keyring_p.cc.

## ◆ publicKeyData() [2/2]

const std::list< PublicKeyData > & zypp::KeyRingImpl::publicKeyData | ( | const Pathname & | keyring | ) |
| inline

Definition at line 155 of file keyring_p.h.

## ◆ publicKeyExists() [2/2]

PublicKeyData zypp::KeyRingImpl::publicKeyExists | ( | const std::string & | id,
|  | const Pathname & | keyring )

Get PublicKeyData for ID (`false` if ID is not found).

Definition at line 160 of file keyring_p.cc.

## ◆ preloadCachedKeys()

void zypp::KeyRingImpl::preloadCachedKeys | ( |  | ) |

Load key files cached on the system into the generalKeyRing.

Definition at line 180 of file keyring_p.cc.

## ◆ generalKeyRing()

const Pathname zypp::KeyRingImpl::generalKeyRing | ( |  | ) | const
| inline

Definition at line 163 of file keyring_p.h.

## ◆ trustedKeyRing()

const Pathname zypp::KeyRingImpl::trustedKeyRing | ( |  | ) | const
| inline

Definition at line 165 of file keyring_p.h.

## ◆ sigTrustedKeyAdded()

zyppng::SignalProxy< void(const PublicKey &)> zypp::KeyRingImpl::sigTrustedKeyAdded | ( |  | ) |
| inline

Definition at line 168 of file keyring_p.h.

## ◆ sigTrustedKeyRemoved()

zyppng::SignalProxy< void(const PublicKey &)> zypp::KeyRingImpl::sigTrustedKeyRemoved | ( |  | ) |
| inline

Definition at line 172 of file keyring_p.h.

## Member Data Documentation

## ◆ _trusted_tmp_dir

filesystem::TmpDir zypp::KeyRingImpl::_trusted_tmp_dir
| private

Definition at line 178 of file keyring_p.h.

## ◆ _general_tmp_dir

filesystem::TmpDir zypp::KeyRingImpl::_general_tmp_dir
| private

Definition at line 179 of file keyring_p.h.

## ◆ _base_dir

Pathname zypp::KeyRingImpl::_base_dir
| private

Definition at line 180 of file keyring_p.h.

## ◆ _allowPreload

bool zypp::KeyRingImpl::_allowPreload = false
| private

Definition at line 181 of file keyring_p.h.

## ◆ cachedPublicKeyData

CachedPublicKeyData zypp::KeyRingImpl::cachedPublicKeyData
| private

Functor returning the keyrings data (cached).

const std::list<PublicKeyData> & cachedPublicKeyData( const Pathname & keyring );
zypp::KeyRingImpl::cachedPublicKeyData
CachedPublicKeyData cachedPublicKeyData
Functor returning the keyrings data (cached).
Definition keyring_p.h:188
zypp::filesystem::Pathname
Pathname.
Definition Pathname.h:48
zypp::keyring
Definition KeyRingContexts.cc:18

Definition at line 188 of file keyring_p.h.

## ◆ _sigTrustedKeyAdded

zyppng::Signal<void ( const PublicKey & )> zypp::KeyRingImpl::_sigTrustedKeyAdded
| private

Definition at line 190 of file keyring_p.h.

## ◆ _sigTrustedKeyRemoved

zyppng::Signal<void ( const PublicKey & )> zypp::KeyRingImpl::_sigTrustedKeyRemoved
| private

Definition at line 191 of file keyring_p.h.

The documentation for this class was generated from the following files:

- zypp-common/private/keyring_p.h
- zypp-common/private/keyring_p.cc