summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2013-12-23 15:40:25 +0000
committerMarc Espie <espie@cvs.openbsd.org>2013-12-23 15:40:25 +0000
commit07148d9e99fffbac93eb7089be1d3aeddc70a119 (patch)
tree35dc04dbadd59cd21756e9e01c257c368df668f7 /usr.sbin/pkg_add
parent9be6ed1d3c1a8a7d1a646b8c17acb15600bc1fe5 (diff)
simpler logic: if one package is signed, check all digests
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgAdd.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm b/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm
index ab949571d70..6ff666a1ff2 100644
--- a/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PkgAdd.pm
@@ -1,7 +1,7 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: PkgAdd.pm,v 1.37 2013/12/08 12:14:41 espie Exp $
+# $OpenBSD: PkgAdd.pm,v 1.38 2013/12/23 15:40:24 espie Exp $
#
# Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org>
#
@@ -658,6 +658,7 @@ sub iterate
sub check_x509_signature
{
my ($set, $state) = @_;
+ $state->{check_digest} //= 0;
for my $handle ($set->newer) {
$state->set_name_from_handle($handle, '+');
my $plist = $handle->plist;
@@ -665,7 +666,6 @@ sub check_x509_signature
if ($state->defines('nosig')) {
$state->errsay("NOT CHECKING DIGITAL SIGNATURE FOR #1",
$plist->pkgname);
- $state->{check_digest} = 0;
} else {
require OpenBSD::x509;
@@ -679,7 +679,6 @@ sub check_x509_signature
}
} else {
$state->{packages_without_sig}{$plist->pkgname} = 1;
- $state->{check_digest} = 0;
}
}
}