libzypp  11.13.5
zypp::PublicKeyData Class Reference

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

#include <PublicKey.h>

List of all members.

Classes

class  Impl
 PublicKeyData implementation. More...

Public Member Functions

 PublicKeyData ()
 Default constructed: empty data.
 ~PublicKeyData ()
 operator bool () const
 Whether this contains valid data (not default constructed).
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
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 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)

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 74 of file PublicKey.h.


Constructor & Destructor Documentation

zypp::PublicKeyData::PublicKeyData ( )

Default constructed: empty data.

class PublicKeyData

Definition at line 69 of file PublicKey.cc.

zypp::PublicKeyData::~PublicKeyData ( )

Definition at line 73 of file PublicKey.cc.


Member Function Documentation

zypp::PublicKeyData::operator bool ( ) const
explicit

Whether this contains valid data (not default constructed).

Definition at line 76 of file PublicKey.cc.

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

Key ID.

Definition at line 79 of file PublicKey.cc.

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

Key name.

Definition at line 82 of file PublicKey.cc.

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

Key fingerprint.

Definition at line 85 of file PublicKey.cc.

Date zypp::PublicKeyData::created ( ) const

Creation / last modification date (latest selfsig).

Definition at line 88 of file PublicKey.cc.

Date zypp::PublicKeyData::expires ( ) const

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

Definition at line 91 of file PublicKey.cc.

bool zypp::PublicKeyData::expired ( ) const

Whether the key has expired.

Definition at line 94 of file PublicKey.cc.

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.

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.

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.

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

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

Definition at line 137 of file PublicKey.cc.

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.


Friends And Related Function Documentation

friend class PublicKeyScanner
friend

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

Definition at line 83 of file PublicKey.h.

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

Stream output

Definition at line 149 of file PublicKey.h.

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 159 of file PublicKey.h.


Member Data Documentation

RWCOW_pointer<Impl> zypp::PublicKeyData::_pimpl
private

Definition at line 143 of file PublicKey.h.


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