summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2014-01-09 13:40:06 +0000
committerMarc Espie <espie@cvs.openbsd.org>2014-01-09 13:40:06 +0000
commit989a89cefe0e2eec8431f704b8b430a1b9cbb475 (patch)
tree8e88d23bf5c7407beddc95ad3306bbb9fea06ecb
parent5e1555640cc6ad40a855a167ba6205af8af8ea6a (diff)
-C was useless with signify, report @signer identity instead (prepend
"reportedly" to make tedu happy :) )
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgInfo.pm15
1 files changed, 10 insertions, 5 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgInfo.pm b/usr.sbin/pkg_add/OpenBSD/PkgInfo.pm
index 89697fe31fc..642c296e1f5 100644
--- a/usr.sbin/pkg_add/OpenBSD/PkgInfo.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PkgInfo.pm
@@ -1,6 +1,6 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: PkgInfo.pm,v 1.28 2014/01/07 13:52:43 espie Exp $
+# $OpenBSD: PkgInfo.pm,v 1.29 2014/01/09 13:40:05 espie Exp $
#
# Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org>
#
@@ -424,10 +424,15 @@ sub print_info
if ($state->opt('C')) {
$state->header($handle);
if ($plist->is_signed) {
-
- require OpenBSD::x509;
- $state->banner("Certificate info:");
- OpenBSD::x509::print_certificate_info($plist);
+ my $sig = $plist->get('digital-signature');
+ if ($sig->{key} eq 'x509') {
+ require OpenBSD::x509;
+ $state->banner("Certificate info:");
+ OpenBSD::x509::print_certificate_info($plist);
+ } elsif ($sig->{key} eq 'signify') {
+ $state->say("reportedly signed by #1",
+ $plist->get('signer')->name);
+ }
} else {
$state->banner("No digital signature");
}