From 6a50035b242b972c1d9b659ba63e037a0a8afe71 Mon Sep 17 00:00:00 2001
From: Garrett D'Amore <garrett@damore.org>
Date: Fri, 29 Dec 2017 14:21:20 -0800
Subject: fixes #166 Websocket TLS mapping

This introduces the wss:// scheme, which is available and works like
the ws:// scheme if TLS is enabled in the library.

The library modularization is refactored somewhat, to make it easier
to use.  There is now a single NNG_ENABLE_TLS that enables TLS support
under the hood.

This also adds a new option for the TLS transport, NNG_OPT_TLS_CONFIG
(and a similar one for WSS, NNG_OPT_TLS_WSS_CONFIG) that offer access
to the underlying TLS configuration object, which now has a public API
to go with it as well.

Note that it is also possible to use pure HTTPS using the *private*
API, which will be exposed in a public form soon.
---
 docs/nng_tls.adoc | 12 ++++++++++++
 1 file changed, 12 insertions(+)

(limited to 'docs/nng_tls.adoc')

diff --git a/docs/nng_tls.adoc b/docs/nng_tls.adoc
index e6eafdd5..a6737d01 100644
--- a/docs/nng_tls.adoc
+++ b/docs/nng_tls.adoc
@@ -157,6 +157,17 @@ Transport Options
 The following transport options are available. Note that
 setting these must be done before the transport is started.
 
+`NNG_OPT_TLS_CONFIG`::
+
+This option is used to set or obtain the TLS configuration
+object (type `nng_tls_config *`), which is passed as a pointer.
+Setting this option adds a reference to the object; obtaining the
+object pointer does not.  (Therefore when retrieving this option,
+care must be taken not to access it after the endpoint is closed.)
+
+Note that configuration object is not modifiable once it has been
+used in a running TLS stream.
+
 `NNG_OPT_TLS_CA_CERT`::
 
 This is a write-only binay object containing a certificate
@@ -232,6 +243,7 @@ if the `NNG_OPT_TLS_AUTH_MODE` option is set to
 SEE ALSO
 --------
 <<nng.adoc#,nng(7)>>
+<<nng_tls_init#,nng_tls_init(3)>>
 
 COPYRIGHT
 ---------
-- 
cgit v1.2.3-70-g09d2

