docs: Name the timestamp protocol Set-AuthenticodeSignature actually uses - #198
Merged
Conversation
…uses build.properties.ps1 called Sign.TimestampServer an RFC 3161 timestamp server, and the README row carried that wording. It is not. Signed a file with Set-AuthenticodeSignature -TimestampServer against the configured default and read the resulting PKCS#7 back out. The signature carries a PKCS#9 counter-signature (1.2.840.113549.1.9.6) and contains no RFC 3161 token attribute (1.3.6.1.4.1.311.3.3.1) at all. Identical result on PowerShell 7 and Windows PowerShell 5.1. That is signtool's /t, not /tr. Nothing is broken, which is why this could sit unnoticed: timestamp.digicert.com answers both protocols, so signatures verify either way. It matters when a consumer picks a different provider, because several publish separate endpoints for the two protocols and an RFC 3161 only endpoint will not answer this request. Someone reading "RFC 3161" would configure exactly the wrong one. The wording predates the signing documentation added in #190, which faithfully copied it. Raised by the independent review of that pull request as a low confidence flag, and worth the check for the same reason as #193: an inline comment in this settings block describing behavior the code does not have. Closes #196 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U1Jhu7fgTRJq7LK5MuKteE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #196
The review of #190 flagged, with low confidence, that
$PSBPreference.Sign.TimestampServermight be documented as the wrong protocol. It is. I settled it by experiment rather than by reading.The experiment
Created a throwaway self-signed code-signing certificate, signed a file with
Set-AuthenticodeSignature -TimestampServer http://timestamp.digicert.com, pulled the appended PKCS#7 back out of the file, and searched the DER for the two OIDs that distinguish the protocols.Identical on PowerShell 7 and Windows PowerShell 5.1. The certificate was removed from the store afterwards.
(
UnknownErroris only the untrusted self-signed root — timestamping plainly succeeded, and DigiCert's responder certificate is embedded in the result.)So
Set-AuthenticodeSignature -TimestampServeruses the legacy Authenticode timestamp protocol, embedding a PKCS#9 counter-signature. It issigntool /t, not/tr.Why it was invisible
timestamp.digicert.comanswers both protocols, so the signature timestamps correctly and verifies, and nothing observable is wrong today.It matters when a consumer chooses a different provider. Several publish separate endpoints for legacy Authenticode and RFC 3161, and an RFC 3161-only endpoint will not answer this request. A consumer reading "RFC 3161" in our documentation would configure exactly the endpoint that fails.
The change
build.properties.ps1now names the protocol correctly, cites both OIDs, and warns about the endpoint choice. The README row says "Legacy Authenticode protocol, not RFC 3161" — column alignment preserved at 61/45/174.The wording predates #190, which faithfully copied it from the source comment. This is the same failure mode as #193: an inline comment in this settings block describing behavior the code does not have.
Verification
Full suite 503 passed, 0 failed, 3 skipped;
Analyzeclean.🤖 Generated with Claude Code
https://claude.ai/code/session_01U1Jhu7fgTRJq7LK5MuKteE