summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2011-05-21 08:33:42 +0000
committerMarc Espie <espie@cvs.openbsd.org>2011-05-21 08:33:42 +0000
commit4d20d296262325dd9e51c4dfb732e0f0542f16d6 (patch)
tree73ca42dac42247067b13e8172d7765b7a2825d8f /usr.sbin/pkg_add
parent5dae76dbd9ac3393f45296e4e0d705c353583de9 (diff)
add legacy support for old sha256 checksums in distinfos.
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/md5.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/md5.pm b/usr.sbin/pkg_add/OpenBSD/md5.pm
index fdfca08f012..10551cb6297 100644
--- a/usr.sbin/pkg_add/OpenBSD/md5.pm
+++ b/usr.sbin/pkg_add/OpenBSD/md5.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: md5.pm,v 1.13 2010/12/24 09:04:14 espie Exp $
+# $OpenBSD: md5.pm,v 1.14 2011/05/21 08:33:41 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -131,7 +131,9 @@ sub stringize
sub unstringize
{
my ($class, $arg) = @_;
-
+ if ($arg =~ /^[0-9a-f]{64}$/i) {
+ return pack('H*', $arg);
+ }
return decode_base64($arg);
}