12#ifndef ZYPP_PUBLICKEY_H
13#define ZYPP_PUBLICKEY_H
89 explicit operator bool()
const;
93 std::string id()
const;
102 bool expired()
const;
109 int daysToLive()
const;
130 {
return str <<
obj.asString(); }
146 explicit operator bool()
const;
150 std::string id()
const;
153 std::string name()
const;
156 Date created()
const;
159 Date expires()
const;
162 bool expired()
const;
169 int daysToLive()
const;
172 bool inTrustedRing()
const;
175 bool inKnownRing()
const;
196 {
return str <<
obj.asString(); }
225 std::
string id() const;
228 std::
string name() const;
231 std::
string fingerprint() const;
234 std::
string algoName() const;
237 Date created() const;
240 Date expires() const;
243 bool expired() const;
250 int daysToLive() const;
264 std::
string expiresAsString() const;
267 std::
string gpgPubkeyVersion() const;
270 std::
string gpgPubkeyRelease() const;
273 std::
string rpmName () const;
277 {
return Edition( gpgPubkeyVersion(), gpgPubkeyRelease() ); }
292 bool hasSubkeys()
const;
303 bool providesKey(
const std::string &
id_r )
const;
309 {
return id_r.size() >= 16; }
341 {
return str <<
obj.asString(); }
351 {
return !( lhs == rhs ); }
404 {
return ! ( id().empty() || fingerprint().empty() ); }
406 std::string id()
const;
407 std::string name()
const;
408 std::string fingerprint()
const;
409 std::string algoName()
const;
410 Date created()
const;
411 Date expires()
const;
412 std::string expiresAsString()
const;
413 bool expired()
const;
414 int daysToLive()
const;
415 std::string gpgPubkeyVersion()
const;
416 std::string gpgPubkeyRelease()
const;
418 std::string rpmName ()
const;
427 {
return keyData().
subkeys(); }
446 const std::list<PublicKeyData> & hiddenKeys()
const;
451 bool fileProvidesKey(
const std::string &
id_r )
const;
476 {
return str <<
obj.asString(); }
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
Exception thrown when the supplied key is not a valid gpg key.
BadKeyException(const std::string &msg_r, Pathname keyfile=Pathname())
Ctor taking message.
~BadKeyException() override
Dtor.
BadKeyException()
Ctor taking message.
Store and operate on date (time_t).
Edition represents [epoch:]version[-release]
Base class for Exception.
Class representing one GPG Public Keys data.
bool hasSignatures() const
Whether signatures is not empty.
Iterable< SubkeyIterator > subkeys() const
Iterate any subkeys.
bool operator!=(const PublicKeyData &lhs, const PublicKeyData &rhs)
NotEqual.
bool hasSubkeys() const
Whether subkeys is not empty.
const PublicSubkeyData * SubkeyIterator
PublicKeyData(const PublicKeyData &)=default
static bool isSafeKeyId(const std::string &id_r)
Whether this is a long id (64bit/16byte) or even better a fingerprint.
RWCOW_pointer< Impl > _pimpl
bool providesKey(const std::string &id_r) const
Whether id_r is the id or fingerprint of the primary key or of a subkey.
PublicKeyData(PublicKeyData &&) noexcept=default
AsciiArt asciiArt() const
Random art fingerprint visualization (base::DrunkenBishop).
base::DrunkenBishop AsciiArt
Random art fingerprint visualization type (base::DrunkenBishop).
Edition gpgPubkeyEdition() const
Gpg-pubkey Edition built from version and release.
std::ostream & operator<<(std::ostream &str, const PublicKeyData &obj)
Stream output.
Class representing a signature on a GPG Public Key.
RWCOW_pointer< Impl > _pimpl
std::ostream & operator<<(std::ostream &str, const PublicKeySignatureData &obj)
Stream output.
Class representing one GPG Public Key (PublicKeyData + ASCII armored in a tempfile).
Edition gpgPubkeyEdition() const
!<
AsciiArt asciiArt() const
!<
RWCOW_pointer< Impl > _pimpl
Pointer to implementation.
static bool isSafeKeyId(const std::string &id_r)
!<
std::ostream & operator<<(std::ostream &str, const PublicKey &obj)
Stream output.
bool operator!=(const std::string &sid) const
bool operator!=(const PublicKey &rhs) const
bool hasSubkeys() const
!<
bool providesKey(const std::string &id_r) const
!<
Iterable< SubkeyIterator > subkeys() const
!<
Class representing a GPG Public Keys subkeys.
RWCOW_pointer< Impl > _pimpl
std::ostream & operator<<(std::ostream &str, const PublicSubkeyData &obj)
Stream output.
Random art fingerprint visualization Visualize fingerprint data on a [17x9] (SSH) or [19x11] (GPG) or...
Provide a new empty temporary file and delete it when no longer needed.
String related utilities and Regular expression matching.
Easy-to use interface to the ZYPP dependency resolver.
bool operator==(const SetRelation::Enum &lhs, const SetCompare &rhs)
This is an overloaded member function, provided for convenience. It differs from the above function o...
std::ostream & dumpOn(std::ostream &str, const Capability &obj)
const Arch Arch_armv7hnl Arch_armv7nhl ZYPP_API
std::string asString(const Patch::Category &obj)
PublicKeyData implementation.
PublicKeySignatureData implementation.
PublicKey implementation.
PublicSubkeyData implementation.