25#ifdef ZYPP_ENABLE_ASYNC
28 this->
_ctx->sendUserRequest( req );
29 return req->choice ();
31 return _report->askUserToAcceptNoDigest(file);
37#ifdef ZYPP_ENABLE_ASYNC
40 this->
_ctx->sendUserRequest( req );
41 return req->choice ();
43 return _report->askUserToAccepUnknownDigest( file, name );
50#ifdef ZYPP_ENABLE_ASYNC
53 this->
_ctx->sendUserRequest( req );
54 return req->choice ();
56 return _report->askUserToAcceptWrongDigest( file, requested, found );
63#ifdef ZYPP_ENABLE_ASYNC
65 if (keycontext.
empty())
68 _(
"File '%s' is unsigned, continue?")) % file;
72 _(
"File '%s' from repository '%s' is unsigned, continue?"))
77 this->
_ctx->sendUserRequest ( req );
78 return req->choice ();
80 return _report->askUserToAcceptUnsignedFile( file, keycontext );
87#ifdef ZYPP_ENABLE_ASYNC
88 auto req = TrustKeyRequest::create(
89 _(
"Do you want to reject the key, trust temporarily, or trust always?"),
93 this->
_ctx->sendUserRequest ( req );
96 return _report->askUserToAcceptKey( key, keycontext );
103#ifdef ZYPP_ENABLE_ASYNC
104 ERR <<
"Not implemented yet" << std::endl;
107 return _report->askUserToAcceptPackageKey ( key_r, keycontext_r );
114#ifdef ZYPP_ENABLE_ASYNC
117 this->
_ctx->sendUserRequest ( req );
119 return _report->infoVerify( file_r, keyData_r, keycontext );
126#ifdef ZYPP_ENABLE_ASYNC
127 const std::string &lbl =
zypp::str::Format(
PL_(
"Received %1% new package signing key from repository \"%2%\":",
128 "Received %1% new package signing keys from repository \"%2%\":",
132 return _report->reportAutoImportKey( keyDataList_r, keySigning_r, keyContext_r );
139#ifdef ZYPP_ENABLE_ASYNC
141 if ( keycontext.
empty() )
143 label =
zypp::str::Format(
_(
"Signature verification failed for file '%1%'.") ) % file;
149 label += std::string(
" ") +
_(
"Continue?");
151 this->
_ctx->sendUserRequest ( req );
152 return req->choice ();
154 return _report->askUserToAcceptVerificationFailed( file, key, keycontext );
161#ifdef ZYPP_ENABLE_ASYNC
164 if (keycontext.
empty())
167 _(
"File '%s' is signed with an unknown key '%s'. Continue?")) % file % id;
171 _(
"File '%s' from repository '%s' is signed with an unknown key '%s'. Continue?"))
175 this->
_ctx->sendUserRequest ( req );
176 return req->choice ();
178 return _report->askUserToAcceptUnknownKey( file,
id, keycontext );
185#ifdef ZYPP_ENABLE_ASYNC
196#ifdef ZYPP_ENABLE_ASYNC
207#ifdef ZYPP_ENABLE_ASYNC
218#ifdef ZYPP_ENABLE_ASYNC
229#ifdef ZYPP_ENABLE_ASYNC
240#ifdef ZYPP_ENABLE_ASYNC
#define PL_(MSG1, MSG2, N)
Class representing one GPG Public Keys data.
std::string name() const
Key name.
Class representing one GPG Public Key (PublicKeyData + ASCII armored in a tempfile).
std::string asUserString() const
User string: label (alias or name).
BasicReportHelper(const BasicReportHelper &)=default
bool askUserToAcceptNoDigest(const zypp::Pathname &file)
detail::ReportHolder< zypp::DigestReport, Context::isAsync > _report
bool askUserToAccepUnknownDigest(const zypp::Pathname &file, const std::string &name)
bool askUserToAcceptWrongDigest(const zypp::Pathname &file, const std::string &requested, const std::string &found)
bool debug(std::string msg_r, UserData userData_r=UserData())
send debug message text
bool important(std::string msg_r, UserData userData_r=UserData())
send important 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 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 askUserToAcceptUnsignedFile(const std::string &file, const zypp::KeyContext &keycontext={})
detail::ReportHolder< zypp::KeyRingReport, Context::isAsync > _report
bool askUserToAcceptPackageKey(const zypp::PublicKey &key_r, const zypp::KeyContext &keycontext_r={})
bool askUserToAcceptUnknownKey(const std::string &file, const std::string &id, const zypp::KeyContext &keycontext={})
bool askUserToAcceptVerificationFailed(const std::string &file, const zypp::PublicKey &key, const zypp::KeyContext &keycontext={})
void reportAutoImportKey(const std::list< zypp::PublicKeyData > &keyDataList_r, const zypp::PublicKeyData &keySigning_r, const zypp::KeyContext &keyContext_r)
void infoVerify(const std::string &file_r, const zypp::PublicKeyData &keyData_r, const zypp::KeyContext &keycontext={})
zypp::KeyRingReport::KeyTrust askUserToAcceptKey(const zypp::PublicKey &key, 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.