Skip to content

Commit 97ad1a0

Browse files
AdamMajerjuanarbol
authored andcommitted
doc: clarify tls.tlsSocket.getCipher().version
The getCipher() returns a tuple that includes protocol version string. This string refers to the minimum protocol version string, as per documentation. What is missing is a reference to the documentation where to get the negotiated cipher for the socket connection and a clearer example. Fixes: #43406 PR-URL: #44086 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
1 parent 9e10ee7 commit 97ad1a0

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

doc/api/tls.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -1091,17 +1091,17 @@ changes:
10911091
* `name` {string} OpenSSL name for the cipher suite.
10921092
* `standardName` {string} IETF name for the cipher suite.
10931093
* `version` {string} The minimum TLS protocol version supported by this cipher
1094-
suite.
1094+
suite. For the actual negotiated protocol, see [`tls.TLSSocket.getProtocol()`][].
10951095

10961096
Returns an object containing information on the negotiated cipher suite.
10971097

1098-
For example:
1098+
For example, a TLSv1.2 protocol with AES256-SHA cipher:
10991099

11001100
```json
11011101
{
1102-
"name": "AES128-SHA256",
1103-
"standardName": "TLS_RSA_WITH_AES_128_CBC_SHA256",
1104-
"version": "TLSv1.2"
1102+
"name": "AES256-SHA",
1103+
"standardName": "TLS_RSA_WITH_AES_256_CBC_SHA",
1104+
"version": "SSLv3"
11051105
}
11061106
```
11071107

@@ -2237,6 +2237,7 @@ added: v11.4.0
22372237
[`tls.Server`]: #class-tlsserver
22382238
[`tls.TLSSocket.enableTrace()`]: #tlssocketenabletrace
22392239
[`tls.TLSSocket.getPeerCertificate()`]: #tlssocketgetpeercertificatedetailed
2240+
[`tls.TLSSocket.getProtocol()`]: #tlssocketgetprotocol
22402241
[`tls.TLSSocket.getSession()`]: #tlssocketgetsession
22412242
[`tls.TLSSocket.getTLSTicket()`]: #tlssocketgettlsticket
22422243
[`tls.TLSSocket`]: #class-tlstlssocket

0 commit comments

Comments
 (0)