Skip to content

Commit

Permalink
fixup: Adjust inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
IngelaAndin committed Dec 10, 2023
1 parent 66f34d5 commit 51e2083
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/ssl/src/tls_gen_connection_1_3.erl
Original file line number Diff line number Diff line change
Expand Up @@ -174,15 +174,13 @@ connection({call, From}, {prf, Secret0, Label, Context, WantedLength}, #state{co
master_secret ->
maps:get(exporter_secret, PS)
end,
Seed1 = lists:reverse(
Seed = lists:reverse(
lists:foldl(fun(X, Acc) when is_binary(X) -> [X|Acc];
(client_random, Acc) -> [ClientRandom|Acc];
(server_random, Acc) -> [ServerRandom|Acc]
end, [], Context)),
Secret = tls_v1:derive_secret(Secret1, Label, <<>>, PRFAlgorithm),
Seed = tls_v1:transcript_hash(Seed1, PRFAlgorithm),
Result = tls_v1:hkdf_expand_label(Secret, Label, Seed, WantedLength, PRFAlgorithm,
<<"exporter">>),
Result = tls_v1:hkdf_expand_label(Secret, <<"exporter">>, Seed, WantedLength, PRFAlgorithm),
{next_state, ?FUNCTION_NAME, State, [{reply, From, {ok, Result}}]};
connection(Type, Event, State) ->
ssl_gen_statem:?FUNCTION_NAME(Type, Event, State).
Expand Down

0 comments on commit 51e2083

Please sign in to comment.