diff options
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackingElement.pm | 8 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/md5.pm | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm index e9127b10073..a275c3d5d71 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.63 2004/11/11 11:23:04 espie Exp $ +# $OpenBSD: PackingElement.pm,v 1.64 2004/11/12 19:42:01 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -252,7 +252,7 @@ sub write print $fh "\@comment no checksum\n" if defined $self->{nochecksum}; $self->SUPER::write($fh); if (defined $self->{md5}) { - print $fh "\@md5 ", $self->{md5}, "\n"; + print $fh "\@md5 ", unpack('H*', $self->{md5}), "\n"; } if (defined $self->{size}) { print $fh "\@size ", $self->{size}, "\n"; @@ -489,7 +489,7 @@ sub add if ($args[0] =~ m/^\$OpenBSD(.*)\$\s*$/) { return OpenBSD::PackingElement::CVSTag->add($plist, @args); } elsif ($args[0] =~ m/^MD5:\s*/) { - $plist->{state}->{lastfile}->add_md5($'); + $plist->{state}->{lastfile}->add_md5(pack('H*', $')); return undef; } elsif ($args[0] =~ m/^subdir\=(.*?)\s+cdrom\=(.*?)\s+ftp\=(.*?)\s*$/) { return OpenBSD::PackingElement::ExtraInfo->add($plist, $1, $2, $3); @@ -517,7 +517,7 @@ sub add { my ($class, $plist, @args) = @_; - $plist->{state}->{lastfile}->add_md5($'); + $plist->{state}->{lastfile}->add_md5(pack('H*', $')); return undef; } diff --git a/usr.sbin/pkg_add/OpenBSD/md5.pm b/usr.sbin/pkg_add/OpenBSD/md5.pm index 2fe0abd827c..499594c47b5 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.3 2004/08/06 07:51:17 espie Exp $ +# $OpenBSD: md5.pm,v 1.4 2004/11/12 19:42:01 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -29,6 +29,6 @@ sub fromfile $md5->addfile($file); close($file) or die "problem closing $fname: $!"; - return $md5->hexdigest(); + return $md5->digest(); } 1; |