Skip to content

Fix mismatches with SignTool - #539

Open
mrexodia wants to merge 4 commits into
mtrojnar:masterfrom
mrexodia:feature/driver-signing-compat
Open

mrexodia wants to merge 4 commits into
mtrojnar:masterfrom
mrexodia:feature/driver-signing-compat

Conversation

@mrexodia

Copy link
Copy Markdown

Pull Request Type

  • Bug fix
  • New feature
  • Code style / formatting / renaming
  • Refactoring (no functional or API changes)
  • Build / CI related changes
  • Documentation
  • Other (please describe):

Related Issue

Issue number: N/A

Current Behavior

osslsigncode currently does not match signtool's output when signing a driver/CAB in various ways.

New Behavior

Match signtool's output exectly.

Scope of Changes

  • Do not emit signingTime and remove -time argument, signtool never emit this attribute
  • Encode empty file link when page hashes are disabled
  • Match CAB (<<Obsolete>> is never emitted by signtool and fix object id)
  • Use correct page hashing algorithm for sha3

Testing

  • Existing tests
  • New tests added
  • Manual testing

Additional Notes

Technically a breaking change, but the signingTime attribute is never emitted by signtool and discarded during verification (timestamp countersigning is used instead).

License Declaration

  • I hereby agree to license my contribution under the project's license.

Include an empty SpcSpOpusInfo when no description or URL is supplied.

Ignore -time and -st with a warning when signing. Accept both options
for setting the certificate verification time when verifying.
Encode an empty Unicode file link when page hashes are disabled.
Hash the four-byte little-endian cbCabinet value after reserving the
signature header. Store the hash in the serialized subject data.
Generate page hashes using the selected SHA-2 signing digest.

Determine the digest width during verification from the PE page count
and serialized table length. Also accept SHA-256 page hashes in
signatures using SHA-384 or SHA-512.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T23:13:50.219148Z 30cdda3 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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