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 bool askUserToAcceptWrongDigest(const zypp::Pathname &file, const std::string &requested, const std::string &found)
bool error(std::string msg_r, UserData userData_r=UserData())
send error text
static bool error(const std::string &msg_r, const UserData &userData_r=UserData())
send error text
UserData makeData(const std::list< zypp::PublicKeyData > &keyDataList_r, const zypp::PublicKeyData &keySigning_r, const zypp::KeyContext &keyContext_r)
bool askUserToAcceptUnknownKey(const std::string &file, const std::string &id, const zypp::KeyContext &keycontext={})
bool askUserToAcceptUnsignedFile(const std::string &file, const zypp::KeyContext &keycontext={})
bool askUserToAcceptVerificationFailed(const std::string &file, const zypp::PublicKey &key, const zypp::KeyContext &keycontext={})
UserData makeData(const zypp::Pathname &p, const std::string &name)
Class representing one GPG Public Keys data.
UserData makeData(const std::string &file, const zypp::PublicKey &key, const zypp::KeyContext &keycontext=zypp::KeyContext())
UserData makeData(const std::string &file_r, const zypp::PublicKeyData &keyData_r, const zypp::KeyContext &keycontext=zypp::KeyContext())
void reportAutoImportKey(const std::list< zypp::PublicKeyData > &keyDataList_r, const zypp::PublicKeyData &keySigning_r, const zypp::KeyContext &keyContext_r)
detail::ReportHolder< zypp::DigestReport, Context::isAsync > _report
bool important(std::string msg_r, UserData userData_r=UserData())
send important message text
std::string name() const
Key name.
String related utilities and Regular expression matching.
bool askUserToAccepUnknownDigest(const zypp::Pathname &file, const std::string &name)
static bool warning(const std::string &msg_r, const UserData &userData_r=UserData())
send warning text
detail::ReportHolder< zypp::KeyRingReport, Context::isAsync > _report
std::string asUserString() const
User string: label (alias or name)
UserData makeData(const std::string &file, const std::string &id, const zypp::KeyContext &keycontext=zypp::KeyContext())
BasicReportHelper(const BasicReportHelper &)=default
#define PL_(MSG1, MSG2, N)
void infoVerify(const std::string &file_r, const zypp::PublicKeyData &keyData_r, const zypp::KeyContext &keycontext={})
KeyTrust
User reply options for the askUserToTrustKey callback.
zypp::KeyRingReport::KeyTrust askUserToAcceptKey(const zypp::PublicKey &key, const zypp::KeyContext &keycontext={})
bool data(std::string msg_r, UserData userData_r=UserData())
send data message
bool askUserToAcceptPackageKey(const zypp::PublicKey &key_r, const zypp::KeyContext &keycontext_r={})
repo::DownloadContextRef _ctx
User has chosen not to trust the key.
static bool important(const std::string &msg_r, const UserData &userData_r=UserData())
send important message text
static bool data(const std::string &msg_r, const UserData &userData_r=UserData())
send data message
UserData makeData(const zypp::PublicKey &key, const zypp::KeyContext &keycontext=zypp::KeyContext())
static bool debug(const std::string &msg_r, const UserData &userData_r=UserData())
send debug message text
bool info(std::string msg_r, UserData userData_r=UserData())
send message text
const RepoInfo repoInfo() const
Class representing one GPG Public Key (PublicKeyData + ASCII armored in a tempfile).
bool empty() const
Is the context unknown?
bool debug(std::string msg_r, UserData userData_r=UserData())
send debug message text
Typesafe passing of user data via callbacks.
UserData makeData(const zypp::Pathname &p)
static bool info(const std::string &msg_r, const UserData &userData_r=UserData())
send message text
bool askUserToAcceptNoDigest(const zypp::Pathname &file)
UserData makeData(const zypp::Pathname &p, const std::string &requested, const std::string &found)
UserData makeData(const std::string &file, const zypp::KeyContext &keycontext=zypp::KeyContext())
bool warning(std::string msg_r, UserData userData_r=UserData())
send warning text