zypp::SignatureFileChecker Class Reference

Checks for the validity of a signature. More...

#include <FileChecker.h>

List of all members.

Public Member Functions

 SignatureFileChecker (const Pathname &signature)
 Constructor.
 SignatureFileChecker ()
 Default Constructor.
void setKeyContext (const KeyContext &keycontext)
 Set context for this checker.
void addPublicKey (const PublicKey &publickey, const KeyContext &keycontext=KeyContext())
 add a public key to the list of known keys
void addPublicKey (const Pathname &publickey, const KeyContext &keycontext=KeyContext())
void operator() (const Pathname &file) const
 Try to validate the file.

Protected Attributes

Pathname _signature
KeyContext _context


Detailed Description

Checks for the validity of a signature.

Definition at line 85 of file FileChecker.h.


Constructor & Destructor Documentation

zypp::SignatureFileChecker::SignatureFileChecker ( const Pathname &  signature  ) 

Constructor.

Parameters:
signature Signature that validates the file

Definition at line 97 of file FileChecker.cc.

zypp::SignatureFileChecker::SignatureFileChecker (  ) 

Default Constructor.

Signature for unsigned files Use it when you dont have a signature but you want to check the user to accept an unsigned file.

Definition at line 104 of file FileChecker.cc.


Member Function Documentation

void zypp::SignatureFileChecker::setKeyContext ( const KeyContext keycontext  ) 

Set context for this checker.

Use this method if you're not adding the key (with context) via one of the addPublicKey methods. The addPublicKey method overwrites the context.

Definition at line 108 of file FileChecker.cc.

References _context.

Referenced by zypp::repo::yum::Downloader::download(), and zypp::repo::susetags::Downloader::download().

void zypp::SignatureFileChecker::addPublicKey ( const PublicKey publickey,
const KeyContext keycontext = KeyContext() 
)

add a public key to the list of known keys

Definition at line 114 of file FileChecker.cc.

References _context.

Referenced by addPublicKey(), zypp::repo::yum::Downloader::download(), and zypp::repo::susetags::Downloader::download().

void zypp::SignatureFileChecker::addPublicKey ( const Pathname &  publickey,
const KeyContext keycontext = KeyContext() 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 111 of file FileChecker.cc.

References addPublicKey().

void zypp::SignatureFileChecker::operator() ( const Pathname &  file  )  const

Try to validate the file.

Parameters:
file File to validate.
Exceptions:
SignatureCheckException if validation fails

Definition at line 120 of file FileChecker.cc.

References _context, _signature, MIL, and ZYPP_THROW.


Member Data Documentation

Definition at line 127 of file FileChecker.h.

Referenced by operator()().

Definition at line 128 of file FileChecker.h.

Referenced by addPublicKey(), operator()(), and setKeyContext().


The documentation for this class was generated from the following files:

doxygen