Skip to content

Conversation

@KatsuhiroWatanabe
Copy link
Contributor

@KatsuhiroWatanabe KatsuhiroWatanabe commented Jan 30, 2026

Summary

This PR adds SHA256 support for validating downloaded ESD files in OSD.
When a catalog entry does not provide a SHA1 hash, the script now falls back to SHA256 verification to prevent corrupted images from being used.

Details of Changes

  • Public/OSDCloud.ps1

    • Add SHA256 fallback logic when the catalog does not include a SHA1 value.
    • Compare the downloaded ESD’s SHA256 with the catalog value.
    • Halt execution on mismatch to ensure image integrity.
  • Catalog updates (add Sha256 fields)

    • cache/archive-cloudoperatingsystems/CloudOperatingSystems.json
    • cache/archive-cloudoperatingsystems/CloudOperatingSystems.xml
    • cache/archive-cloudoperatingsystems/CloudOperatingSystemsARM64.json
    • cache/archive-cloudoperatingsystems/CloudOperatingSystemsARM64.xml
    • Source of truth: SHA256 values are based on the Windows 11 build 26200.7462 ESD information from cache/os-catalogs/build-operatingusystem.xml.

Motivation

Starting with Windows 11 25H2, Microsoft provides SHA256 (not SHA1) for ESD integrity.
Classic OSD, however, only validated SHA1 and its catalogs did not expose a Sha256 field.

As discussed in OSDeploy/OSD#317, I needed a working implementation on my side.
This PR adds a SHA256 fallback in OSDCloud.ps1 and introduces Sha256 fields to the catalogs so ESDs can be verified reliably when SHA1 is unavailable.

The SHA256 values were populated from cache/os-catalogs/build-operatingusystem.xml for build 26200.7462.

Compatibility

This change is backward‑compatible:

  • SHA1 validation remains unchanged.
  • SHA256 is used only when the catalog does not provide SHA1.
  • Existing catalogs without a Sha256 field continue to work normally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant