zypp::KeyRing Class Reference

Class that represent a text and multiple translations. More...

#include <KeyRing.h>

Inheritance diagram for zypp::KeyRing:
[legend]

List of all members.

Public Member Functions

 KeyRing (const Pathname &baseTmpDir)
 Default ctor.
void importKey (const PublicKey &key, bool trusted=false)
 imports a key from a file.
void dumpTrustedPublicKey (const std::string &id, std::ostream &stream)
void dumpUntrustedPublicKey (const std::string &id, std::ostream &stream)
void dumpPublicKey (const std::string &id, bool trusted, std::ostream &stream)
std::string readSignatureKeyId (const Pathname &signature)
 reads the public key id from a signature
bool isKeyTrusted (const std::string &id)
 true if the key id is trusted
bool isKeyKnown (const std::string &id)
 true if the key id is knows, that means at least exist on the untrusted keyring
void deleteKey (const std::string &id, bool trusted=false)
 removes a key from the keyring.
std::list< PublicKeypublicKeys ()
 Get a list of public keys in the keyring.
std::list< PublicKeytrustedPublicKeys ()
 Get a list of trusted public keys in the keyring.
std::list< std::string > publicKeyIds ()
 Get a list of public key ids in the keyring.
std::list< std::string > trustedPublicKeyIds ()
 Get a list of trusted public key ids in the keyring.
bool verifyFileSignatureWorkflow (const Pathname &file, const std::string filedesc, const Pathname &signature)
 Follows a signature verification interacting with the user.
bool verifyFileSignature (const Pathname &file, const Pathname &signature)
bool verifyFileTrustedSignature (const Pathname &file, const Pathname &signature)
 ~KeyRing ()
 Dtor.

Private Attributes

RWCOW_pointer< Impl_pimpl
 Synonym for text.

Friends

std::ostream & operator<< (std::ostream &str, const KeyRing &obj)
 Stream output.

Classes

struct  Impl
 KeyRing implementation. More...


Detailed Description

Class that represent a text and multiple translations.

Definition at line 97 of file KeyRing.h.


Constructor & Destructor Documentation

zypp::KeyRing::KeyRing ( const Pathname &  baseTmpDir  ) 

Default ctor.

Definition at line 644 of file KeyRing.cc.

zypp::KeyRing::~KeyRing (  ) 

Dtor.

Definition at line 662 of file KeyRing.cc.


Member Function Documentation

void zypp::KeyRing::importKey ( const PublicKey key,
bool  trusted = false 
)

imports a key from a file.

throw if key was not imported

Definition at line 672 of file KeyRing.cc.

References _pimpl, and zypp::PublicKey::path().

void zypp::KeyRing::dumpTrustedPublicKey ( const std::string &  id,
std::ostream &  stream 
) [inline]

Definition at line 117 of file KeyRing.h.

References dumpPublicKey().

void zypp::KeyRing::dumpUntrustedPublicKey ( const std::string &  id,
std::ostream &  stream 
) [inline]

Definition at line 120 of file KeyRing.h.

References dumpPublicKey().

void zypp::KeyRing::dumpPublicKey ( const std::string &  id,
bool  trusted,
std::ostream &  stream 
)

Referenced by dumpTrustedPublicKey(), and dumpUntrustedPublicKey().

string zypp::KeyRing::readSignatureKeyId ( const Pathname &  signature  ) 

reads the public key id from a signature

Definition at line 677 of file KeyRing.cc.

References _pimpl.

bool zypp::KeyRing::isKeyTrusted ( const std::string &  id  ) 

true if the key id is trusted

bool zypp::KeyRing::isKeyKnown ( const std::string &  id  ) 

true if the key id is knows, that means at least exist on the untrusted keyring

void zypp::KeyRing::deleteKey ( const std::string &  id,
bool  trusted = false 
)

removes a key from the keyring.

If trusted is true, Remove it from trusted keyring too.

list< PublicKey > zypp::KeyRing::publicKeys (  ) 

Get a list of public keys in the keyring.

Definition at line 687 of file KeyRing.cc.

References _pimpl.

list< PublicKey > zypp::KeyRing::trustedPublicKeys (  ) 

Get a list of trusted public keys in the keyring.

Definition at line 692 of file KeyRing.cc.

References _pimpl.

list< string > zypp::KeyRing::publicKeyIds (  ) 

Get a list of public key ids in the keyring.

Definition at line 697 of file KeyRing.cc.

References _pimpl.

list< string > zypp::KeyRing::trustedPublicKeyIds (  ) 

Get a list of trusted public key ids in the keyring.

Definition at line 702 of file KeyRing.cc.

References _pimpl.

bool zypp::KeyRing::verifyFileSignatureWorkflow ( const Pathname &  file,
const std::string  filedesc,
const Pathname &  signature 
)

Follows a signature verification interacting with the user.

The bool returned depends on user decision to trust or not.

bool zypp::KeyRing::verifyFileSignature ( const Pathname &  file,
const Pathname &  signature 
)

Definition at line 712 of file KeyRing.cc.

References _pimpl.

bool zypp::KeyRing::verifyFileTrustedSignature ( const Pathname &  file,
const Pathname &  signature 
)

Definition at line 717 of file KeyRing.cc.

References _pimpl.


Friends And Related Function Documentation

std::ostream & operator<< ( std::ostream &  str,
const KeyRing obj 
) [friend]

Stream output.

Definition at line 191 of file KeyRing.h.


Member Data Documentation

RWCOW_pointer<Impl> zypp::KeyRing::_pimpl [private]

Synonym for text.

Pointer to implementation

Definition at line 186 of file KeyRing.h.

Referenced by importKey(), publicKeyIds(), publicKeys(), readSignatureKeyId(), trustedPublicKeyIds(), trustedPublicKeys(), verifyFileSignature(), and verifyFileTrustedSignature().


The documentation for this class was generated from the following files:
Generated on Tue Sep 25 19:23:14 2007 for libzypp by  doxygen 1.5.3