mirror of https://github.com/djcb/mu.git
mu: update 'verify' command for message changes
This commit is contained in:
parent
c0fe17eb1d
commit
6b8f7db693
11
mu/mu-cmd.cc
11
mu/mu-cmd.cc
|
@ -160,7 +160,7 @@ view_msg_plain(const Message& message, const MuConfig* opts)
|
||||||
static Mu::Result<void>
|
static Mu::Result<void>
|
||||||
handle_msg(const std::string& fname, const MuConfig* opts)
|
handle_msg(const std::string& fname, const MuConfig* opts)
|
||||||
{
|
{
|
||||||
auto message{Message::make_from_path(fname)};
|
auto message{Message::make_from_path(mu_config_message_options(opts), fname)};
|
||||||
if (!message)
|
if (!message)
|
||||||
return Err(message.error());
|
return Err(message.error());
|
||||||
|
|
||||||
|
@ -389,7 +389,11 @@ verify(const MimeMultipartSigned& sigpart, const MuConfig *opts)
|
||||||
const auto vflags{opts->auto_retrieve ?
|
const auto vflags{opts->auto_retrieve ?
|
||||||
VFlags::EnableKeyserverLookups: VFlags::None};
|
VFlags::EnableKeyserverLookups: VFlags::None};
|
||||||
|
|
||||||
const auto sigs{sigpart.verify(vflags)};
|
auto ctx{MimeCryptoContext::make_gpg()};
|
||||||
|
if (!ctx)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
const auto sigs{sigpart.verify(*ctx, vflags)};
|
||||||
Mu::MaybeAnsi col{!opts->nocolor};
|
Mu::MaybeAnsi col{!opts->nocolor};
|
||||||
|
|
||||||
if (!sigs || sigs->empty()) {
|
if (!sigs || sigs->empty()) {
|
||||||
|
@ -429,7 +433,8 @@ cmd_verify(const MuConfig* opts)
|
||||||
return Err(Error::Code::InvalidArgument,
|
return Err(Error::Code::InvalidArgument,
|
||||||
"missing message-file parameter");
|
"missing message-file parameter");
|
||||||
|
|
||||||
auto message{Message::make_from_path(opts->params[1])};
|
auto message{Message::make_from_path(mu_config_message_options(opts),
|
||||||
|
opts->params[1])};
|
||||||
if (!message)
|
if (!message)
|
||||||
return Err(message.error());
|
return Err(message.error());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue