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:
2016-10-14 11:52:48 +02:00
parent 01a9d02586
commit d4ec640ac8
47 changed files with 483 additions and 298 deletions

View File

@@ -21,10 +21,12 @@ create {NETWORK_STREAM_SOCKET}
feature -- Status report
is_ssl_supported: BOOLEAN
-- SSL supported?
is_secure_connection_supported: BOOLEAN
-- SSL/TLS supported?
once
Result := False
ensure
Result = {HTTP_SECURE_HELPER}.is_secure_connection_supported
end
feature -- Input

View File

@@ -0,0 +1,18 @@
note
description: "[
Interface helping using SSL.
For now, mainly for `is_secure_connection_supported' to indicate if current project is compiled with SSL support.
i.e compiled with EiffelNet-SSL library.
]"
date: "$Date$"
revision: "$Revision$"
class
HTTP_SECURE_HELPER
feature -- Status
is_secure_connection_supported: BOOLEAN = False
-- Is Current system compiled with EiffelNet-SSL support?
end

View File

@@ -7,7 +7,7 @@ note
revision: "$Revision$"
class
HTTP_STREAM_SSL_SOCKET
HTTP_STREAM_SECURE_SOCKET
inherit
HTTP_STREAM_SOCKET
@@ -17,7 +17,7 @@ create
make_client_by_port, make_client_by_address_and_port,
make_server_by_port, make_server_by_address_and_port, make_loopback_server_by_port
create {HTTP_STREAM_SSL_SOCKET}
create {HTTP_STREAM_SECURE_SOCKET}
make_from_descriptor_and_address
feature -- Element change
@@ -29,9 +29,39 @@ feature -- Element change
set_key_file_path (a_key_filename: PATH)
do
end
feature -- SSL Helpers
set_secure_protocol (v: NATURAL)
do
end
set_secure_protocol_to_ssl_2_or_3
-- Set `ssl_protocol' with `Ssl_23'.
do
end
set_secure_protocol_to_tls_1_0
-- Set `ssl_protocol' with `Tls_1_0'.
do
end
set_secure_protocol_to_tls_1_1
-- Set `ssl_protocol' with `Tls_1_1'.
do
end
set_secure_protocol_to_tls_1_2
-- Set `ssl_protocol' with `Tls_1_2'.
do
end
set_secure_protocol_to_dtls_1_0
-- Set `ssl_protocol' with `Dtls_1_0'.
do
end
invariant
ssl_not_supported: not is_ssl_supported -- Current is a Fake SSL interface!
secure_connection_not_supported: not is_secure_connection_supported -- Current is a Fake SSL interface!
note
copyright: "2011-2013, Javier Velilla, Jocelyn Fiat and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"

View File

@@ -0,0 +1,18 @@
note
description: "[
Interface helping using SSL.
For now, mainly for `is_secure_connection_supported' to indicate if current project is compiled with SSL support.
i.e compiled with EiffelNet-SSL library.
]"
date: "$Date$"
revision: "$Revision$"
class
HTTP_SECURE_HELPER
feature -- Status
is_secure_connection_supported: BOOLEAN = True
-- Is Current system compiled with EiffelNet-SSL support?
end

View File

@@ -4,7 +4,7 @@ note
revision: "$Revision$"
class
HTTP_STREAM_SSL_SOCKET
HTTP_STREAM_SECURE_SOCKET
inherit
HTTP_STREAM_SOCKET
@@ -20,7 +20,7 @@ inherit
connect, shutdown,
do_accept
redefine
is_ssl_supported,
is_secure_connection_supported,
put_managed_pointer,
read_stream_noexception,
read_into_pointer_noexception,
@@ -32,7 +32,7 @@ inherit
put_managed_pointer -- Redefine to allow support of compiler before 16.11.
end
HTTP_STREAM_SSL_SOCKET_EXT
HTTP_STREAM_SECURE_SOCKET_EXT
create
make, make_empty,
@@ -44,42 +44,44 @@ create {SSL_NETWORK_STREAM_SOCKET}
feature -- Status report
is_ssl_supported: BOOLEAN
is_secure_connection_supported: BOOLEAN = True
-- SSL supported?
once
Result := True
feature -- Secure connection Helpers
set_secure_protocol (v: NATURAL)
do
set_tls_protocol (v)
end
feature -- SSL Helpers
set_ssl_protocol_to_ssl_2_or_3
set_secure_protocol_to_ssl_2_or_3
-- Set `ssl_protocol' with `Ssl_23'.
do
set_tls_protocol ({SSL_PROTOCOL}.Ssl_23)
set_secure_protocol ({SSL_PROTOCOL}.Ssl_23)
end
set_ssl_protocol_to_tls_1_0
set_secure_protocol_to_tls_1_0
-- Set `ssl_protocol' with `Tls_1_0'.
do
set_tls_protocol ({SSL_PROTOCOL}.Tls_1_0)
set_secure_protocol ({SSL_PROTOCOL}.Tls_1_0)
end
set_ssl_protocol_to_tls_1_1
set_secure_protocol_to_tls_1_1
-- Set `ssl_protocol' with `Tls_1_1'.
do
set_tls_protocol ({SSL_PROTOCOL}.Tls_1_1)
set_secure_protocol ({SSL_PROTOCOL}.Tls_1_1)
end
set_ssl_protocol_to_tls_1_2
set_secure_protocol_to_tls_1_2
-- Set `ssl_protocol' with `Tls_1_2'.
do
set_tls_protocol ({SSL_PROTOCOL}.Tls_1_2)
set_secure_protocol ({SSL_PROTOCOL}.Tls_1_2)
end
set_ssl_protocol_to_dtls_1_0
set_secure_protocol_to_dtls_1_0
-- Set `ssl_protocol' with `Dtls_1_0'.
do
set_tls_protocol ({SSL_PROTOCOL}.Dtls_1_0)
set_secure_protocol ({SSL_PROTOCOL}.Dtls_1_0)
end
feature -- Input

View File

@@ -6,7 +6,7 @@ note
]"
deferred class
HTTP_STREAM_SSL_SOCKET_EXT
HTTP_STREAM_SECURE_SOCKET_EXT
feature {NONE} -- SSL bridge

View File

@@ -6,7 +6,7 @@ note
]"
deferred class
HTTP_STREAM_SSL_SOCKET_EXT
HTTP_STREAM_SECURE_SOCKET_EXT
feature {NONE} -- SSL bridge