libzypp: zypp::SignatureFileChecker Class Reference

libzypp 17.38.6

zypp::SignatureFileChecker Class Reference

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

`#include <zypp/FileChecker.h>`

## Public Types
typedef SignatureCheckException | ExceptionType

## Public Member Functions
| SignatureFileChecker ()
| Default Ctor for unsigned files.
| SignatureFileChecker (Pathname signature_r)
| Ctor taking the detached signature.
void | addPublicKey (const PublicKey &publickey_r)
| Add a public key to the list of known keys.
void | addPublicKey (const Pathname &publickey_r)
void | operator() (const Pathname &file_r) const
| Call KeyRing::verifyFileSignatureWorkflow to verify the file.
keyring::VerifyFileContext & | verifyContext ()
const keyring::VerifyFileContext & | verifyContext () const

## Private Attributes
keyring::VerifyFileContext | _verifyContext

## Detailed Description

Checks for the validity of a signature.

Definition at line 70 of file FileChecker.h.

## Member Typedef Documentation

## ◆ ExceptionType

typedef SignatureCheckException zypp::SignatureFileChecker::ExceptionType

Definition at line 73 of file FileChecker.h.

## Constructor & Destructor Documentation

## ◆ SignatureFileChecker() [1/2]

zypp::SignatureFileChecker::SignatureFileChecker | ( |  | ) |

Default Ctor for unsigned files.

Use it when you don't have a signature and you want to check whether the user accepts an unsigned file.

Definition at line 71 of file FileChecker.cc.

## ◆ SignatureFileChecker() [2/2]

zypp::SignatureFileChecker::SignatureFileChecker | ( | Pathname | signature_r | ) |

Ctor taking the detached signature.

Definition at line 74 of file FileChecker.cc.

## Member Function Documentation

## ◆ addPublicKey() [1/2]

void zypp::SignatureFileChecker::addPublicKey | ( | const PublicKey & | publickey_r | ) |

Add a public key to the list of known keys.

Definition at line 80 of file FileChecker.cc.

## ◆ addPublicKey() [2/2]

void zypp::SignatureFileChecker::addPublicKey | ( | const Pathname & | publickey_r | ) |

Definition at line 77 of file FileChecker.cc.

## ◆ operator()()

void zypp::SignatureFileChecker::operator() | ( | const Pathname & | file_r | ) | const

Call KeyRing::verifyFileSignatureWorkflow to verify the file.

Keep in mind the the workflow may return `true` (fileAccepted) due to user interaction or global defaults even if a signature was not actually sucessfully verified. Whether a signature was actually sucessfully verified can be determined by checking fileValidated which is invokes IFF a signature for this file actually validated.

Parameters

  file_r | File to validate.

Exceptions

  SignatureCheckException | if validation fails

Definition at line 83 of file FileChecker.cc.

## ◆ verifyContext() [1/2]

keyring::VerifyFileContext & zypp::SignatureFileChecker::verifyContext | ( |  | ) |

Definition at line 96 of file FileChecker.cc.

## ◆ verifyContext() [2/2]

const keyring::VerifyFileContext & zypp::SignatureFileChecker::verifyContext | ( |  | ) | const

Definition at line 101 of file FileChecker.cc.

## Member Data Documentation

## ◆ _verifyContext

keyring::VerifyFileContext zypp::SignatureFileChecker::_verifyContext
| private

Definition at line 108 of file FileChecker.h.

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

- zypp/FileChecker.h
- zypp/FileChecker.cc