Signs Windows programs on a home PC with the at-terminal certificate every release carries, and installs that certificate non-exportable in the user's store (from at-home-tools, AHT-258)
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nelson b75b07a5dc
All checks were successful
Suite release / finalize (push) Has been skipped
Suite release / deliver (push) Has been skipped
Suite release / check-package (push) Has been skipped
Suite release / reused-checks (push) Has been skipped
Suite release / deliver-prune (push) Has been skipped
Suite release / build (none, ubuntu-latest) (ubuntu-latest, none) (push) Has been skipped
Suite release / publish (push) Has been skipped
Suite release / reserve (push) Has been skipped
Suite release / deploy-image (push) Has been skipped
Suite release / check-manifest (push) Has been skipped
Suite release / check-build (none, ubuntu-latest) (ubuntu-latest, none) (push) Has been skipped
Suite release / scope (push) Successful in 53s
Suite release / module (push) Has been skipped
Clear the shared CI's lint findings (PIPT-85) (#3)
2026-11-30 14:50:09 -08:00
authenticode_windows.go authenticode moves in from at-home-tools, unchanged (#1) 2026-11-29 22:36:52 -08:00
authenticode_windows_test.go authenticode moves in from at-home-tools, unchanged (#1) 2026-11-29 22:36:52 -08:00
go.mod The module is forgejo.romaine.life/romaine-life/authenticode (#2) 2026-11-29 22:43:27 -08:00
go.sum authenticode moves in from at-home-tools, unchanged (#1) 2026-11-29 22:36:52 -08:00
README.md Clear the shared CI's lint findings (PIPT-85) (#3) 2026-11-30 14:50:09 -08:00

authenticode

Signs Windows programs on a home PC with the at-terminal certificate, the one every release carries, so a local build is signed as a release is (AHT-229). Like the release suite's signing (pipeline-templates' suites/release/sign-windows.ps1), the signature is SHA-256 with no timestamp.

  • Install(pfx, password, thumbprint): puts the certificate in the user's own store (CurrentUser\My) with its private key marked non-exportable. home-sync does this on every home PC.
  • Installed(thumbprint) and Remove(thumbprint): whether it is there, and taking it out.
  • Sign(file): signs an exe or dll with it. sign-build runs this on a local build.
  • Thumbprint(der): a certificate's SHA-1 thumbprint, as Windows shows it.

Windows only. It was at-home-tools' internal/authenticode until shared packages got repositories of their own (AGT-85, AHT-258).

Using it

require forgejo.romaine.life/romaine-life/authenticode v0.1.1
import "forgejo.romaine.life/romaine-life/authenticode"

if ok, err := authenticode.Installed(thumb); err == nil && !ok {
    err = authenticode.Install(pfx, password, thumb)
}

Testing

go test ./... on Windows. The install-and-sign test makes a throwaway certificate, installs it in the user's store the way home-sync installs the at-terminal one, signs a program with it and removes the certificate and its key after. It skips in CI, whose runner can't hold a user key, and in an elevated process.

Shipping

A library: the release-module topic in pipeline-templates' fleet.json tags each merge that changes the code, and every fleet repository whose go.mod requires it gets a take-up. Forgejo pushes it to its public GitHub copy, which proxy.golang.org serves to builds outside CI.