diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2011-05-21 08:33:42 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2011-05-21 08:33:42 +0000 |
commit | 4d20d296262325dd9e51c4dfb732e0f0542f16d6 (patch) | |
tree | 73ca42dac42247067b13e8172d7765b7a2825d8f | |
parent | 5dae76dbd9ac3393f45296e4e0d705c353583de9 (diff) |
add legacy support for old sha256 checksums in distinfos.
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/md5.pm | 6 |
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); } |