Skip to content

Commit 7c46a2e

Browse files
committed
Fix integration tests: Convert URL-safe base64 nonces to standard base64 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
1 parent 931a4be commit 7c46a2e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

integration-tests/utils/generators.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,11 @@ def generate_evidence(scheme, evidence, nonce, signing, outname):
128128

129129
if scheme == 'psa' and nonce:
130130
claims_file = f'{GENDIR}/claims/{scheme}.{evidence}.json'
131+
# convert nonce from base64url to base64
132+
translated_nonce = nonce.replace('-', '+').replace('_', '/')
131133
update_json(
132134
f'data/claims/{scheme}.{evidence}.json',
133-
{f'{scheme}-nonce': nonce},
135+
{f'{scheme}-nonce': translated_nonce},
134136
claims_file,
135137
)
136138
elif scheme == 'cca' and nonce:

0 commit comments

Comments
 (0)