libzypp  17.34.1
zyppng::KeyRingWorkflow Namespace Reference

Classes

struct  AsyncImportKeyFromRepoExecutor
 
struct  ImportKeyFromRepoLogic
 
struct  SyncImportKeyFromRepoExecutor
 

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. More...
 
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) ZYPP_TESTS
 Follows a signature verification interacting with the user. More...
 
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 119 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 124 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 461 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 467 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 473 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 478 of file keyringwf.cc.