From 3cc8477cbb0a3fb47b6d344ffdcd363d5dd75c78 Mon Sep 17 00:00:00 2001 From: espie Date: Thu, 9 Jan 2014 13:30:46 +0000 Subject: [PATCH] @signer makes sense only for signify, so move it there. --- usr.sbin/pkg_add/OpenBSD/PkgCreate.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm index 6501f73c741..deac54a896b 100644 --- a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm +++ b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm @@ -1,6 +1,6 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: PkgCreate.pm,v 1.89 2014/01/09 13:21:03 espie Exp $ +# $OpenBSD: PkgCreate.pm,v 1.90 2014/01/09 13:30:46 espie Exp $ # # Copyright (c) 2003-2010 Marc Espie # @@ -87,6 +87,10 @@ sub new_sig sub compute_signature { my ($self, $state, $plist) = @_; + + my $list = $state->signer_list; + OpenBSD::PackingElement::Signer->add($plist, $list->[0]); + return OpenBSD::signify::compute_signature($plist, $state, $self->{privkey}); } @@ -1158,9 +1162,6 @@ sub add_signature } } - my $list = $state->signer_list; - OpenBSD::PackingElement::Signer->add($plist, $list->[0]); - my $sig = $state->{signer}->new_sig; $sig->add_object($plist); $sig->{b64sig} = $state->{signer}->compute_signature($state, $plist); -- 2.20.1