Commit a43e701
authored
feat(nitro-verifier): add expiry-aware intermediate certificate caching (#240)
* feat(nitro-verifier): add expiry-aware intermediate certificate caching
Change trustedIntermediateCerts mapping from bytes32=>bool to
bytes32=>uint64, where the value is the certificate's notAfter timestamp
in seconds (0 = not cached). Cached certs are now automatically treated
as untrusted once block.timestamp exceeds their expiry, closing a
security gap where cached entries could outlive their X.509 validity.
Changes:
- INitroEnclaveVerifier.sol: Add certExpiries field to VerifierJournal
- NitroEnclaveVerifier.sol: uint64 mapping, expiry checks in
_verifyJournal, checkTrustedIntermediateCerts, _cacheNewCert,
revokeCert; constructor accepts parallel expiries array
- DeployRiscZeroStack.s.sol: Pass empty expiries array to constructor
- Tests: 6 new tests for expiry semantics, all existing tests updated
- Semver: 0.1.0 -> 0.2.0
CHAIN-3889
* refactor(nitro-verifier): remove redundant expiry == 0 checks since block.timestamp is always positive
* chore: regenerate semver-lock after expiry check simplification1 parent 4cca72b commit a43e701
File tree
7 files changed
+196
-23
lines changed- interfaces/multiproof/tee
- scripts/multiproof
- snapshots
- abi
- storageLayout
- src/multiproof/tee
- test/multiproof
7 files changed
+196
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
129 | 129 | | |
| 130 | + | |
130 | 131 | | |
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
| 138 | + | |
137 | 139 | | |
138 | 140 | | |
139 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
19 | 24 | | |
20 | 25 | | |
21 | 26 | | |
| |||
127 | 132 | | |
128 | 133 | | |
129 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
130 | 140 | | |
131 | 141 | | |
132 | 142 | | |
| |||
522 | 532 | | |
523 | 533 | | |
524 | 534 | | |
525 | | - | |
| 535 | + | |
526 | 536 | | |
527 | | - | |
| 537 | + | |
528 | 538 | | |
529 | 539 | | |
530 | 540 | | |
| |||
613 | 623 | | |
614 | 624 | | |
615 | 625 | | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
616 | 631 | | |
617 | 632 | | |
618 | 633 | | |
| |||
1000 | 1015 | | |
1001 | 1016 | | |
1002 | 1017 | | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
1003 | 1034 | | |
1004 | 1035 | | |
1005 | 1036 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
240 | | - | |
| 239 | + | |
| 240 | + | |
241 | 241 | | |
242 | 242 | | |
243 | | - | |
| 243 | + | |
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
| 55 | + | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
146 | 149 | | |
147 | 150 | | |
148 | 151 | | |
149 | 152 | | |
150 | 153 | | |
| 154 | + | |
151 | 155 | | |
152 | 156 | | |
153 | 157 | | |
| |||
158 | 162 | | |
159 | 163 | | |
160 | 164 | | |
| 165 | + | |
161 | 166 | | |
162 | 167 | | |
163 | 168 | | |
164 | 169 | | |
165 | 170 | | |
166 | 171 | | |
167 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
168 | 176 | | |
169 | 177 | | |
170 | | - | |
| 178 | + | |
171 | 179 | | |
172 | 180 | | |
173 | 181 | | |
| |||
239 | 247 | | |
240 | 248 | | |
241 | 249 | | |
242 | | - | |
| 250 | + | |
| 251 | + | |
243 | 252 | | |
244 | 253 | | |
245 | 254 | | |
| |||
319 | 328 | | |
320 | 329 | | |
321 | 330 | | |
322 | | - | |
| 331 | + | |
323 | 332 | | |
324 | 333 | | |
325 | 334 | | |
| |||
536 | 545 | | |
537 | 546 | | |
538 | 547 | | |
539 | | - | |
| 548 | + | |
540 | 549 | | |
541 | 550 | | |
542 | 551 | | |
| |||
574 | 583 | | |
575 | 584 | | |
576 | 585 | | |
577 | | - | |
| 586 | + | |
| 587 | + | |
578 | 588 | | |
579 | 589 | | |
580 | 590 | | |
| |||
652 | 662 | | |
653 | 663 | | |
654 | 664 | | |
655 | | - | |
| 665 | + | |
656 | 666 | | |
657 | | - | |
| 667 | + | |
658 | 668 | | |
659 | 669 | | |
0 commit comments