Skip to content

Commit efeabcb

Browse files
authored
openssl: update page (#19629)
* update openssl page with examples * resolve 1 of 1 review comment * resolve 4 of 4 review comments * resolve 3 of 3 review comments * update the more information URL
1 parent 25432fa commit efeabcb

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

pages/common/openssl.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,33 @@
44
> Some subcommands such as `req` have their own usage documentation.
55
> More information: <https://docs.openssl.org/master/man1/openssl/>.
66
7-
- Display help:
7+
- Generate a private key and encrypt the output file using AES256:
88

9-
`openssl help`
9+
`openssl genpkey -algorithm {{rsa|ec}} -out {{private.key}} -aes256`
10+
11+
- Generate the corresponding public key from private key `private.key` using `rsa`:
12+
13+
`openssl rsa -in {{private.key}} -pubout -out {{public.key}}`
14+
15+
- Generate a self-signed certificate valid for a specified number of days (`365`):
16+
17+
`openssl req -new -x509 -key {{private.key}} -out {{certificate.crt}} -days {{365}}`
18+
19+
- Convert certificate to `pem` or `der` format:
1020

11-
- Display help for a specific subcommand:
21+
`openssl x509 -in {{certificate.crt}} -out {{certificate.pem|certificate.der}} -outform {{pem|der}}`
1222

13-
`openssl help {{x509}}`
23+
- Check certificate details:
24+
25+
`openssl x509 -in {{certificate.crt}} -text -noout`
26+
27+
- Generate a certificate signing request (CSR):
28+
29+
`openssl req -new -key {{private.key}} -out {{request.csr}}`
30+
31+
- Display help:
32+
33+
`openssl help`
1434

1535
- Display version:
1636

0 commit comments

Comments
 (0)