@@ -21,7 +21,7 @@ Private keys can be generated in multiple ways. The example below illustrates
2121use of the OpenSSL command-line interface to generate a 2048-bit RSA private
2222key:
2323
24- ``` sh
24+ ``` bash
2525openssl genrsa -out ryans-key.pem 2048
2626```
2727
@@ -35,7 +35,7 @@ step to obtaining a certificate is to create a *Certificate Signing Request*
3535The OpenSSL command-line interface can be used to generate a CSR for a private
3636key:
3737
38- ``` sh
38+ ``` bash
3939openssl req -new -sha256 -key ryans-key.pem -out ryans-csr.pem
4040```
4141
@@ -45,14 +45,14 @@ Authority for signing or used to generate a self-signed certificate.
4545Creating a self-signed certificate using the OpenSSL command-line interface
4646is illustrated in the example below:
4747
48- ``` sh
48+ ``` bash
4949openssl x509 -req -in ryans-csr.pem -signkey ryans-key.pem -out ryans-cert.pem
5050```
5151
5252Once the certificate is generated, it can be used to generate a ` .pfx ` or
5353` .p12 ` file:
5454
55- ``` sh
55+ ``` bash
5656openssl pkcs12 -export -in ryans-cert.pem -inkey ryans-key.pem \
5757 -certfile ca-cert.pem -out ryans.pfx
5858```
@@ -95,7 +95,7 @@ to generate Diffie-Hellman parameters and specify them with the `dhparam`
9595option to [ ` tls.createSecureContext() ` ] [ ] . The following illustrates the use of
9696the OpenSSL command-line interface to generate such parameters:
9797
98- ``` sh
98+ ``` bash
9999openssl dhparam -outform PEM -out dhparam.pem 2048
100100```
101101
@@ -250,7 +250,7 @@ failures, it is easy to not notice unnecessarily poor TLS performance. The
250250OpenSSL CLI can be used to verify that servers are resuming sessions. Use the
251251` -reconnect ` option to ` openssl s_client ` , for example:
252252
253- ``` sh
253+ ``` console
254254$ openssl s_client -connect localhost:443 -reconnect
255255```
256256
@@ -304,7 +304,7 @@ line switch (directly, or via the [`NODE_OPTIONS`][] environment variable). For
304304instance, the following makes ` ECDHE-RSA-AES128-GCM-SHA256:!RC4 ` the default TLS
305305cipher suite:
306306
307- ``` sh
307+ ``` bash
308308node --tls-cipher-list=" ECDHE-RSA-AES128-GCM-SHA256:!RC4" server.js
309309
310310export NODE_OPTIONS=--tls-cipher-list=" ECDHE-RSA-AES128-GCM-SHA256:!RC4"
0 commit comments