zypp::KeyRing::Impl Struct Reference

KeyRing implementation. More...

List of all members.

Public Member Functions

 Impl (const Pathname &baseTmpDir)
void importKey (const PublicKey &key, bool trusted=false)
void deleteKey (const string &id, bool trusted)
string readSignatureKeyId (const Pathname &signature)
bool isKeyTrusted (const string &id)
bool isKeyKnown (const string &id)
list< PublicKeytrustedPublicKeys ()
list< PublicKeypublicKeys ()
list< string > trustedPublicKeyIds ()
list< string > publicKeyIds ()
void dumpPublicKey (const string &id, bool trusted, ostream &stream)
bool verifyFileSignatureWorkflow (const Pathname &file, const string filedesc, const Pathname &signature)
bool verifyFileSignature (const Pathname &file, const Pathname &signature)
bool verifyFileTrustedSignature (const Pathname &file, const Pathname &signature)

Static Public Member Functions

static shared_ptr< Implnullimpl ()
 Offer default Impl.

Private Member Functions

bool verifyFile (const Pathname &file, const Pathname &signature, const Pathname &keyring)
void importKey (const Pathname &keyfile, const Pathname &keyring)
PublicKey exportKey (string id, const Pathname &keyring)
void dumpPublicKey (const string &id, const Pathname &keyring, ostream &stream)
void deleteKey (const string &id, const Pathname &keyring)
list< PublicKeypublicKeys (const Pathname &keyring)
list< string > publicKeyIds (const Pathname &keyring)
bool publicKeyExists (string id, const Pathname &keyring)
const Pathname generalKeyRing () const
const Pathname trustedKeyRing () const
Implclone () const
 clone for RWCOW_pointer

Private Attributes

TmpDir _trusted_tmp_dir
TmpDir _general_tmp_dir
Pathname _base_dir

Friends

Implr (const Impl *rhs)


Detailed Description

KeyRing implementation.

Definition at line 76 of file KeyRing.cc.


Constructor & Destructor Documentation

zypp::KeyRing::Impl::Impl ( const Pathname &  baseTmpDir  )  [inline]

Definition at line 78 of file KeyRing.cc.


Member Function Documentation

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

Definition at line 163 of file KeyRing.cc.

References generalKeyRing(), zypp::PublicKey::path(), and trustedKeyRing().

Referenced by verifyFileSignatureWorkflow().

void zypp::KeyRing::Impl::deleteKey ( const string &  id,
bool  trusted 
)

Definition at line 177 of file KeyRing.cc.

References generalKeyRing(), and trustedKeyRing().

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

Definition at line 538 of file KeyRing.cc.

References _base_dir, zypp::ExternalProgram::close(), zypp::ExternalProgram::Discard_Stderr, GPG_BINARY, MIL, zypp::filesystem::TmpPath::path(), zypp::externalprogram::ExternalDataSource::receiveLine(), zypp::str::regex_match(), zypp::str::smatch::size(), and ZYPP_THROW.

Referenced by verifyFileSignatureWorkflow().

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

Definition at line 212 of file KeyRing.cc.

References publicKeyExists(), and trustedKeyRing().

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

Definition at line 217 of file KeyRing.cc.

References generalKeyRing(), MIL, publicKeyExists(), and trustedKeyRing().

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

Definition at line 187 of file KeyRing.cc.

References publicKeys(), and trustedKeyRing().

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

Definition at line 182 of file KeyRing.cc.

References generalKeyRing().

Referenced by publicKeyExists(), and trustedPublicKeys().

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

Definition at line 197 of file KeyRing.cc.

References publicKeyIds(), and trustedKeyRing().

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

Definition at line 192 of file KeyRing.cc.

References generalKeyRing().

Referenced by publicKeys(), and trustedPublicKeyIds().

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

Definition at line 263 of file KeyRing.cc.

References generalKeyRing(), and trustedKeyRing().

Referenced by exportKey().

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

Definition at line 297 of file KeyRing.cc.

References exportKey(), generalKeyRing(), importKey(), MIL, zypp::PublicKey::name(), zypp::PublicKey::path(), publicKeyExists(), readSignatureKeyId(), report, trustedKeyRing(), and verifyFile().

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

Definition at line 207 of file KeyRing.cc.

References generalKeyRing(), and verifyFile().

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

Definition at line 202 of file KeyRing.cc.

References trustedKeyRing(), and verifyFile().

bool zypp::KeyRing::Impl::verifyFile ( const Pathname &  file,
const Pathname &  signature,
const Pathname &  keyring 
) [private]

Definition at line 596 of file KeyRing.cc.

References zypp::ExternalProgram::close(), zypp::ExternalProgram::Discard_Stderr, and GPG_BINARY.

Referenced by verifyFileSignature(), verifyFileSignatureWorkflow(), and verifyFileTrustedSignature().

void zypp::KeyRing::Impl::importKey ( const Pathname &  keyfile,
const Pathname &  keyring 
) [private]

Definition at line 479 of file KeyRing.cc.

References zypp::ExternalProgram::close(), zypp::ExternalProgram::Discard_Stderr, GPG_BINARY, and ZYPP_THROW.

PublicKey zypp::KeyRing::Impl::exportKey ( string  id,
const Pathname &  keyring 
) [private]

Definition at line 238 of file KeyRing.cc.

References _base_dir, dumpPublicKey(), ERR, zypp::BadKeyException::keyFile(), MIL, zypp::filesystem::TmpPath::path(), and ZYPP_THROW.

Referenced by publicKeys(), and verifyFileSignatureWorkflow().

void zypp::KeyRing::Impl::dumpPublicKey ( const string &  id,
const Pathname &  keyring,
ostream &  stream 
) [private]

Definition at line 268 of file KeyRing.cc.

References zypp::ExternalProgram::close(), zypp::ExternalProgram::Discard_Stderr, GPG_BINARY, and zypp::externalprogram::ExternalDataSource::receiveLine().

void zypp::KeyRing::Impl::deleteKey ( const string &  id,
const Pathname &  keyring 
) [private]

Definition at line 509 of file KeyRing.cc.

References zypp::ExternalProgram::close(), zypp::ExternalProgram::Discard_Stderr, GPG_BINARY, MIL, and ZYPP_THROW.

list< PublicKey > zypp::KeyRing::Impl::publicKeys ( const Pathname &  keyring  )  [private]

Definition at line 463 of file KeyRing.cc.

References exportKey(), zypp::PublicKey::fingerprint(), zypp::PublicKey::id(), MIL, zypp::PublicKey::name(), and publicKeyIds().

list< string > zypp::KeyRing::Impl::publicKeyIds ( const Pathname &  keyring  )  [private]

Definition at line 398 of file KeyRing.cc.

References zypp::ExternalProgram::close(), zypp::ExternalProgram::Discard_Stderr, GPG_BINARY, MIL, zypp::externalprogram::ExternalDataSource::receiveLine(), and zypp::str::regex_match().

bool zypp::KeyRing::Impl::publicKeyExists ( string  id,
const Pathname &  keyring 
) [private]

Definition at line 226 of file KeyRing.cc.

References MIL, and publicKeys().

Referenced by isKeyKnown(), isKeyTrusted(), and verifyFileSignatureWorkflow().

const Pathname zypp::KeyRing::Impl::generalKeyRing (  )  const [private]

Definition at line 153 of file KeyRing.cc.

References _general_tmp_dir, and zypp::filesystem::TmpPath::path().

Referenced by deleteKey(), dumpPublicKey(), importKey(), isKeyKnown(), publicKeyIds(), publicKeys(), verifyFileSignature(), and verifyFileSignatureWorkflow().

const Pathname zypp::KeyRing::Impl::trustedKeyRing (  )  const [private]

Definition at line 158 of file KeyRing.cc.

References _trusted_tmp_dir, and zypp::filesystem::TmpPath::path().

Referenced by deleteKey(), dumpPublicKey(), importKey(), isKeyKnown(), isKeyTrusted(), trustedPublicKeyIds(), trustedPublicKeys(), verifyFileSignatureWorkflow(), and verifyFileTrustedSignature().

static shared_ptr<Impl> zypp::KeyRing::Impl::nullimpl (  )  [inline, static]

Offer default Impl.

Definition at line 139 of file KeyRing.cc.

Impl* zypp::KeyRing::Impl::clone (  )  const [inline, private]

clone for RWCOW_pointer

Definition at line 148 of file KeyRing.cc.


Friends And Related Function Documentation

Impl* r ( const Impl rhs  )  [friend]


Member Data Documentation

TmpDir zypp::KeyRing::Impl::_trusted_tmp_dir [private]

Definition at line 134 of file KeyRing.cc.

Referenced by trustedKeyRing().

TmpDir zypp::KeyRing::Impl::_general_tmp_dir [private]

Definition at line 135 of file KeyRing.cc.

Referenced by generalKeyRing().

Pathname zypp::KeyRing::Impl::_base_dir [private]

Definition at line 136 of file KeyRing.cc.

Referenced by exportKey(), and readSignatureKeyId().


The documentation for this struct was generated from the following file:
Generated on Tue Sep 25 19:23:15 2007 for libzypp by  doxygen 1.5.3