libzypp 17.32.5
KeyRingContexts.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
11#ifndef ZYPP_KEYRINGCONTEXTS_H
12#define ZYPP_KEYRINGCONTEXTS_H
13
14#include <iosfwd>
15#include <string>
16#include <set>
17
18#include <zypp/base/PtrTypes.h>
19
20#include <zypp/Pathname.h>
21#include <zypp/KeyContext.h>
22
24namespace zypp::keyring
25{
30 {
31 public:
38
41
44
46
48 const Pathname & file() const;
49 void file( Pathname file_r );
50
52 const Pathname & signature() const;
54
56 std::string shortFile() const;
57 void shortFile( std::string shortFile_r );
58
60 const KeyContext & keyContext() const;
62
64 using BuddyKeys = std::set<std::string>;
65 const BuddyKeys & buddyKeys() const;
66 void addBuddyKey( std::string sid_r );
67
72 void resetResults();
73
75 bool fileAccepted() const;
76 void fileAccepted( bool yesno_r) ;
77
79 bool fileValidated() const;
80 void fileValidated( bool yesno_r );
81
83 const std::string & signatureId() const;
84 void signatureId( std::string signatureId_r );
85
87 bool signatureIdTrusted() const;
88 void signatureIdTrusted( bool yesno_r );
90 public:
91 class Impl;
92 private:
94 };
95
97 std::ostream & operator<<( std::ostream & str, const VerifyFileContext & obj );
98
99} // namespace zypp::keyring
101#endif // ZYPP_KEYRINGCONTEXTS_H
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
Definition AutoDispose.h:95
Directly accessed by verifyFileSignatureWorkflow to set the result data.
I/O context for KeyRing::verifyFileSignatureWorkflow.
bool fileValidated() const
Whether the signature was actually successfully verified.
std::set< std::string > BuddyKeys
List of key safe key ids to import IFF fileValidated.
VerifyFileContext(VerifyFileContext &&) noexcept=default
const KeyContext & keyContext() const
KeyContext passed to callbacks
std::string shortFile() const
Short name for file (default: basename).
RWCOW_pointer< Impl > _pimpl
Implementation.
const Pathname & file() const
File to verify.
const BuddyKeys & buddyKeys() const
bool signatureIdTrusted() const
Whether the SignatureId is in the trusted keyring (not temp.
VerifyFileContext(const VerifyFileContext &)=default
const Pathname & signature() const
Detached signature or empty.
void resetResults()
Reset all result values to safe defaults.
const std::string & signatureId() const
The id of the gpg key which signed the file.
bool fileAccepted() const
May return true due to user interaction or global defaults even if the signature was not actually ver...
void addBuddyKey(std::string sid_r)
Definition Arch.h:364
String related utilities and Regular expression matching.
RW_pointer supporting 'copy on write' functionality.
Definition PtrTypes.h:468