mirror of
https://github.com/tldr-pages/tldr.git
synced 2026-10-30 18:53:35 +08:00
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
This commit is contained in:
+24
-4
@@ -4,14 +4,34 @@
|
||||
> Some subcommands such as `req` have their own usage documentation.
|
||||
> More information: <https://docs.openssl.org/master/man1/openssl/>.
|
||||
|
||||
- Generate a private key and encrypt the output file using AES256:
|
||||
|
||||
`openssl genpkey -algorithm {{rsa|ec}} -out {{private.key}} -aes256`
|
||||
|
||||
- Generate the corresponding public key from private key `private.key` using `rsa`:
|
||||
|
||||
`openssl rsa -in {{private.key}} -pubout -out {{public.key}}`
|
||||
|
||||
- Generate a self-signed certificate valid for a specified number of days (`365`):
|
||||
|
||||
`openssl req -new -x509 -key {{private.key}} -out {{certificate.crt}} -days {{365}}`
|
||||
|
||||
- Convert certificate to `pem` or `der` format:
|
||||
|
||||
`openssl x509 -in {{certificate.crt}} -out {{certificate.pem|certificate.der}} -outform {{pem|der}}`
|
||||
|
||||
- Check certificate details:
|
||||
|
||||
`openssl x509 -in {{certificate.crt}} -text -noout`
|
||||
|
||||
- Generate a certificate signing request (CSR):
|
||||
|
||||
`openssl req -new -key {{private.key}} -out {{request.csr}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`openssl help`
|
||||
|
||||
- Display help for a specific subcommand:
|
||||
|
||||
`openssl help {{x509}}`
|
||||
|
||||
- Display version:
|
||||
|
||||
`openssl version`
|
||||
|
||||
Reference in New Issue
Block a user