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
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)
 Stream output.

Classes

struct  Impl
 KeyRing implementation. More...

Detailed Description

Class that represent a text and multiple translations.

Definition at line 75 of file KeyRing.h.


Constructor & Destructor Documentation

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

Default ctor.

Definition at line 589 of file KeyRing.cc.

zypp::KeyRing::~KeyRing (  ) 

Dtor.

Definition at line 607 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 617 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 95 of file KeyRing.h.

References dumpPublicKey().

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

Definition at line 98 of file KeyRing.h.

References dumpPublicKey().

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

Definition at line 657 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 622 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 627 of file KeyRing.cc.

References _pimpl.

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

Definition at line 632 of file KeyRing.cc.

References _pimpl.

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

Definition at line 637 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 642 of file KeyRing.cc.

References _pimpl.

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

Definition at line 647 of file KeyRing.cc.

References _pimpl.

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

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


Member Data Documentation

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

Pointer to implementation.

Definition at line 136 of file KeyRing.h.

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


The documentation for this class was generated from the following files:
Generated on Tue Nov 28 16:49:36 2006 for zypp by  doxygen 1.5.0