Bug 1266693 - 3.3.1 Verifying checksums on Windows systems not correct
3.3.1 Verifying checksums on Windows systems not correct
Status: CLOSED DUPLICATE of bug 1175759
Product: Fedora Documentation
Classification: Fedora
Component: install-guide (Show other bugs)
devel
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Petr Bokoc
Fedora Docs QA
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-26 11:40 EDT by fran_hermida
Modified: 2016-02-02 09:31 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-02-02 09:31:00 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description fran_hermida 2015-09-26 11:40:43 EDT
Description of problem:
Powershell command for getting expected checksum not correct:

$expected_checksum = ((Get-Content $checksum_file | Select-String -Pattern $image) -split " ")[0].ToLower()

Should be:

$expected_checksum = ((Get-Content $checksum_file | Select-String -Pattern $image) -split " ")[3].ToLower()

since checksum file content is:

SHA256 (Fedora-Live-Workstation-x86_64-22-3.iso) = 615abfc89709a46a078dd1d39638019aa66f62b0ff8325334f1af100551bb6cf
Comment 1 Toby Ovod-Everett 2015-11-08 23:32:42 EST
In addition, the code in the documentation does not work on files larger than 2 GB (plus it reads the entire file into memory).  http://stackoverflow.com/questions/10521061/how-to-get-an-md5-checksum-in-powershell#comment22577307_10521162 (it should be davor's comment) suggests another approach that will stream the data through the checksum.

Substituting that logic into the approach in the documentation, one gets:

$download_checksum = [System.BitConverter]::ToString($sha256.ComputeHash([System.IO.File]::Open("$PWD\$image", [System.IO.Filemode]::Open, [System.IO.FileAccess]::Read))) -replace '-', ''

Also, if anyone does update the documentation, they might as well update the filenames to 23!
Comment 2 Pete Travis 2016-02-02 09:31:00 EST

*** This bug has been marked as a duplicate of bug 1175759 ***

Note You need to log in before you can comment on or make changes to this bug.