Commit 08e5ed2
committed
fix: address root cause of empty reference IDs instead of suppressing them
This commit addresses the feedback from @setrofim in PR #338 by fixing
the root cause where empty reference value IDs were being generated
rather than suppressing them in the consuming code.
Changes made:
- Fixed multiple scheme handlers (psa-iot, tpm-enacttrust, parsec-tpm,
arm-cca, parsec-cca) to return nil instead of []string{""} when
encountering errors
- Fixed handler/store_rpc.go to return nil instead of []string{""}
on RPC call failures
- Fixed vts/trustedservices/trustedservices_grpc.go to return nil
instead of []string{""} on trust anchor retrieval errors
- Removed the workaround that was skipping empty reference IDs in
GetAttestation method since the root cause is now fixed
The original URL-safe base64 nonce functionality from the PR is
preserved and all tests continue to pass.
Fixes: Issue identified by @setrofim - empty refvalID should never
occur and indicates a bug that should be fixed at the source.
Signed-off-by: Kallal Mukherjee <[email protected]>1 parent 876d5e7 commit 08e5ed2
File tree
7 files changed
+14
-20
lines changed- handler
- scheme
- arm-cca
- parsec-cca
- parsec-tpm
- psa-iot
- tpm-enacttrust
- vts/trustedservices
7 files changed
+14
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | | - | |
| 244 | + | |
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
| 250 | + | |
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | 445 | | |
452 | 446 | | |
453 | 447 | | |
| |||
512 | 506 | | |
513 | 507 | | |
514 | 508 | | |
515 | | - | |
| 509 | + | |
516 | 510 | | |
517 | 511 | | |
518 | 512 | | |
519 | 513 | | |
520 | | - | |
| 514 | + | |
521 | 515 | | |
522 | 516 | | |
523 | 517 | | |
| |||
0 commit comments