From: espie Date: Thu, 9 Jan 2014 13:40:05 +0000 (+0000) Subject: -C was useless with signify, report @signer identity instead (prepend X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=25a0b59e0c837cac75e36f1a5ec47e1e60d4de68;p=openbsd -C was useless with signify, report @signer identity instead (prepend "reportedly" to make tedu happy :) ) --- 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 # @@ -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"); }