libzypp  17.30.2
zypp::keyring::VerifyFileContext Class Reference

I/O context for KeyRing::verifyFileSignatureWorkflow. More...

#include <KeyRingContexts.h>

Inheritance diagram for zypp::keyring::VerifyFileContext:

Classes

class  Impl
 Directly accessed by verifyFileSignatureWorkflow to set the result data. More...
 

Public Types

typedef std::set< std::string > BuddyKeys
 List of key safe key ids to import IFF fileValidated. More...
 

Public Member Functions

 VerifyFileContext ()
 Ctor. More...
 
 VerifyFileContext (Pathname file_r)
 Ctor may take file to verify and detatched signature. More...
 
 VerifyFileContext (Pathname file_r, Pathname signature_r)
 Ctor may take file to verify and detatched signature. More...
 
 ~VerifyFileContext ()
 
const Pathnamefile () const
 File to verify. More...
 
void file (Pathname file_r)
 
const Pathnamesignature () const
 Detached signature or empty. More...
 
void signature (Pathname signature_r)
 
std::string shortFile () const
 Short name for file (default: basename). More...
 
void shortFile (std::string shortFile_r)
 
const KeyContextkeyContext () const
 KeyContext passed to callbacks More...
 
void keyContext (KeyContext keyContext_r)
 
const BuddyKeysbuddyKeys () const
 
void addBuddyKey (std::string sid_r)
 

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &str, const VerifyFileContext &obj)
 Stream output. More...
 

Results provided by \ref KeyRing::verifyFileSignatureWorkflow.

RWCOW_pointer< Impl_pimpl
 Implementation. More...
 
void resetResults ()
 Reset all result values to safe defaults. More...
 
bool fileAccepted () const
 May return true due to user interaction or global defaults even if the signature was not actually verified. More...
 
void fileAccepted (bool yesno_r)
 
bool fileValidated () const
 Whether the signature was actually successfully verified. More...
 
void fileValidated (bool yesno_r)
 
const std::string & signatureId () const
 The id of the gpg key which signed the file. More...
 
void signatureId (std::string signatureId_r)
 
bool signatureIdTrusted () const
 Whether the SignatureId is in the trusted keyring (not temp. More...
 
void signatureIdTrusted (bool yesno_r)
 

Detailed Description

I/O context for KeyRing::verifyFileSignatureWorkflow.

Definition at line 29 of file KeyRingContexts.h.

Member Typedef Documentation

◆ BuddyKeys

typedef std::set<std::string> zypp::keyring::VerifyFileContext::BuddyKeys

List of key safe key ids to import IFF fileValidated.

Definition at line 58 of file KeyRingContexts.h.

Constructor & Destructor Documentation

◆ VerifyFileContext() [1/3]

zypp::keyring::VerifyFileContext::VerifyFileContext ( )

Ctor.

Definition at line 60 of file KeyRingContexts.cc.

◆ VerifyFileContext() [2/3]

zypp::keyring::VerifyFileContext::VerifyFileContext ( Pathname  file_r)
explicit

Ctor may take file to verify and detatched signature.

Definition at line 63 of file KeyRingContexts.cc.

◆ VerifyFileContext() [3/3]

zypp::keyring::VerifyFileContext::VerifyFileContext ( Pathname  file_r,
Pathname  signature_r 
)

Ctor may take file to verify and detatched signature.

Definition at line 66 of file KeyRingContexts.cc.

◆ ~VerifyFileContext()

zypp::keyring::VerifyFileContext::~VerifyFileContext ( )

Definition at line 69 of file KeyRingContexts.cc.

Member Function Documentation

◆ file() [1/2]

const Pathname & zypp::keyring::VerifyFileContext::file ( ) const

File to verify.

Definition at line 73 of file KeyRingContexts.cc.

◆ file() [2/2]

void zypp::keyring::VerifyFileContext::file ( Pathname  file_r)

Definition at line 76 of file KeyRingContexts.cc.

◆ signature() [1/2]

const Pathname & zypp::keyring::VerifyFileContext::signature ( ) const

Detached signature or empty.

Definition at line 79 of file KeyRingContexts.cc.

◆ signature() [2/2]

void zypp::keyring::VerifyFileContext::signature ( Pathname  signature_r)

Definition at line 82 of file KeyRingContexts.cc.

◆ shortFile() [1/2]

std::string zypp::keyring::VerifyFileContext::shortFile ( ) const

Short name for file (default: basename).

Definition at line 85 of file KeyRingContexts.cc.

◆ shortFile() [2/2]

void zypp::keyring::VerifyFileContext::shortFile ( std::string  shortFile_r)

Definition at line 88 of file KeyRingContexts.cc.

◆ keyContext() [1/2]

const KeyContext & zypp::keyring::VerifyFileContext::keyContext ( ) const

KeyContext passed to callbacks

Definition at line 91 of file KeyRingContexts.cc.

◆ keyContext() [2/2]

void zypp::keyring::VerifyFileContext::keyContext ( KeyContext  keyContext_r)

Definition at line 94 of file KeyRingContexts.cc.

◆ buddyKeys()

const VerifyFileContext::BuddyKeys & zypp::keyring::VerifyFileContext::buddyKeys ( ) const

Definition at line 97 of file KeyRingContexts.cc.

◆ addBuddyKey()

void zypp::keyring::VerifyFileContext::addBuddyKey ( std::string  sid_r)

Definition at line 100 of file KeyRingContexts.cc.

◆ resetResults()

void zypp::keyring::VerifyFileContext::resetResults ( )

Reset all result values to safe defaults.

Definition at line 104 of file KeyRingContexts.cc.

◆ fileAccepted() [1/2]

bool zypp::keyring::VerifyFileContext::fileAccepted ( ) const

May return true due to user interaction or global defaults even if the signature was not actually verified.

Definition at line 107 of file KeyRingContexts.cc.

◆ fileAccepted() [2/2]

void zypp::keyring::VerifyFileContext::fileAccepted ( bool  yesno_r)

Definition at line 110 of file KeyRingContexts.cc.

◆ fileValidated() [1/2]

bool zypp::keyring::VerifyFileContext::fileValidated ( ) const

Whether the signature was actually successfully verified.

Definition at line 113 of file KeyRingContexts.cc.

◆ fileValidated() [2/2]

void zypp::keyring::VerifyFileContext::fileValidated ( bool  yesno_r)

Definition at line 116 of file KeyRingContexts.cc.

◆ signatureId() [1/2]

const std::string & zypp::keyring::VerifyFileContext::signatureId ( ) const

The id of the gpg key which signed the file.

Definition at line 119 of file KeyRingContexts.cc.

◆ signatureId() [2/2]

void zypp::keyring::VerifyFileContext::signatureId ( std::string  signatureId_r)

Definition at line 122 of file KeyRingContexts.cc.

◆ signatureIdTrusted() [1/2]

bool zypp::keyring::VerifyFileContext::signatureIdTrusted ( ) const

Whether the SignatureId is in the trusted keyring (not temp.

trusted).

Definition at line 125 of file KeyRingContexts.cc.

◆ signatureIdTrusted() [2/2]

void zypp::keyring::VerifyFileContext::signatureIdTrusted ( bool  yesno_r)

Definition at line 128 of file KeyRingContexts.cc.

Friends And Related Function Documentation

◆ operator<<()

std::ostream & operator<< ( std::ostream &  str,
const VerifyFileContext obj 
)
related

Stream output.

Definition at line 131 of file KeyRingContexts.cc.

Member Data Documentation

◆ _pimpl

RWCOW_pointer<Impl> zypp::keyring::VerifyFileContext::_pimpl
private

Implementation.

Pointer to implementation

Definition at line 87 of file KeyRingContexts.h.


The documentation for this class was generated from the following files: