Skip to content

Commit 46f8fb8

Browse files
AdamMajerruyadorno
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 <luigipinca@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
1 parent 0223603 commit 46f8fb8

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
@@ -1098,17 +1098,17 @@ changes:
10981098
* `name` {string} OpenSSL name for the cipher suite.
10991099
* `standardName` {string} IETF name for the cipher suite.
11001100
* `version` {string} The minimum TLS protocol version supported by this cipher
1101-
suite.
1101+
suite. For the actual negotiated protocol, see [`tls.TLSSocket.getProtocol()`][].
11021102

11031103
Returns an object containing information on the negotiated cipher suite.
11041104

1105-
For example:
1105+
For example, a TLSv1.2 protocol with AES256-SHA cipher:
11061106

11071107
```json
11081108
{
1109-
"name": "AES128-SHA256",
1110-
"standardName": "TLS_RSA_WITH_AES_128_CBC_SHA256",
1111-
"version": "TLSv1.2"
1109+
"name": "AES256-SHA",
1110+
"standardName": "TLS_RSA_WITH_AES_256_CBC_SHA",
1111+
"version": "SSLv3"
11121112
}
11131113
```
11141114

@@ -2258,6 +2258,7 @@ added: v11.4.0
22582258
[`tls.Server`]: #class-tlsserver
22592259
[`tls.TLSSocket.enableTrace()`]: #tlssocketenabletrace
22602260
[`tls.TLSSocket.getPeerCertificate()`]: #tlssocketgetpeercertificatedetailed
2261+
[`tls.TLSSocket.getProtocol()`]: #tlssocketgetprotocol
22612262
[`tls.TLSSocket.getSession()`]: #tlssocketgetsession
22622263
[`tls.TLSSocket.getTLSTicket()`]: #tlssocketgettlsticket
22632264
[`tls.TLSSocket`]: #class-tlstlssocket

0 commit comments

Comments
 (0)