Skip to content

Commit

Permalink
ssl: Move all configuration handling to ssl_config.erl
Browse files Browse the repository at this point in the history
  • Loading branch information
IngelaAndin committed Dec 11, 2024
1 parent c838c6c commit 813e905
Show file tree
Hide file tree
Showing 15 changed files with 1,676 additions and 1,643 deletions.
7 changes: 3 additions & 4 deletions lib/ssl/src/dtls_client_connection.erl
Original file line number Diff line number Diff line change
Expand Up @@ -230,12 +230,11 @@ initial_hello({call, From}, {start, {Opts, EmOpts}, Timeout},
ssl_options = OrigSSLOptions,
socket_options = SockOpts} = State0) ->
try
SslOpts = ssl:update_options(Opts, Role, OrigSSLOptions),
SslOpts = ssl_config:update_options(Opts, Role, OrigSSLOptions),
State = ssl_gen_statem:ssl_config(SslOpts, Role, State0),
initial_hello({call, From}, {start, Timeout},
State#state{ssl_options = SslOpts,
socket_options =
ssl_config:new_emulated(EmOpts, SockOpts)})
State#state{socket_options =
ssl_config:new_emulated(EmOpts, SockOpts)})
catch throw:Error ->
{stop_and_reply, {shutdown, normal}, {reply, From, {error, Error}}, State0}
end;
Expand Down
7 changes: 3 additions & 4 deletions lib/ssl/src/dtls_server_connection.erl
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,11 @@ initial_hello({call, From}, {start, {Opts, EmOpts}, Timeout},
ssl_options = OrigSSLOptions,
socket_options = SockOpts} = State0) ->
try
SslOpts = ssl:update_options(Opts, Role, OrigSSLOptions),
SslOpts = ssl_config:update_options(Opts, Role, OrigSSLOptions),
State = ssl_gen_statem:ssl_config(SslOpts, Role, State0),
initial_hello({call, From}, {start, Timeout},
State#state{ssl_options = SslOpts,
socket_options =
ssl_config:new_emulated(EmOpts, SockOpts)})
State#state{socket_options =
ssl_config:new_emulated(EmOpts, SockOpts)})
catch throw:Error ->
{stop_and_reply, {shutdown, normal}, {reply, From, {error, Error}}, State0}
end;
Expand Down
Loading

0 comments on commit 813e905

Please sign in to comment.