libzypp
17.34.1
|
Class representing one GPG Public Key (PublicKeyData + ASCII armored in a tempfile). More...
#include <zypp/PublicKey.h>
Classes | |
class | Impl |
PublicKey implementation. More... | |
Public Types | |
using | SubkeyIterator = PublicKeyData::SubkeyIterator |
using | AsciiArt = PublicKeyData::AsciiArt |
Public Member Functions | |
PublicKey () | |
Default ctor. More... | |
PublicKey (const Pathname &keyFile_r) | |
Ctor taking the key from a file. More... | |
PublicKey (const filesystem::TmpFile &sharedFile_r) | |
Ctor reading the key from a TmpFile. More... | |
~PublicKey () | |
const PublicKeyData & | keyData () const |
The public keys data (. More... | |
bool | isValid () const |
std::string | id () const |
std::string | name () const |
std::string | fingerprint () const |
std::string | algoName () const |
Date | created () const |
Date | expires () const |
std::string | expiresAsString () const |
bool | expired () const |
int | daysToLive () const |
std::string | gpgPubkeyVersion () const |
std::string | gpgPubkeyRelease () const |
std::string | asString () const |
std::string | rpmName () const |
Edition | gpgPubkeyEdition () const |
!< More... | |
bool | hasSubkeys () const |
!< More... | |
Iterable< SubkeyIterator > | subkeys () const |
!< More... | |
bool | providesKey (const std::string &id_r) const |
!< More... | |
AsciiArt | asciiArt () const |
!< More... | |
Pathname | path () const |
File containing the ASCII armored key. More... | |
const std::list< PublicKeyData > & | hiddenKeys () const |
Additional keys data in case the ASCII armored blob contains multiple keys. More... | |
bool | fileProvidesKey (const std::string &id_r) const |
Extends providesKey to look at the hidden keys too. More... | |
bool | operator== (const PublicKey &rhs) const |
bool | operator!= (const PublicKey &rhs) const |
bool | operator== (const std::string &sid) const |
bool | operator!= (const std::string &sid) const |
Static Public Member Functions | |
static PublicKey | noThrow (const Pathname &keyFile_r) |
Static ctor returning an empty PublicKey rather than throwing. More... | |
static bool | isSafeKeyId (const std::string &id_r) |
!< More... | |
Private Member Functions | |
PublicKey (const filesystem::TmpFile &sharedFile_r, const PublicKeyData &keyData_r) | |
KeyRing ctor: No need to parse file if KeyRing already had valid KeyData. More... | |
PublicKey (const PublicKeyData &keyData_r) | |
KeyRing ctor: Legacy callback APIs take PublicKey, but just need the PublicKeyData No need to export to file. More... | |
Private Attributes | |
RWCOW_pointer< Impl > | _pimpl |
Pointer to implementation. More... | |
Friends | |
class | KeyRing |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &str, const PublicKey &obj) |
std::ostream & | dumpOn (std::ostream &str, const PublicKey &obj) ZYPP_API |
Class representing one GPG Public Key (PublicKeyData + ASCII armored in a tempfile).
If you don't need the ASCII armored version of the key stored in a tempfile, using PublicKeyData might be sufficient.
Definition at line 364 of file PublicKey.h.
Definition at line 401 of file PublicKey.h.
Definition at line 436 of file PublicKey.h.
zypp::PublicKey::PublicKey | ( | ) |
Default ctor.
Definition at line 617 of file PublicKey.cc.
|
explicit |
Ctor taking the key from a file.
This is quite expensive, as a copy of the file is created and used. If you can construct PublicKey from a filesystem::TmpFile, this prevents copying.
when | data does not make a key |
Definition at line 621 of file PublicKey.cc.
|
explicit |
Ctor reading the key from a TmpFile.
PublicKey holds a reference on the TmpFile providing the key.
when | data does not make a key |
Definition at line 625 of file PublicKey.cc.
zypp::PublicKey::~PublicKey | ( | ) |
Definition at line 637 of file PublicKey.cc.
|
private |
KeyRing ctor: No need to parse file if KeyRing already had valid KeyData.
Definition at line 629 of file PublicKey.cc.
|
explicitprivate |
KeyRing ctor: Legacy callback APIs take PublicKey, but just need the PublicKeyData No need to export to file.
Definition at line 633 of file PublicKey.cc.
Static ctor returning an empty PublicKey rather than throwing.
Definition at line 640 of file PublicKey.cc.
const PublicKeyData & zypp::PublicKey::keyData | ( | ) | const |
|
inline |
Definition at line 403 of file PublicKey.h.
std::string zypp::PublicKey::id | ( | ) | const |
Definition at line 663 of file PublicKey.cc.
std::string zypp::PublicKey::name | ( | ) | const |
Definition at line 666 of file PublicKey.cc.
std::string zypp::PublicKey::fingerprint | ( | ) | const |
Definition at line 669 of file PublicKey.cc.
std::string zypp::PublicKey::algoName | ( | ) | const |
Definition at line 672 of file PublicKey.cc.
Date zypp::PublicKey::created | ( | ) | const |
Definition at line 675 of file PublicKey.cc.
Date zypp::PublicKey::expires | ( | ) | const |
Definition at line 678 of file PublicKey.cc.
std::string zypp::PublicKey::expiresAsString | ( | ) | const |
Definition at line 687 of file PublicKey.cc.
bool zypp::PublicKey::expired | ( | ) | const |
Definition at line 681 of file PublicKey.cc.
int zypp::PublicKey::daysToLive | ( | ) | const |
Definition at line 684 of file PublicKey.cc.
std::string zypp::PublicKey::gpgPubkeyVersion | ( | ) | const |
Definition at line 690 of file PublicKey.cc.
std::string zypp::PublicKey::gpgPubkeyRelease | ( | ) | const |
Definition at line 693 of file PublicKey.cc.
std::string zypp::PublicKey::asString | ( | ) | const |
Definition at line 696 of file PublicKey.cc.
std::string zypp::PublicKey::rpmName | ( | ) | const |
Definition at line 699 of file PublicKey.cc.
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
inline |
Pathname zypp::PublicKey::path | ( | ) | const |
File containing the ASCII armored key.
Definition at line 646 of file PublicKey.cc.
const std::list< PublicKeyData > & zypp::PublicKey::hiddenKeys | ( | ) | const |
Additional keys data in case the ASCII armored blob contains multiple keys.
Definition at line 649 of file PublicKey.cc.
bool zypp::PublicKey::fileProvidesKey | ( | const std::string & | id_r | ) | const |
Extends providesKey to look at the hidden keys too.
Those 'hidden' keys become visible when the file is imported into a keyring.
Definition at line 652 of file PublicKey.cc.
Definition at line 702 of file PublicKey.cc.
Definition at line 455 of file PublicKey.h.
bool zypp::PublicKey::operator== | ( | const std::string & | sid | ) | const |
Definition at line 705 of file PublicKey.cc.
|
inline |
Definition at line 458 of file PublicKey.h.
|
friend |
Definition at line 462 of file PublicKey.h.
|
related |
Stream output
Definition at line 475 of file PublicKey.h.
|
related |
Detailed stream output
Definition at line 708 of file PublicKey.cc.
|
private |
Pointer to implementation.
Definition at line 470 of file PublicKey.h.