37 MIL <<
"File " << file <<
" has no checksum available." << std::endl;
38 if ( report->askUserToAcceptNoDigest(file) )
40 MIL <<
"User accepted " << file <<
" with no checksum." << std::endl;
55 WAR <<
"User accepted " << file <<
" with WRONG CHECKSUM." << std::endl;
68 MIL <<
"+ null check on " << file << endl;
75 for ( list<FileChecker>::const_iterator it =
_checkers.begin(); it !=
_checkers.end(); ++it )
84 ERR <<
"Invalid checker" << endl;
98 : _signature(signature)
116 getZYpp()->keyRing()->importKey(publickey,
false);
129 MIL <<
"checking " << file <<
" file validity using digital signature.." << endl;
130 bool valid = z->keyRing()->verifyFileSignatureWorkflow( file, file.basename(),
_signature,
_context);
#define ZYPP_THROW(EXCPT)
Drops a logline and throws the Exception.
SignatureFileChecker()
Default Constructor.
std::list< FileChecker > _checkers
void operator()(const Pathname &file) const
Try to validate the file.
void addPublicKey(const PublicKey &publickey, const KeyContext &keycontext=KeyContext())
add a public key to the list of known keys
void operator()(const Pathname &file) const
std::ostream & operator<<(std::ostream &str, const Exception &obj)
void add(const FileChecker &checker)
std::string checksum() const
void operator()(const Pathname &file) const
Class representing one GPG Public Key (PublicKeyData + ASCII armored in a tempfile).
std::string checksum(const Pathname &file, const std::string &algorithm)
Compute a files checksum.
void operator()(const Pathname &file) const
Try to validate the file.
intrusive_ptr< ZYpp > Ptr
function< void(const Pathname &file)> FileChecker
Functor signature used to check files.
void setKeyContext(const KeyContext &keycontext)
Set context for this checker.