Skip to content

docs: Name the timestamp protocol Set-AuthenticodeSignature actually uses - #198

Merged
tablackburn merged 1 commit into
mainfrom
bugfix/196-timestamp-protocol
Aug 28, 2026
Merged

docs: Name the timestamp protocol Set-AuthenticodeSignature actually uses#198
tablackburn merged 1 commit into
mainfrom
bugfix/196-timestamp-protocol

Conversation

@tablackburn

Copy link
Copy Markdown
Contributor

Closes #196

The review of #190 flagged, with low confidence, that $PSBPreference.Sign.TimestampServer might 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.

signature status : UnknownError
timestamper      : CN=DigiCert SHA256 RSA4096 Timestamp Responder 2025 1, O="DigiCert, Inc.", C=US
pkcs7 bytes      : 7186
contains RFC 3161 OID (1.3.6.1.4.1.311.3.3.1)               : False
contains legacy counterSignature OID (1.2.840.113549.1.9.6) : True

Identical on PowerShell 7 and Windows PowerShell 5.1. The certificate was removed from the store afterwards.

(UnknownError is only the untrusted self-signed root — timestamping plainly succeeded, and DigiCert's responder certificate is embedded in the result.)

So Set-AuthenticodeSignature -TimestampServer uses the legacy Authenticode timestamp protocol, embedding a PKCS#9 counter-signature. It is signtool /t, not /tr.

Why it was invisible

timestamp.digicert.com answers 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.ps1 now 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; Analyze clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01U1Jhu7fgTRJq7LK5MuKteE

…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
Copilot AI lite review requested due to automatic review settings August 28, 2026 02:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown

Test Results

    4 files  ±0    785 suites  ±0   2m 37s ⏱️ +23s
  508 tests ±0    505 ✅ ±0   3 💤 ±0  0 ❌ ±0 
2 015 runs  ±0  1 921 ✅ ±0  94 💤 ±0  0 ❌ ±0 

Results for commit e577906. ± Comparison against base commit ff45f77.

@tablackburn
tablackburn merged commit 22e2337 into main Aug 28, 2026
9 checks passed
@tablackburn
tablackburn deleted the bugfix/196-timestamp-protocol branch August 28, 2026 03:00
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.

Verify whether Sign.TimestampServer is documented as the right protocol

2 participants