STRONGSWAN_PKI---REQ(1)
πΈ PKI --REQ(1) πΈ
okay bestie, sit down, hydrate, because we're about to talk about the pki --req page from the strongSwan manual, and honestly? it's giving certificate-request royalty. π
β¨ NAME β¨
pki --req β create a PKCS#10 certificate request π
β¨ SYNOPSIS β¨
like, here's the whole vibe of how you call it:
pki --req [--in file|--keyid hex] [--type type] --dn distinguished-name
[--san subjectAltName] [--profile profile] [--flag flag]
[--password password] [--digest digest]
[--rsa-padding padding] [--outform encoding] [--debug level]
pki --req [--in file|--keyid hex] [--type type] --oldreq file
[--password password] [--digest digest]
[--rsa-padding padding] [--outform encoding] [--debug level]
pki --req --options file
pki --req -h | --help
β¨ DESCRIPTION β¨
so this sub-command of pki(1) is literally the one that creates a PKCS#10 certificate request. that's it, that's the job, and it does it flawlessly. π
β¨ OPTIONS β¨
-h,--helpβ prints usage info plus a lil summary of all the options available. your bestie when you're lost. π«Ά-v,--debug levelβ sets the debug level, and the default is1.-+,--options fileβ reads the command line options from file. yes the flag is literally-+, iconic behaviour.-i,--in fileβ the private key input file. if you don't give it one, the key gets read fromSTDINinstead. no cap.-x,--keyid hexβ smartcard or TPM private key object handle, in hex format, with an optional0xprefix.-t,--type typeβ the type of the input key. eitherpriv,rsaorecdsa, and it defaults topriv.-d,--dn distinguished-nameβ the subject distinguished name (DN). Required if the--dnoption is not set. π¨ (yes, it really says that, we don't question the lore)-a,--san subjectAltNameβ a subjectAltName extension to include in the request. can be used multiple times, stack 'em up. π-P,--profile profileβ a certificate profile name to be included in the certificate request. can be any UTF8 string. supported e.g. by openxpki (with profilespc-client,tls-server, etc.) orpki --issue(with profilesserver,client,dual, orocsp) that are translated into corresponding Extended Key Usage (EKU) flags in the generated X.509 certificate.-e,--flag flagβ adds an extendedKeyUsage flag. one ofserverAuth,clientAuth,ocspSigningormsSmartcardLogon. can be used multiple times. it adds an X.509v3 EKU extension containing these flags to the certificate request. π₯-p,--password passwordβ the challengePassword to include in the certificate request.-o,--oldreq fileβ an old certificate request to be used as a template. required if the--dnoption is not set. the public key in the old certificate request is replaced and a fresh signature is generated using the new private key. optionally a new challengePassword may be set using the--passwordoption. glow-up energy fr fr. β¨-g,--digest digestβ the digest to use for signature creation. one ofsha1,sha224,sha256,sha384,sha512,sha3_224,sha3_256,sha3_384, orsha3_512. 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.
β¨ EXAMPLES β¨
generate a certificate request for an RSA key, with a subjectAltName extension and a TLS-server profile:
pki --req --in key.der --dn "C=CH, O=strongSwan, CN=moon" \
--san moon@strongswan.org --profile server > req.der
generate a certificate request for a renewed key based on an existing template:
pki --req --in myNewKey.der --oldreq myReq.der > myNewReq.der
generate a certificate request for an ECDSA key and a different digest:
pki --req --in key.der --type ecdsa --digest sha256 \
--dn "C=CH, O=strongSwan, CN=carol" > req.der
β¨ SEE ALSO β¨
π reminder bestie: all the flags, values, defaults and paths up there are exactly as written, don't go freestyling them. iykyk.
okay that's the whole page, and honestly it ate. π β¨
signing off from the strongSwan manual, version 6.0.7, dated 2022-08-30, still the one and only PKI --REQ(1). mwah, bye bestie! π¦ππ
π¦ 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