Public Member Functions | |
Impl (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 | verifyFileSignatureWorkflow (const Pathname &file, const std::string &filedesc, const Pathname &signature, const KeyContext &keycontext=KeyContext()) |
bool | verifyFileSignature (const Pathname &file, const Pathname &signature) |
bool | verifyFileTrustedSignature (const Pathname &file, const Pathname &signature) |
Static Public Member Functions | |
static shared_ptr< Impl > | nullimpl () |
Offer default Impl. | |
Private Member Functions | |
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) |
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). | |
const Pathname | generalKeyRing () const |
const Pathname | trustedKeyRing () const |
Impl * | clone () const |
clone for RWCOW_pointer | |
Private Attributes | |
filesystem::TmpDir | _trusted_tmp_dir |
filesystem::TmpDir | _general_tmp_dir |
Pathname | _base_dir |
CachedPublicKeyData | cachedPublicKeyData |
Functor returning the keyrings data (cached). | |
Friends | |
Impl * | rwcowClone (const Impl *rhs) |
Definition at line 165 of file KeyRing.cc.
zypp::KeyRing::Impl::Impl | ( | const Pathname & | baseTmpDir | ) | [inline] |
void zypp::KeyRing::Impl::importKey | ( | const PublicKey & | key, | |
bool | trusted = false | |||
) |
Definition at line 269 of file KeyRing.cc.
References generalKeyRing(), zypp::PublicKey::path(), and trustedKeyRing().
Referenced by multiKeyImport(), and verifyFileSignatureWorkflow().
void zypp::KeyRing::Impl::multiKeyImport | ( | const Pathname & | keyfile_r, | |
bool | trusted_r = false | |||
) |
Definition at line 283 of file KeyRing.cc.
References generalKeyRing(), importKey(), and trustedKeyRing().
void zypp::KeyRing::Impl::deleteKey | ( | const std::string & | id, | |
bool | trusted | |||
) |
Definition at line 288 of file KeyRing.cc.
References exportKey(), generalKeyRing(), and trustedKeyRing().
std::string zypp::KeyRing::Impl::readSignatureKeyId | ( | const Pathname & | signature | ) |
Definition at line 569 of file KeyRing.cc.
References _, _base_dir, zypp::ExternalProgram::close(), zypp::ExternalProgram::Discard_Stderr, GPG_BINARY, MIL, zypp::filesystem::TmpPath::path(), zypp::externalprogram::ExternalDataSource::receiveLine(), zypp::str::regex_match(), zypp::str::smatch::size(), and ZYPP_THROW.
Referenced by verifyFileSignatureWorkflow().
bool zypp::KeyRing::Impl::isKeyTrusted | ( | const std::string & | id | ) | [inline] |
Definition at line 181 of file KeyRing.cc.
bool zypp::KeyRing::Impl::isKeyKnown | ( | const std::string & | id | ) | [inline] |
Definition at line 183 of file KeyRing.cc.
std::list<PublicKey> zypp::KeyRing::Impl::trustedPublicKeys | ( | ) | [inline] |
Definition at line 186 of file KeyRing.cc.
std::list<PublicKey> zypp::KeyRing::Impl::publicKeys | ( | ) | [inline] |
Definition at line 188 of file KeyRing.cc.
const std::list<PublicKeyData>& zypp::KeyRing::Impl::trustedPublicKeyData | ( | ) | [inline] |
Definition at line 191 of file KeyRing.cc.
const std::list<PublicKeyData>& zypp::KeyRing::Impl::publicKeyData | ( | ) | [inline] |
void zypp::KeyRing::Impl::dumpPublicKey | ( | const std::string & | id, | |
bool | trusted, | |||
std::ostream & | stream | |||
) | [inline] |
PublicKey zypp::KeyRing::Impl::exportPublicKey | ( | const PublicKeyData & | keyData | ) | [inline] |
Definition at line 199 of file KeyRing.cc.
PublicKey zypp::KeyRing::Impl::exportTrustedPublicKey | ( | const PublicKeyData & | keyData | ) | [inline] |
Definition at line 201 of file KeyRing.cc.
bool zypp::KeyRing::Impl::verifyFileSignatureWorkflow | ( | const Pathname & | file, | |
const std::string & | filedesc, | |||
const Pathname & | signature, | |||
const KeyContext & | keycontext = KeyContext() | |||
) |
Definition at line 376 of file KeyRing.cc.
References zypp::PublicKeyData::created(), exportKey(), zypp::PublicKeyData::fingerprint(), generalKeyRing(), importKey(), zypp::KeyRingReport::KEY_TRUST_AND_IMPORT, zypp::KeyRingReport::KEY_TRUST_TEMPORARILY, MIL, zypp::PublicKey::name(), zypp::PublicKey::path(), publicKeyExists(), readSignatureKeyId(), report, trustedKeyRing(), and verifyFile().
bool zypp::KeyRing::Impl::verifyFileSignature | ( | const Pathname & | file, | |
const Pathname & | signature | |||
) | [inline] |
Definition at line 210 of file KeyRing.cc.
bool zypp::KeyRing::Impl::verifyFileTrustedSignature | ( | const Pathname & | file, | |
const Pathname & | signature | |||
) | [inline] |
Definition at line 212 of file KeyRing.cc.
bool zypp::KeyRing::Impl::verifyFile | ( | const Pathname & | file, | |
const Pathname & | signature, | |||
const Pathname & | keyring | |||
) | [private] |
Definition at line 625 of file KeyRing.cc.
References zypp::ExternalProgram::close(), zypp::ExternalProgram::Discard_Stderr, and GPG_BINARY.
Referenced by verifyFileSignatureWorkflow().
void zypp::KeyRing::Impl::importKey | ( | const Pathname & | keyfile, | |
const Pathname & | keyring | |||
) | [private] |
Definition at line 515 of file KeyRing.cc.
References _, zypp::ExternalProgram::close(), zypp::ExternalProgram::Discard_Stderr, GPG_BINARY, and ZYPP_THROW.
PublicKey zypp::KeyRing::Impl::exportKey | ( | const std::string & | id, | |
const Pathname & | keyring | |||
) | [private] |
Definition at line 328 of file KeyRing.cc.
References dumpPublicKeyToTmp(), zypp::PublicKeyData::id(), publicKeyExists(), and WAR.
Referenced by deleteKey(), publicKeys(), and verifyFileSignatureWorkflow().
PublicKey zypp::KeyRing::Impl::exportKey | ( | const PublicKeyData & | keyData, | |
const Pathname & | keyring | |||
) | [private] |
Definition at line 323 of file KeyRing.cc.
References dumpPublicKeyToTmp(), and zypp::PublicKeyData::id().
void zypp::KeyRing::Impl::dumpPublicKey | ( | const std::string & | id, | |
const Pathname & | keyring, | |||
std::ostream & | stream | |||
) | [private] |
Definition at line 340 of file KeyRing.cc.
References zypp::ExternalProgram::close(), zypp::ExternalProgram::Discard_Stderr, GPG_BINARY, and zypp::externalprogram::ExternalDataSource::receiveLine().
filesystem::TmpFile zypp::KeyRing::Impl::dumpPublicKeyToTmp | ( | const std::string & | id, | |
const Pathname & | keyring | |||
) | [private] |
Definition at line 365 of file KeyRing.cc.
References _base_dir, dumpPublicKey(), MIL, and zypp::filesystem::TmpPath::path().
Referenced by exportKey().
void zypp::KeyRing::Impl::deleteKey | ( | const std::string & | id, | |
const Pathname & | keyring | |||
) | [private] |
Definition at line 542 of file KeyRing.cc.
References _, zypp::ExternalProgram::close(), zypp::ExternalProgram::Discard_Stderr, GPG_BINARY, MIL, and ZYPP_THROW.
std::list< PublicKey > zypp::KeyRing::Impl::publicKeys | ( | const Pathname & | keyring | ) | [private] |
const std::list<PublicKeyData>& zypp::KeyRing::Impl::publicKeyData | ( | const Pathname & | keyring | ) | [inline, private] |
Definition at line 228 of file KeyRing.cc.
PublicKeyData zypp::KeyRing::Impl::publicKeyExists | ( | const std::string & | id, | |
const Pathname & | keyring | |||
) | [private] |
Get PublicKeyData for ID (false
if ID is not found).
Definition at line 309 of file KeyRing.cc.
References for_, MIL, and publicKeyData().
Referenced by exportKey(), and verifyFileSignatureWorkflow().
const Pathname zypp::KeyRing::Impl::generalKeyRing | ( | ) | const [inline, private] |
Definition at line 234 of file KeyRing.cc.
Referenced by deleteKey(), importKey(), multiKeyImport(), and verifyFileSignatureWorkflow().
const Pathname zypp::KeyRing::Impl::trustedKeyRing | ( | ) | const [inline, private] |
Definition at line 236 of file KeyRing.cc.
Referenced by deleteKey(), importKey(), multiKeyImport(), and verifyFileSignatureWorkflow().
static shared_ptr<Impl> zypp::KeyRing::Impl::nullimpl | ( | ) | [inline, static] |
Offer default Impl.
Definition at line 254 of file KeyRing.cc.
References zypp::filesystem::TmpPath::defaultLocation().
Impl* zypp::KeyRing::Impl::clone | ( | ) | const [inline, private] |
Definition at line 240 of file KeyRing.cc.
Definition at line 241 of file KeyRing.cc.
Pathname zypp::KeyRing::Impl::_base_dir [private] |
Definition at line 242 of file KeyRing.cc.
Referenced by dumpPublicKeyToTmp(), and readSignatureKeyId().
CachedPublicKeyData zypp::KeyRing::Impl::cachedPublicKeyData [private] |
Functor returning the keyrings data (cached).
const std::list<PublicKeyData> & cachedPublicKeyData( const Pathname & keyring );
Definition at line 250 of file KeyRing.cc.