libzypp: zypp::keyring::VerifyFileContext Class Reference

libzypp 17.38.5

zypp::keyring::VerifyFileContext Class Reference

I/O context for KeyRing::verifyFileSignatureWorkflow. More...

`#include <zypp/KeyRingContexts.h>`

## Classes
class | Impl
| Directly accessed by verifyFileSignatureWorkflow to set the result data. More...

## Public Types
using | BuddyKeys = std::set<std::string>
| List of key safe key ids to import IFF fileValidated.

## Public Member Functions
| VerifyFileContext ()
| Ctor.
| VerifyFileContext (Pathname file_r)
| Ctor may take file to verify and detatched signature.
| VerifyFileContext (Pathname file_r, Pathname signature_r)
| Ctor may take file to verify and detatched signature.
| VerifyFileContext (const VerifyFileContext &)=default
| VerifyFileContext (VerifyFileContext &&) noexcept=default
VerifyFileContext & | operator= (const VerifyFileContext &)=default
VerifyFileContext & | operator= (VerifyFileContext &&) noexcept=default
| ~VerifyFileContext ()
const Pathname & | file () const
| File to verify.
void | file (Pathname file_r)
const Pathname & | signature () const
| Detached signature or empty.
void | signature (Pathname signature_r)
std::string | shortFile () const
| Short name for file (default: basename).
void | shortFile (std::string shortFile_r)
const KeyContext & | keyContext () const
| KeyContext passed to callbacks
void | keyContext (KeyContext keyContext_r)
const BuddyKeys & | buddyKeys () const
void | addBuddyKey (std::string sid_r)

## Related Symbols
(Note that these are not member symbols.)
std::ostream & | operator<< (std::ostream &str, const VerifyFileContext &obj)
| Stream output.

## Results provided by \ref KeyRing::verifyFileSignatureWorkflow.
RWCOW_pointer< Impl > | _pimpl
| Implementation.
void | resetResults ()
| Reset all result values to safe defaults.
bool | fileAccepted () const
| May return `true` due to user interaction or global defaults even if the signature was not actually verified.
void | fileAccepted (bool yesno_r)
bool | fileValidated () const
| Whether the signature was actually successfully verified.
void | fileValidated (bool yesno_r)
const std::string & | signatureId () const
| The id of the gpg key which signed the file.
void | signatureId (std::string signatureId_r)
bool | signatureIdTrusted () const
| Whether the SignatureId is in the trusted keyring (not temp.
void | signatureIdTrusted (bool yesno_r)

## Detailed Description

I/O context for KeyRing::verifyFileSignatureWorkflow.

Definition at line 29 of file KeyRingContexts.h.

## Member Typedef Documentation

## ◆ BuddyKeys

using zypp::keyring::VerifyFileContext::BuddyKeys = std::set<std::string>

List of key safe key ids to import IFF fileValidated.

Definition at line 64 of file KeyRingContexts.h.

## Constructor & Destructor Documentation

## ◆ VerifyFileContext() [1/5]

zypp::keyring::VerifyFileContext::VerifyFileContext | ( |  | ) |

Ctor.

Definition at line 60 of file KeyRingContexts.cc.

## ◆ VerifyFileContext() [2/5]

zypp::keyring::VerifyFileContext::VerifyFileContext | ( | Pathname | file_r | ) |
| explicit

Ctor may take file to verify and detatched signature.

Definition at line 63 of file KeyRingContexts.cc.

## ◆ VerifyFileContext() [3/5]

zypp::keyring::VerifyFileContext::VerifyFileContext | ( | Pathname | file_r,
|  | Pathname | signature_r )

Ctor may take file to verify and detatched signature.

Definition at line 66 of file KeyRingContexts.cc.

## ◆ VerifyFileContext() [4/5]

zypp::keyring::VerifyFileContext::VerifyFileContext | ( | const VerifyFileContext & |  | ) |
| default

## ◆ VerifyFileContext() [5/5]

zypp::keyring::VerifyFileContext::VerifyFileContext | ( | VerifyFileContext && |  | ) |
| defaultnoexcept

## ◆ ~VerifyFileContext()

zypp::keyring::VerifyFileContext::~VerifyFileContext | ( |  | ) |

Definition at line 69 of file KeyRingContexts.cc.

## Member Function Documentation

## ◆ operator=() [1/2]

VerifyFileContext & zypp::keyring::VerifyFileContext::operator= | ( | const VerifyFileContext & |  | ) |
| default

## ◆ operator=() [2/2]

VerifyFileContext & zypp::keyring::VerifyFileContext::operator= | ( | VerifyFileContext && |  | ) |
| defaultnoexcept

## ◆ file() [1/2]

const Pathname & zypp::keyring::VerifyFileContext::file | ( |  | ) | const

File to verify.

Definition at line 73 of file KeyRingContexts.cc.

## ◆ file() [2/2]

void zypp::keyring::VerifyFileContext::file | ( | Pathname | file_r | ) |

Definition at line 76 of file KeyRingContexts.cc.

## ◆ signature() [1/2]

const Pathname & zypp::keyring::VerifyFileContext::signature | ( |  | ) | const

Detached signature or empty.

Definition at line 79 of file KeyRingContexts.cc.

## ◆ signature() [2/2]

void zypp::keyring::VerifyFileContext::signature | ( | Pathname | signature_r | ) |

Definition at line 82 of file KeyRingContexts.cc.

## ◆ shortFile() [1/2]

std::string zypp::keyring::VerifyFileContext::shortFile | ( |  | ) | const

Short name for file (default: basename).

Definition at line 85 of file KeyRingContexts.cc.

## ◆ shortFile() [2/2]

void zypp::keyring::VerifyFileContext::shortFile | ( | std::string | shortFile_r | ) |

Definition at line 88 of file KeyRingContexts.cc.

## ◆ keyContext() [1/2]

const KeyContext & zypp::keyring::VerifyFileContext::keyContext | ( |  | ) | const

KeyContext passed to callbacks

Definition at line 91 of file KeyRingContexts.cc.

## ◆ keyContext() [2/2]

void zypp::keyring::VerifyFileContext::keyContext | ( | KeyContext | keyContext_r | ) |

Definition at line 94 of file KeyRingContexts.cc.

## ◆ buddyKeys()

const VerifyFileContext::BuddyKeys & zypp::keyring::VerifyFileContext::buddyKeys | ( |  | ) | const

Definition at line 97 of file KeyRingContexts.cc.

## ◆ addBuddyKey()

void zypp::keyring::VerifyFileContext::addBuddyKey | ( | std::string | sid_r | ) |

Definition at line 100 of file KeyRingContexts.cc.

## ◆ resetResults()

void zypp::keyring::VerifyFileContext::resetResults | ( |  | ) |

Reset all result values to safe defaults.

Definition at line 104 of file KeyRingContexts.cc.

## ◆ fileAccepted() [1/2]

bool zypp::keyring::VerifyFileContext::fileAccepted | ( |  | ) | const

May return `true` due to user interaction or global defaults even if the signature was not actually verified.

Definition at line 107 of file KeyRingContexts.cc.

## ◆ fileAccepted() [2/2]

void zypp::keyring::VerifyFileContext::fileAccepted | ( | bool | yesno_r | ) |

Definition at line 110 of file KeyRingContexts.cc.

## ◆ fileValidated() [1/2]

bool zypp::keyring::VerifyFileContext::fileValidated | ( |  | ) | const

Whether the signature was actually successfully verified.

Definition at line 113 of file KeyRingContexts.cc.

## ◆ fileValidated() [2/2]

void zypp::keyring::VerifyFileContext::fileValidated | ( | bool | yesno_r | ) |

Definition at line 116 of file KeyRingContexts.cc.

## ◆ signatureId() [1/2]

const std::string & zypp::keyring::VerifyFileContext::signatureId | ( |  | ) | const

The id of the gpg key which signed the file.

Definition at line 119 of file KeyRingContexts.cc.

## ◆ signatureId() [2/2]

void zypp::keyring::VerifyFileContext::signatureId | ( | std::string | signatureId_r | ) |

Definition at line 122 of file KeyRingContexts.cc.

## ◆ signatureIdTrusted() [1/2]

bool zypp::keyring::VerifyFileContext::signatureIdTrusted | ( |  | ) | const

Whether the SignatureId is in the trusted keyring (not temp.

trusted).

Definition at line 125 of file KeyRingContexts.cc.

## ◆ signatureIdTrusted() [2/2]

void zypp::keyring::VerifyFileContext::signatureIdTrusted | ( | bool | yesno_r | ) |

Definition at line 128 of file KeyRingContexts.cc.

## Friends And Related Symbol Documentation

## ◆ operator<<()

std::ostream & operator<< | ( | std::ostream & | str,
|  | const VerifyFileContext & | obj )
| related

Stream output.

Definition at line 131 of file KeyRingContexts.cc.

## Member Data Documentation

## ◆ _pimpl

RWCOW_pointer<Impl> zypp::keyring::VerifyFileContext::_pimpl
| private

Implementation.

Pointer to implementation

Definition at line 93 of file KeyRingContexts.h.

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

- zypp/KeyRingContexts.h
- zypp/KeyRingContexts.cc