@@ -1072,6 +1072,18 @@ added: v0.11.4 |
1072 | 1072 | This property is `true` if the peer certificate was signed by one of the CAs |
1073 | 1073 | specified when creating the `tls.TLSSocket` instance, otherwise `false`. |
1074 | 1074 |
|
| 1075 | +The peer certificate is only verified during a full TLS handshake. When a |
| 1076 | +connection is established by resuming a previous session (see |
| 1077 | +[Session Resumption][]), verification is not repeated. If the client |
| 1078 | +presented a certificate in the original handshake, `authorized` and |
| 1079 | +`authorizationError` carry the result stored with the session, including |
| 1080 | +any verification error. On TLS 1.3, a client that sent no certificate at |
| 1081 | +all can resume a session and report `authorized` as `true`, while |
| 1082 | +[`tls.TLSSocket.getPeerCertificate()`][] returns an empty object. Servers |
| 1083 | +that authorize clients manually with `rejectUnauthorized: false` should |
| 1084 | +therefore also check [`tls.TLSSocket.isSessionReused()`][] and that a peer |
| 1085 | +certificate is present. |
| 1086 | + |
1075 | 1087 | ### `tlsSocket.disableRenegotiation()` |
1076 | 1088 |
|
1077 | 1089 | <!-- YAML |
@@ -2573,6 +2585,7 @@ added: v0.11.3 |
2573 | 2585 | [`tls.TLSSocket.getProtocol()`]: #tlssocketgetprotocol |
2574 | 2586 | [`tls.TLSSocket.getSession()`]: #tlssocketgetsession |
2575 | 2587 | [`tls.TLSSocket.getTLSTicket()`]: #tlssocketgettlsticket |
| 2588 | +[`tls.TLSSocket.isSessionReused()`]: #tlssocketissessionreused |
2576 | 2589 | [`tls.TLSSocket.servername`]: #tlssocketservername |
2577 | 2590 | [`tls.TLSSocket`]: #class-tlstlssocket |
2578 | 2591 | [`tls.connect()`]: #tlsconnectoptions-callback |
|