https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=fc7bda93992086e01b62d08fa5ca2b70a69b62aa From fc7bda93992086e01b62d08fa5ca2b70a69b62aa Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Tue, 3 Dec 2024 02:40:48 +0100 Subject: Dpkg::OpenPGP::Backend::Sequoia: Adapt to new CLI 0.40.0 API As the API is not yet stable (but it is getting closer to be), we need to adapt it to the current version. --- scripts/Dpkg/OpenPGP/Backend/Sequoia.pm | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/scripts/Dpkg/OpenPGP/Backend/Sequoia.pm b/scripts/Dpkg/OpenPGP/Backend/Sequoia.pm index 36801c9f5..82c64591c 100644 --- a/scripts/Dpkg/OpenPGP/Backend/Sequoia.pm +++ b/scripts/Dpkg/OpenPGP/Backend/Sequoia.pm @@ -69,7 +69,7 @@ sub armor return OPENPGP_MISSING_CMD unless $self->{cmd}; # We ignore the $type, and let "sq" handle this automatically. - my $rc = $self->_sq_exec(qw(toolbox armor --output), $out, $in); + my $rc = $self->_sq_exec(qw(packet armor --output), $out, $in); return OPENPGP_BAD_DATA if $rc; return OPENPGP_OK; } @@ -81,7 +81,7 @@ sub dearmor return OPENPGP_MISSING_CMD unless $self->{cmd}; # We ignore the $type, and let "sq" handle this automatically. - my $rc = $self->_sq_exec(qw(toolbox dearmor --output), $out, $in); + my $rc = $self->_sq_exec(qw(packet dearmor --output), $out, $in); return OPENPGP_BAD_DATA if $rc; return OPENPGP_OK; } @@ -93,6 +93,7 @@ sub inline_verify return OPENPGP_MISSING_CMD unless $self->{cmd}; my @opts; + push @opts, '--cleartext'; push @opts, map { ('--signer-file', $_) } @certs; push @opts, '--output', $data if defined $data; @@ -109,7 +110,7 @@ sub verify my @opts; push @opts, map { ('--signer-file', $_) } @certs; - push @opts, '--detached', $sig; + push @opts, '--signature-file', $sig; my $rc = $self->_sq_exec(qw(verify), @opts, $data); return OPENPGP_NO_SIG if $rc; @@ -124,7 +125,7 @@ sub inline_sign return OPENPGP_NEEDS_KEYSTORE if $key->needs_keystore(); my @opts; - push @opts, '--cleartext-signature'; + push @opts, '--cleartext'; push @opts, '--signer-file', $key->handle; push @opts, '--output', $inlinesigned; -- cgit v1.2.3