12 #ifndef ZYPP_PUBLICKEY_H
13 #define ZYPP_PUBLICKEY_H
55 BadKeyException(
const std::string & msg_r,
const Pathname &keyfile = Pathname() )
86 explicit operator bool()
const;
90 std::string
id()
const;
93 std::string
name()
const;
160 {
return !( lhs == rhs ); }
185 void scan( std::string line_r );
226 explicit PublicKey(
const Pathname & keyFile_r );
245 std::string
id()
const;
246 std::string
name()
const;
259 Pathname
path()
const;
262 const std::list<PublicKeyData> &
hiddenKeys()
const;
266 bool operator==(
const std::string & sid )
const;
289 #endif // ZYPP_PUBLICKEY_H
std::string name() const
Key name.
Date expires() const
Expiry date, or Date() if the key never expires.
std::string gpgPubkeyRelease() const
Gpg-pubkey release as computed by rpm (hexencoded created)
int daysToLive() const
Number of days (24h) until the key expires (or since it exired).
std::list< PublicKeyData > _keys
Extracted keys.
virtual ~BadKeyException()
Dtor.
Class representing one GPG Public Keys data.
Exception thrown when the supplied key is not a valid gpg key.
const std::list< PublicKeyData > & hiddenKeys() const
Additional keys data in case the ASCII armored blob containes multiple keys.
std::string asString() const
void scan(std::string line_r)
Feed gpg output line by line into scan.
RW_pointer< Impl, rw_pointer::Scoped< Impl > > _pimpl
std::string gpgPubkeyVersion() const
Gpg-pubkey version as computed by rpm (trailing 8 byte id)
PublicKeyScanner implementation.
std::string expiresAsString() const
Provide a new empty temporary file and delete it when no longer needed.
PublicKeyData()
Default constructed: empty data.
std::ostream & operator<<(std::ostream &str, const PublicKeyData &obj)
std::string gpgPubkeyVersion() const
Pathname path() const
File containig the ASCII armored key.
RWCOW_pointer< Impl > _pimpl
Pointer to implementation.
Store and operate on date (time_t).
std::string fingerprint() const
Key fingerprint.
std::string expiresAsString() const
bool expired() const
Whether the key has expired.
BadKeyException()
Ctor taking message.
std::ostream & dumpOn(std::ostream &str, const Capability &obj)
Scan abstract from 'gpg –with-colons' key listings.
bool operator==(const StrMatcher &lhs, const StrMatcher &rhs)
PublicKey implementation.
Class representing one GPG Public Key (PublicKeyData + ASCII armored in a tempfile).
std::ostream & operator<<(std::ostream &str, const PublicKey &obj)
Base class for Exception.
const PublicKeyData & keyData() const
The public keys data (.
RWCOW_pointer< Impl > _pimpl
std::string id() const
Key ID.
Wrapper for const correct access via Smart pointer types.
PublicKeyData implementation.
std::string fingerprint() const
bool operator!=(const PublicKeyData &lhs, const PublicKeyData &rhs)
Date created() const
Creation / last modification date (latest selfsig).
std::string gpgPubkeyRelease() const
bool operator==(const PublicKey &rhs) const
std::string asString() const
Simple string representation.
RW_pointer supporting 'copy on write' functionality.