Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
reynir committed Sep 27, 2024
1 parent 6545ad9 commit d9b45cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bench/bench_engine.ml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ let test_receive_data cipher =
Staged.stage @@ fun () ->
match Miragevpn.handle established_client (`Data pkt) with
| Ok _ -> ()
| Error _ -> assert false
| Error err -> Format.kasprintf failwith "%a" Miragevpn.pp_error err
in
Test.make ~name:"decode data" staged

Expand Down
2 changes: 1 addition & 1 deletion src/engine.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,7 @@ let out ?add_timestamp prefix_len (ctx : keys) hmac_algorithm compress rng data
Bytes.create
(prefix_len + String.length replay_id + tag_size + String.length data)
in
Bytes.blit_string replay_id 0 b prefix_len (String.length replay_id);
set_replay_id b prefix_len;
authenticate_encrypt_into ~key:my_key ~nonce ~adata:replay_id data
~src_off:0 b
~dst_off:(prefix_len + String.length replay_id + tag_size)
Expand Down

0 comments on commit d9b45cc

Please sign in to comment.