Trust Tokens: Treat empty (but present) issuance responses as successes
This change updates the Trust Tokens issuance helper to treat responses bearing empty Sec-Trust-Token headers as "successful" issuance responses that contain no tokens. This was initially implicitly supported by the "v0" BoringSSL cryptographic logic, but the change to the "v1" cryptographic logic altered BoringSSL's behavior to no longer treat an empty string as a well-formed response containing 0 tokens. This is still useful behavior to have: we'd like to avoid console errors in the case that the issuer wants to defer judgment about what, or how many, tokens to issue until a later time, for instance. Consequently, we're implementing this behavior explicitly at the Trust Tokens-over-HTTP level: see go/successfully-issuing-no-tokens for some related background (internal, sorry, due to discussion of server-side implementation details). I've updated the "process an issuance response" pseudocode in the design doc to cover this: https://docs.google.com/document/d/1TNnya6B8pyomDK2F1R9CL3dY10OAmqWlnCxsWyOBDVQ/edit#heading=h.2kzxtyuk0nvu R=csharrison Test: Adds an issuance helper unit test covering this case Change-Id: I4f747a1ce3b2d5b937d69895f2ce78382a60d42a Fixed: 1124443 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2561046 Commit-Queue: David Van Cleve <davidvc@chromium.org> Reviewed-by:Charlie Harrison <csharrison@chromium.org> Cr-Commit-Position: refs/heads/master@{#832647}
Showing
Please register or sign in to comment