libzypp: zyppng::KeyRingWorkflow Namespace Reference

libzypp 17.38.9

zyppng::KeyRingWorkflow Namespace Reference

## Classes
struct | ImportKeyFromRepoLogic

## Functions
MaybeAwaitable< bool > | provideAndImportKeyFromRepository (ContextRef ctx, std::string id_r, zypp::RepoInfo info_r)
| Try to find the id in key cache or repository specified in info.
MaybeAwaitable< std::pair< bool, zypp::keyring::VerifyFileContext > > | verifyFileSignature (ContextRef zyppContext, zypp::keyring::VerifyFileContext &&context_r)
| Follows a signature verification interacting with the user.
MaybeAwaitable< std::pair< bool, zypp::keyring::VerifyFileContext > > | verifyFileSignature (ContextRef zyppContext, zypp::KeyRing_Ptr keyRing, zypp::keyring::VerifyFileContext &&context_r)

## Function Documentation

## ◆ provideAndImportKeyFromRepository()

MaybeAwaitable< bool > zyppng::KeyRingWorkflow::provideAndImportKeyFromRepository | ( | ContextRef | ctx,
|  | std::string | id_r,
|  | zypp::RepoInfo | info_r )

Try to find the id in key cache or repository specified in info.

Ask the user to trust the key if it was found

Definition at line 115 of file keyringwf.cc.

## ◆ verifyFileSignature() [1/2]

MaybeAwaitable< std::pair< bool, zypp::keyring::VerifyFileContext > > zyppng::KeyRingWorkflow::verifyFileSignature | ( | ContextRef | zyppContext,
|  | zypp::keyring::VerifyFileContext && | context_r )

Follows a signature verification interacting with the user.

The bool returned depends on user decision to trust or not.

To propagate user decisions, either connect to the KeyRingReport or use its static methods to set the desired defaults.

A second bool passed as reference arg sigValid_r tells whether the signature was actually successfully verified. If sigValid_r returns `false`, but the method `true`, you know it's due to user callback or defaults.

struct KeyRingReportReceive : public callback::ReceiveReport<KeyRingReport>
{
KeyRingReportReceive() { connect(); }
// Overload the virtual methods to return the appropriate values.
virtual bool askUserToAcceptUnsignedFile( const std::string &file );
...
};
zypp::callback::ReceiveReport
Definition Callback.h:169
zypp::callback::ReceiveReport::connect
void connect()
Definition Callback.h:183

Parameters

  keyRing | The KeyRing instance the file verification should run against
  context_r | The verification context containing all required informations

Returns
  a std::pair, containing a boolean signalling if the verification was successful or not and the zypp::keyring::VerifyFileContext containing more detailed informations.

See also
  zypp::KeyRingReport

Definition at line 324 of file keyringwf.cc.

## ◆ verifyFileSignature() [2/2]

MaybeAwaitable< std::pair< bool, zypp::keyring::VerifyFileContext > > zyppng::KeyRingWorkflow::verifyFileSignature | ( | ContextRef | zyppContext,
|  | zypp::KeyRing_Ptr | keyRing,
|  | zypp::keyring::VerifyFileContext && | context_r )

Definition at line 331 of file keyringwf.cc.