Matter smart home protocol implementation for OCaml
0
fork

Configure Feed

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

claude: complete Err -> Error module rename across call sites

Follow up to the module rename: update the remaining callers that
still referenced [Err] (library [claude.ml{,i}], [client.ml], the test
driver [test.ml]), and fix one stray [^ e] string concatenation in
hermest's CLI that needed [Json.Error.to_string e] now that
[Json.of_string] yields a structured error.

+2 -19
-1
fuzz/dune
··· 5 5 6 6 (executable 7 7 (name fuzz) 8 - (modules fuzz fuzz_tlv fuzz_case) 9 8 (libraries matter alcobar fmt)) 10 9 11 10 (rule
+2 -18
lib/case.ml
··· 31 31 32 32 type initiator_state = { 33 33 i_credentials : credentials; 34 - i_peer_fabric : fabric; 35 - i_session_id : int; 36 34 i_random : string; 37 35 i_eph_priv : Crypto_ec.P256.Dh.secret; 38 36 i_eph_pub : string; 39 37 } 40 38 41 39 type responder_state = { 42 - r_credentials : credentials; 43 - r_session_id : int; 44 40 r_random : string; 45 - r_eph_priv : Crypto_ec.P256.Dh.secret; 46 41 r_eph_pub : string; 47 42 r_peer_eph_pub : string; 48 - r_peer_session_id : int; 49 43 r_peer_random : string; 50 44 r_shared_secret : string; 51 45 } ··· 384 378 let state = 385 379 { 386 380 i_credentials = credentials; 387 - i_peer_fabric = peer_fabric; 388 - i_session_id = initiator_session_id; 389 381 i_random = random; 390 382 i_eph_priv = eph_priv; 391 383 i_eph_pub = eph_pub; ··· 504 496 let s2k = derive_sigma_key ~shared_secret ~salt ~info:sigma2_info in 505 497 aes_ccm_encrypt ~key:s2k ~nonce ~adata:"" tbs2_inner 506 498 507 - let responder_build_state ~credentials ~(sigma1 : sigma1) ~responder_session_id 508 - ~random ~eph_priv ~eph_pub ~shared_secret = 499 + let responder_build_state ~(sigma1 : sigma1) ~random ~eph_pub ~shared_secret = 509 500 { 510 - r_credentials = credentials; 511 - r_session_id = responder_session_id; 512 501 r_random = random; 513 - r_eph_priv = eph_priv; 514 502 r_eph_pub = eph_pub; 515 503 r_peer_eph_pub = sigma1.initiator_eph_pub_key; 516 - r_peer_session_id = sigma1.initiator_session_id; 517 504 r_peer_random = sigma1.initiator_random; 518 505 r_shared_secret = shared_secret; 519 506 } ··· 536 523 responder_sign_and_encrypt ~credentials ~sigma1 ~random ~eph_pub 537 524 ~shared_secret 538 525 in 539 - let state = 540 - responder_build_state ~credentials ~sigma1 ~responder_session_id ~random 541 - ~eph_priv ~eph_pub ~shared_secret 542 - in 526 + let state = responder_build_state ~sigma1 ~random ~eph_pub ~shared_secret in 543 527 let sigma2 = 544 528 { 545 529 responder_random = random;