CSRF protection using HMAC-signed state tokens (RFC 5869, RFC 2104)
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(lint): resolve E600, E605 in csrf and delegation, apply auto-fixes

- csrf: flatten suite to single tuple, add test_csrf.mli, update runner
- delegation: split monolithic test.ml into test_name, test_trie,
test_policy, test_asn_ext, test_extract with .mli files
- delegation auto-fixes: E331 renames (make→v, make_of_path→of_path,
name→label)
- fdir auto-fixes: E105 narrow catch-all, E331 _stats→stats, add Logs

+11 -11
+1 -1
test/test.ml
··· 1 1 let () = 2 2 Crypto_rng_unix.use_default (); 3 - Alcotest.run "csrf" Test_csrf.suite 3 + Alcotest.run "csrf" [ Test_csrf.suite ]
+7 -10
test/test_csrf.ml
··· 76 76 "accept reasonably sized state" (Some short_state) short_verified 77 77 78 78 let suite = 79 - [ 80 - ( "signing", 81 - [ 82 - Alcotest.test_case "state signing and verification" `Quick 83 - test_csrf_signing; 84 - Alcotest.test_case "length limit protection" `Quick test_length_limit; 85 - ] ); 86 - ( "hkdf", 87 - [ Alcotest.test_case "key derivation" `Quick test_hkdf_key_derivation ] ); 88 - ] 79 + ( "csrf", 80 + [ 81 + Alcotest.test_case "state signing and verification" `Quick 82 + test_csrf_signing; 83 + Alcotest.test_case "length limit protection" `Quick test_length_limit; 84 + Alcotest.test_case "key derivation" `Quick test_hkdf_key_derivation; 85 + ] )
+3
test/test_csrf.mli
··· 1 + (** CSRF token signing and verification tests. *) 2 + 3 + val suite : string * unit Alcotest.test_case list