24 template <
class Executor,
class OpType>
25 struct VerifySignatureLogic :
public LogicBase<Executor,OpType> {
28 using ZyppContextRefType = MaybeAsyncContextRef<OpType>;
34 MaybeAsyncRef<expected<zypp::keyring::VerifyFileContext>> execute () {
41 MIL <<
"Checking " <<
_verifyCtx.
file ()<<
" file validity using digital signature.." << std::endl;
57 namespace SignatureFileCheckWorkflow {
ZyppContextRefType _zyppCtx
I/O context for KeyRing::verifyFileSignatureWorkflow.
std::pair< bool, zypp::keyring::VerifyFileContext > verifyFileSignature(SyncContextRef zyppContext, zypp::keyring::VerifyFileContext &&context_r)
Follows a signature verification interacting with the user.
#define ZYPP_EXCPT_PTR(EXCPT)
Drops a logline and returns Exception as a std::exception_ptr.
const Pathname & signature() const
Detached signature or empty.
bool isExist() const
Return whether valid stat info exists.
#define ZYPP_ENABLE_LOGIC_BASE(Executor, OpType)
const Pathname & file() const
File to verify.
std::conditional_t< isAsync, AsyncOpRef< T >, T > makeReadyResult(T &&result)
static expected success(ConsParams &&...params)
std::shared_ptr< AsyncOp< T > > AsyncOpRef
expected< zypp::keyring::VerifyFileContext > verifySignature(SyncContextRef ctx, zypp::keyring::VerifyFileContext context)
Wrapper class for ::stat/::lstat.
zypp::keyring::VerifyFileContext _verifyCtx