Bug 1266693 - 3.3.1 Verifying checksums on Windows systems not correct
Summary: 3.3.1 Verifying checksums on Windows systems not correct
Keywords:
Status: CLOSED DUPLICATE of bug 1175759
Alias: None
Product: Fedora Documentation
Classification: Fedora
Component: install-guide
Version: devel
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Bokoc
QA Contact: Fedora Docs QA
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-26 15:40 UTC by fran_hermida
Modified: 2016-02-02 14:31 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-02 14:31:00 UTC
Embargoed:


Attachments (Terms of Use)

Description fran_hermida 2015-09-26 15:40:43 UTC
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-09 04:32:42 UTC
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 14:31:00 UTC

*** 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.