libzypp 17.35.14
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:
35 explicit VerifyFileContext( Pathname file_r );
37 VerifyFileContext( Pathname file_r, Pathname signature_r );
38
40 VerifyFileContext(VerifyFileContext &&) noexcept = default;
41
42 VerifyFileContext &operator=(const VerifyFileContext &) = default;
43 VerifyFileContext &operator=(VerifyFileContext &&) noexcept = default;
44
46
48 const Pathname & file() const;
49 void file( Pathname file_r );
50
52 const Pathname & signature() const;
53 void signature( Pathname signature_r );
54
56 std::string shortFile() const;
57 void shortFile( std::string shortFile_r );
58
60 const KeyContext & keyContext() const;
61 void keyContext( KeyContext keyContext_r );
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
Directly accessed by verifyFileSignatureWorkflow to set the result data.
I/O context for KeyRing::verifyFileSignatureWorkflow.
std::set< std::string > BuddyKeys
List of key safe key ids to import IFF fileValidated.
VerifyFileContext(VerifyFileContext &&) noexcept=default
VerifyFileContext(const VerifyFileContext &)=default
Definition Arch.h:364
String related utilities and Regular expression matching.
const Arch Arch_armv7hnl Arch_armv7nhl ZYPP_API
Definition Arch.h:247
RW_pointer supporting 'copy on write' functionality.
Definition PtrTypes.h:469