Leaf keys: honour BitSize, offer ECDSA, 30-day validity #29

Merged
mikluko merged 2 commits from fix/leaf-keys into main 2026-10-26 20:56:04 +00:00
Owner

Closes #5.

Leaves were RSA 1024, ignoring BitSize, valid for ten years, and all carried serial 1. Now BitSize is honoured and defaults to 2048. KeyAlgorithm offers ECDSA P-256. Validity defaults to 30 days, and the MITM cache issues a certificate again once it expires. Serials are random.

The command gains -leaf-key and -leaf-validity. To test them, flag parsing and handler assembly move out of init and main into functions the new end-to-end tests drive. The command goes from 0% to 78% coverage.

Closes #5. Leaves were RSA 1024, ignoring `BitSize`, valid for ten years, and all carried serial 1. Now `BitSize` is honoured and defaults to 2048. `KeyAlgorithm` offers ECDSA P-256. `Validity` defaults to 30 days, and the MITM cache issues a certificate again once it expires. Serials are random. The command gains `-leaf-key` and `-leaf-validity`. To test them, flag parsing and handler assembly move out of `init` and `main` into functions the new end-to-end tests drive. The command goes from 0% to 78% coverage.
Leaves were RSA 1024 valid for ten years, which Apple verifiers reject. Leaves
also all carried serial 1. The MITM cache issues an expired certificate again.

Closes #5
Testable command, with -leaf-key and -leaf-validity
All checks were successful
CI / changelog (pull_request) Successful in 6s
CI / test (pull_request) Successful in 37s
e8ca6e3fea
Flag parsing and handler assembly move out of init and main into parseFlags
and newHandler, which the new tests drive end to end.
mikluko deleted branch fix/leaf-keys 2026-10-26 20:56:05 +00:00
Sign in to join this conversation.
No description provided.