#include <PublicKey.h>
Public Member Functions | |
PublicKey () | |
Default ctor. | |
PublicKey (const Pathname &keyFile_r) | |
Ctor taking the key from a file. | |
PublicKey (const filesystem::TmpFile &sharedFile_r) | |
Ctor reading the key from a TmpFile. | |
~PublicKey () | |
const PublicKeyData & | keyData () const |
The public keys data (. | |
bool | isValid () const |
std::string | id () const |
std::string | name () const |
std::string | fingerprint () const |
Date | created () const |
Date | expires () const |
std::string | expiresAsString () const |
bool | expired () const |
int | daysToLive () const |
std::string | gpgPubkeyVersion () const |
std::string | gpgPubkeyRelease () const |
std::string | asString () const |
Pathname | path () const |
File containig the ASCII armored key. | |
const std::list< PublicKeyData > & | hiddenKeys () const |
Additional keys data in case the ASCII armored blob containes multiple keys. | |
bool | operator== (PublicKey rhs) const |
bool | operator== (std::string sid) const |
Private Member Functions | |
PublicKey (const filesystem::TmpFile &sharedFile_r, const PublicKeyData &keyData_r) | |
KeyRing ctor: No need to parse file if KeyRing already had valid KeyData. | |
Private Attributes | |
RWCOW_pointer< Impl > | _pimpl |
Pointer to implementation. | |
Friends | |
class | KeyRing |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &str, const PublicKey &obj) |
std::ostream & | dumpOn (std::ostream &str, const PublicKey &obj) |
Classes | |
class | Impl |
PublicKey implementation. More... |
If you don't need the ASCII armored version of the key stored in a tempfile, using PublicKeyData might be sufficient.
Definition at line 217 of file PublicKey.h.
zypp::PublicKey::PublicKey | ( | ) |
zypp::PublicKey::PublicKey | ( | const Pathname & | keyFile_r | ) | [explicit] |
Ctor taking the key from a file.
This is quite expensive, as a copy of the file is created and used. If you can construct PublicKey from a filesystem::TmpFile, this prevents copying.
when | data does not make a key |
Definition at line 403 of file PublicKey.cc.
zypp::PublicKey::PublicKey | ( | const filesystem::TmpFile & | sharedFile_r | ) | [explicit] |
Ctor reading the key from a TmpFile.
PublicKey holds a reference on the TmpFile providing the key.
when | data does not make a key |
Definition at line 407 of file PublicKey.cc.
zypp::PublicKey::~PublicKey | ( | ) |
Definition at line 415 of file PublicKey.cc.
zypp::PublicKey::PublicKey | ( | const filesystem::TmpFile & | sharedFile_r, | |
const PublicKeyData & | keyData_r | |||
) | [private] |
KeyRing ctor: No need to parse file if KeyRing already had valid KeyData.
Definition at line 411 of file PublicKey.cc.
const PublicKeyData & zypp::PublicKey::keyData | ( | ) | const |
The public keys data (.
Definition at line 418 of file PublicKey.cc.
References _pimpl.
Referenced by asString(), created(), daysToLive(), zypp::dumpOn(), expired(), expires(), expiresAsString(), fingerprint(), gpgPubkeyRelease(), gpgPubkeyVersion(), id(), name(), and operator==().
bool zypp::PublicKey::isValid | ( | ) | const [inline] |
std::string zypp::PublicKey::id | ( | ) | const |
Definition at line 427 of file PublicKey.cc.
References zypp::PublicKeyData::id(), and keyData().
Referenced by isValid(), operator==(), zypp::target::rpm::RpmDb::removePubkey(), zypp::target::rpm::KeyRingSignalReceiver::trustedKeyAdded(), and zypp::target::rpm::KeyRingSignalReceiver::trustedKeyRemoved().
std::string zypp::PublicKey::name | ( | ) | const |
Definition at line 430 of file PublicKey.cc.
References keyData(), and zypp::PublicKeyData::name().
Referenced by zypp::target::rpm::KeyRingSignalReceiver::trustedKeyAdded(), zypp::target::rpm::KeyRingSignalReceiver::trustedKeyRemoved(), and zypp::KeyRing::Impl::verifyFileSignatureWorkflow().
std::string zypp::PublicKey::fingerprint | ( | ) | const |
Definition at line 433 of file PublicKey.cc.
References zypp::PublicKeyData::fingerprint(), and keyData().
Referenced by isValid().
Date zypp::PublicKey::created | ( | ) | const |
Definition at line 436 of file PublicKey.cc.
References zypp::PublicKeyData::created(), and keyData().
Date zypp::PublicKey::expires | ( | ) | const |
Definition at line 439 of file PublicKey.cc.
References zypp::PublicKeyData::expires(), and keyData().
std::string zypp::PublicKey::expiresAsString | ( | ) | const |
Definition at line 448 of file PublicKey.cc.
References zypp::PublicKeyData::expiresAsString(), and keyData().
bool zypp::PublicKey::expired | ( | ) | const |
Definition at line 442 of file PublicKey.cc.
References zypp::PublicKeyData::expired(), and keyData().
int zypp::PublicKey::daysToLive | ( | ) | const |
Definition at line 445 of file PublicKey.cc.
References zypp::PublicKeyData::daysToLive(), and keyData().
std::string zypp::PublicKey::gpgPubkeyVersion | ( | ) | const |
Definition at line 451 of file PublicKey.cc.
References zypp::PublicKeyData::gpgPubkeyVersion(), and keyData().
Referenced by zypp::target::rpm::RpmDb::importPubkey(), and zypp::target::rpm::RpmDb::removePubkey().
std::string zypp::PublicKey::gpgPubkeyRelease | ( | ) | const |
Definition at line 454 of file PublicKey.cc.
References zypp::PublicKeyData::gpgPubkeyRelease(), and keyData().
Referenced by zypp::target::rpm::RpmDb::importPubkey().
std::string zypp::PublicKey::asString | ( | ) | const |
Definition at line 457 of file PublicKey.cc.
References zypp::PublicKeyData::asString(), and keyData().
Referenced by zypp::target::rpm::RpmDb::importPubkey(), operator<<(), and zypp::target::rpm::RpmDb::removePubkey().
Pathname zypp::PublicKey::path | ( | ) | const |
File containig the ASCII armored key.
Definition at line 421 of file PublicKey.cc.
References _pimpl.
Referenced by zypp::KeyRing::Impl::importKey(), zypp::target::rpm::RpmDb::importPubkey(), zypp::target::rpm::KeyRingSignalReceiver::trustedKeyAdded(), and zypp::KeyRing::Impl::verifyFileSignatureWorkflow().
const std::list< PublicKeyData > & zypp::PublicKey::hiddenKeys | ( | ) | const |
Additional keys data in case the ASCII armored blob containes multiple keys.
Definition at line 424 of file PublicKey.cc.
References _pimpl.
bool zypp::PublicKey::operator== | ( | PublicKey | rhs | ) | const |
bool zypp::PublicKey::operator== | ( | std::string | sid | ) | const |
friend class KeyRing [friend] |
Definition at line 278 of file PublicKey.h.
std::ostream & operator<< | ( | std::ostream & | str, | |
const PublicKey & | obj | |||
) | [related] |
std::ostream & dumpOn | ( | std::ostream & | str, | |
const PublicKey & | obj | |||
) | [related] |
RWCOW_pointer<Impl> zypp::PublicKey::_pimpl [private] |
Pointer to implementation.
Definition at line 284 of file PublicKey.h.
Referenced by hiddenKeys(), keyData(), and path().