You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A boolean that is `true` if the peer certificate was signed by one of the
422
482
specified CAs, otherwise `false`
423
483
424
484
### tlsSocket.authorizationError
485
+
<!-- YAML
486
+
added: v0.11.4
487
+
-->
425
488
426
489
The reason why the peer's certificate has not been verified. This property
427
490
becomes available only when `tlsSocket.authorized === false`.
428
491
429
492
### tlsSocket.encrypted
493
+
<!-- YAML
494
+
added: v0.11.4
495
+
-->
430
496
431
497
Static boolean value, always `true`. May be used to distinguish TLS sockets
432
498
from regular ones.
433
499
434
500
### tlsSocket.getCipher()
501
+
<!-- YAML
502
+
added: v0.11.4
503
+
-->
504
+
435
505
Returns an object representing the cipher name and the SSL/TLS
436
506
protocol version of the current connection.
437
507
@@ -443,6 +513,9 @@ https://www.openssl.org/docs/ssl/ssl.html#DEALING-WITH-CIPHERS for more
443
513
information.
444
514
445
515
### tlsSocket.getPeerCertificate([ detailed ])
516
+
<!-- YAML
517
+
added: v0.11.4
518
+
-->
446
519
447
520
Returns an object representing the peer's certificate. The returned object has
448
521
some properties corresponding to the field of the certificate. If `detailed`
@@ -479,39 +552,63 @@ If the peer does not provide a certificate, it returns `null` or an empty
479
552
object.
480
553
481
554
### tlsSocket.getSession()
555
+
<!-- YAML
556
+
added: v0.11.4
557
+
-->
482
558
483
559
Return ASN.1 encoded TLS session or `undefined` if none was negotiated. Could
484
560
be used to speed up handshake establishment when reconnecting to the server.
485
561
486
562
### tlsSocket.getTLSTicket()
563
+
<!-- YAML
564
+
added: v0.11.4
565
+
-->
487
566
488
567
NOTE: Works only with client TLS sockets. Useful only for debugging, for
489
568
session reuse provide `session` option to [`tls.connect()`][].
490
569
491
570
Return TLS session ticket or `undefined` if none was negotiated.
492
571
493
572
### tlsSocket.localPort
573
+
<!-- YAML
574
+
added: v0.11.4
575
+
-->
494
576
495
577
The numeric representation of the local port.
496
578
497
579
### tlsSocket.localAddress
580
+
<!-- YAML
581
+
added: v0.11.4
582
+
-->
498
583
499
584
The string representation of the local IP address.
500
585
501
586
### tlsSocket.remoteAddress
587
+
<!-- YAML
588
+
added: v0.11.4
589
+
-->
502
590
503
591
The string representation of the remote IP address. For example,
504
592
`'74.125.127.100'` or `'2001:4860:a005::68'`.
505
593
506
594
### tlsSocket.remoteFamily
595
+
<!-- YAML
596
+
added: v0.11.4
597
+
-->
507
598
508
599
The string representation of the remote IP family. `'IPv4'` or `'IPv6'`.
509
600
510
601
### tlsSocket.remotePort
602
+
<!-- YAML
603
+
added: v0.11.4
604
+
-->
511
605
512
606
The numeric representation of the remote port. For example, `443`.
513
607
514
608
### tlsSocket.renegotiate(options, callback)
609
+
<!-- YAML
610
+
added: v0.11.8
611
+
-->
515
612
516
613
Initiate TLS renegotiation process. The `options` may contain the following
517
614
fields: `rejectUnauthorized`, `requestCert` (See [`tls.createServer()`][] for
@@ -525,6 +622,9 @@ ANOTHER NOTE: When running as the server, socket will be destroyed
525
622
with an error after `handshakeTimeout` timeout.
526
623
527
624
### tlsSocket.setMaxSendFragment(size)
625
+
<!-- YAML
626
+
added: v0.11.11
627
+
-->
528
628
529
629
Set maximum TLS fragment size (default and maximum value is: `16384`, minimum
530
630
is: `512`). Returns `true` on success, `false` otherwise.
@@ -538,6 +638,9 @@ decrease overall server throughput.
0 commit comments