fix(cloud): normalize EC curve casing so get_policy/set_policy round-trips - #219
Open
TomaszSwierszczCA wants to merge 1 commit into
Open
fix(cloud): normalize EC curve casing so get_policy/set_policy round-trips#219TomaszSwierszczCA wants to merge 1 commit into
TomaszSwierszczCA wants to merge 1 commit into
Conversation
…trips
KeyType lowercases EC curve names (e.g. "p256"), so build_policy_spec
emitted lowercase curves that validate_policy_spec then rejected against
the uppercase supported_elliptic_curves list ("The Elliptic Curve [p256]
is not supported by VaaS"). Every EC get_policy -> set_policy round-trip
failed. Cloud and NGTS share this code.
Normalize EC curve casing at both boundaries: build_policy_spec now emits
uppercase curves (curve list and default), build_cit_request forwards
uppercase keyCurves and default curve, and get_invalid_cloud_ec_value
compares case-insensitively so a hand-written lowercase spec also
validates.
Adds an offline round-trip test; live-verified: get_policy on a DigiCert
EC CIT now returns P256/P384/P521/ED25519 and validate_policy_spec
passes. Offline suite: 56 passed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
KeyType lowercases EC curve names (e.g. "p256"), so build_policy_spec emitted lowercase curves that validate_policy_spec then rejected against the uppercase supported_elliptic_curves list ("The Elliptic Curve [p256] is not supported by VaaS"). Every EC get_policy -> set_policy round-trip failed. Cloud and NGTS share this code.
Normalize EC curve casing at both boundaries: build_policy_spec now emits uppercase curves (curve list and default), build_cit_request forwards uppercase keyCurves and default curve, and get_invalid_cloud_ec_value compares case-insensitively so a hand-written lowercase spec also validates.
Adds an offline round-trip test; live-verified: get_policy on a DigiCert EC CIT now returns P256/P384/P521/ED25519 and validate_policy_spec passes. Offline suite: 56 passed.