12 #ifndef ZYPP_PUBLICKEY_H
13 #define ZYPP_PUBLICKEY_H
81 explicit operator bool()
const;
85 std::string
id()
const;
141 explicit operator bool()
const;
145 std::string
id()
const;
148 std::string
name()
const;
207 bool providesKey(
const std::string & id_r )
const;
229 {
return !( lhs == rhs ); }
254 void scan( std::string line_r );
316 std::string
id()
const;
317 std::string
name()
const;
342 const std::list<PublicKeyData> &
hiddenKeys()
const;
346 bool operator==(
const std::string & sid )
const;
Exception thrown when the supplied key is not a valid gpg key.
BadKeyException(const std::string &msg_r, const Pathname &keyfile=Pathname())
Ctor taking message.
virtual ~BadKeyException()
Dtor.
BadKeyException()
Ctor taking message.
Store and operate on date (time_t).
Base class for Exception.
Class representing one GPG Public Keys data.
Date created() const
Creation / last modification date (latest selfsig).
bool expired() const
Whether the key has expired.
std::string name() const
Key name.
Iterable< SubkeyIterator > subkeys() const
Iterate any subkeys.
int daysToLive() const
Number of days (24h) until the key expires (or since it exired).
bool operator!=(const PublicKeyData &lhs, const PublicKeyData &rhs)
NotEqual.
bool hasSubkeys() const
Whether subkeys is not empty.
PublicKeyData()
Default constructed: empty data.
Date expires() const
Expiry date, or Date() if the key never expires.
RWCOW_pointer< Impl > _pimpl
const PublicSubkeyData * SubkeyIterator
bool providesKey(const std::string &id_r) const
Whether id_r is the id of the primary key or of a subkey.
std::string id() const
Key ID.
std::string fingerprint() const
Key fingerprint.
std::string gpgPubkeyRelease() const
Gpg-pubkey release as computed by rpm (hexencoded created)
std::string gpgPubkeyVersion() const
Gpg-pubkey version as computed by rpm (trailing 8 byte id)
std::string expiresAsString() const
std::string asString() const
Simple string representation.
friend std::ostream & dumpOn(std::ostream &str, const PublicKeyData &obj)
std::ostream & operator<<(std::ostream &str, const PublicKeyData &obj)
Stream output.
Class representing one GPG Public Key (PublicKeyData + ASCII armored in a tempfile).
Pathname path() const
File containig the ASCII armored key.
PublicKeyData::SubkeyIterator SubkeyIterator
std::string expiresAsString() const
bool operator==(const PublicKey &rhs) const
RWCOW_pointer< Impl > _pimpl
Pointer to implementation.
const std::list< PublicKeyData > & hiddenKeys() const
Additional keys data in case the ASCII armored blob containes multiple keys.
const PublicKeyData & keyData() const
The public keys data (.
std::string gpgPubkeyRelease() const
std::string asString() const
std::string fingerprint() const
std::ostream & operator<<(std::ostream &str, const PublicKey &obj)
Stream output.
std::string gpgPubkeyVersion() const
Iterable< SubkeyIterator > subkeys() const
!<
bool hasSubkeys() const
!<
bool providesKey(const std::string &id_r) const
!<
Class representing a GPG Public Keys subkeys.
RWCOW_pointer< Impl > _pimpl
std::string id() const
Subkey ID.
PublicSubkeyData()
Default constructed: empty data.
std::ostream & operator<<(std::ostream &str, const PublicSubkeyData &obj)
Stream output.
int daysToLive() const
Number of days (24h) until the key expires (or since it exired).
Date expires() const
Expiry date, or Date() if the key never expires.
friend std::ostream & dumpOn(std::ostream &str, const PublicKeyData &obj)
std::string asString() const
Simple string representation.
Date created() const
Creation date.
bool expired() const
Whether the key has expired.
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)
PublicKeyData implementation.
PublicKeyScanner implementation.
Scan abstract from 'gpg –with-colons' key listings.
std::list< PublicKeyData > _keys
Extracted keys.
void scan(std::string line_r)
Feed gpg output line by line into scan.
RW_pointer< Impl, rw_pointer::Scoped< Impl > > _pimpl
PublicKey implementation.
PublicSubkeyData implementation.
Wrapper for const correct access via Smart pointer types.