zypp::KeyRing Class Reference

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

#include <KeyRing.h>

Inheritance diagram for zypp::KeyRing:

zypp::base::ReferenceCounted NonCopyable 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 ()
std::list< PublicKeytrustedPublicKeys ()
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
 Pointer to implementation.

Friends

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

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 605 of file KeyRing.cc.

zypp::KeyRing::~KeyRing  ) 
 

Dtor.

Definition at line 623 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 633 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
 

Definition at line 673 of file KeyRing.cc.

References _pimpl.

Referenced by dumpTrustedPublicKey(), and dumpUntrustedPublicKey().

std::string zypp::KeyRing::readSignatureKeyId const Pathname signature  ) 
 

reads the public key id from a signature

Definition at line 638 of file KeyRing.cc.

References _pimpl.

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

true if the key id is trusted

Definition at line 678 of file KeyRing.cc.

References _pimpl.

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

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

Definition at line 683 of file KeyRing.cc.

References _pimpl.

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.

Definition at line 643 of file KeyRing.cc.

References _pimpl.

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

Definition at line 648 of file KeyRing.cc.

References _pimpl.

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

Definition at line 653 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 boolr eturned depends on user desicion to trust or not.

Definition at line 658 of file KeyRing.cc.

References _pimpl.

bool zypp::KeyRing::verifyFileSignature const Pathname file,
const Pathname signature
 

Definition at line 663 of file KeyRing.cc.

References _pimpl.

bool zypp::KeyRing::verifyFileTrustedSignature const Pathname file,
const Pathname signature
 

Definition at line 668 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 174 of file KeyRing.h.


Member Data Documentation

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

Pointer to implementation.

Definition at line 169 of file KeyRing.h.

Referenced by deleteKey(), dumpPublicKey(), importKey(), isKeyKnown(), isKeyTrusted(), publicKeys(), readSignatureKeyId(), trustedPublicKeys(), verifyFileSignature(), verifyFileSignatureWorkflow(), and verifyFileTrustedSignature().


The documentation for this class was generated from the following files:
Generated on Thu Apr 24 02:25:07 2008 for zypp by  doxygen 1.4.6