-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Always use system certificates #13052
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The implementation of the function is small, so we can inline it: ssl_verify_host_options(WildcardHostName) ->
WildCard = case WildcardHostName of
true ->
Fun = public_key:pkix_verify_hostname_match_fun(https),
[{customize_hostname_check,[{match_fun, Fun}]}];
false ->
[]
end,
[{verify, verify_peer}, {cacerts, public_key:cacerts_get()} | WildCard]. And then we leave a note to use |
Brilliant! Will do! |
c88c0f8
to
ed9fcd9
Compare
ed9fcd9
to
e6af52d
Compare
ssl_options = [ | ||
verify: :verify_peer, | ||
cacerts: :public_key.cacerts_get(), | ||
customize_hostname_check: [match_fun: :public_key.pkix_verify_hostname_match_fun(:https)] | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Original for comparison:
ssl_verify_host_options(WildcardHostName) ->
WildCard = case WildcardHostName of
true ->
Fun = public_key:pkix_verify_hostname_match_fun(https),
[{customize_hostname_check,[{match_fun, Fun}]}];
false ->
[]
end,
[{verify, verify_peer}, {cacerts, public_key:cacerts_get()} | WildCard].
Relates to #11220
Hope I didn't misunderstood "Use new system certificates" and the TODO, feel free to close if that's the case.
Note:
:httpc.ssl_verify_host_options/1
is available from 25.1, which would imply 1.17 compatibility is from OTP 25.1, not 25 (is this a showstopper?).