Skip to content

Commit

Permalink
expose MLSMessage parsing function
Browse files Browse the repository at this point in the history
  • Loading branch information
TWal committed Jul 3, 2024
1 parent c397e24 commit 7ea1b74
Show file tree
Hide file tree
Showing 5 changed files with 443 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fstar/api/MLS.API.fst
Original file line number Diff line number Diff line change
Expand Up @@ -285,3 +285,6 @@ let create_remove_proposal #bytes #cb st removed_cred =
else return ()
) in
return (MLS.TreeDEM.NetworkTypes.P_remove { removed })

let parse_message #bytes #cb msg_bytes =
from_option "parse_message: malformed message" (parse _ msg_bytes)
7 changes: 7 additions & 0 deletions fstar/api/MLS.API.fsti
Original file line number Diff line number Diff line change
Expand Up @@ -299,3 +299,10 @@ val create_remove_proposal:
mls_group bytes ->
removed:credential bytes ->
result (proposal bytes)

(*** Helper function ***)

val parse_message:
#bytes:Type0 -> {|crypto_bytes bytes|} ->
bytes ->
result (MLS.TreeDEM.NetworkTypes.mls_message_nt bytes)
Loading

0 comments on commit 7ea1b74

Please sign in to comment.