Bug 1299138 - Instructions for verifying ISO on windows don't work
Summary: Instructions for verifying ISO on windows don't work
Keywords:
Status: CLOSED DUPLICATE of bug 1175759
Alias: None
Product: Fedora Documentation
Classification: Fedora
Component: install-guide
Version: devel
Hardware: Unspecified
OS: Windows
unspecified
high
Target Milestone: ---
Assignee: Pete Travis
QA Contact: Fedora Docs QA
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-16 13:46 UTC by tlhackque
Modified: 2016-02-02 14:30 UTC (History)
3 users (show)

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


Attachments (Terms of Use)

Description tlhackque 2016-01-16 13:46:51 UTC
Description of problem:
https://docs.fedoraproject.org/en-US/Fedora/23/html/Installation_Guide/sect-verifying-images.html Section 3.3.1 gives a PowerShell procedure for verifying the signature of a download on windows.

I downloaded Fedora-Server-DVD-x86_64-23 and tried the procedure.  It fails due to the size of the file.

Another method needs to be used.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Create this script (copied and pasted from the cited webpage, except for the Parameter block):

Param(
[Parameter(Mandatory=$True,Position=1)]
[String]$image,
[Parameter(Mandatory=$True,Position=2)]
[String]$checksum_file
)

$sha256 = New-Object -TypeName System.Security.Cryptography.sha256CryptoServiceProvider
$expected_checksum = ((Get-Content $checksum_file | Select-String -Pattern $image) -split " ")[0].ToLower()
$download_checksum = [System.BitConverter]::ToString($sha256.ComputeHash([System.IO.File]::ReadAllBytes("$PWD\$image"))).ToLower() -replace '-', ''
echo "Download Checksum: $download_checksum"
echo "Expected Checksum: $expected_checksum"
if ( $download_checksum -eq "$expected_checksum" ) {
echo "Checksum test passed!"
} else {
echo "Checksum test failed."
}

2. If necessary, execute: Set-ExecutionPolicy RemoteSigned


3. ..\Documents\Scripts\SHA1-Check.ps1 Fedora-Server-DVD-x86_64-23.iso Fedora-Server-23-x86_64-CHECKSUM

Actual results:

Exception calling "ReadAllBytes" with "1" argument(s): "The file is too long. This operation is currently limited to supporting 
files less than 2 gigabytes in size."
At C:\Users\timothe\Documents\Scripts\SHA1-Check.ps1:10 char:1
+ $download_checksum = [System.BitConverter]::ToString($sha256.ComputeH ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : IOException


Expected results:

The checksum is computed.

Additional info:
Also note that the script as written will fail if a path is given, as '.' and '\' are used in the pattern - which takes a REGEX, where they are special.

Note that Fedora 18 (https://docs.fedoraproject.org/en-US/Fedora/18/html/Burning_ISO_images_to_disc/sect-Burning_ISO_images_to_disc-Validating_the_Files-Validating_at_the_Windows_Command_Prompt.html)suggested an executable from http://www.labtestproject.com/files/win/sha256sum/sha256sum.exe that can handle the large file.

While the idea of a powershell script to avoid downloading an unknown executable is clever, it doesn't work.

Perhaps a signed windows executable can be provided.

Also, the procedure should indicate how to verify the PGP signature on the CHECKSUM file...

Comment 1 Pete Travis 2016-02-02 14:30:32 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.