14#include <zypp/base/LogTools.h>
54 friend Impl * rwcowClone<Impl>(
const Impl * rhs );
57 {
return new Impl( *
this ); }
61 : _pimpl( new
Impl() )
64 : _pimpl( new
Impl(
std::move(file_r) ) )
67 : _pimpl( new
Impl(
std::move(file_r),
std::move(signature_r) ) )
77 {
_pimpl->_file = std::move(file_r); }
80 {
return _pimpl->_signature; }
83 {
_pimpl->_signature = std::move(signature_r); }
86 {
return _pimpl->_shortFile.has_value() ?
_pimpl->_shortFile.value() :
_pimpl->_file.basename(); }
89 {
_pimpl->_shortFile = std::move(shortFile_r); }
92 {
return _pimpl->_keyContext; }
95 {
_pimpl->_keyContext = std::move(keyContext_r); }
98 {
return _pimpl->_buddyKeys; }
101 {
_pimpl->_buddyKeys.insert( sid_r ); }
105 {
_pimpl->resetResults(); }
108 {
return _pimpl->_fileAccepted; }
111 {
_pimpl->_fileAccepted = yesno_r; }
114 {
return _pimpl->_fileValidated; }
117 {
_pimpl->_fileValidated = yesno_r; }
120 {
return _pimpl->_signatureId; }
123 {
_pimpl->_signatureId = std::move(signatureId_r); }
126 {
return _pimpl->_signatureIdTrusted; }
129 {
_pimpl->_signatureIdTrusted = yesno_r; }
std::string basename() const
Return the last component of this path.
Directly accessed by verifyFileSignatureWorkflow to set the result data.
Impl(Pathname file_r, Pathname signature_r)
Impl * clone() const
clone for RWCOW_pointer
std::optional< std::string > _shortFile
I/O context for KeyRing::verifyFileSignatureWorkflow.
std::set< std::string > BuddyKeys
List of key safe key ids to import IFF fileValidated.
bool fileValidated() const
Whether the signature was actually successfully verified.
const KeyContext & keyContext() const
KeyContext passed to callbacks
std::string shortFile() const
Short name for file (default: basename).
RWCOW_pointer< Impl > _pimpl
Implementation.
const Pathname & file() const
File to verify.
const BuddyKeys & buddyKeys() const
bool signatureIdTrusted() const
Whether the SignatureId is in the trusted keyring (not temp.
const Pathname & signature() const
Detached signature or empty.
void resetResults()
Reset all result values to safe defaults.
const std::string & signatureId() const
The id of the gpg key which signed the file.
bool fileAccepted() const
May return true due to user interaction or global defaults even if the signature was not actually ver...
void addBuddyKey(std::string sid_r)
String related utilities and Regular expression matching.
std::ostream & operator<<(std::ostream &str, const VerifyFileContext &obj)