From 50f3b3aee6039621539b0ec4a5e733199e9d1d3e Mon Sep 17 00:00:00 2001 From: Aadish M Date: Tue, 29 Jul 2025 15:20:29 +0530 Subject: [PATCH] certtool: add page (#17391) * certtool: add page --------- Co-authored-by: Managor <42655600+Managor@users.noreply.github.com> Co-authored-by: Fazle Arefin --- pages/linux/certtool.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pages/linux/certtool.md diff --git a/pages/linux/certtool.md b/pages/linux/certtool.md new file mode 100644 index 0000000000..63e0fc2f0c --- /dev/null +++ b/pages/linux/certtool.md @@ -0,0 +1,24 @@ +# certtool + +> Generate and manage X.509 certificates, keys, and PKI structures using GnuTLS. +> More information: . + +- 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}}`