阿西河

所有教程

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

我的收藏

    最近访问  (文章)

      教程列表

      抓包专区
      测试专区

      Node.js tlsSocket.getPeerCertificate

      Node.js tlsSocket.getPeerCertificate

      新增于: v0.11.4

      • detailed < boolean> Include the full certificate chain if true, otherwise include just the peer’s certificate.
      • Returns: < Object>

      Returns an object representing the peer’s certificate. The returned object has some properties corresponding to the fields of the certificate.

      If the full certificate chain was requested, each certificate will include an issuerCertificate property containing an object representing its issuer’s certificate.

      { subject:
         { C: 'UK',
           ST: 'Acknack Ltd',
           L: 'Rhys Jones',
           O: 'node.js',
           OU: 'Test TLS Certificate',
           CN: 'localhost' },
        issuer:
         { C: 'UK',
           ST: 'Acknack Ltd',
           L: 'Rhys Jones',
           O: 'node.js',
           OU: 'Test TLS Certificate',
           CN: 'localhost' },
        issuerCertificate:
         { ... another certificate, possibly with an .issuerCertificate ... },
        raw: < RAW DER buffer >,
        pubkey: < RAW DER buffer >,
        valid_from: 'Nov 11 09:52:22 2009 GMT',
        valid_to: 'Nov 6 09:52:22 2029 GMT',
        fingerprint: '2A:7A:C2:DD:E5:F9:CC:53:72:35:99:7A:02:5A:71:38:52:EC:8A:DF',
        fingerprint256: '2A:7A:C2:DD:E5:F9:CC:53:72:35:99:7A:02:5A:71:38:52:EC:8A:DF:00:11:22:33:44:55:66:77:88:99:AA:BB',
        serialNumber: 'B9B0D332A1AA5635' }
      

      If the peer does not provide a certificate, an empty object will be returned.


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


      目录
      本文目录
      目录