From 2cddce069605725eec2f51d6aeea7e17c4278798 Mon Sep 17 00:00:00 2001 From: Benjamin Smedberg Date: Tue, 27 Apr 2021 21:24:34 +0000 Subject: [PATCH] Fixes #2 - correct parsing of x5c data in JWK to be a list instead of a string. --- src/lib.rs | 2 +- src/tests.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 4a4b805..cb3750c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -104,7 +104,7 @@ pub struct X509Params { /// x5c: The certificate chain used to verify this key. #[serde(default, rename = "x5c", skip_serializing_if = "Option::is_none")] - cert_chain: Option, + cert_chain: Option>, /// 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")] diff --git a/src/tests.rs b/src/tests.rs index bdf74db..52190af 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -430,7 +430,7 @@ fn x509_params() { "kty": "oct", "k": "TdSBZdXL5n39JXlQc7QL3w", "x5u": "https://example.com/testing.crt", - "x5c": "---BEGIN CERTIFICATE---...", + "x5c": ["---BEGIN CERTIFICATE---..."], "x5t": "aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d", "x5t#S256": "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824" }"#;