PKI---REQ(1)
π¦ PKI --REQ(1): pki --req π¦
okay so bestie, this is the PKI --REQ(1) manual page from strongSwan β and the pki --req sub-command is the one that creates a PKCS#10 certificate request. very main character behavior, honestly π
β¨ NAME β¨
pki --req β Create a PKCS#10 certificate request. That's it, that's the name, no cap π
β¨ SYNOPSIS β¨
here's the exact command shape, bestie β every bracket and pipe stays put:
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 β¨
This sub-command of pki(1) is used to create a PKCS#10 certificate request. it's giving certificate-request main character energy, and honestly? obsessed π«Ά
β¨ OPTIONS β¨
every single flag, default, and little detail β let's go, no skips:
-h,--helpβ Print usage information with a summary of the available options. love a helpful icon π-v,--debuglevelβ Set debug level, default:1.-+,--optionsfileβ Read command line options fromfile.-i,--infileβ Private key input file. If not given the key is read fromSTDIN.-x,--keyidhexβ Smartcard or TPM private key object handle in hex format with an optional0xprefix.-t,--typetypeβ Type of the input key. Eitherpriv,rsaorecdsa, defaults topriv.-d,--dndistinguished-nameβ Subject distinguished name (DN). Required if the--dnoption is not set.-a,--sansubjectAltNameβsubjectAltNameextension to include in request. Can be used multiple times. slay, stack those SANs π-P,--profileprofileβ Certificate profile name to be included in the certificate request. Can be anyUTF8string. Supported e.g. byopenxpki(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,--flagflagβ AddextendedKeyUsageflag. One ofserverAuth,clientAuth,ocspSigningormsSmartcardLogon. Can be used multiple times. Adds an X.509v3 EKU extension containing these flags to the certificate request.-p,--passwordpasswordβ ThechallengePasswordto include in the certificate request.-o,--oldreqfileβ 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 newchallengePasswordmay be set using the--passwordoption.-g,--digestdigestβ 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-paddingpaddingβ Padding to use for RSA signatures. Eitherpkcs1orpss, defaults topkcs1.-f,--outformencodingβ Encoding of the created certificate file. Eitherder(ASN.1 DER) orpem(Base64 PEM), defaults toder.
β¨ EXAMPLES β¨
three little examples, all iconic β¨
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 β¨
pki(1) β the parent page, obviously. go read it too, bestie π«Ά
and that's the whole page, periodt π
β strongSwan 6.1.0, dated 2022-08-30. mwah π
π¦ where this page comes from
- arch rolling: strongswan 6.1.0-2 Β· GPL-2.0-only
- nixos 26.05: strongswan 6.1.0
- nixpkgs unstable: strongswan 6.1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms