STRONGSWAN_PKI---ISSUE(1)
โจ pki --issue โจ
okay so bestie, welcome to the PKI --ISSUE(1) page ๐ this is the strongSwan corner of the world where we make certificates, and honestly? it's giving main character energy ๐
๐ธ NAME ๐ธ
pki --issue โ Issue a certificate using a CA certificate and key ๐
๐ฆ SYNOPSIS ๐ฆ
pki --issue [--in file] [--type type] --cakey file|--cakeyid hex
--cacert file [--dn subject-dn] [--san subjectAltName]
[--lifetime days] [--not-before datetime] [--not-
after datetime] [--serial hex] [--flag flag]
[--digest digest] [--rsa-padding padding] [--ca]
[--crl uri [--crlissuer issuer]] [--ocsp uri]
[--pathlen len] [--addrblock block] [--nc-permitted name]
[--nc-excluded name] [--critical oid]
[--policy-mapping mapping] [--policy-explicit len]
[--policy-inhibit len] [--policy-any len]
[--cert-policy oid [--cps-uri uri] [--user-notice text]]
[--outform encoding] [--debug level]
pki --issue --options file
pki --issue -h | --help
๐ DESCRIPTION ๐
So this is a sub-command of pki(1), and what it does is issue a certificate using a CA certificate and a private key ๐ like, you bring the CA stuff, it hands you a shiny new cert. iconic behavior fr fr.
โจ OPTIONS โจ
-h,--helpโ prints usage info plus a lil summary of all the options you can use ๐ซถ-v,--debug levelโ sets the debug level, default is1๐-+,--options fileโ reads your command line options from a file, so you don't gotta type forever ๐-i,--in fileโ the public key or PKCS#10 certificate request file you wanna issue. If you don't give this, the key/request gets read fromSTDIN๐-t,--type typeโ the type of the input. Pick one ofpub(public key),priv(private key),rsa(RSA private key),ecdsa(ECDSA private key),ed25519(Ed25519 private key),ed448(Ed448 private key) orpkcs10(PKCS#10 certificate request). Defaults topub๐ซ-k,--cakey fileโ the CA private key file. You need either this or--cakeyid, no skipping ๐-x,--cakeyid hexโ smartcard or TPM CA private key object handle in hex format, with an optional0xprefix. You need either this or--cakey๐-c,--cacert fileโ the CA certificate file. Required. no cap, you literally can't skip this one โ ๏ธ-d,--dn subject-dnโ the subject distinguished name (DN) of the certificate you're issuing ๐ท๏ธ-a,--san subjectAltNameโ the subjectAltName extension to include in the cert. You can use this multiple times, stack 'em up ๐-l,--lifetime daysโ how many days the certificate stays valid, default:1095. It gets ignored if you give both an absolute start and end time โณ-F,--not-before datetimeโ the absolute time when the certificate's validity begins. The datetime format is defined by the--dateformoption ๐ฐ๏ธ-T,--not-after datetimeโ the absolute time when the certificate's validity ends. The datetime format is defined by the--dateformoption โ-D,--dateform formโ thestrptime(3)format for the--not-beforeand--not-afteroptions, default:%d.%m.%y %T๐-s,--serial hexโ serial number in hex. It's randomly allocated by default, so if you don't care, the universe picks for you ๐ฒ-e,--flag flagโ adds an extendedKeyUsage flag. One ofserverAuth,clientAuth,crlSign,ocspSigningormsSmartcardLogon. Can be used multiple times. Without modifiers, this overrides flags from PKCS#10 certificate requests. Prefixing a flag with+adds it to the set of flags read from the request, prefixing it with-removes it from that set ๐ฉ-g,--digest digestโ the digest to use for signature creation. One ofmd5,sha1,sha224,sha256,sha384, orsha512. The default is determined based on the type and size of the signature key ๐-R,--rsa-padding paddingโ the padding to use for RSA signatures. Eitherpkcs1orpss, defaults topkcs1๐งฑ-f,--outform encodingโ the encoding of the created certificate file. Eitherder(ASN.1 DER) orpem(Base64 PEM), defaults toder๐ฆ-b,--caโ includes the CA basicConstraint extension in the certificate ๐-u,--crl uriโ the CRL distribution point URI to include in the certificate. Can be used multiple times ๐-I,--crlissuer issuerโ optional CRL issuer for the CRL at the preceding distribution point ๐-o,--ocsp uriโ the OCSP AuthorityInfoAccess URI to include in the certificate. Can be used multiple times ๐-p,--pathlen lenโ sets the path length constraint ๐-B,--addrblock blockโ RFC 3779 address block to include in the certificate.blockis either a CIDR subnet (such as10.0.0.0/8) or an arbitrary address range (192.168.1.7-192.168.1.13). Can be repeated to include multiple blocks. Please note that the supplied blocks are included in the certificate as is, so for standards compliance, multiple blocks must be supplied in correct order and adjacent blocks must be combined. Refer to RFC 3779 for details ๐งฎ-n,--nc-permitted nameโ adds a permitted NameConstraint extension to the certificate. For DNS or email constraints, the identity type is not always detectable by the given name. Use thedns:oremail:prefix to force a constraint type โ-N,--nc-excluded nameโ adds an excluded NameConstraint extension to the certificate. For DNS or email constraints, the identity type is not always detectable by the given name. Use thedns:oremail:prefix to force a constraint type โ-X,--critical oidโ adds a critical extension with the given OID ๐จ-M,--policy-mapping issuer-oid:subject-oidโ adds a policyMapping from issuer to subject OID ๐บ๏ธ-E,--policy-explicit lenโ adds a requireExplicitPolicy constraint ๐ข-H,--policy-inhibit lenโ adds an inhibitPolicyMapping constraint ๐-A,--policy-any lenโ adds an inhibitAnyPolicy constraint ๐ซ
๐ Certificate Policy ๐
You can add multiple certificatePolicy extensions. Each one carries the following info, bestie:
-P,--cert-policy oidโ OID to include in the certificatePolicy extension. Required. ๐-C,--cps-uri uriโ Certification Practice statement URI for the certificatePolicy ๐-U,--user-notice textโ user notice for the certificatePolicy ๐ฌ
๐ EXAMPLES ๐
To save on repetitive typing (the struggle is real ๐ญ), command line options can be stored in files. Let's assume pki.opt contains the following contents:
--cacert ca_cert.der --cakey ca_key.der --digest sha256
--flag serverAuth --lifetime 1460 --type pkcs10
Then the following command can be used to issue a certificate based on a given PKCS#10 certificate request and the options above:
pki --issue --options pki.opt --in req.der > cert.der
slay. one line, whole cert. ๐
โญ SEE ALSO โญ
and that's the whole page, bestie ๐ซถ this was strongSwan version 6.0.7, dated 2019-05-06 โ go forth and issue those certificates, you absolute icon ๐๐โจ
๐ฆ where this page comes from
- fedora 43: strongswan 6.0.7-2.fc43 ยท GPL-2.0-or-later
- fedora 44: strongswan 6.0.7-4.fc44 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms