diff --git a/doc/api/errors.md b/doc/api/errors.md
index b186275807aee7..d64afba591a4b7 100644
--- a/doc/api/errors.md
+++ b/doc/api/errors.md
@@ -1831,7 +1831,7 @@ recommended to use 2048 bits or larger for stronger security.
A TLS/SSL handshake timed out. In this case, the server must also abort the
connection.
-
+
### `ERR_TLS_INVALID_CONTEXT`
+
+The TLS socket must be connected and securily established. Ensure the 'secure'
+event is emitted, before you continue.
+
### `ERR_TLS_INVALID_PROTOCOL_METHOD`
diff --git a/doc/api/tls.md b/doc/api/tls.md
index fee6e33d610581..3341e6e9ea514b 100644
--- a/doc/api/tls.md
+++ b/doc/api/tls.md
@@ -1094,6 +1094,39 @@ See
[SSL_get_shared_sigalgs](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_shared_sigalgs.html)
for more information.
+### `tlsSocket.exportKeyingMaterial(length, label[, context])`
+
+
+* `length` {number} number of bytes to retrieve from keying material
+* `label` {string} an application specific label, typically this will be a
+value from the
+[IANA Exporter Label Registry](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#exporter-labels).
+* `context` {Buffer} Optionally provide a context.
+
+* Returns: {Buffer} requested bytes of the keying material
+
+Keying material is used for validations to prevent different kind of attacks in
+network protocols, for example in the specifications of IEEE 802.1X.
+
+Example
+
+```js
+const keyingMaterial = tlsSocket.exportKeyingMaterial(
+ 128,
+ 'client finished');
+
+/**
+ Example return value of keyingMaterial:
+
+*/
+```
+See the OpenSSL [`SSL_export_keying_material`][] documentation for more
+information.
+
### `tlsSocket.getTLSTicket()`