阿西河

所有教程

公众号
🌙
阿西河前端的公众号

我的收藏

    最近访问  (文章)

      教程列表

      抓包专区
      测试专区

      Node.js new tls.TLSSocket

      Node.js new tls.TLSSocket(socket[, options])

      版本历史

      版本变更
      v5.0.0ALPN options are supported now.
      v0.11.4新增于: v0.11.4
      • socket < net.Socket> | < stream.Duplex> On the server side, any Duplex stream. On the client side, any instance of net.Socket (for generic Duplex stream support on the client side, tls.connect() must be used).
      • options < Object>
        • isServer: The SSL/TLS protocol is asymmetrical, TLSSockets must know if they are to behave as a server or a client. If true the TLS socket will be instantiated as a server. Default: false.
        • server < net.Server> A net.Server instance.
        • requestCert: Whether to authenticate the remote peer by requesting a certificate. Clients always request a server certificate. Servers (isServer is true) may set requestCert to true to request a client certificate.
        • rejectUnauthorized: See tls.createServer()
        • ALPNProtocols: See tls.createServer()
        • SNICallback: See tls.createServer()
        • session < Buffer> A Buffer instance containing a TLS session.
        • requestOCSP < boolean> If true, specifies that the OCSP status request extension will be added to the client hello and an ‘OCSPResponse’ event will be emitted on the socket before establishing a secure communication
        • secureContext: TLS context object created with tls.createSecureContext(). If a secureContext is not provided, one will be created by passing the entire options object to tls.createSecureContext().
        • …: tls.createSecureContext() options that are used if the secureContext option is missing. Otherwise, they are ignored.

      Construct a new tls.TLSSocket object from an existing TCP socket.


      更多内容请参考:Node.js tls 安全传输层,或者通过 点击对应菜单 进行查看;


      目录
      本文目录
      目录