You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: default readonly trust to mozilla and fix export csr subjects (#195)
* fix: default readonly trust to mozilla and fix export csr subjects
Use explicit Mozilla-first trust-store selection for scan, verify, inspect, and connect, stop exporting unmatched bundle directories, preserve CSR common names in PEM and JSON exports, and include the dependency updates from the repository pre-commit hooks.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: address exporter review feedback
Refactor exporter fallback to use an input struct, assign bundle names per certificate record so same-SKI renewals do not override configured bundles, and align changelog text with the selected trust-store behavior.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: export exact matched cert for reused ski
Carry the selected cert record through bundle export so same-SKI renewals do not substitute a newer certificate from a different bundle. This keeps exact-bundle export aligned with expiry filtering and prevents expired bundles like dnsstg from borrowing a valid zimperium leaf.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: fail fast on invalid readonly trust stores
* fix: address remaining PR review comments
* fix: address remaining PR review feedback
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,21 +22,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
22
22
### Changed
23
23
24
24
-**Breaking:** Default `TrustStore` in `DefaultOptions()` changed from `"system"` to `"mozilla"` — pure-Go Mozilla root verification is used by default instead of macOS `SecTrustEvaluateWithError` syscalls, eliminating multi-minute hangs on large certificate stores
25
-
- Parallelize trust verification in scan summary, dump-certs, and AIA resolution — mozilla checks run concurrently, system checks only run for certs mozilla didn't trust
25
+
- Default `scan`, `verify`, `inspect`, and `connect` trust-store selection to Mozilla, and require an explicit `--trust-store system` when command trust reporting should come from host trust roots
26
+
- Parallelize trust verification in scan summary, dump-certs, and AIA resolution for the selected trust store
26
27
- Add `TrustStore` label to `VerifyChainTrustInput` and debug-log every trust verification call with subject, store, and result
27
28
- Normalize all exported private key PEM output (`.key`, K8s `tls.key`, YAML `key`) to PKCS#8 (`PRIVATE KEY`) regardless of input format ([#167])
28
29
- Bundle export warns when Kubernetes TLS secret contains an unencrypted private key alongside encrypted outputs ([#167])
29
30
- Use browser Web Crypto API for PBKDF2 key derivation in WASM builds to avoid blocking the main thread during encrypted key export ([#167])
30
-
-`verify` now checks both Mozilla and system trust stores by default and treats a certificate as trusted when any available anchor source succeeds ([`0ee41ad`])
31
+
-`verify` now uses the selected built-in trust store plus any `--roots` file-backed anchors, and treats a certificate as trusted when any requested anchor source succeeds
31
32
-`scan` now counts `untrusted_*` certificates as trusted by neither Mozilla nor system, and exposes per-store trust counts in JSON output ([`0ee41ad`])
32
33
- Surface trust-source load warnings in `inspect`, `verify`, and `connect`, fail fast on invalid `verify` trust-store configuration, and stop reporting a synthetic `file` source when no file-backed roots were requested ([#171])
33
34
34
-
### Removed
35
-
36
-
-**Breaking:** Remove `verify --trust-store`; use the default Mozilla+system verification or `--roots` to add a file-backed trust source ([`0ee41ad`])
37
-
38
35
### Fixed
39
36
37
+
- Make `scan` summaries rely on the selected trust store while still retrying bundle exports against host trust roots after Mozilla unknown-authority failures
38
+
- Stop assigning fallback bundle names to certificates that do not match any configured bundle entry, so stray export directories like `bundles/spf-console.zimperium.com/` are no longer generated
39
+
- Preserve the certificate common name in generated bundle CSRs so exported requests include a subject CN alongside SANs
40
+
- Include `subject.common_name` in generated CSR JSON output so `.csr.json` matches the exported CSR subject
41
+
- Stop bundle export from retrying the system trust fallback for non-trust-store verification failures such as expired certificates
40
42
- Make `connect` fail when the peer omits part of the trust path and validation only succeeds after local chain completion, instead of accepting the incomplete server-presented chain ([#190])
41
43
- Use bundle folder name as Kubernetes secret `metadata.name` instead of the CN-derived prefix, so the secret name matches the export directory ([#178])
42
44
- Validate `bundleName` in bundle config YAML against DNS-1123 rules at load time; invalid names now produce a fatal error with the file path and line number ([#178])
|`--trust-store`|`mozilla`| Trust store: system, mozilla |
166
168
<!-- /certkit:flags -->
167
169
168
-
Chain verification is always performed against both the embedded Mozilla roots and the host system trust store. Use `--roots` to add a file-backed trust source for private PKI, including pinned or legacy trust anchors loaded from PEM, DER, PKCS#7, PKCS#12, or JKS. When the input contains an embedded private key (PKCS#12, JKS), key match is checked automatically. Use `--ocsp` and/or `--crl` to check revocation status (requires network access and a valid chain).
170
+
Chain verification uses the embedded Mozilla roots by default; use `--trust-store system` to switch to the host trust store. Use `--roots` to add a file-backed trust source for private PKI, including pinned or legacy trust anchors loaded from PEM, DER, PKCS#7, PKCS#12, or JKS. When the input contains an embedded private key (PKCS#12, JKS), key match is checked automatically. Use `--ocsp` and/or `--crl` to check revocation status (requires network access and a valid chain).
169
171
170
172
JSON output includes `trust_anchors` and `trust_warnings` for the leaf and displayed chain entries.
|`--trust-store`|`mozilla`| Trust store: system, mozilla |
186
189
<!-- /certkit:flags -->
187
190
188
191
Port defaults to 443 if not specified. OCSP revocation status is checked automatically (best-effort); use `--no-ocsp` to disable. Use `--verbose` for extended details (serial, key info, signature algorithm, key usage, EKU, extensions) plus a PEM-formatted copy of the server-sent certificate chain with `# Subject`, `# Issuer`, and validity headers.
@@ -267,6 +270,7 @@ Input format is auto-detected.
267
270
|`--load-db`|| Load an existing database into memory before scanning |
268
271
|`--max-file-size`|`10485760`| Skip files larger than this size in bytes (0 to disable) |
269
272
|`--save-db`|| Save the in-memory database to disk after scanning |
273
+
|`--trust-store`|`mozilla`| Trust store: system, mozilla |
0 commit comments