We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 48cbbc3 commit 70d2618Copy full SHA for 70d2618
1 file changed
libwebauthn/src/ops/webauthn/get_assertion.rs
@@ -777,6 +777,17 @@ mod tests {
777
}
778
779
780
+ #[test]
781
+ fn test_prf_input_short_via_json() {
782
+ // Regression test for #209: a sub-32-byte salt encoded in the JSON IDL
783
+ // must round-trip through GetAssertionRequest::from_json into a
784
+ // PrfInputValue with the expected bytes.
785
+ let prf = parse_prf(r#"{"prf":{"eval":{"first":"aGk"}}}"#); // base64url "aGk" -> b"hi"
786
+ let eval = prf.eval.expect("eval");
787
+ assert_eq!(eval.first, b"hi");
788
+ assert!(eval.second.is_none());
789
+ }
790
+
791
#[test]
792
fn test_prf_input_empty_allowed() {
793
// §10.1.4 says "of any length" with no lower bound; empty must parse.
0 commit comments