1
0
mirror of https://github.com/BitskiCo/jwk-rs synced 2024-11-22 03:49:22 +00:00

Fixes #2 - correct parsing of x5c data in JWK to be a list instead of a string.

This commit is contained in:
Benjamin Smedberg 2021-04-27 21:24:34 +00:00 committed by Nick Hynes
parent 2bf261052c
commit 2cddce0696
2 changed files with 2 additions and 2 deletions

View File

@ -104,7 +104,7 @@ pub struct X509Params {
/// x5c: The certificate chain used to verify this key. /// x5c: The certificate chain used to verify this key.
#[serde(default, rename = "x5c", skip_serializing_if = "Option::is_none")] #[serde(default, rename = "x5c", skip_serializing_if = "Option::is_none")]
cert_chain: Option<String>, cert_chain: Option<Vec<String>>,
/// x5t: The SHA-1 thumbprint of the DER-encoded X.509 version of the public key. /// x5t: The SHA-1 thumbprint of the DER-encoded X.509 version of the public key.
#[serde(default, rename = "x5t", skip_serializing_if = "Option::is_none")] #[serde(default, rename = "x5t", skip_serializing_if = "Option::is_none")]

View File

@ -430,7 +430,7 @@ fn x509_params() {
"kty": "oct", "kty": "oct",
"k": "TdSBZdXL5n39JXlQc7QL3w", "k": "TdSBZdXL5n39JXlQc7QL3w",
"x5u": "https://example.com/testing.crt", "x5u": "https://example.com/testing.crt",
"x5c": "---BEGIN CERTIFICATE---...", "x5c": ["---BEGIN CERTIFICATE---..."],
"x5t": "aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d", "x5t": "aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d",
"x5t#S256": "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824" "x5t#S256": "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824"
}"#; }"#;