Update Trust Tokens store to accommodate issuance requirements.
This CL updates the Trust Tokens store to handle a few requirements for token issuance: 1. Allow adding tokens to fail if there is no stored key commitment for the tokens' issuer with value equal to that of the tokens' associated key. (Previously, this was DCHECKED as a precondition, but it's easier to handle within the store.) 2. Add a capacity limiting the number of tokens stored per issuer, and make TrustTokenStore::AddTokens respect this capacity. 3. Add a number-of-tokens-for-issuer getter so clients can check (for instance) if tokens are at capacity without attempting to add a token. 4. Add a cap on the number of issuers allowed to be associated with any given top level origin, and make TrustTokenStore::SetAssociated respect this limit. Bug: 1042962 Test: Expand unittests. Change-Id: I544aa64eeeab1a1f6c777631f1579d2402fd179e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2057523Reviewed-by:Charlie Harrison <csharrison@chromium.org> Commit-Queue: David Van Cleve <davidvc@chromium.org> Cr-Commit-Position: refs/heads/master@{#749328}
Showing
Please register or sign in to comment