17 template<
typename ZyppContextRef>
22 template<
typename ZyppContextRef>
25 if constexpr (
async() ) {
28 this->
_ctx->sendUserRequest( req );
29 return req->choice ();
31 return _report->askUserToAcceptNoDigest(file);
35 template<
typename ZyppContextRef>
38 if constexpr (
async() ) {
41 this->
_ctx->sendUserRequest( req );
42 return req->choice ();
44 return _report->askUserToAccepUnknownDigest( file, name );
48 template<
typename ZyppContextRef>
51 if constexpr (
async() ) {
54 this->
_ctx->sendUserRequest( req );
55 return req->choice ();
57 return _report->askUserToAcceptWrongDigest( file, requested, found );
61 template<
typename ZyppContextRef>
64 if constexpr (
async() ) {
66 if (keycontext.
empty())
69 _(
"File '%s' is unsigned, continue?")) % file;
73 _(
"File '%s' from repository '%s' is unsigned, continue?"))
78 this->
_ctx->sendUserRequest ( req );
79 return req->choice ();
81 return _report->askUserToAcceptUnsignedFile( file, keycontext );
85 template<
typename ZyppContextRef>
88 if constexpr (
async() ) {
89 auto req = TrustKeyRequest::create(
90 _(
"Do you want to reject the key, trust temporarily, or trust always?"),
94 this->
_ctx->sendUserRequest ( req );
97 return _report->askUserToAcceptKey( key, keycontext );
101 template<
typename ZyppContextRef>
104 if constexpr (
async() ) {
105 ERR <<
"Not implemented yet" << std::endl;
108 return _report->askUserToAcceptPackageKey ( key_r, keycontext_r );
112 template<
typename ZyppContextRef>
115 if constexpr (
async() ) {
118 this->
_ctx->sendUserRequest ( req );
120 return _report->infoVerify( file_r, keyData_r, keycontext );
124 template<
typename ZyppContextRef>
127 if constexpr (
async() ) {
128 const std::string &lbl =
zypp::str::Format(
PL_(
"Received %1% new package signing key from repository \"%2%\":",
129 "Received %1% new package signing keys from repository \"%2%\":",
133 return _report->reportAutoImportKey( keyDataList_r, keySigning_r, keyContext_r );
137 template<
typename ZyppContextRef>
140 if constexpr (
async() ) {
142 if ( keycontext.
empty() )
144 label =
zypp::str::Format(
_(
"Signature verification failed for file '%1%'.") ) % file;
150 label += std::string(
" ") +
_(
"Continue?");
152 this->
_ctx->sendUserRequest ( req );
153 return req->choice ();
155 return _report->askUserToAcceptVerificationFailed( file, key, keycontext );
159 template<
typename ZyppContextRef>
162 if constexpr (
async() ) {
165 if (keycontext.
empty())
168 _(
"File '%s' is signed with an unknown key '%s'. Continue?")) % file % id;
172 _(
"File '%s' from repository '%s' is signed with an unknown key '%s'. Continue?"))
176 this->
_ctx->sendUserRequest ( req );
177 return req->choice ();
179 return _report->askUserToAcceptUnknownKey( file,
id, keycontext );
183 template<
typename ZyppContextRef>
186 if constexpr (
async() ) {
194 template<
typename ZyppContextRef>
197 if constexpr (
async() ) {
205 template<
typename ZyppContextRef>
208 if constexpr (
async() ) {
216 template<
typename ZyppContextRef>
219 if constexpr (
async() ) {
227 template<
typename ZyppContextRef>
230 if constexpr (
async() ) {
238 template<
typename ZyppContextRef>
241 if constexpr (
async() ) {
std::string asUserString() const
User string: label (alias or name)
BasicReportHelper(const BasicReportHelper &)=default
static constexpr bool async()
bool askUserToAccepUnknownDigest(const zypp::Pathname &file, const std::string &name)
detail::ReportHolder< ZyppContextRef, zypp::DigestReport > _report
bool askUserToAcceptWrongDigest(const zypp::Pathname &file, const std::string &requested, const std::string &found)
bool askUserToAcceptNoDigest(const zypp::Pathname &file)
bool important(std::string msg_r, UserData userData_r=UserData())
send important message text
bool error(std::string msg_r, UserData userData_r=UserData())
send error text
bool warning(std::string msg_r, UserData userData_r=UserData())
send warning text
bool debug(std::string msg_r, UserData userData_r=UserData())
send debug message text
bool data(std::string msg_r, UserData userData_r=UserData())
send data message
bool info(std::string msg_r, UserData userData_r=UserData())
send message text
bool askUserToAcceptPackageKey(const zypp::PublicKey &key_r, const zypp::KeyContext &keycontext_r={})
void reportAutoImportKey(const std::list< zypp::PublicKeyData > &keyDataList_r, const zypp::PublicKeyData &keySigning_r, const zypp::KeyContext &keyContext_r)
bool askUserToAcceptUnsignedFile(const std::string &file, const zypp::KeyContext &keycontext={})
void infoVerify(const std::string &file_r, const zypp::PublicKeyData &keyData_r, const zypp::KeyContext &keycontext={})
detail::ReportHolder< ZyppContextRef, zypp::KeyRingReport > _report
bool askUserToAcceptVerificationFailed(const std::string &file, const zypp::PublicKey &key, const zypp::KeyContext &keycontext={})
zypp::KeyRingReport::KeyTrust askUserToAcceptKey(const zypp::PublicKey &key, const zypp::KeyContext &keycontext={})
bool askUserToAcceptUnknownKey(const std::string &file, const std::string &id, const zypp::KeyContext &keycontext={})
@ KEY_DONT_TRUST
User has chosen not to trust the key.
String related utilities and Regular expression matching.
UserData makeData(const std::string &file, const zypp::PublicKey &key, const zypp::KeyContext &keycontext=zypp::KeyContext())
UserData makeData(const zypp::PublicKey &key, const zypp::KeyContext &keycontext=zypp::KeyContext())
UserData makeData(const zypp::Pathname &p)
UserData makeData(const zypp::Pathname &p, const std::string &name)
UserData makeData(const std::string &file, const std::string &id, const zypp::KeyContext &keycontext=zypp::KeyContext())
UserData makeData(const std::string &file, const zypp::KeyContext &keycontext=zypp::KeyContext())
UserData makeData(const zypp::Pathname &p, const std::string &requested, const std::string &found)
UserData makeData(const std::list< zypp::PublicKeyData > &keyDataList_r, const zypp::PublicKeyData &keySigning_r, const zypp::KeyContext &keyContext_r)
UserData makeData(const std::string &file_r, const zypp::PublicKeyData &keyData_r, const zypp::KeyContext &keycontext=zypp::KeyContext())
zypp::callback::UserData UserData
static bool debug(const std::string &msg_r, const UserData &userData_r=UserData())
send debug message text
static bool warning(const std::string &msg_r, const UserData &userData_r=UserData())
send warning text
static bool error(const std::string &msg_r, const UserData &userData_r=UserData())
send error text
static bool data(const std::string &msg_r, const UserData &userData_r=UserData())
send data message
static bool important(const std::string &msg_r, const UserData &userData_r=UserData())
send important message text
static bool info(const std::string &msg_r, const UserData &userData_r=UserData())
send message text
const RepoInfo repoInfo() const
bool empty() const
Is the context unknown?
KeyTrust
User reply options for the askUserToTrustKey callback.
#define PL_(MSG1, MSG2, N)