Commit e451137
committed
cli: pin the SCEP GetCACert response
- --ca-fingerprint takes [sha256:|sha1:|sha512:]HEX.
parse_ca_fingerprint decodes it into a CaPin, ignoring ':' and ' '
between hex digits, and refuses malformed hex, an unnamed digest, a
length that disagrees with the named digest, and a digest wolfSSL was
not built with. scep_pin_setup resolves it for the SCEP commands and,
when it is absent, notes that the served CA is trusted unverified.
check_proto_only_opts refuses the option under EST.
- pem_cert_at converts the idx-th PEM certificate of a GetCACert
response to DER, find_pinned_cert returns the one matching the pin,
and print_ca_fingerprints writes each certificate's SHA-256 to
stderr.
- scep_enroll carries the SCEP arm of cmd_enroll. With a pin the
matched certificate is the envelope recipient and the only CertRep
trust anchor and the bundle is not fetched; unpinned, the bundle
remains the trust set. cmd_getcacerts reports the fingerprints and
fails on a pin that matches nothing, and cmd_getnextca resolves the
current CA from the pinned certificate.
- cli_proto_scoping.sh covers the scoping and the argument rejections,
and starts wolfcert-server for a group that reads the fingerprint
from getcacerts, then runs enroll and getnextca with a mismatched and
a matching pin.
- README.md documents fetching and pinning the fingerprint;
docs/MIGRATING-FROM-WOLFSCEP.md names the flag beside the API.
Issue: F-80461 parent c124b6f commit e451137
4 files changed
Lines changed: 623 additions & 96 deletions
File tree
- cli
- docs
- tests/integration
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
| |||
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
123 | 152 | | |
124 | 153 | | |
125 | 154 | | |
| |||
0 commit comments