diff options
author | Ingela Anderton Andin <[email protected]> | 2018-06-08 09:56:43 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2018-06-08 09:56:43 +0200 |
commit | cabbb94eab4d94f3c924f8854e3f030d7ceca9cc (patch) | |
tree | 4b53159ae1918ef7d8b2814dfb45f71cd62b0910 /lib/ssl/src/ssl.erl | |
parent | ec031cb823e7691ab28d7599a4064331ccd90754 (diff) | |
parent | f821c91cebe0cee22c1c6e0a9dfe45d4e9b5f129 (diff) | |
download | otp-cabbb94eab4d94f3c924f8854e3f030d7ceca9cc.tar.gz otp-cabbb94eab4d94f3c924f8854e3f030d7ceca9cc.tar.bz2 otp-cabbb94eab4d94f3c924f8854e3f030d7ceca9cc.zip |
Merge branch 'ingela/ssl/verify-hostname-customize/OTP-15102'
* ingela/ssl/verify-hostname-customize/OTP-15102:
ssl: Add option customize_hostname_check
Diffstat (limited to 'lib/ssl/src/ssl.erl')
-rw-r--r-- | lib/ssl/src/ssl.erl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/ssl/src/ssl.erl b/lib/ssl/src/ssl.erl index a7b4ec2bf7..565cc9e1bc 100644 --- a/lib/ssl/src/ssl.erl +++ b/lib/ssl/src/ssl.erl @@ -938,7 +938,8 @@ handle_options(Opts0, Role, Host) -> crl_check = handle_option(crl_check, Opts, false), crl_cache = handle_option(crl_cache, Opts, {ssl_crl_cache, {internal, []}}), max_handshake_size = handle_option(max_handshake_size, Opts, ?DEFAULT_MAX_HANDSHAKE_SIZE), - handshake = handle_option(handshake, Opts, full) + handshake = handle_option(handshake, Opts, full), + customize_hostname_check = handle_option(customize_hostname_check, Opts, []) }, CbInfo = proplists:get_value(cb_info, Opts, default_cb_info(Protocol)), @@ -954,7 +955,7 @@ handle_options(Opts0, Role, Host) -> client_preferred_next_protocols, log_alert, server_name_indication, honor_cipher_order, padding_check, crl_check, crl_cache, fallback, signature_algs, eccs, honor_ecc_order, beast_mitigation, - max_handshake_size, handshake], + max_handshake_size, handshake, customize_hostname_check], SockOpts = lists:foldl(fun(Key, PropList) -> proplists:delete(Key, PropList) end, Opts, SslOptions), @@ -1197,6 +1198,8 @@ validate_option(handshake, hello = Value) -> Value; validate_option(handshake, full = Value) -> Value; +validate_option(customize_hostname_check, Value) when is_list(Value) -> + Value; validate_option(Opt, Value) -> throw({error, {options, {Opt, Value}}}). |