mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-05 06:55:45 +00:00
Update cheatsheets
This commit is contained in:
29
tldr/linux/certtool
Normal file
29
tldr/linux/certtool
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# certtool
|
||||
|
||||
> Generate and manage X.509 certificates, keys, and PKI structures using GnuTLS.
|
||||
> More information: <https://gnutls.org/manual/gnutls.html#certtool-Invocation>.
|
||||
|
||||
- Generate a private key and save it to a file:
|
||||
|
||||
`certtool {{[-p|--generate-privkey]}} --outfile {{path/to/private.key}}`
|
||||
|
||||
- Generate a self-signed certificate using a private key and a template file:
|
||||
|
||||
`certtool {{[-s|--generate-self-signed]}} --load-privkey {{path/to/private.key}} --template {{path/to/info.template}} --outfile {{path/to/certificate.crt}}`
|
||||
|
||||
- Generate a certificate signing request (CSR):
|
||||
|
||||
`certtool {{[-q|--generate-request]}} --load-privkey {{path/to/private.key}} --template {{path/to/info.template}} --outfile {{path/to/request.csr}}`
|
||||
|
||||
- Generate a certificate authority (CA) certificate:
|
||||
|
||||
`certtool {{[-s|--generate-self-signed]}} --load-privkey {{path/to/ca.key}} --template {{path/to/ca.template}} --outfile {{path/to/ca.crt}}`
|
||||
|
||||
- Verify a certificate against a CA certificate:
|
||||
|
||||
`certtool --verify --infile {{path/to/certificate.crt}} --load-ca-certificate {{path/to/ca.crt}}`
|
||||
Reference in New Issue
Block a user