Skip to content

Commit 9934c7f

Browse files
authored
Fix formatting in Ed25519 key serialization (#485)
In the thumbprint() function, the serialized format of the Ed25519 curve is missing double quotes around "crv", which would likely affect interoperability between other implementations. Fixes #484
1 parent abbc307 commit 9934c7f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/jwk.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ impl Jwk {
531531
}
532532
EllipticCurve::Ed25519 => {
533533
format!(
534-
r#"{{crv:{},"kty":{},"x":"{}"}}"#,
534+
r#"{{"crv":{},"kty":{},"x":"{}"}}"#,
535535
serde_json::to_string(&a.curve).unwrap(),
536536
serde_json::to_string(&a.key_type).unwrap(),
537537
a.x,

0 commit comments

Comments
 (0)