summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2016-09-06 10:41:52 +0000
committerMarc Espie <espie@cvs.openbsd.org>2016-09-06 10:41:52 +0000
commit7cefce90640e01a20742167d6b1737e0ac658ee0 (patch)
tree6207838532a25480bb2bb0ce2b858956b34c2faa /usr.sbin/pkg_add/OpenBSD
parentc36cbf0aa08066b5f4310cfa03c7991852645fcc (diff)
remove code that allows pkg_create to sign
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgCreate.pm4
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgSign.pm11
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Signer.pm16
3 files changed, 12 insertions, 19 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm
index 32e95eb2433..4c2002e7671 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.121 2016/06/21 10:40:37 espie Exp $
+# $OpenBSD: PkgCreate.pm,v 1.122 2016/09/06 10:41:51 espie Exp $
#
# Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
#
@@ -104,7 +104,7 @@ sub handle_options
$state->SUPER::handle_options('p:f:d:M:U:A:B:P:W:qQ',
'[-nQqvx] [-A arches] [-B pkg-destdir] [-D name[=value]]',
'[-L localbase] [-M displayfile] [-P pkg-dependency]',
- '[-s signing-parameter] [-U undisplayfile] [-W wantedlib]',
+ '[-U undisplayfile] [-W wantedlib]',
'[-d desc -D COMMENT=value -f packinglist -p prefix]',
'pkg-name');
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgSign.pm b/usr.sbin/pkg_add/OpenBSD/PkgSign.pm
index e2d8f4ebe66..99cb4b5ac39 100644
--- a/usr.sbin/pkg_add/OpenBSD/PkgSign.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PkgSign.pm
@@ -1,6 +1,6 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: PkgSign.pm,v 1.8 2016/05/09 14:17:24 espie Exp $
+# $OpenBSD: PkgSign.pm,v 1.9 2016/09/06 10:41:51 espie Exp $
#
# Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
#
@@ -38,10 +38,17 @@ sub handle_options
sub {
$state->{source} = shift;
},
+ 's' =>
+ sub {
+ push(@{$state->{signature_params}}, shift);
+ },
};
- $state->SUPER::handle_options('Cij:o:S:',
+ $state->SUPER::handle_options('Cij:o:S:s:',
'[-Cv] [-D name[=value]] -s x509|signify [-s cert] -s priv',
'[-o dir] [-S source] [pkg-name...]');
+ if (defined $state->{signature_params}) {
+ $state->{signer} = OpenBSD::Signer->factory($state);
+ }
if (!defined $state->{signer}) {
$state->usage("Can't invoke command without valid signing parameters");
}
diff --git a/usr.sbin/pkg_add/OpenBSD/Signer.pm b/usr.sbin/pkg_add/OpenBSD/Signer.pm
index 9415bcadf5d..7806e71bdba 100644
--- a/usr.sbin/pkg_add/OpenBSD/Signer.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Signer.pm
@@ -1,6 +1,6 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: Signer.pm,v 1.6 2015/01/04 14:10:20 espie Exp $
+# $OpenBSD: Signer.pm,v 1.7 2016/09/06 10:41:51 espie Exp $
#
# Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
#
@@ -110,20 +110,6 @@ sub compute_signature
package OpenBSD::CreateSign::State;
our @ISA = qw(OpenBSD::AddCreateDelete::State);
-sub handle_options
-{
- my ($state, $opt_string, @usage) = @_;
- $state->{opt}{s} =
- sub {
- push(@{$state->{signature_params}}, shift);
- };
- $state->{no_exports} = 1;
- $state->SUPER::handle_options($opt_string.'s:', @usage);
- if (defined $state->{signature_params}) {
- $state->{signer} = OpenBSD::Signer->factory($state);
- }
-}
-
sub create_archive
{
my ($state, $filename, $dir) = @_;