Skip to content

Commit 9c0f258

Browse files
authored
Merge pull request #777 from savonarola/fix-ssl-default-options
Fix default ssl options in presence of SNI
2 parents 76b03b2 + a686610 commit 9c0f258

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/hackney_connection.erl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,11 @@ ssl_opts_2() ->
135135
hackney_ssl:cipher_opts().
136136

137137
merge_ssl_opts(Host, OverrideOpts) ->
138-
DefaultOpts = ssl_opts_1(Host, OverrideOpts),
138+
VerifyHost = case proplists:get_value(server_name_indication, OverrideOpts, disable) of
139+
disable -> Host;
140+
SNI -> SNI
141+
end,
142+
DefaultOpts = ssl_opts_1(VerifyHost, OverrideOpts),
139143
MergedOpts = orddict:merge(fun(_K, _V1, V) -> V end,
140144
orddict:from_list(DefaultOpts),
141145
orddict:from_list(OverrideOpts)),

0 commit comments

Comments
 (0)