aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_server/httpd_conf.erl
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2013-08-21 12:54:38 +0200
committerErlang/OTP <[email protected]>2013-08-21 12:54:38 +0200
commitb6b47d4c18c88380ea104aab57e13363c7b24a51 (patch)
tree7083aba98b243d6a1cd6aa279da737295f4f22bf /lib/inets/src/http_server/httpd_conf.erl
parenta21db4078a7b5f23b665dc2d466541b394936cb8 (diff)
parent2ab0f356a00f42060d0f4ca9c4225644e2d9052e (diff)
downloadotp-b6b47d4c18c88380ea104aab57e13363c7b24a51.tar.gz
otp-b6b47d4c18c88380ea104aab57e13363c7b24a51.tar.bz2
otp-b6b47d4c18c88380ea104aab57e13363c7b24a51.zip
Merge branch 'fredrik/inets/ssl/fixup_log_alert_option/OTP-11259' into maint-r15
* fredrik/inets/ssl/fixup_log_alert_option/OTP-11259: [inets, ssl]: make log_alert configurable as option in ssl, SSLLogLevel added as option to inets conf file
Diffstat (limited to 'lib/inets/src/http_server/httpd_conf.erl')
-rw-r--r--lib/inets/src/http_server/httpd_conf.erl18
1 files changed, 17 insertions, 1 deletions
diff --git a/lib/inets/src/http_server/httpd_conf.erl b/lib/inets/src/http_server/httpd_conf.erl
index 884e3defb8..190967f656 100644
--- a/lib/inets/src/http_server/httpd_conf.erl
+++ b/lib/inets/src/http_server/httpd_conf.erl
@@ -390,6 +390,13 @@ load("SSLCertificateFile " ++ SSLCertificateFile, []) ->
{error, ?NICE(clean(SSLCertificateFile)++
" is an invalid SSLCertificateFile")}
end;
+load("SSLLogLevel " ++ SSLLogAlert, []) ->
+ case SSLLogAlert of
+ "none" ->
+ {ok, [], {ssl_log_alert, false}};
+ _ ->
+ {ok, [], {ssl_log_alert, true}}
+ end;
load("SSLCertificateKeyFile " ++ SSLCertificateKeyFile, []) ->
case is_file(clean(SSLCertificateKeyFile)) of
{ok, File} ->
@@ -942,7 +949,8 @@ ssl_config(ConfigDB) ->
ssl_ciphers(ConfigDB) ++
ssl_password(ConfigDB) ++
ssl_verify_depth(ConfigDB) ++
- ssl_ca_certificate_file(ConfigDB).
+ ssl_ca_certificate_file(ConfigDB) ++
+ ssl_log_level(ConfigDB).
@@ -1208,6 +1216,14 @@ ssl_certificate_key_file(ConfigDB) ->
[{keyfile,SSLCertificateKeyFile}]
end.
+ssl_log_level(ConfigDB) ->
+ case httpd_util:lookup(ConfigDB,ssl_log_alert) of
+ undefined ->
+ [];
+ SSLLogLevel ->
+ [{log_alert,SSLLogLevel}]
+ end.
+
ssl_verify_client(ConfigDB) ->
case httpd_util:lookup(ConfigDB,ssl_verify_client) of
undefined ->