File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ import {
6060 tlsSocket . enableTrace ( ) ;
6161
6262 tlsSocket . encrypted ; // $ExpectType true
63+ tlsSocket . servername ; // $ExpectType string | false | null
6364
6465 const caCertificates : string [ ] = getCACertificates ( "default" ) ;
6566 const ciphers : string [ ] = getCiphers ( ) ;
Original file line number Diff line number Diff line change @@ -251,6 +251,10 @@ declare module "node:tls" {
251251 * When a handshake is completed but not ALPN protocol was selected, tlsSocket.alpnProtocol equals false.
252252 */
253253 alpnProtocol : string | false | null ;
254+ /**
255+ * String containing the server name requested via SNI (Server Name Indication) TLS extension.
256+ */
257+ servername : string | false | null ;
254258 /**
255259 * Returns an object representing the local certificate. The returned object has
256260 * some properties corresponding to the fields of the certificate.
Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ import {
5858 tlsSocket . enableTrace ( ) ;
5959
6060 tlsSocket . encrypted ; // $ExpectType true
61+ tlsSocket . servername ; // $ExpectType string | false | null
6162
6263 const ciphers : string [ ] = getCiphers ( ) ;
6364 const curve : string = DEFAULT_ECDH_CURVE ;
Original file line number Diff line number Diff line change @@ -245,6 +245,10 @@ declare module "tls" {
245245 * When a handshake is completed but not ALPN protocol was selected, tlsSocket.alpnProtocol equals false.
246246 */
247247 alpnProtocol : string | false | null ;
248+ /**
249+ * String containing the server name requested via SNI (Server Name Indication) TLS extension.
250+ */
251+ servername : string | false | null ;
248252 /**
249253 * Returns an object representing the local certificate. The returned object has
250254 * some properties corresponding to the fields of the certificate.
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ import {
6060 tlsSocket . enableTrace ( ) ;
6161
6262 tlsSocket . encrypted ; // $ExpectType true
63+ tlsSocket . servername ; // $ExpectType string | false | null
6364
6465 const caCertificates : string [ ] = getCACertificates ( "default" ) ;
6566 const ciphers : string [ ] = getCiphers ( ) ;
Original file line number Diff line number Diff line change @@ -245,6 +245,10 @@ declare module "tls" {
245245 * When a handshake is completed but not ALPN protocol was selected, tlsSocket.alpnProtocol equals false.
246246 */
247247 alpnProtocol : string | false | null ;
248+ /**
249+ * String containing the server name requested via SNI (Server Name Indication) TLS extension.
250+ */
251+ servername : string | false | null ;
248252 /**
249253 * Returns an object representing the local certificate. The returned object has
250254 * some properties corresponding to the fields of the certificate.
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ import {
6060 tlsSocket . enableTrace ( ) ;
6161
6262 tlsSocket . encrypted ; // $ExpectType true
63+ tlsSocket . servername ; // $ExpectType string | false | null
6364
6465 const caCertificates : string [ ] = getCACertificates ( "default" ) ;
6566 const ciphers : string [ ] = getCiphers ( ) ;
Original file line number Diff line number Diff line change @@ -245,6 +245,10 @@ declare module "tls" {
245245 * When a handshake is completed but not ALPN protocol was selected, tlsSocket.alpnProtocol equals false.
246246 */
247247 alpnProtocol : string | false | null ;
248+ /**
249+ * String containing the server name requested via SNI (Server Name Indication) TLS extension.
250+ */
251+ servername : string | false | null ;
248252 /**
249253 * Returns an object representing the local certificate. The returned object has
250254 * some properties corresponding to the fields of the certificate.
You can’t perform that action at this time.
0 commit comments