diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2023-11-25 10:29:24 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2023-11-25 10:29:24 +0000 |
commit | c037301b17849d53386c066e24056227d0dac3a6 (patch) | |
tree | 5bfe5b33e285a07b065c710a14f06826871a55f5 /usr.sbin/pkg_add/OpenBSD | |
parent | 0119f1cef8a2d9030d9b86ba651380ddd4b9db97 (diff) |
reinstate checking the keytype, which I unwittingly dropped a long time ago.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackageRepository.pm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm b/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm index f54409b69af..67d5ddf9d09 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PackageRepository.pm,v 1.176 2023/06/13 09:07:17 espie Exp $ +# $OpenBSD: PackageRepository.pm,v 1.177 2023/11/25 10:29:23 espie Exp $ # # Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org> # @@ -420,12 +420,22 @@ sub uncompress($self, $object, @p) return $fh; } +sub keytype($self) +{ + if ($self->{state}->defines("FW_UPDATE")) { + return "fw"; + } else { + return "pkg"; + } +} + sub signify_pipe($self, $object, @p) { CORE::open STDERR, ">>", $object->{errors}; exec {OpenBSD::Paths->signify} ("signify", "-zV", + "-t", $self->keytype, @p) or $self->{state}->fatal("Can't run #1: #2", OpenBSD::Paths->signify, $!); |