summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2018-10-13 14:18:31 -0400
committercjihrig <cjihrig@gmail.com>2018-10-21 09:32:45 -0400
commit96a986d675fbc3ccc98832232b73b84ba5a4818d (patch)
treebf36dfe628dead7bd161580e9342e9f90ef3b027 /doc
parent517955a474877893751d71b33f9c02a21bc25000 (diff)
downloadandroid-node-v8-96a986d675fbc3ccc98832232b73b84ba5a4818d.tar.gz
android-node-v8-96a986d675fbc3ccc98832232b73b84ba5a4818d.tar.bz2
android-node-v8-96a986d675fbc3ccc98832232b73b84ba5a4818d.zip
tls: support changing credentials dynamically
This commit adds a setSecureContext() method to TLS servers. In order to maintain backwards compatibility, the method takes the options needed to create a new SecureContext, rather than an instance of SecureContext. Fixes: https://github.com/nodejs/node/issues/4464 Refs: https://github.com/nodejs/node/issues/10349 Refs: https://github.com/nodejs/help/issues/603 Refs: https://github.com/nodejs/node/issues/15115 PR-URL: https://github.com/nodejs/node/pull/23644 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/tls.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/api/tls.md b/doc/api/tls.md
index 4f3430854e..f9a313f914 100644
--- a/doc/api/tls.md
+++ b/doc/api/tls.md
@@ -411,6 +411,18 @@ encryption/decryption of the [TLS Session Tickets][].
Starts the server listening for encrypted connections.
This method is identical to [`server.listen()`][] from [`net.Server`][].
+### server.setSecureContext(options)
+<!-- YAML
+added: REPLACEME
+-->
+
+* `options` {Object} An object containing any of the possible properties from
+ the [`tls.createSecureContext()`][] `options` arguments (e.g. `key`, `cert`,
+ `ca`, etc).
+
+The `server.setSecureContext()` method replaces the secure context of an
+existing server. Existing connections to the server are not interrupted.
+
### server.setTicketKeys(keys)
<!-- YAML
added: v3.0.0