createSSLStream - multiple declarations

Function createSSLStream

Constructs a new SSL tunnel and infers the stream state from the SSLContextKind.

Depending on the SSLContextKind of ctx, the tunnel will try to establish an SSL tunnel by either passively accepting or by actively connecting.

Prototype

SSLStream createSSLStream(
  Stream underlying,
  SSLContext ctx,
  string peer_name,
  NetworkAddress peer_address
);

Parameters

NameDescription
underlying The base stream which is used for the SSL tunnel
ctx SSL context used for initiating the tunnel
peer_name DNS name of the remote peer, used for certificate validation
peer_address IP address of the remote peer, used for certificate validation

Function createSSLStream

Constructs a new SSL tunnel, allowing to override the stream state.

This constructor allows to specify a custom tunnel state, which can be useful when a tunnel has already been established by other means.

Prototype

SSLStream createSSLStream(
  Stream underlying,
  SSLContext ctx,
  SSLStreamState state,
  string peer_name,
  NetworkAddress peer_address
);

Parameters

NameDescription
underlying The base stream which is used for the SSL tunnel
ctx SSL context used for initiating the tunnel
state The manually specified tunnel state
peer_name DNS name of the remote peer, used for certificate validation
peer_address IP address of the remote peer, used for certificate validation

Authors

Sönke Ludwig

Copyright

© 2012-2014 RejectedSoftware e.K.

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.