CA.PL(1SSL)
π NAME π
CA.pl β the friendlier interface for OpenSSL certificate programs π like, it's the vibes-forward front door to the whole cert situation.
β¨ 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 π¦
Okay so bestie, CA.pl is a perl script π
and what it does is hand the relevant command line arguments over to the openssl(1) command for a bunch of common certificate operations. It's literally designed to make certificate creation and management less of a whole ordeal by giving you some simple options instead of a wall of flags. π«Ά
Real talk though: this script is meant as a simple front end for the openssl(1) program, for beginners. Its behaviour isn't always what is wanted π no cap. If you want more control over the behaviour of the certificate commands, call the openssl(1) command directly. Periodt.
Most of the filenames mentioned below can be modified by editing the CA.pl script. β¨
And under some environments it may not even be possible to run the CA.pl script directly (for example Win32 π), plus the default configuration file location may be wrong. In that case the command:
perl -S CA.pl
can be used π and the OPENSSL_CONF environment variable can be set to point to the correct path of the configuration file.
πΈ OPTIONS πΈ
-?,-h,-helpβ Prints a usage message. π-newcertβ Creates a new self signed certificate. The private key is written to the filenewkey.pemand the request written to the filenewreq.pem. Invokesopenssl-req(1).-newreqβ Creates a new certificate request. The private key is written to the filenewkey.pemand the request written to the filenewreq.pem. Executesopenssl-req(1)under the hood. π-newreq-nodesβ Is like-newreqexcept that the private key will not be encrypted π. Usesopenssl-req(1).-newcaβ Creates a new CA hierarchy for use with thecaprogram (or the-signcertand-xsignoptions). The user is prompted to enter the filename of the CA certificates (which should also contain the private key) or by hitting ENTER details of the CA will be prompted for. The relevant files and directories are created in a directory calleddemoCAin the current directory. Usesopenssl-req(1)andopenssl-ca(1).
Heads up bestie: if thedemoCAdirectory already exists then 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.
-pkcs12β Create 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, it creates a filenewcert.p12. This command can thus be called after the-signoption. The PKCS#12 file can be imported directly into a browser π. If there is an additional argument on the command line it will be used as the "friendly name" for the certificate (which is typically displayed in the browser list box), otherwise the name "My Certificate" is used. Delegates work toopenssl-pkcs12(1).-sign,-xsignβ Calls theopenssl-ca(1)command to sign a certificate request. It expects the request to be in the filenewreq.pem. The new certificate is written to the filenewcert.pemexcept in the case of the-xsignoption when it is written to standard output. β-signCAβ This option is the same as the-signoption except it uses the configuration file sectionv3_caand so makes the signed request a valid CA certificate. This is useful when creating intermediate CA from a root CA π. Extra params are passed toopenssl-ca(1).-signcertβ This option is the same as-signexcept it expects a self signed certificate to be present in the filenewreq.pem. Extra params are passed toopenssl-x509(1)andopenssl-ca(1).-crlβ Generate a CRL. Executesopenssl-ca(1). π₯-revoke certfile [reason]β Revoke the certificate contained in the specified certfile. An optional reason may be specified, and 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-cmd parameterβ For each optionextra-cmd, pass parameter to theopenssl(1)sub-command with the same name as cmd, 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:
CA.pl -newca
Complete certificate creation example: 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 may 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 may be used to specify a configuration option and value to the req and ca commands invoked by this script. It's value should be the option and pathname, as in "-config /path/to/conf-file". π
π SEE ALSO π
openssl(1), openssl-x509(1), openssl-ca(1), openssl-req(1), openssl-pkcs12(1), config(5)
π COPYRIGHT π
Copyright 2000-2026 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 thing, bestie, you ate π
β¨ this is CA.PL(1SSL) from OpenSSL version 4.0.3, dated 2026-09-29 β now go make some certificates, main character energy only ππ¦π
π¦ where this page comes from
- ubuntu stonking: openssl 4.0.3-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms