12#ifndef ZYPP_ZYPP_DETAIL_KEYRINGIMPL_H
13#define ZYPP_ZYPP_DETAIL_KEYRINGIMPL_H
15#include "zypp-core/fs/TmpPath.h"
16#include <zypp-core/fs/WatchFile>
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
Class representing one GPG Public Keys data.
Class representing one GPG Public Key (PublicKeyData + ASCII armored in a tempfile).
const PublicKeyData & keyData() const
The public keys data (.
Provide a new empty temporary directory and recursively delete it when no longer needed.
Provide a new empty temporary file and delete it when no longer needed.
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
Easy-to use interface to the ZYPP dependency resolver.
scoped_ptr< WatchFile > _keyringP
void assertCache(const Pathname &keyring_r)
std::list< PublicKeyData > _data
scoped_ptr< WatchFile > _keyringK
Helper providing on demand a KeyManagerCtx to manip the cached keyring.
std::optional< KeyManagerCtx > _context
KeyManagerCtx & keyManagerCtx()
Manip(CachedPublicKeyData &cache_r, Pathname keyring_r)
NON_COPYABLE_BUT_MOVE(Manip)
CachedPublicKeyData & _cache
Functor returning the keyrings data (cached).
void setDirty(const Pathname &keyring_r)
const std::list< PublicKeyData > & operator()(const Pathname &keyring_r) const
const std::list< PublicKeyData > & getData(const Pathname &keyring_r) const
Manip manip(Pathname keyring_r)
Helper providing on demand a KeyManagerCtx to manip the cached keyring.
std::map< Pathname, Cache > CacheMap
void importKey(const PublicKey &key, bool trusted=false)
PublicKeyData trustedPublicKeyExists(const std::string &id)
void preloadCachedKeys()
Load key files cached on the system into the generalKeyRing.
std::list< PublicKey > trustedPublicKeys()
CachedPublicKeyData::Manip keyRingManip(const Pathname &keyring)
Impl helper providing on demand a KeyManagerCtx to manip a cached keyring.
PublicKeyData publicKeyExists(const std::string &id)
PublicKey exportKey(const std::string &id, const Pathname &keyring)
PublicKey exportPublicKey(const PublicKeyData &keyData)
bool isKeyKnown(const std::string &id)
const std::list< PublicKeyData > & publicKeyData()
bool verifyFileTrustedSignature(const Pathname &file, const Pathname &signature)
void allowPreload(bool yesno_r)
PublicKey exportTrustedPublicKey(const PublicKeyData &keyData)
Impl(const Pathname &baseTmpDir)
bool verifyFile(const Pathname &file, const Pathname &signature, const Pathname &keyring)
const Pathname generalKeyRing() const
const std::list< PublicKeyData > & trustedPublicKeyData()
filesystem::TmpDir _general_tmp_dir
bool verifyFileSignature(const Pathname &file, const Pathname &signature)
CachedPublicKeyData cachedPublicKeyData
Functor returning the keyrings data (cached).
std::string readSignatureKeyId(const Pathname &signature)
void multiKeyImport(const Pathname &keyfile_r, bool trusted_r=false)
std::list< PublicKey > publicKeys()
const std::list< PublicKeyData > & publicKeyData(const Pathname &keyring)
void deleteKey(const std::string &id, bool trusted)
const Pathname trustedKeyRing() const
filesystem::TmpFile dumpPublicKeyToTmp(const std::string &id, const Pathname &keyring)
PublicKey exportKey(const PublicKey &key, const Pathname &keyring)
filesystem::TmpDir _trusted_tmp_dir
bool isKeyTrusted(const std::string &id)
void dumpPublicKey(const std::string &id, bool trusted, std::ostream &stream)