Bug 205598 - [patch] sbin/md5.c param -c, convert to lowercase so E975548260B65C79AF... matches calculated e975548260b65c79af...
Summary: [patch] sbin/md5.c param -c, convert to lowercase so E975548260B65C79AF... ma...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.2-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: Eitan Adler
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-12-25 13:42 UTC by Olli Hauer
Modified: 2018-06-09 03:02 UTC (History)
0 users

See Also:
ohauer: mfc-stable10?
ohauer: mfc-stable9?


Attachments
sbin/md5.c patch (1.60 KB, patch)
2015-12-25 13:42 UTC, Olli Hauer
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olli Hauer freebsd_committer freebsd_triage 2015-12-25 13:42:58 UTC
Created attachment 164621 [details]
sbin/md5.c patch

This week I was running into a stupid compare issue 

Transferring a bigger image from a vendor who publish also the check sums but stupidly in UPPERCASE (seems to be a default on some sites)

After feeding the checksum to 'sha256 -c E975548260B65C79AF... $download_file' and getting a failed back I wiped the file from disk and noticed <arrg> checksum was correct but in UPPERCASE ...

The attached patch will convert an UPPERCASE checksum before comparing into lowercase (will help every FreeBSD user downloading files from HP)
Comment 1 commit-hook freebsd_committer freebsd_triage 2018-05-23 11:45:54 UTC
A commit references this bug:

Author: eadler
Date: Wed May 23 11:45:47 UTC 2018
New revision: 334091
URL: https://svnweb.freebsd.org/changeset/base/334091

Log:
  md5: perform compare case-insenstive

  md5 generates a md5 hash lowercase, but it might be provided in
  uppercase. Allow this.

  PR:		205598
  Reported by:	ohauer
  MFC After:	2 weeks

Changes:
  head/sbin/md5/md5.c
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2018-05-23 11:46:04 UTC
Thanks! Fixed.
Comment 3 commit-hook freebsd_committer freebsd_triage 2018-06-09 03:02:42 UTC
A commit references this bug:

Author: eadler
Date: Sat Jun  9 03:01:39 UTC 2018
New revision: 334870
URL: https://svnweb.freebsd.org/changeset/base/334870

Log:
  MFC r334091:

  md5: perform compare case-insenstive

  md5 generates a md5 hash lowercase, but it might be provided in
  uppercase. Allow this.

  PR:           205598
  Reported by:  ohauer
  MFC After:    2 weeks

Changes:
_U  stable/11/
  stable/11/sbin/md5/md5.c