1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-12 05:55:42 +02:00

certtool: add page (#17391)

* certtool: add page

---------

Co-authored-by: Managor <42655600+Managor@users.noreply.github.com>
Co-authored-by: Fazle Arefin <fazlearefin@users.noreply.github.com>
This commit is contained in:
Aadish M 2025-07-29 15:20:29 +05:30 committed by GitHub
parent 20c4dad079
commit 50f3b3aee6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

24
pages/linux/certtool.md Normal file
View file

@ -0,0 +1,24 @@
# 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}}`