doc: indent ordered list child content
Markdownlint flags this with MD029 rule. Markdown renders will usually use list continuation number if it can. Explicitly adding it to the list item child scope makes it clearer. PR-URL: https://github.com/nodejs/node/pull/29332 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
This commit is contained in:
parent
02f3dd24f3
commit
754d5a9375
@ -6,52 +6,54 @@
|
|||||||
|
|
||||||
The `dns` module contains functions belonging to two different categories:
|
The `dns` module contains functions belonging to two different categories:
|
||||||
|
|
||||||
1) Functions that use the underlying operating system facilities to perform
|
1. Functions that use the underlying operating system facilities to perform
|
||||||
name resolution, and that do not necessarily perform any network communication.
|
name resolution, and that do not necessarily perform any network
|
||||||
This category contains only one function: [`dns.lookup()`][]. **Developers
|
communication.
|
||||||
looking to perform name resolution in the same way that other applications on
|
This category contains only one function: [`dns.lookup()`][]. **Developers
|
||||||
the same operating system behave should use [`dns.lookup()`][].**
|
looking to perform name resolution in the same way that other applications
|
||||||
|
on the same operating system behave should use [`dns.lookup()`][].**
|
||||||
|
|
||||||
For example, looking up `iana.org`.
|
For example, looking up `iana.org`.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const dns = require('dns');
|
const dns = require('dns');
|
||||||
|
|
||||||
dns.lookup('iana.org', (err, address, family) => {
|
dns.lookup('iana.org', (err, address, family) => {
|
||||||
console.log('address: %j family: IPv%s', address, family);
|
console.log('address: %j family: IPv%s', address, family);
|
||||||
});
|
|
||||||
// address: "192.0.43.8" family: IPv4
|
|
||||||
```
|
|
||||||
|
|
||||||
2) Functions that connect to an actual DNS server to perform name resolution,
|
|
||||||
and that _always_ use the network to perform DNS queries. This category
|
|
||||||
contains all functions in the `dns` module _except_ [`dns.lookup()`][]. These
|
|
||||||
functions do not use the same set of configuration files used by
|
|
||||||
[`dns.lookup()`][] (e.g. `/etc/hosts`). These functions should be used by
|
|
||||||
developers who do not want to use the underlying operating system's facilities
|
|
||||||
for name resolution, and instead want to _always_ perform DNS queries.
|
|
||||||
|
|
||||||
Below is an example that resolves `'archive.org'` then reverse resolves the IP
|
|
||||||
addresses that are returned.
|
|
||||||
|
|
||||||
```js
|
|
||||||
const dns = require('dns');
|
|
||||||
|
|
||||||
dns.resolve4('archive.org', (err, addresses) => {
|
|
||||||
if (err) throw err;
|
|
||||||
|
|
||||||
console.log(`addresses: ${JSON.stringify(addresses)}`);
|
|
||||||
|
|
||||||
addresses.forEach((a) => {
|
|
||||||
dns.reverse(a, (err, hostnames) => {
|
|
||||||
if (err) {
|
|
||||||
throw err;
|
|
||||||
}
|
|
||||||
console.log(`reverse for ${a}: ${JSON.stringify(hostnames)}`);
|
|
||||||
});
|
});
|
||||||
});
|
// address: "192.0.43.8" family: IPv4
|
||||||
});
|
```
|
||||||
```
|
|
||||||
|
2. Functions that connect to an actual DNS server to perform name resolution,
|
||||||
|
and that _always_ use the network to perform DNS queries. This category
|
||||||
|
contains all functions in the `dns` module _except_ [`dns.lookup()`][].
|
||||||
|
These functions do not use the same set of configuration files used by
|
||||||
|
[`dns.lookup()`][] (e.g. `/etc/hosts`). These functions should be used by
|
||||||
|
developers who do not want to use the underlying operating system's
|
||||||
|
facilities for name resolution, and instead want to _always_ perform DNS
|
||||||
|
queries.
|
||||||
|
|
||||||
|
Below is an example that resolves `'archive.org'` then reverse resolves the
|
||||||
|
IP addresses that are returned.
|
||||||
|
|
||||||
|
```js
|
||||||
|
const dns = require('dns');
|
||||||
|
|
||||||
|
dns.resolve4('archive.org', (err, addresses) => {
|
||||||
|
if (err) throw err;
|
||||||
|
|
||||||
|
console.log(`addresses: ${JSON.stringify(addresses)}`);
|
||||||
|
|
||||||
|
addresses.forEach((a) => {
|
||||||
|
dns.reverse(a, (err, hostnames) => {
|
||||||
|
if (err) {
|
||||||
|
throw err;
|
||||||
|
}
|
||||||
|
console.log(`reverse for ${a}: ${JSON.stringify(hostnames)}`);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
There are subtle consequences in choosing one over the other, please consult
|
There are subtle consequences in choosing one over the other, please consult
|
||||||
the [Implementation considerations section][] for more information.
|
the [Implementation considerations section][] for more information.
|
||||||
|
@ -35,34 +35,34 @@ replace that with the staging branch for the targeted release line.
|
|||||||
2. Make sure that the local staging branch is up to date with the remote
|
2. Make sure that the local staging branch is up to date with the remote
|
||||||
3. Create a new branch off of the staging branch
|
3. Create a new branch off of the staging branch
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# Assuming your fork of Node.js is checked out in $NODE_DIR,
|
# Assuming your fork of Node.js is checked out in $NODE_DIR,
|
||||||
# the origin remote points to your fork, and the upstream remote points
|
# the origin remote points to your fork, and the upstream remote points
|
||||||
# to git://github.com/nodejs/node
|
# to git://github.com/nodejs/node
|
||||||
cd $NODE_DIR
|
cd $NODE_DIR
|
||||||
# If v8.x-staging is checked out `pull` should be used instead of `fetch`
|
# If v8.x-staging is checked out `pull` should be used instead of `fetch`
|
||||||
git fetch upstream v8.x-staging:v8.x-staging -f
|
git fetch upstream v8.x-staging:v8.x-staging -f
|
||||||
# Assume we want to backport PR #10157
|
# Assume we want to backport PR #10157
|
||||||
git checkout -b backport-10157-to-v8.x v8.x-staging
|
git checkout -b backport-10157-to-v8.x v8.x-staging
|
||||||
# Ensure there are no test artifacts from previous builds
|
# Ensure there are no test artifacts from previous builds
|
||||||
# Note that this command deletes all files and directories
|
# Note that this command deletes all files and directories
|
||||||
# not under revision control below the ./test directory.
|
# not under revision control below the ./test directory.
|
||||||
# It is optional and should be used with caution.
|
# It is optional and should be used with caution.
|
||||||
git clean -xfd ./test/
|
git clean -xfd ./test/
|
||||||
```
|
```
|
||||||
|
|
||||||
4. After creating the branch, apply the changes to the branch. The cherry-pick
|
4. After creating the branch, apply the changes to the branch. The cherry-pick
|
||||||
will likely fail due to conflicts. In that case, you will see something
|
will likely fail due to conflicts. In that case, you will see something
|
||||||
like this:
|
like this:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# Say the $SHA is 773cdc31ef
|
# Say the $SHA is 773cdc31ef
|
||||||
$ git cherry-pick $SHA # Use your commit hash
|
$ git cherry-pick $SHA # Use your commit hash
|
||||||
error: could not apply 773cdc3... <commit title>
|
error: could not apply 773cdc3... <commit title>
|
||||||
hint: after resolving the conflicts, mark the corrected paths
|
hint: after resolving the conflicts, mark the corrected paths
|
||||||
hint: with 'git add <paths>' or 'git rm <paths>'
|
hint: with 'git add <paths>' or 'git rm <paths>'
|
||||||
hint: and commit the result with 'git commit'
|
hint: and commit the result with 'git commit'
|
||||||
```
|
```
|
||||||
|
|
||||||
5. Make the required changes to remove the conflicts, add the files to the index
|
5. Make the required changes to remove the conflicts, add the files to the index
|
||||||
using `git add`, and then commit the changes. That can be done with
|
using `git add`, and then commit the changes. That can be done with
|
||||||
|
@ -20,106 +20,106 @@ the nodejs/node repository.
|
|||||||
|
|
||||||
1. Find NSS metadata for update.
|
1. Find NSS metadata for update.
|
||||||
|
|
||||||
The latest released NSS version, release date, Firefox version, and Firefox
|
The latest released NSS version, release date, Firefox version, and Firefox
|
||||||
release date can be found in the [NSS release schedule][].
|
release date can be found in the [NSS release schedule][].
|
||||||
|
|
||||||
The tag to fetch `certdata.txt` from is found by looking for the release
|
The tag to fetch `certdata.txt` from is found by looking for the release
|
||||||
version in the [tag list][].
|
version in the [tag list][].
|
||||||
|
|
||||||
2. Update `certdata.txt` from the NSS release tag.
|
2. Update `certdata.txt` from the NSS release tag.
|
||||||
|
|
||||||
Update the tag in the commands below, and run:
|
Update the tag in the commands below, and run:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
cd tools/
|
cd tools/
|
||||||
./mk-ca-bundle.pl -v 2>_before
|
./mk-ca-bundle.pl -v 2>_before
|
||||||
curl -O https://hg.mozilla.org/projects/nss/raw-file/NSS_3_41_RTM/lib/ckfw/builtins/certdata.txt
|
curl -O https://hg.mozilla.org/projects/nss/raw-file/NSS_3_41_RTM/lib/ckfw/builtins/certdata.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
The `_before` file will be used later. Verify that running `mk-ca-bundle` made
|
The `_before` file will be used later. Verify that running `mk-ca-bundle`
|
||||||
no changes to `src/node_root_certs.h`. If it did, something went wrong with the
|
made no changes to `src/node_root_certs.h`. If it did, something went wrong
|
||||||
previous update. Seek help!
|
with the previous update. Seek help!
|
||||||
|
|
||||||
Update metadata in the message below, and commit `certdata.txt`:
|
Update metadata in the message below, and commit `certdata.txt`:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
tools: update certdata.txt
|
tools: update certdata.txt
|
||||||
|
|
||||||
This is the certdata.txt[0] from NSS 3.41, released on 2018-12-03.
|
This is the certdata.txt[0] from NSS 3.41, released on 2018-12-03.
|
||||||
|
|
||||||
This is the version of NSS that will ship in Firefox 65 on
|
This is the version of NSS that will ship in Firefox 65 on
|
||||||
2018-12-11.
|
2018-12-11.
|
||||||
|
|
||||||
[0] https://hg.mozilla.org/projects/nss/raw-file/NSS_3_41_RTM/lib/ckfw/builtins/certdata.txt
|
[0] https://hg.mozilla.org/projects/nss/raw-file/NSS_3_41_RTM/lib/ckfw/builtins/certdata.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Update `node_root_certs.h` from `certdata.txt`.
|
3. Update `node_root_certs.h` from `certdata.txt`.
|
||||||
|
|
||||||
Run the command below:
|
Run the command below:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
./mk-ca-bundle.pl -v 2>_after
|
./mk-ca-bundle.pl -v 2>_after
|
||||||
```
|
```
|
||||||
|
|
||||||
Confirm that `../src/node_root_certs.h` was updated.
|
Confirm that `../src/node_root_certs.h` was updated.
|
||||||
|
|
||||||
Determine what changes were made by diffing the before and after files:
|
Determine what changes were made by diffing the before and after files:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
% diff _before _after
|
% diff _before _after
|
||||||
11d10
|
11d10
|
||||||
< Parsing: Visa eCommerce Root
|
< Parsing: Visa eCommerce Root
|
||||||
106d104
|
106d104
|
||||||
< Parsing: TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı H5
|
< Parsing: TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı H5
|
||||||
113,117d110
|
113,117d110
|
||||||
< Parsing: Certplus Root CA G1
|
< Parsing: Certplus Root CA G1
|
||||||
< Parsing: Certplus Root CA G2
|
< Parsing: Certplus Root CA G2
|
||||||
< Parsing: OpenTrust Root CA G1
|
< Parsing: OpenTrust Root CA G1
|
||||||
< Parsing: OpenTrust Root CA G2
|
< Parsing: OpenTrust Root CA G2
|
||||||
< Parsing: OpenTrust Root CA G3
|
< Parsing: OpenTrust Root CA G3
|
||||||
134c127,136
|
134c127,136
|
||||||
< Done (133 CA certs processed, 20 skipped).
|
< Done (133 CA certs processed, 20 skipped).
|
||||||
---
|
---
|
||||||
> Parsing: GlobalSign Root CA - R6
|
> Parsing: GlobalSign Root CA - R6
|
||||||
> Parsing: OISTE WISeKey Global Root GC CA
|
> Parsing: OISTE WISeKey Global Root GC CA
|
||||||
> Parsing: GTS Root R1
|
> Parsing: GTS Root R1
|
||||||
> Parsing: GTS Root R2
|
> Parsing: GTS Root R2
|
||||||
> Parsing: GTS Root R3
|
> Parsing: GTS Root R3
|
||||||
> Parsing: GTS Root R4
|
> Parsing: GTS Root R4
|
||||||
> Parsing: UCA Global G2 Root
|
> Parsing: UCA Global G2 Root
|
||||||
> Parsing: UCA Extended Validation Root
|
> Parsing: UCA Extended Validation Root
|
||||||
> Parsing: Certigna Root CA
|
> Parsing: Certigna Root CA
|
||||||
> Done (135 CA certs processed, 16 skipped).
|
> Done (135 CA certs processed, 16 skipped).
|
||||||
```
|
```
|
||||||
|
|
||||||
Use the diff to update the message below, and commit `src/node_root_certs.h`:
|
Use the diff to update the message below, and commit `src/node_root_certs.h`:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
crypto: update root certificates
|
crypto: update root certificates
|
||||||
|
|
||||||
Update the list of root certificates in src/node_root_certs.h with
|
Update the list of root certificates in src/node_root_certs.h with
|
||||||
tools/mk-ca-bundle.pl.
|
tools/mk-ca-bundle.pl.
|
||||||
|
|
||||||
Certificates added:
|
Certificates added:
|
||||||
- GlobalSign Root CA - R6
|
- GlobalSign Root CA - R6
|
||||||
- OISTE WISeKey Global Root GC CA
|
- OISTE WISeKey Global Root GC CA
|
||||||
- GTS Root R1
|
- GTS Root R1
|
||||||
- GTS Root R2
|
- GTS Root R2
|
||||||
- GTS Root R3
|
- GTS Root R3
|
||||||
- GTS Root R4
|
- GTS Root R4
|
||||||
- UCA Global G2 Root
|
- UCA Global G2 Root
|
||||||
- UCA Extended Validation Root
|
- UCA Extended Validation Root
|
||||||
- Certigna Root CA
|
- Certigna Root CA
|
||||||
|
|
||||||
Certificates removed:
|
Certificates removed:
|
||||||
- Visa eCommerce Root
|
- Visa eCommerce Root
|
||||||
- TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı H5
|
- TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı H5
|
||||||
- Certplus Root CA G1
|
- Certplus Root CA G1
|
||||||
- Certplus Root CA G2
|
- Certplus Root CA G2
|
||||||
- OpenTrust Root CA G1
|
- OpenTrust Root CA G1
|
||||||
- OpenTrust Root CA G2
|
- OpenTrust Root CA G2
|
||||||
- OpenTrust Root CA G3
|
- OpenTrust Root CA G3
|
||||||
```
|
```
|
||||||
|
|
||||||
[NSS release schedule]: https://wiki.mozilla.org/NSS:Release_Versions
|
[NSS release schedule]: https://wiki.mozilla.org/NSS:Release_Versions
|
||||||
[tag list]: https://hg.mozilla.org/projects/nss/tags
|
[tag list]: https://hg.mozilla.org/projects/nss/tags
|
||||||
|
Loading…
x
Reference in New Issue
Block a user