From 7fa3fb1822cf7a0c86ca6279a9b4706e696bf0b9 Mon Sep 17 00:00:00 2001
From: Marc G <91296549+Marc-Gee@users.noreply.github.com>
Date: Sun, 19 Mar 2023 00:50:46 -0700
Subject: [PATCH 1/5] Readme- Windows Verification steps
Improvements to Binary file verification on Windows Platform
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 2741969ed..996542f88 100644
--- a/README.md
+++ b/README.md
@@ -206,7 +206,7 @@ shasum -a 256 --ignore-missing --check seedsigner.0.6.*.sha256
```
CertUtil -hashfile seedsigner_os.0.6.0.Insert_Your_Pi_Models_binary_here_For_Example_pi02w.img SHA256
```
-On Windows, you must then manually compare the resulting file hash value to the corresponding hash value shown inside the .SHA256 cleartext file.
+
Wait up to 30 seconds for the command to complete, and it should display:
From 39dc50bd828ec8e1f9f4d48fc10e6a406381715a Mon Sep 17 00:00:00 2001
From: Marc G <91296549+Marc-Gee@users.noreply.github.com>
Date: Sun, 19 Mar 2023 01:03:47 -0700
Subject: [PATCH 2/5] Update README.md
---
README.md | 1 -
1 file changed, 1 deletion(-)
diff --git a/README.md b/README.md
index 996542f88..371290445 100644
--- a/README.md
+++ b/README.md
@@ -206,7 +206,6 @@ shasum -a 256 --ignore-missing --check seedsigner.0.6.*.sha256
```
CertUtil -hashfile seedsigner_os.0.6.0.Insert_Your_Pi_Models_binary_here_For_Example_pi02w.img SHA256
```
-
Wait up to 30 seconds for the command to complete, and it should display:
From 77ba400934af41136e5d2f889929a2fd9eba2171 Mon Sep 17 00:00:00 2001
From: Marc G <91296549+Marc-Gee@users.noreply.github.com>
Date: Sun, 19 Mar 2023 23:28:25 -0700
Subject: [PATCH 3/5] Update the Powershell script
Replacement powershell script to emulate SHASUM command but on windows!
---
README.md | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 371290445..6fda7dfd0 100644
--- a/README.md
+++ b/README.md
@@ -204,11 +204,24 @@ shasum -a 256 --ignore-missing --check seedsigner.0.6.*.sha256
**On Windows (inside Powershell):** Run this command
```
-CertUtil -hashfile seedsigner_os.0.6.0.Insert_Your_Pi_Models_binary_here_For_Example_pi02w.img SHA256
+# Read the content of the seedsigner.0.6.0.sha256 (manifest) file and loop through each line
+# to check if the computed hash matches the expected hash.
+Get-Content seedsigner.0.6.0.sha256 | ForEach-Object {
+
+ # Split the line by two spaces to extract the filename and the expected hash
+ $hash, $filename = $_ -Split ' '
+
+ # Check if the binary file exists,
+ if ((Test-Path $filename) -eq $True) {
+
+ # check if the computed hash matches the expected hash
+ write-host $filename (':WARNING:This computed hash/checksum did NOT match!', 'is OK.')[((Get-FileHash $filename).hash -eq $hash)]
+ }
+}
```
-Wait up to 30 seconds for the command to complete, and it should display:
+When the OSX/Linux/Windows command completes it should display:
```
seedsigner_os.0.6.x.[Your_Pi_Model_For_Example:pi02w].img: OK
```
From bf82ab77921fb9380ca111b23ebd34586fa68882 Mon Sep 17 00:00:00 2001
From: Marc G <91296549+Marc-Gee@users.noreply.github.com>
Date: Mon, 20 Mar 2023 15:06:27 -0700
Subject: [PATCH 4/5] Modify checksum fail message
The scripts [computed checksum failure] message is changed to match to the Linux SHASUM failure output.
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 6fda7dfd0..4f664a963 100644
--- a/README.md
+++ b/README.md
@@ -215,7 +215,7 @@ Get-Content seedsigner.0.6.0.sha256 | ForEach-Object {
if ((Test-Path $filename) -eq $True) {
# check if the computed hash matches the expected hash
- write-host $filename (':WARNING:This computed hash/checksum did NOT match!', 'is OK.')[((Get-FileHash $filename).hash -eq $hash)]
+ write-host $filename ('FAILED: Computed checksum did NOT match!', 'is OK.')[((Get-FileHash $filename).hash -eq $hash)]
}
}
```
From 58dfb3f4f927c2de1d42ee22a98c8bb0f4441eeb Mon Sep 17 00:00:00 2001
From: Marc G <91296549+Marc-Gee@users.noreply.github.com>
Date: Fri, 30 Jun 2023 20:41:03 +0100
Subject: [PATCH 5/5] Improve the formatting of the code comments by using
comment blocks.
---
README.md | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index 4f664a963..5a3c558a9 100644
--- a/README.md
+++ b/README.md
@@ -204,11 +204,13 @@ shasum -a 256 --ignore-missing --check seedsigner.0.6.*.sha256
**On Windows (inside Powershell):** Run this command
```
-# Read the content of the seedsigner.0.6.0.sha256 (manifest) file and loop through each line
-# to check if the computed hash matches the expected hash.
+<#
+Read the contents of the manifest file (seedsigner.0.6.0.sha256) and
+loop through each line to check
+if the computed hash matches the expected hash.#>
Get-Content seedsigner.0.6.0.sha256 | ForEach-Object {
- # Split the line by two spaces to extract the filename and the expected hash
+ # Split each line to extract the binary filename and its expected hash.
$hash, $filename = $_ -Split ' '
# Check if the binary file exists,
@@ -217,7 +219,7 @@ Get-Content seedsigner.0.6.0.sha256 | ForEach-Object {
# check if the computed hash matches the expected hash
write-host $filename ('FAILED: Computed checksum did NOT match!', 'is OK.')[((Get-FileHash $filename).hash -eq $hash)]
}
-}
+} <#Press Enter to begin the hash verification.#>
```