Skip to content

Move Easy-RSA command logic into PKI - #28

Merged
kemsta merged 20 commits into
masterfrom
feat/move-cli-logic-to-pki
Aug 20, 2026
Merged

kemsta merged 20 commits into
masterfrom
feat/move-cli-logic-to-pki

Conversation

@kemsta

@kemsta kemsta commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • make public *pki.PKI methods the implementation surface for all 34 verified Easy-RSA commands
  • replace the five-component constructor boundary with one transactional storage.Backend
  • implement writable filesystem/memory backends and read-only legacy behavior, including durable crash recovery, lifecycle/current-state snapshots, confinement, locking, and rollback
  • move initialization, lifecycle archives, CRL/DH/PKCS artifact persistence, typed CSR inspection, path-first EKU, DN parsing, and random generation into the root library
  • reduce cmd/go-easyrsa to argv/environment parsing, typed option construction, formatting, and exit status

Intentional API changes

  • pki.New now accepts a single storage.Backend
  • export methods use typed option structs and persist standard artifacts
  • command-equivalent revoke methods no longer generate a CRL implicitly; GenCRL remains explicit, matching Easy-RSA
  • Expire performs filesystem lifecycle movement; ExpireCert remains the index-only extension

The command matrix remains 34 verified / 10 deferred. This PR adds no new commands.

Verification

  • ordinary tests and go vet for all four Go modules on Go 1.25.13 and 1.26.6
  • root and CLI Easy-RSA v3.2.6 E2E suites
  • root storage/PKI and CLI race suites
  • golangci-lint v2.12.2 for root and CLI
  • govulncheck v1.7.0 for all four modules
  • actionlint
  • Linux, Windows, and AIX compilation checks
  • tidy, module verification, and no-replace checks
  • external go install at the final branch commit plus lifecycle smoke test

No tags or releases are included.

@kemsta
kemsta merged commit 43cb5e1 into master Aug 20, 2026
24 checks passed
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