Fix certificate chain install hang, elevation-aware stores, and idempotent gallery publish #20
Reference in New Issue
Block a user
Delete Branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to #19, covering the issues hit while testing profile-based issuance end to end.
Fixed:
-InstallChaincould hang foreverAdding a root certificate to
CurrentUser\Rootmakes Windows raise a modal trust confirmation dialog, andX509Store.Addblocks until it is answered. With the dialog hidden behind the console the cmdlet appeared to stop right after installing the intermediate, leaving a subordinate installed with no root above it — which Windows then reports as "The issuer of this certificate could not be found".The chain itself was never incomplete: the run reached a
Root-store write, and only a self-signed certificate routes there, so Infisical had returned the root all along. The dialog was the blocker.Certificate store selection now follows elevation
-StoreLocationis chosen from the process's elevation when not supplied, which also sidesteps the prompt entirely (writingLocalMachine\Rootalready required elevation, so Windows does not ask):LocalMachine\MyLocalMachine\CertificateAuthorityLocalMachine\RootCurrentUser\MyCurrentUser\CertificateAuthorityCurrentUser\RootApplies to
Request-InfisicalCertificateandInstall-InfisicalCertificate. The resolved value is reported on the verbose stream and an explicit-StoreLocationstill wins. A warning is emitted before any blockingCurrentUser\Rootwrite.Only the leaf honours
-StoreName(defaultMy). Chain members are routed by what they are — self-signed to the trusted-root store, anything with an issuer above it to the intermediate store — for a chain of any depth.Related correctness fixes
LocalMachineand-KeyStorageFlagswas not supplied, the private key is written to the machine key store. Otherwise the key lands in the calling user's profile while the certificate sits inLocalMachine\My, the usual cause of an installed certificate with no usable private key for a service.CurrentUser— otherwise every elevated run would reissue.-InstallChainand names the certificate whose issuer is missing rather than leaving it to be found incertmgr.-FriendlyNameoverrides it and moves from theByCaset to every set; the CA path still forwards it to Infisical as the issued certificate'sfriendlyName.Fixed: the gallery publish reported failure on a successful push
The publish job failed on #19 with a 409 for
2026.7.30.2309, but that version is live on the gallery (created 23:10:04) — the push landed and the client surfaced an error anyway, so the retry collided with its own upload.The step now checks the gallery before pushing, skips when the version is already there, and re-checks before failing on a publish error. This mirrors the release job, which already looks for an existing tag and skips.
Version comparison normalizes each segment the way NuGet does: the manifest carries
2026.07.30.2309while the gallery lists2026.7.30.2309, so comparing raw strings would never match and the guard would never fire. Verified against four published versions, and a live lookup confirms the guard would have exited 0 on the run that failed.Both workflow files are updated and still parse as YAML with the same three jobs;
.githubkeeps itsubuntu-latestrunners and standard artifact actions.These workflow changes take effect on this merge. Gitea evaluates workflows at the merge commit — run #16 executed
publish-psgallery.yml@5e5145f, a commit that introduced a workflow file absent frommainbeforehand — so the updated publish step is what runs when this PR lands.Tests
282 pass, up from 268. New coverage for the trust-prompt warning, store routing across a real root/intermediate/leaf chain, friendly-name application, partial-chain detection, and elevation-aware resolution. Full
build.ps1 -RunTestsgreen including module import, manifest, and help validation across 53 cmdlets.Verified live under Windows PowerShell 5.1 in an elevated session: auto-resolution reports
LocalMachine,-WhatIfconfirmsLocalMachine\My, and an explicit-StoreLocationproduces no auto-resolve message.Co-Authored-By: Claude Opus 5 noreply@anthropic.com
Generated with Claude Code