CA.PL(1ossl)
okay so this is the CA.PL(1ossl) manual page and bestie, if you've ever stared at OpenSSL cert commands like they were a cryptic group chat you got added to by accident β this is the glow-up you needed π
β¨
π NAME π
CA.pl β a friendlier interface for OpenSSL certificate programs π«Ά
π¦ SYNOPSIS π¦
CA.pl -? | -h | -help
CA.pl -newcert | -newreq | -newreq-nodes | -xsign | -sign | -signCA |
-signcert | -crl | -newca [-extra-cmd parameter]
CA.pl -pkcs12 [certname]
CA.pl -verify certfile ...
CA.pl -revoke certfile [reason]
πΈ DESCRIPTION πΈ
So CA.pl is a perl script that hands the openssl(1) command all the relevant command line arguments for a bunch of common certificate operations. The whole vibe is: make certificate creation and management less of a nightmare by giving you some simple options to work with π
It's lowkey designed as a simple front end for openssl(1), meant for beginners. But real talk β its behaviour isn't always what you want. If you need more control over what the certificate commands are doing, just call openssl(1) directly, no hard feelings π«Ά
Most of the filenames mentioned below can be changed by editing the CA.pl script itself.
Also, heads up π β in some environments (looking at you, Win32) you might not be able to run the CA.pl script directly, and the default configuration file location may be wrong. In that case, run:
perl -S CA.pl
and set the OPENSSL_CONF environment variable to point at the correct path of the configuration file. Slay, problem solved β¨
β¨ OPTIONS β¨
-?,-h,-helpβ prints a usage message. That's it, that's the whole job π-newcertβ creates a brand new self signed certificate. The private key goes into the filenewkey.pemand the request goes into the filenewreq.pem. It invokesopenssl-req(1)under the hood π₯-newreqβ creates a new certificate request. Private key β‘οΈnewkey.pem, request β‘οΈnewreq.pem. Executesopenssl-req(1)behind the scenes π-newreq-nodesβ literally-newreqexcept the private key will not be encrypted. Usesopenssl-req(1)π-newcaβ creates a whole new CA hierarchy for use with thecaprogram (or the-signcertand-xsignoptions). You get prompted to enter the filename of the CA certificates (which should also contain the private key), or if you just hit ENTER you'll be prompted for the details of the CA instead. The relevant files and directories get created in a directory calleddemoCAin the current directory. Usesopenssl-req(1)andopenssl-ca(1). π
β οΈ If thedemoCAdirectory already exists, the-newcacommand will not overwrite it and will do nothing. This can happen if a previous call using the-newcaoption terminated abnormally. To get the correct behaviour, delete the directory if it already exists. Not me warning you twice π
-pkcs12β creates a PKCS#12 file containing the user certificate, private key and CA certificate. It expects the user certificate and private key to be in the filenewcert.pemand the CA certificate to be in the filedemoCA/cacert.pem, and it creates a filenewcert.p12. So you can call this after the-signoption. The PKCS#12 file can be imported directly into a browser π§ If there's an extra argument on the command line, it's used as the "friendly name" for the certificate (which is typically displayed in the browser list box), otherwise the name"My Certificate"is used. It delegates all the work toopenssl-pkcs12(1)β¨-sign,-signcert,-xsignβ calls theopenssl-ca(1)command to sign a certificate request. Expects the request to be in the filenewreq.pem. The new certificate gets written to the filenewcert.pemβ except with the-xsignoption, where it's written to standard output π¨οΈ-signCAβ same as the-signoption, except it uses the configuration file sectionv3_ca, so it makes the signed request a valid CA certificate. Super useful when you're creating an intermediate CA from a root CA π Extra params are passed toopenssl-ca(1).-signcertβ same as-sign, except it expects a self signed certificate to be present in the filenewreq.pem. Extra params are passed toopenssl-x509(1)andopenssl-ca(1).-crlβ generates a CRL. Executesopenssl-ca(1)ποΈ-revokecertfile [reason] β revokes the certificate contained in the specified certfile. An optional reason may be specified, and it must be one of:unspecified,keyCompromise,CACompromise,affiliationChanged,superseded,cessationOfOperation,certificateHold, orremoveFromCRL. Leveragesopenssl-ca(1)π-verifyβ verifies certificates against the CA certificate fordemoCA. If no certificates are specified on the command line, it tries to verify the filenewcert.pem. Invokesopenssl-verify(1)β-extra-cmdparameter β for each optionextra-cmd, passes parameter to theopenssl(1)sub-command with the same name ascmd, if that sub-command is invoked. For example, ifopenssl-req(1)is invoked, the parameter given with-extra-reqwill be passed to it. For multi-word parameters, either repeat the option or quote the parameters so it looks like one word to your shell. See the individual command documentation for more information π
π EXAMPLES π
Create a CA hierarchy β easy:
CA.pl -newca
Complete certificate creation example, aka the full main character arc β¨ create a CA, create a request, sign the request, and finally create a PKCS#12 file containing it:
CA.pl -newca
CA.pl -newreq
CA.pl -sign
CA.pl -pkcs12 "My Test Certificate"
π ENVIRONMENT π
The environment variable OPENSSL can be used to specify the name of the OpenSSL program. It can be a full pathname, or a relative one π£οΈ
The environment variable OPENSSL_CONFIG can be used to specify a configuration option and value to the req and ca commands invoked by this script. Its value should be the option and pathname, like this:
"-config /path/to/conf-file"
π SEE ALSO π
openssl(1), openssl-x509(1), openssl-ca(1), openssl-req(1), openssl-pkcs12(1), config(5) β go read them, iykyk π¦
π COPYRIGHT π
Copyright 2000-2025 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
okay that's the whole page bestie, you ate that π«Άβ¨ this was CA.PL(1ossl) from OpenSSL version 3.5.0, dated 2026-09-25 β go forth and certify, no cap π
π
π¦ where this page comes from
- opensuse-leap 16.0: openssl-3 3.5.0-160000.11.1 Β· Apache-2.0
- opensuse-leap 16.0: openssl-3 3.5.0-160000.11.1 Β· Apache-2.0
- opensuse-leap 16.0: openssl-3 3.5.0-160000.11.1 Β· Apache-2.0
- opensuse-leap 16.0: openssl-3 3.5.0-160000.11.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms