libzypp
15.28.6
|
Class representing one GPG Public Keys data. More...
#include <PublicKey.h>
Classes | |
class | Impl |
PublicKeyData implementation. More... | |
Public Types | |
typedef const PublicSubkeyData * | SubkeyIterator |
Public Member Functions | |
PublicKeyData () | |
Default constructed: empty data. More... | |
~PublicKeyData () | |
operator bool () const | |
Whether this contains valid data (not default constructed). More... | |
std::string | id () const |
Key ID. More... | |
std::string | name () const |
Key name. More... | |
std::string | fingerprint () const |
Key fingerprint. More... | |
Date | created () const |
Creation / last modification date (latest selfsig). More... | |
Date | expires () const |
Expiry date, or Date() if the key never expires. More... | |
bool | expired () const |
Whether the key has expired. More... | |
int | daysToLive () const |
Number of days (24h) until the key expires (or since it exired). More... | |
std::string | expiresAsString () const |
std::string | gpgPubkeyVersion () const |
Gpg-pubkey version as computed by rpm (trailing 8 byte id) More... | |
std::string | gpgPubkeyRelease () const |
Gpg-pubkey release as computed by rpm (hexencoded created) More... | |
std::string | asString () const |
Simple string representation. More... | |
bool | hasSubkeys () const |
Whether subkeys is not empty. More... | |
Iterable< SubkeyIterator > | subkeys () const |
Iterate any subkeys. More... | |
bool | providesKey (const std::string &id_r) const |
Whether id_r is the id of the primary key or of a subkey. More... | |
Private Attributes | |
RWCOW_pointer< Impl > | _pimpl |
Friends | |
class | PublicKeyScanner |
std::ostream & | dumpOn (std::ostream &str, const PublicKeyData &obj) |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &str, const PublicKeyData &obj) |
std::ostream & | dumpOn (std::ostream &str, const PublicKeyData &obj) |
bool | operator== (const PublicKeyData &lhs, const PublicKeyData &rhs) |
bool | operator!= (const PublicKeyData &lhs, const PublicKeyData &rhs) |
Class representing one GPG Public Keys data.
PublicKeyData are provided e.g. by a PublicKey or a KeyRing. PublicKeyData are usually easier to retrieve and sufficient unless you actually need an ASCII armored version of the key placed in a tempfile. In this case use PublicKey.
Definition at line 132 of file PublicKey.h.
typedef const PublicSubkeyData* zypp::PublicKeyData::SubkeyIterator |
Definition at line 198 of file PublicKey.h.
zypp::PublicKeyData::PublicKeyData | ( | ) |
zypp::PublicKeyData::~PublicKeyData | ( | ) |
Definition at line 216 of file PublicKey.cc.
|
explicit |
Whether this contains valid data (not default constructed).
Definition at line 219 of file PublicKey.cc.
std::string zypp::PublicKeyData::id | ( | ) | const |
Key ID.
Definition at line 222 of file PublicKey.cc.
std::string zypp::PublicKeyData::name | ( | ) | const |
Key name.
Definition at line 225 of file PublicKey.cc.
std::string zypp::PublicKeyData::fingerprint | ( | ) | const |
Key fingerprint.
Definition at line 228 of file PublicKey.cc.
Date zypp::PublicKeyData::created | ( | ) | const |
Creation / last modification date (latest selfsig).
Definition at line 231 of file PublicKey.cc.
Date zypp::PublicKeyData::expires | ( | ) | const |
Expiry date, or Date()
if the key never expires.
Definition at line 234 of file PublicKey.cc.
bool zypp::PublicKeyData::expired | ( | ) | const |
Whether the key has expired.
Definition at line 237 of file PublicKey.cc.
int zypp::PublicKeyData::daysToLive | ( | ) | const |
Number of days (24h) until the key expires (or since it exired).
A value of 0
means the key will expire within the next 24h. Negative values indicate the key has expired less than N
days ago. For keys without expiration date INT_MAX
is returned.
Definition at line 240 of file PublicKey.cc.
std::string zypp::PublicKeyData::expiresAsString | ( | ) | const |
Definition at line 243 of file PublicKey.cc.
std::string zypp::PublicKeyData::gpgPubkeyVersion | ( | ) | const |
Gpg-pubkey version as computed by rpm (trailing 8 byte id)
Definition at line 246 of file PublicKey.cc.
std::string zypp::PublicKeyData::gpgPubkeyRelease | ( | ) | const |
Gpg-pubkey release as computed by rpm (hexencoded created)
Definition at line 249 of file PublicKey.cc.
std::string zypp::PublicKeyData::asString | ( | ) | const |
Simple string representation.
Encodes id, gpgPubkeyRelease, name and fingerprint.
Definition at line 252 of file PublicKey.cc.
bool zypp::PublicKeyData::hasSubkeys | ( | ) | const |
Whether subkeys is not empty.
Definition at line 261 of file PublicKey.cc.
Iterable< PublicKeyData::SubkeyIterator > zypp::PublicKeyData::subkeys | ( | ) | const |
Iterate any subkeys.
Definition at line 264 of file PublicKey.cc.
bool zypp::PublicKeyData::providesKey | ( | const std::string & | id_r | ) | const |
Whether id_r is the id of the primary key or of a subkey.
Definition at line 267 of file PublicKey.cc.
|
friend |
Definition at line 212 of file PublicKey.h.
|
friend |
Definition at line 270 of file PublicKey.cc.
|
related |
Stream output
Definition at line 218 of file PublicKey.h.
|
related |
Detailed stream output
Definition at line 270 of file PublicKey.cc.
|
related |
Equal based on fingerprint anf creation date.
Definition at line 284 of file PublicKey.cc.
|
related |
NotEqual.
Definition at line 228 of file PublicKey.h.
|
private |
Definition at line 210 of file PublicKey.h.