12 #ifndef ZYPP_PUBLICKEY_H 13 #define ZYPP_PUBLICKEY_H 31 struct _gpgme_key_sig;
88 explicit operator bool()
const;
92 std::string id()
const;
101 bool expired()
const;
108 int daysToLive()
const;
145 explicit operator bool()
const;
149 std::string id()
const;
152 std::string name()
const;
155 Date created()
const;
158 Date expires()
const;
161 bool expired()
const;
168 int daysToLive()
const;
214 explicit operator bool()
const;
218 std::string id()
const;
221 std::string name()
const;
224 std::string fingerprint()
const;
227 std::string algoName()
const;
230 Date created()
const;
233 Date expires()
const;
236 bool expired()
const;
243 int daysToLive()
const;
257 std::string expiresAsString()
const;
260 std::string gpgPubkeyVersion()
const;
263 std::string gpgPubkeyRelease()
const;
266 std::string rpmName ()
const;
270 {
return Edition( gpgPubkeyVersion(), gpgPubkeyRelease() ); }
294 return not rhs || ( fingerprint() == rhs.
fingerprint() && created() > rhs.
created() );
302 bool hasSubkeys()
const;
313 bool providesKey(
const std::string & id_r )
const;
319 {
return id_r.size() >= 16; }
323 bool hasSignatures()
const;
361 {
return !( lhs == rhs ); }
414 {
return ! ( id().empty() || fingerprint().empty() ); }
416 std::string id()
const;
417 std::string name()
const;
418 std::string fingerprint()
const;
419 std::string algoName()
const;
420 Date created()
const;
421 Date expires()
const;
422 std::string expiresAsString()
const;
423 bool expired()
const;
424 int daysToLive()
const;
425 std::string gpgPubkeyVersion()
const;
426 std::string gpgPubkeyRelease()
const;
428 std::string rpmName ()
const;
437 {
return keyData().
subkeys(); }
456 {
return not hiddenKeys().empty(); }
459 const std::list<PublicKeyData> & hiddenKeys()
const;
464 bool fileProvidesKey(
const std::string & id_r )
const;
470 bool operator==(
const std::string & sid )
const;
497 #endif // ZYPP_PUBLICKEY_H std::string asString() const
Simple string representation.
static bool isSafeKeyId(const std::string &id_r)
Whether this is a long id (64bit/16byte) or even better a fingerprint.
bool operator==(const Capability &lhs, const Capability &rhs)
relates: Capability
bool hasHiddenKeys() const
std::string asString(const Patch::Category &obj)
relates: Patch::Category string representation.
bool operator!=(const std::string &sid) const
RWCOW_pointer< Impl > _pimpl
PublicSubkeyData implementation.
KeyRing implementation, shared between zyppng and zypp.
Edition gpgPubkeyEdition() const
!<
Class representing one GPG Public Keys data.
std::string asString() const
Simple string representation.
Exception thrown when the supplied key is not a valid gpg key.
base::DrunkenBishop AsciiArt
Random art fingerprint visualization type (base::DrunkenBishop).
Iterable< SubkeyIterator > subkeys() const
!<
String related utilities and Regular expression matching.
RWCOW_pointer< Impl > _pimpl
std::string asString() const
Simple string representation.
Edition represents [epoch:]version[-release]
bool hasSubkeys() const
!<
Provide a new empty temporary file and delete it when no longer needed.
Iterable< SubkeyIterator > subkeys() const
Iterate any subkeys.
PublicKeySignatureData implementation.
AsciiArt asciiArt() const
!<
bool operator!=(const PublicKey &rhs) const
const PublicSubkeyData * SubkeyIterator
RWCOW_pointer< Impl > _pimpl
Pointer to implementation.
Store and operate on date (time_t).
Date created() const
Creation / last modification date (latest selfsig).
const Arch Arch_empty ZYPP_API
relates: Arch This is an empty Arch represented by an empty string.
bool isUpdateFor(const PublicKeyData &rhs) const
Whether this could replace rhs in a keyring.
bool operator!=(const Capability &lhs, const Capability &rhs)
relates: Capability
bool providesKey(const std::string &id_r) const
!<
BadKeyException()
Ctor taking message.
std::ostream & dumpOn(std::ostream &str, const Capability &obj)
relates: Capability Detailed stream output
PublicKey implementation.
std::string fingerprint() const
Key fingerprint.
~BadKeyException() override
Dtor.
Class representing a GPG Public Keys subkeys.
Class representing one GPG Public Key (PublicKeyData + ASCII armored in a tempfile).
AsciiArt asciiArt() const
Random art fingerprint visualization (base::DrunkenBishop).
Base class for Exception.
static bool isSafeKeyId(const std::string &id_r)
!<
Edition gpgPubkeyEdition() const
Gpg-pubkey Edition built from version and release.
RWCOW_pointer< Impl > _pimpl
BadKeyException(const std::string &msg_r, Pathname keyfile=Pathname())
Ctor taking message.
std::string asString() const
PublicKeyData implementation.
std::ostream & operator<<(std::ostream &str, const Capabilities &obj)
relates: Capabilities Stream output
Easy-to use interface to the ZYPP dependency resolver.
bool providesKey(const std::string &id_r) const
Whether id_r is the id or fingerprint of the primary key or of a subkey.
Class representing a signature on a GPG Public Key.
bool hasSubkeys() const
Whether subkeys is not empty.
Random art fingerprint visualization Visualize fingerprint data on a [17x9] (SSH) or [19x11] (GPG) or...