Renamed many classes and feature to use "secure" term instead of "ssl". (note, the .ecf are still using the "ssl" terminologie).
Provided easy way to set secure settings for Standalone. For wsf launcher boolean option accept "true" or "yes" for True boolean, anything else is False.
This commit is contained in:
@@ -21,48 +21,48 @@ feature {NONE} -- Initialization
|
||||
-- Create a new instance and set ssl protocol to tls_1_2.
|
||||
do
|
||||
Precursor
|
||||
set_ssl_protocol_to_tls_1_2
|
||||
set_secure_protocol_to_tls_1_2
|
||||
ensure then
|
||||
ssl_protocol_set: ssl_protocol = {SSL_PROTOCOL}.tls_1_2
|
||||
secure_protocol_set: secure_protocol = {SSL_PROTOCOL}.tls_1_2
|
||||
end
|
||||
|
||||
feature -- Access
|
||||
|
||||
Server_details: STRING_8 = "Server: Standalone Eiffel Server (https)"
|
||||
Server_details: STRING_8 = "Server: Standalone Eiffel Server (secure)"
|
||||
|
||||
has_ssl_support: BOOLEAN = True
|
||||
has_secure_support: BOOLEAN = True
|
||||
-- Precursor
|
||||
|
||||
feature -- SSL Helpers
|
||||
|
||||
set_ssl_protocol_to_ssl_2_or_3
|
||||
-- Set `ssl_protocol' with `Ssl_23'.
|
||||
set_secure_protocol_to_ssl_2_or_3
|
||||
-- Set `secure_protocol' with `Ssl_23'.
|
||||
do
|
||||
set_ssl_protocol ({SSL_PROTOCOL}.Ssl_23)
|
||||
set_secure_protocol ({SSL_PROTOCOL}.Ssl_23)
|
||||
end
|
||||
|
||||
set_ssl_protocol_to_tls_1_0
|
||||
-- Set `ssl_protocol' with `Tls_1_0'.
|
||||
set_secure_protocol_to_tls_1_0
|
||||
-- Set `secure_protocol' with `Tls_1_0'.
|
||||
do
|
||||
set_ssl_protocol ({SSL_PROTOCOL}.Tls_1_0)
|
||||
set_secure_protocol ({SSL_PROTOCOL}.Tls_1_0)
|
||||
end
|
||||
|
||||
set_ssl_protocol_to_tls_1_1
|
||||
-- Set `ssl_protocol' with `Tls_1_1'.
|
||||
set_secure_protocol_to_tls_1_1
|
||||
-- Set `secure_protocol' with `Tls_1_1'.
|
||||
do
|
||||
set_ssl_protocol ({SSL_PROTOCOL}.Tls_1_1)
|
||||
set_secure_protocol ({SSL_PROTOCOL}.Tls_1_1)
|
||||
end
|
||||
|
||||
set_ssl_protocol_to_tls_1_2
|
||||
-- Set `ssl_protocol' with `Tls_1_2'.
|
||||
set_secure_protocol_to_tls_1_2
|
||||
-- Set `secure_protocol' with `Tls_1_2'.
|
||||
do
|
||||
set_ssl_protocol ({SSL_PROTOCOL}.Tls_1_2)
|
||||
set_secure_protocol ({SSL_PROTOCOL}.Tls_1_2)
|
||||
end
|
||||
|
||||
set_ssl_protocol_to_dtls_1_0
|
||||
-- Set `ssl_protocol' with `Dtls_1_0'.
|
||||
set_secure_protocol_to_dtls_1_0
|
||||
-- Set `secure_protocol' with `Dtls_1_0'.
|
||||
do
|
||||
set_ssl_protocol ({SSL_PROTOCOL}.Dtls_1_0)
|
||||
set_secure_protocol ({SSL_PROTOCOL}.Dtls_1_0)
|
||||
end
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
note
|
||||
description: "[
|
||||
SSL enabled server
|
||||
SECURE enabled server
|
||||
]"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
@@ -21,24 +21,24 @@ feature {NONE} -- Factory
|
||||
|
||||
new_listening_socket (a_addr: detachable INET_ADDRESS; a_http_port: INTEGER): HTTPD_STREAM_SOCKET
|
||||
local
|
||||
s_ssl: HTTPD_STREAM_SSL_SOCKET
|
||||
s_secure: HTTPD_STREAM_SECURE_SOCKET
|
||||
do
|
||||
if configuration.is_secure then
|
||||
if a_addr /= Void then
|
||||
create s_ssl.make_server_by_address_and_port (a_addr, a_http_port)
|
||||
Result := s_ssl
|
||||
create s_secure.make_server_by_address_and_port (a_addr, a_http_port)
|
||||
Result := s_secure
|
||||
else
|
||||
create s_ssl.make_server_by_port (a_http_port)
|
||||
create s_secure.make_server_by_port (a_http_port)
|
||||
end
|
||||
s_ssl.set_tls_protocol (configuration.ssl_protocol)
|
||||
if attached configuration.ca_crt as l_crt then
|
||||
s_ssl.set_certificate_file_name (l_crt)
|
||||
s_secure.set_tls_protocol (configuration.secure_protocol)
|
||||
if attached configuration.secure_certificate as l_crt then
|
||||
s_secure.set_certificate_file_name (l_crt)
|
||||
end
|
||||
if attached configuration.ca_key as l_key then
|
||||
s_ssl.set_key_file_name (l_key)
|
||||
if attached configuration.secure_certificate_key as l_key then
|
||||
s_secure.set_key_file_name (l_key)
|
||||
end
|
||||
|
||||
Result := s_ssl
|
||||
Result := s_secure
|
||||
else
|
||||
Result := Precursor (a_addr, a_http_port)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user