ADDED: Support for creating TLS servers.

The new predicates tls_server_context/2 and tls_server_negotiate/3 can
be used to negotiate TLS connections with clients for encrypted and
authenticated communication.
This commit is contained in:
Markus Triska
2021-12-02 22:10:04 +01:00
parent 7abdade7c1
commit 77c04c3a14
5 changed files with 122 additions and 5 deletions

View File

@@ -117,7 +117,7 @@ enum StreamInstance {
Stderr,
Stdout,
TcpStream(ClauseName, TcpStream),
TlsStream(ClauseName, TlsStream<TcpStream>),
TlsStream(ClauseName, TlsStream<Stream>),
}
impl StreamInstance {
@@ -543,7 +543,7 @@ impl Stream {
}
#[inline]
pub(crate) fn from_tls_stream(address: ClauseName, tls_stream: TlsStream<TcpStream>) -> Self {
pub(crate) fn from_tls_stream(address: ClauseName, tls_stream: TlsStream<Stream>) -> Self {
Stream::from_inst(StreamInstance::TlsStream(address, tls_stream))
}