Skip to content

Commit

Permalink
doc: use correct tls certificate property name
Browse files Browse the repository at this point in the history
Docs referred to an `issuer` property being optionally present, when it
should have referred to the `issuerCertificate` property.

Backport-PR-URL: nodejs/node#12468
PR-URL: nodejs/node#10389
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
  • Loading branch information
sam-github authored and andrew749 committed Jul 19, 2017
1 parent 9b13ada commit 354292d
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions doc/api/tls.md
Original file line number Diff line number Diff line change
Expand Up @@ -583,13 +583,16 @@ For Example: `{ type: 'ECDH', name: 'prime256v1', size: 256 }`
added: v0.11.4
-->

* `detailed` {boolean} Specify `true` to request that the full certificate
chain with the `issuer` property be returned; `false` to return only the
top certificate without the `issuer` property.
* `detailed` {boolean} Include the full certificate chain if `true`, otherwise
include just the peer's certificate.

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 a
`issuerCertificate` property containing an object representing its issuer's
certificate.

For example:

```text
Expand All @@ -600,24 +603,23 @@ For example:
O: 'node.js',
OU: 'Test TLS Certificate',
CN: 'localhost' },
issuerInfo:
issuer:
{ C: 'UK',
ST: 'Acknack Ltd',
L: 'Rhys Jones',
O: 'node.js',
OU: 'Test TLS Certificate',
CN: 'localhost' },
issuer:
{ ... another certificate ... },
issuerCertificate:
{ ... another certificate, possibly with a .issuerCertificate ... },
raw: < 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',
serialNumber: 'B9B0D332A1AA5635' }
```

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

### tlsSocket.getProtocol()
<!-- YAML
Expand Down

0 comments on commit 354292d

Please sign in to comment.