Skip to content

Conversation

@7908837174
Copy link

No description provided.

Kallal Mukherjee and others added 6 commits September 20, 2025 10:05
- Add URLSafeNonce type with custom JSON marshaling/unmarshaling
- Update ChallengeResponseSession to use URLSafeNonce instead of []byte
- Update test cases to use URL-safe base64 encoded nonces
- Add comprehensive test to verify URL-safe base64 encoding
- Ensure nonces no longer contain '+' and '/' characters

This resolves the issue where session nonces were encoded using
standard base64 instead of URL-safe base64, making them unsuitable
for URL parameters and other web contexts.

Signed-off-by: Kallal Mukherjee <[email protected]>
…e64 for PSA tokens

- PSA evidence token generation (evcli psa create) expects standard base64 nonces
- Server now returns URL-safe base64 nonces in challenge-response sessions
- Added conversion from URL-safe to standard base64 for PSA claims generation
- Matches existing conversion logic already used for CCA tokens
- Resolves 'illegal base64 data' errors in integration tests

Signed-off-by: Kallal Mukherjee <[email protected]>
Fixes veraison#42. When attestation schemes return empty reference value IDs,
the GetAttestation method now skips them before calling kvstore.Get()
to avoid 'the supplied key is empty' errors.

This commonly occurs when no software components are provisioned
in trust anchors, causing handlers to return []string{""} for
missing software reference IDs.

Signed-off-by: Kallal Mukherjee <[email protected]>
…root cause fix

- Remove empty reference ID filtering from VTS GetAttestation method as requested by reviewer @setrofim
- Apply root cause fix: modify scheme handlers to return nil instead of []string{""} on errors
- Restore detailed error reporting for integrity validation failures
- Keep URL-safe base64 nonce functionality which is the valid part of this PR

This addresses the reviewer feedback that empty reference IDs should never occur
and indicates an upstream bug that should be fixed at the source.
…cheme handlers, preserve URL-safe base64 nonces
As requested by @setrofim, empty reference IDs should never occur, and if they do,
it's a bug that should be fixed at the source, not suppressed in the processing loop.

This change removes the workaround that was skipping empty reference IDs and allows
the system to fail properly if such IDs are encountered, which will help identify
the root cause of the issue.
@setrofim
Copy link
Collaborator

setrofim commented Oct 6, 2025

Please fix this in #338, and close this PR.

@7908837174 7908837174 closed this Oct 6, 2025
@7908837174
Copy link
Author

OK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants