Expand description
Dev CA generation, loading, and re-signing.
Ported from internal/pki/ca.go. Uses rcgen to build certificates and
x509-parser to read them back (see PORT_NOTES.md for why this pair
was chosen). See PORT_NOTES.md for other adaptations from the Go
original.
Structs§
- Ca
- Ported from
pki.CA. - Cert
Info - A minimal stand-in for the fields of
*x509.Certificatethese tests inspect. Not a real X.509 parser or encoder — that’s Phase 4 work. - KeyInfo
- A minimal stand-in for the fields of
*ecdsa.PrivateKeythese tests inspect, plus the PKCS#8 DER of the private key soself_signcan actually sign with it.
Enums§
- EcCurve
- The elliptic curve of the CA key. Only P-256 is ever generated; this
narrows to that curve so
TestLoadOrGenerate_Generate’selliptic.P256()comparison has a Rust equivalent. - PkiError
- Errors ported from the sentinel
errors.Newvalues andfmt.Errorfwraps inca.go.
Constants§
- COMMON_
NAME - The subject common name of every profile’s dev CA.
- KEY_
USAGE_ CERT_ SIGN - KEY_
USAGE_ CRL_ SIGN - KEY_
USAGE_ DIGITAL_ SIGNATURE
Functions§
- cert_
path - Ported from
CertPath. - constraints_
equal - Ported from
ConstraintsEqual. - ensure_
current - Ported from
EnsureCurrent. - load_
or_ generate - Ported from
LoadOrGenerate.