12 #ifndef ZYPP_PUBLICKEY_H 13 #define ZYPP_PUBLICKEY_H 57 BadKeyException(
const std::string & msg_r,
const Pathname &keyfile = Pathname() )
81 explicit operator bool()
const;
85 std::string id()
const;
101 int daysToLive()
const;
141 explicit operator bool()
const;
145 std::string id()
const;
148 std::string name()
const;
151 std::string fingerprint()
const;
154 Date created()
const;
157 Date expires()
const;
160 bool expired()
const;
167 int daysToLive()
const;
181 std::string expiresAsString()
const;
184 std::string gpgPubkeyVersion()
const;
187 std::string gpgPubkeyRelease()
const;
201 bool hasSubkeys()
const;
207 bool providesKey(
const std::string & id_r )
const;
229 {
return !( lhs == rhs ); }
254 void scan( std::string line_r );
295 explicit PublicKey(
const Pathname & keyFile_r );
314 {
return ! ( id().empty() || fingerprint().empty() ); }
316 std::string id()
const;
317 std::string name()
const;
318 std::string fingerprint()
const;
319 Date created()
const;
320 Date expires()
const;
321 std::string expiresAsString()
const;
322 bool expired()
const;
323 int daysToLive()
const;
324 std::string gpgPubkeyVersion()
const;
325 std::string gpgPubkeyRelease()
const;
332 {
return keyData().
subkeys(); }
339 Pathname path()
const;
342 const std::list<PublicKeyData> & hiddenKeys()
const;
346 bool operator==(
const std::string & sid )
const;
369 #endif // ZYPP_PUBLICKEY_H
std::string asString(const DefaultIntegral< Tp, TInitial > &obj)
RWCOW_pointer< Impl > _pimpl
Iterable< SubkeyIterator > subkeys() const
!<
std::list< PublicKeyData > _keys
Extracted keys.
virtual ~BadKeyException()
Dtor.
PublicSubkeyData implementation.
Iterable< SubkeyIterator > subkeys() const
Iterate any subkeys.
bool hasSubkeys() const
!<
Class representing one GPG Public Keys data.
Exception thrown when the supplied key is not a valid gpg key.
bool hasSubkeys() const
Whether subkeys is not empty.
bool providesKey(const std::string &id_r) const
Whether id_r is the id of the primary key or of a subkey.
std::string asString() const
String related utilities and Regular expression matching.
RW_pointer< Impl, rw_pointer::Scoped< Impl > > _pimpl
PublicKeyScanner implementation.
bool operator==(const SetRelation::Enum &lhs, const SetCompare &rhs)
Provide a new empty temporary file and delete it when no longer needed.
std::ostream & operator<<(std::ostream &str, const PublicKeyData &obj)
RWCOW_pointer< Impl > _pimpl
Pointer to implementation.
bool providesKey(const std::string &id_r) const
!<
Store and operate on date (time_t).
const PublicSubkeyData * SubkeyIterator
BadKeyException()
Ctor taking message.
std::ostream & dumpOn(std::ostream &str, const Capability &obj)
BadKeyException(const std::string &msg_r, const Pathname &keyfile=Pathname())
Ctor taking message.
Scan abstract from 'gpg –with-colons' key listings.
std::ostream & operator<<(std::ostream &str, const PublicSubkeyData &obj)
std::string asString() const
Simple string representation.
PublicKey implementation.
Class representing a GPG Public Keys subkeys.
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.
RWCOW_pointer< Impl > _pimpl
Wrapper for const correct access via Smart pointer types.
PublicKeyData implementation.
bool operator!=(const PublicKeyData &lhs, const PublicKeyData &rhs)
Easy-to use interface to the ZYPP dependency resolver.
std::string asString() const
Simple string representation.
PublicKeyData::SubkeyIterator SubkeyIterator