22 using namespace zyppng::operators;
24 struct VerifySignatureLogic {
26 VerifySignatureLogic( ContextRef &&zyppCtx, zypp::keyring::VerifyFileContext &&ctx )
27 : _zyppCtx( std::move(zyppCtx) )
28 , _verifyCtx( std::move(ctx) ) { }
30 MaybeAwaitable<expected<zypp::keyring::VerifyFileContext>> execute () {
32 const zypp::Pathname & sig { _verifyCtx.signature() };
33 if ( not ( sig.
empty() || zypp::PathInfo(sig).isExist() ) ) {
37 MIL <<
"Checking " << _verifyCtx.file ()<<
" file validity using digital signature.." << std::endl;
49 zypp::keyring::VerifyFileContext _verifyCtx;
56 VerifySignatureLogic impl( std::move(ctx), std::move(context) );
57 zypp_co_return zypp_co_await( impl.execute () );
#define ZYPP_EXCPT_PTR(EXCPT)
Drops a logline and returns Exception as a std::exception_ptr.
const std::string & asString() const
String representation.
bool empty() const
Test for an empty path.
I/O context for KeyRing::verifyFileSignatureWorkflow.
static expected success(ConsParams &&...params)
MaybeAwaitable< std::pair< bool, zypp::keyring::VerifyFileContext > > verifyFileSignature(ContextRef zyppContext, zypp::keyring::VerifyFileContext &&context_r)
Follows a signature verification interacting with the user.
MaybeAwaitable< expected< zypp::keyring::VerifyFileContext > > verifySignature(ContextRef ctx, zypp::keyring::VerifyFileContext context)