summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2008-10-24 16:50:28 +0000
committerMarc Espie <espie@cvs.openbsd.org>2008-10-24 16:50:28 +0000
commit4d4b42276fd25bb4bb1b24a896a1d806d10f10e2 (patch)
treecd0a29aea496df30a820391cbebc677616e94db5 /usr.sbin/pkg_add/OpenBSD/PackingElement.pm
parentbf4fbd9a9c359b0e45dbe70f13de1e2f4c18a573 (diff)
tweak compute_digest so that it `defaults' if invoked without a 2nd argument.
switch the default digest to sha256. It's been there for a few weeks, all package tools cope with both formats, now is the time for the switch.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/PackingElement.pm')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackingElement.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
index 8a6c007d6b7..e9b7ec20c8e 100644
--- a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: PackingElement.pm,v 1.150 2008/10/20 10:25:16 espie Exp $
+# $OpenBSD: PackingElement.pm,v 1.151 2008/10/24 16:50:27 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -254,6 +254,7 @@ sub compute_digest
{
my ($self, $filename, $class) = @_;
require OpenBSD::md5;
+ $class = 'OpenBSD::sha' if !defined $class;
return $class->new($filename);
}