Skip to content

fix(cloud): normalize EC curve casing so get_policy/set_policy round-trips - #219

Open
TomaszSwierszczCA wants to merge 1 commit into
Venafi:masterfrom
TomaszSwierszczCA:fix-cloud-ec-curve-casing
Open

fix(cloud): normalize EC curve casing so get_policy/set_policy round-trips#219
TomaszSwierszczCA wants to merge 1 commit into
Venafi:masterfrom
TomaszSwierszczCA:fix-cloud-ec-curve-casing

Conversation

@TomaszSwierszczCA

Copy link
Copy Markdown
Contributor

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.

…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.
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.

1 participant