libzypp 17.37.17
zyppng::KeyRingWorkflow Namespace Reference

Classes

struct  ImportKeyFromRepoLogic

Functions

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

Function Documentation

◆ provideAndImportKeyFromRepository() [1/2]

bool zyppng::KeyRingWorkflow::provideAndImportKeyFromRepository ( SyncContextRef 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 122 of file keyringwf.cc.

◆ provideAndImportKeyFromRepository() [2/2]

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

Definition at line 127 of file keyringwf.cc.

◆ verifyFileSignature() [1/4]

std::pair< bool, zypp::keyring::VerifyFileContext > zyppng::KeyRingWorkflow::verifyFileSignature ( SyncContextRef 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 );
...
};
Parameters
keyRingThe KeyRing instance the file verification should run against
context_rThe 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 361 of file keyringwf.cc.

◆ verifyFileSignature() [2/4]

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

Definition at line 367 of file keyringwf.cc.

◆ verifyFileSignature() [3/4]

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

Definition at line 373 of file keyringwf.cc.

◆ verifyFileSignature() [4/4]

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

Definition at line 378 of file keyringwf.cc.