zypp::PublicKeyData Class Reference

Class representing one GPG Public Keys data. More...

#include <PublicKey.h>

Inheritance diagram for zypp::PublicKeyData:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 PublicKeyData ()
 Default constructed: empty data.
 ~PublicKeyData ()
std::string id () const
 Key ID.
std::string name () const
 Key name.
std::string fingerprint () const
 Key fingerprint.
Date created () const
 Creation / last modification date (latest selfsig).
Date expires () const
 Expiry date, or Date() if the key never expires.
bool expired () const
 Whether the key has expired.
int daysToLive () const
 Number of days (24h) until the key expires (or since it exired).
std::string expiresAsString () const
 * Expiry info in a human readable form.
std::string gpgPubkeyVersion () const
 Gpg-pubkey version as computed by rpm (trailing 8 byte id).
std::string gpgPubkeyRelease () const
 Gpg-pubkey release as computed by rpm (hexencoded created).
std::string asString () const
 Simple string representation.

Private Member Functions

friend base::SafeBool () const
bool boolTest () const

Private Attributes

RWCOW_pointer< Impl_pimpl

Friends

class PublicKeyScanner
 Scan data from 'gpg --with-colons' key listings.

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &str, const PublicKeyData &obj)
std::ostream & dumpOn (std::ostream &str, const PublicKeyData &obj)
bool operator== (const PublicKeyData &lhs, const PublicKeyData &rhs)
bool operator!= (const PublicKeyData &lhs, const PublicKeyData &rhs)

Classes

class  Impl
 PublicKeyData implementation. More...


Detailed Description

Class representing one GPG Public Keys data.

PublicKeyData are provided e.g. by a PublicKey or a KeyRing. PublicKeyData are usually easier to retrieve and sufficient unless you actually need an ASCII armored version of the key placed in a tempfile. In this case use PublicKey.

Definition at line 75 of file PublicKey.h.


Constructor & Destructor Documentation

zypp::PublicKeyData::PublicKeyData (  ) 

Default constructed: empty data.

class PublicKeyData

Definition at line 69 of file PublicKey.cc.

Referenced by zypp::PublicKeyScanner::Impl::scan().

zypp::PublicKeyData::~PublicKeyData (  ) 

Definition at line 73 of file PublicKey.cc.


Member Function Documentation

std::string zypp::PublicKeyData::id (  )  const

Key ID.

Definition at line 79 of file PublicKey.cc.

References _pimpl.

Referenced by zypp::dumpOn(), zypp::KeyRing::Impl::exportKey(), and zypp::PublicKey::id().

std::string zypp::PublicKeyData::name (  )  const

Key name.

Definition at line 82 of file PublicKey.cc.

References _pimpl.

Referenced by zypp::dumpOn(), and zypp::PublicKey::name().

std::string zypp::PublicKeyData::fingerprint (  )  const

Date zypp::PublicKeyData::created (  )  const

Creation / last modification date (latest selfsig).

Definition at line 88 of file PublicKey.cc.

References _pimpl.

Referenced by zypp::PublicKey::created(), zypp::dumpOn(), zypp::operator==(), and zypp::KeyRing::Impl::verifyFileSignatureWorkflow().

Date zypp::PublicKeyData::expires (  )  const

Expiry date, or Date() if the key never expires.

Definition at line 91 of file PublicKey.cc.

References _pimpl.

Referenced by zypp::dumpOn(), and zypp::PublicKey::expires().

bool zypp::PublicKeyData::expired (  )  const

Whether the key has expired.

Definition at line 94 of file PublicKey.cc.

References _pimpl, and zypp::Date::now().

Referenced by zypp::PublicKey::expired().

int zypp::PublicKeyData::daysToLive (  )  const

Number of days (24h) until the key expires (or since it exired).

A value of 0 means the key will expire within the next 24h. Negative values indicate the key has expired less than N days ago. For keys without expiration date INT_MAX is returned.

Definition at line 97 of file PublicKey.cc.

References _pimpl, zypp::Date::day, and zypp::Date::now().

Referenced by asString(), zypp::PublicKey::daysToLive(), zypp::dumpOn(), and expiresAsString().

std::string zypp::PublicKeyData::expiresAsString (  )  const

* Expiry info in a human readable form.

The exipry daye plus an annotation if the key has expired, or will expire within 90 days.

 (does not expire)
 Tue May 11 13:37:33 CEST 2010
 Tue May 11 13:37:33 CEST 2010 (expires in 90 days)
 Tue May 11 13:37:33 CEST 2010 (expires in 1 day)
 Tue May 11 13:37:33 CEST 2010 (expires within 24h)
 Tue May 11 13:37:33 CEST 2010 (EXPIRED)

Definition at line 107 of file PublicKey.cc.

References _, _pimpl, _PL, daysToLive(), and zypp::str::form().

Referenced by zypp::dumpOn(), and zypp::PublicKey::expiresAsString().

std::string zypp::PublicKeyData::gpgPubkeyVersion (  )  const

Gpg-pubkey version as computed by rpm (trailing 8 byte id).

Definition at line 134 of file PublicKey.cc.

References _pimpl, and zypp::str::toLower().

Referenced by zypp::dumpOn(), and zypp::PublicKey::gpgPubkeyVersion().

std::string zypp::PublicKeyData::gpgPubkeyRelease (  )  const

Gpg-pubkey release as computed by rpm (hexencoded created).

Definition at line 137 of file PublicKey.cc.

References _pimpl, and zypp::str::hexstring().

Referenced by asString(), zypp::dumpOn(), and zypp::PublicKey::gpgPubkeyRelease().

std::string zypp::PublicKeyData::asString (  )  const

Simple string representation.

Encodes id, gpgPubkeyRelease, name and fingerprint.

 [E3A5C360307E3D54-4be01a65] [SuSE Package Signing Key <build@suse.de>] [4E98E67519D98DC7362A5990E3A5C360307E3D54]

Definition at line 140 of file PublicKey.cc.

References _pimpl, daysToLive(), zypp::str::form(), and gpgPubkeyRelease().

Referenced by zypp::PublicKey::asString(), and operator<<().

zypp::PublicKeyData::base::SafeBool (  )  const [private]

bool zypp::PublicKeyData::boolTest (  )  const [private]

Definition at line 76 of file PublicKey.cc.

References _pimpl.


Friends And Related Function Documentation

friend class PublicKeyScanner [friend]

Scan data from 'gpg --with-colons' key listings.

Definition at line 84 of file PublicKey.h.

std::ostream & operator<< ( std::ostream &  str,
const PublicKeyData obj 
) [related]

Stream output

Definition at line 158 of file PublicKey.h.

References asString().

std::ostream & dumpOn ( std::ostream &  str,
const PublicKeyData obj 
) [related]

Detailed stream output

Definition at line 150 of file PublicKey.cc.

bool operator== ( const PublicKeyData lhs,
const PublicKeyData rhs 
) [related]

Equal based on fingerprint anf creation date.

Definition at line 163 of file PublicKey.cc.

bool operator!= ( const PublicKeyData lhs,
const PublicKeyData rhs 
) [related]

NotEqual.

Definition at line 168 of file PublicKey.h.


Member Data Documentation


The documentation for this class was generated from the following files:

Generated on Tue May 5 14:49:25 2015 for libzypp by  doxygen 1.5.6