PKI---SCEP(1)
π NAME π
pki --scep β enroll an X.509 certificate with a SCEP server. This is the PKI --SCEP(1) manual page, aka the --SCEP sub-command of pki(1), and yes bestie, we're doing certificate enrollment with main character energy. π
β¨ SYNOPSIS β¨
pki --scep --url url [--in file] [--dn distinguished-name]
[--san subjectAltName] [--profile profile]
[--password password] --ca-cert-enc file --ca-cert-sig file
[--cacert file] [--cert file --key file] [--cipher cipher]
[--digest digest] [--rsa-padding padding] [--interval time]
[--maxpolltime time] [--outform encoding] [--debug level]
pki --scep --options file
pki --scep -h | --help
π¦ DESCRIPTION π¦
Okay so this sub-command of pki(1) sends a PKCS#10 certificate request inside an encrypted and signed PKCS#7 container over HTTP to a SCEP server, using the Simple Certificate Enrollment Protocol (RFC 8894). After successful authorization β and with manual authentication that means your enrollment client has to poll periodically, yes actual waiting, iconic patience β the SCEP server returns an X.509 certificate signed by the CA.
Before the current certificate expires, a new client certificate based on a fresh RSA private key can be requested. For that glow-up, you use the old certificate and the old key for automatic authentication with the SCEP server. Smooth renewal era, lowkey obsessed. π₯
π OPTIONS π
Here's the whole flag family, no skipping:
-h,--helpβ print usage information with a summary of the available options.-v,--debug levelβ set debug level, default:1.-+,--options fileβ read command line options from file.-u,--url urlβ URL of the SCEP server.-i,--in fileβ RSA private key. If not given the key is read fromSTDIN.-d,--dn distinguished-nameβ Subject distinguished name (DN). Required unless--certis given.-a,--san subjectAltNameβ subjectAltName extension to include in request. Can be used multiple times.-P,--profile profileβ Certificate profile name to be included in the certificate request. Can be any UTF8 string. Supported e.g. by the openxpki SCEP server with profiles (pc-client,tls-server, etc.) that are translated into corresponding Extended Key Usage (EKU) flags in the generated X.509 certificate.-p,--password passwordβ the challengePassword to include in the certificate request.-e,--cacert-enc fileβ CA or RA certificate for encryption.-s,--cacert-sig fileβ CA certificate for signature verification.-C,--cacert fileβ Additional CA certificate in the trust chain used for signature verification. Can be used multiple times.-c,--cert fileβ Client certificate to be renewed.-k,--key fileβ Client RSA private key to be replaced.-E,--cipher cipherβ Cipher used for symmetric encryption. Eitheraes(the default) ordes3.-g,--digest digestβ Digest to use for signature creation. One ofsha256(the default),sha384,sha512, orsha1.-R,--rsa-padding paddingβ Padding to use for RSA signatures. Eitherpkcs1(the default) orpss.-t,--interval timeβ Poll interval in seconds, defaults to60s.-m,--maxpolltime timeβ Maximum poll time in seconds, defaults to0which means unlimited polling.-f,--outform encodingβ Encoding of the created certificate file. Eitherder(ASN.1 DER) orpem(Base64 PEM), defaults toder.
πΈ EXAMPLES πΈ
To save some typing work, the following command line options are stored in a scep.opt file:
--url http://pki.strongswan.org:8080/scep
--cacert-enc myra.crt
--cacert-sig myca-1.crt
--cacert myca.crt
With the following command, an X.509 certificate signed by the intermediate CA is requested from a SCEP server:
pki --options scep.opt --in moonKey.der --san "moon.strongswan.org" \
--dn "C=CH, O=strongSec GmbH, CN=moon.strongswan.org" > moonCert.der
And the terminal is about to be real chatty, periodt:
transaction ID: 4DFCF31CB18A9B5333CCEC6F99CF230E4524E334
using certificate "C=CH, O=strongSwan Project, CN=SCEP RA"
using trusted intermediate ca certificate "C=CH, O=strongSwan Project, CN=strongSwan Issuing CA"
using trusted ca certificate "C=CH, O=strongSwan Project, CN=strongSwan Root CA"
reached self-signed root ca with a path length of 1
SCEP request pending, polling indefinitely every 60 seconds
going to sleep for 60 seconds
transaction ID: 4DFCF31CB18A9B5333CCEC6F99CF230E4524E334
...
going to sleep for 60 seconds
Issued certificate "C=CH, O=strongSwan Project, CN=moon.strongswan.org"
serial: 1e:ff:22:7b:6e:d7:4c:c1:8a:06
using certificate "C=CH, O=strongSwan Project, CN=moon.strongswan.org"
using trusted intermediate ca certificate "C=CH, O=strongSwan Project, CN=strongSwan Issuing CA"
using trusted ca certificate "C=CH, O=strongSwan Project, CN=strongSwan Root CA"
reached self-signed root ca with a path length of 1
Issued certificate is trusted, valid from Aug 22 18:56:23 2022 until Aug 22 18:56:23 2023 (currently valid)
A certificate about to expire can be renewed with the command:
pki --options scep.opt --in moonNewKey.der --san "moon.strongswan.org" \
--dn "C=CH, O=strongSec GmbH, CN=moon.strongswan.org" \
--cert moonCert.der --key moonKey.der > moonNewCert.der
transaction ID: A9A63D028CC439F68452D125C4DBA025E67DBA95
using certificate "C=CH, O=strongSwan Project, CN=SCEP RA"
using trusted intermediate ca certificate "C=CH, O=strongSwan Project, CN=strongSwan Issuing CA"
using trusted ca certificate "C=CH, O=strongSwan Project, CN=strongSwan Root CA"
reached self-signed root ca with a path length of 1
Issued certificate "C=CH, O=strongSwan Project, CN=moon.strongswan.org"
serial: 1f:ff:b2:78:43:a2:9d:85:00:38
using certificate "C=CH, O=strongSwan Project, CN=moon.strongswan.org"
using trusted intermediate ca certificate "C=CH, O=strongSwan Project, CN=strongSwan Issuing CA"
using trusted ca certificate "C=CH, O=strongSwan Project, CN=strongSwan Root CA"
reached self-signed root ca with a path length of 1
Issued certificate is trusted, valid from Jul 20 15:05:33 2023 until Jul 20 15:05:33 2024 (currently valid)
π SEE ALSO π
xoxo, strongSwan 6.1.0 π dated 2022-08-22 β go get that cert, bestie! πβ¨
π¦ 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