Skip to content

Commit 73a9a6f

Browse files
committed
doc: harmonize description of ca argument
Different sections said different things about what the `ca` argument should look like. This commit harmonizes them. Ref: #4099 PR-URL: #4213 Reviewed-By: Roman Reiss <[email protected]>
1 parent 1e89830 commit 73a9a6f

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

doc/api/https.markdown

+3-2
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,9 @@ The following options from [`tls.connect()`][] can also be specified. However, a
164164
- `key`: Private key to use for SSL. Default `null`.
165165
- `passphrase`: A string of passphrase for the private key or pfx. Default `null`.
166166
- `cert`: Public x509 certificate to use. Default `null`.
167-
- `ca`: An authority certificate or array of authority certificates to check
168-
the remote host against.
167+
- `ca`: A string, `Buffer` or array of strings or `Buffer`s of trusted
168+
certificates in PEM format. If this is omitted several well known "root"
169+
CAs will be used, like VeriSign. These are used to authorize connections.
169170
- `ciphers`: A string describing the ciphers to use or exclude. Consult
170171
<https://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT> for
171172
details on the format.

doc/api/tls.markdown

+9-8
Original file line numberDiff line numberDiff line change
@@ -564,9 +564,9 @@ Creates a new client connection to the given `port` and `host` (old API) or
564564
- `cert`: A string or `Buffer` containing the certificate key of the client in
565565
PEM format. (Could be an array of certs).
566566

567-
- `ca`: An array of strings or `Buffer`s of trusted certificates in PEM
568-
format. If this is omitted several well known "root" CAs will be used,
569-
like VeriSign. These are used to authorize connections.
567+
- `ca`: A string, `Buffer` or array of strings or `Buffer`s of trusted
568+
certificates in PEM format. If this is omitted several well known "root"
569+
CAs will be used, like VeriSign. These are used to authorize connections.
570570

571571
- `ciphers`: A string describing the ciphers to use or exclude, separated by
572572
`:`. Uses the same default cipher suite as `tls.createServer`.
@@ -674,8 +674,9 @@ dictionary with keys:
674674
objects in the format `{pem: key, passphrase: passphrase}`. (Required)
675675
* `passphrase` : A string of passphrase for the private key or pfx
676676
* `cert` : A string holding the PEM encoded certificate
677-
* `ca` : Either a string or list of strings of PEM encoded CA
678-
certificates to trust.
677+
* `ca`: A string, `Buffer` or array of strings or `Buffer`s of trusted
678+
certificates in PEM format. If this is omitted several well known "root"
679+
CAs will be used, like VeriSign. These are used to authorize connections.
679680
* `crl` : Either a string or list of strings of PEM encoded CRLs
680681
(Certificate Revocation List)
681682
* `ciphers`: A string describing the ciphers to use or exclude.
@@ -736,9 +737,9 @@ automatically set as a listener for the [`'secureConnection'`][] event. The
736737
- `cert`: A string or `Buffer` containing the certificate key of the server in
737738
PEM format. (Could be an array of certs). (Required)
738739

739-
- `ca`: An array of strings or `Buffer`s of trusted certificates in PEM
740-
format. If this is omitted several well known "root" CAs will be used,
741-
like VeriSign. These are used to authorize connections.
740+
- `ca`: A string, `Buffer` or array of strings or `Buffer`s of trusted
741+
certificates in PEM format. If this is omitted several well known "root"
742+
CAs will be used, like VeriSign. These are used to authorize connections.
742743

743744
- `crl` : Either a string or list of strings of PEM encoded CRLs (Certificate
744745
Revocation List)

0 commit comments

Comments
 (0)