STRONGSWAN_PKI---EST(1)
πΈ PKI --EST(1) β the strongSwan glow-up πΈ
okay bestie, you found the manual page for pki --est, a.k.a. PKI --EST(1) in the strongSwan fam. This is the one that goes and gets you a certificate from an EST server, and honestly? it's giving β¨*secure enrollment*β¨. Let's get into it, no gatekeeping π
β¨ NAME β¨
pki --est β Enroll an X.509 certificate with an EST server π
π¦ SYNOPSIS π¦
pki --est ---url url [--label label] [--in file] --cacert file [--cert
file|--certid hex --key file|--keyid hex]
[--userpass username:password] [--interval time]
[--maxpolltime time] [--outform encoding] [--debug level]
pki --est --options file
pki --est -h | --help
heads up: that first line literally says ---url with three dashes, bestie. I'm not fixing it, I'm just reporting it. Copy-paste responsibly π
π DESCRIPTION π
So this is a sub-command of pki(1) (iykyk), and what it does is send a PKCS#10 certificate request over HTTPS to a server using the Enrollment over Secure Transport (EST) Protocol (RFC 7030). Iconic behavior fr fr.
After the authorization goes through β and ngl, with manual authentication that means the enrollment client has to poll periodically, like a bestie refreshing the group chat for a reply β the EST server hands back an X.509 certificate signed by the CA. π
And here's the cute part: before your current certificate expires, you can request a brand-new client certificate based on a fresh private key. How does it authenticate, you ask? It uses the old certificate and the old key for automatic TLS client authentication with the EST server. Main character energy, honestly. π
π OPTIONS π
-h,--helpβ prints usage info with a lil summary of everything available. your friendly little map πΊοΈ-v,--debug levelβ sets the debug level, and the default is1.-+,--options fileβ reads command line options from a file. yes, the flag is literally-+. slay.-u,--url urlβ the URL of the EST server. where we're headed π«-l,--label labelβ the label in the EST server path.-i,--in fileβ the PKCS#10 certificate request. If you don't give one, it gets read fromSTDIN. no file? fine, pipe it in, we're flexible π-C,--cacert fileβ a CA certificate in the trust chain used for EST TLS server signature verification, or in the trust chain to verify the client certificate issued by the CA. You can use this one multiple times. stack 'em up π§-c,--cert fileβ the client certificate to be renewed.-X,--certid hexβ smartcard or TPM 2.0 client certificate object handle.-k,--key fileβ the client private key to be replaced.-x,--keyid hexβ smartcard or TPM 2.0 client private key object handle.-p,--userpass username:passwordβ optionalusername:passwordthat may be used for HTTP basic authentication.-t,--interval timeβ poll interval in seconds, defaults to60s. And plot twist: this value might get overridden by theretry-afterheader in the HTTP 202 reply from the EST server. the server said "actually, wait this long" π-m,--maxpolltime timeβ maximum poll time in seconds, defaults to0which means unlimited polling. forever and ever, bestie π«Ά-f,--outform encodingβ encoding of the created certificate file. Eitherder(ASN.1 DER) orpem(Base64 PEM), and it defaults toder.
π EXAMPLES π
To save some typing work (we love efficiency β¨), the following command line options are stored in a est.opt file:
--url https://pki.strongswan.org:8443
--cacert tlsca.crt
--cacert tlsca-1.crt
--cacert myca.crt
--cacert myca-1.crt
NOTE: For a successful HTTPS connection, trust must be established into the EST server certificate. The TLS trust chain including the root CA certificate and optionally intermediate CA certificates must be given using multiple --cacert options. don't skip this, it will Not Work π¨
The --cacert option must also be used to be able to verify the received client certificate issued by the CA. This second trust chain might be identical to the TLS trust chain (if the EST server is using a TLS server certificate issued by its own CA) or might be totally different, e.g. if a Let's Encrypt EST server certificate is used. two chains, two vibes, both valid πΈ
With the following command, an X.509 certificate signed by the intermediate CA is requested from an EST server based on a PKCS#10 certificate request:
pki --options est.opt --in moonReq.der > moonCert.der
and the output is genuinely so satisfying to read, look:
negotiated TLS 1.3 using suite TLS_AES_256_GCM_SHA384
received TLS server certificate 'C=CH, O=strongSwan Project, CN=pki.strongswan.org'
using certificate "C=CH, O=strongSwan Project, CN=pki.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
EST request pending, polling indefinitely every 300 seconds
going to sleep for 300 seconds
...
Issued certificate "C=CH, O=strongSwan Project, CN=moon.strongswan.org"
serial: 1a:ff:de:66:d9:38:ea:d5:b6:da
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 15:19:43 2022 until Aug 22 15:19:43 2023 (currently valid)
This certificate can be renewed some time before it expires with the command:
pki --options est.opt --in moonReqNew.der --cert moonCert.der --key moonKey.der > moonCertNew.der
and again, the receipts:
negotiated TLS 1.3 using suite TLS_AES_256_GCM_SHA384
received TLS server certificate 'C=CH, O=strongSwan Project, CN=pki.strongswan.org'
using certificate "C=CH, O=strongSwan Project, CN=pki.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
sending TLS client certificate 'C=CH, O=strongSwan Project, CN=moon.strongswan.org'
sending TLS intermediate certificate 'C=CH, O=strongSwan Project, CN=strongSwan Issuing CA'
Issued certificate "C=CH, O=strongSwan Project, CN=moon.strongswan.org"
serial: 1b:ff:ad:dc:2f:50:c4:cb:a1:44
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 12:21:00 2023 until Jul 20 12:21:00 2024 (currently valid)
And if the private key and the certificate of the client is stored in a TPM 2.0, the renewal can be done with the following options:
pki --options est.opt --in moonReqNew.der --certid 0x01800004 --keyid 0x81010004 > moonCertNew.der
hardware-backed keys? in this economy? obsessed. π₯
π«Ά SEE ALSO π«Ά
okay that's the whole page bestie, you're officially certified in EST enrollment πβ¨
this whole thing is from strongSwan 6.0.7, dated 2022-08-22, and the manual name on the tin is PKI --EST(1) β yes, with the double dash, exactly like that, character for character π
go get that cert, queen. periodt. ππ
π¦ 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