SYSTEMD-KEYUTIL(1)
π SYSTEMD-KEYUTIL π
okay bestie, welcome to systemd-keyutil β she's the one from the systemd fam who handles all your private keys and X.509 certificates and does NOT get enough credit for it. let's get into it β¨
β¨ SYNOPSIS β¨
systemd-keyutil [OPTIONS...] {COMMAND}
πΈ DESCRIPTION πΈ
systemd-keyutil does various operations on private keys and X.509 certificates. that's the whole vibe. she's the key-and-cert handler, and she's literally so good at it. π
π COMMANDS π
validateβ checks that we can actually load the private key and certificate you gave with--private-key=and--certificate=. like, a vibe check but for your keys.
and here's the tea π«: as a side effect, if the private key is loaded from a PIN-protected hardware token, this command can cache the PIN in the kernel keyring. the $SYSTEMD_ASK_PASSWORD_KEYRING_TIMEOUT_SEC and $SYSTEMD_ASK_PASSWORD_KEYRING_TYPE environment variables control how long and in which kernel keyring that PIN gets cached. iykyk π
Added in version 257.
extract-publicβ this command prints the public key in PEM format, extracted from either the certificate given with--certificate=or the private key given with--private-key=. either/or, she's flexible π
Added in version 257.
extract-certificateβ prints the X.509 certificate in PEM format, extracted from the certificate given with--certificate=. super useful when you're loading a certificate from an OpenSSL provider (e.g. a hardware token) and you want to output a standalone PEM certificate that can be used without the provider. no provider required, periodt. π₯
Added in version 260.
pkcs7β embeds the PKCS#1 signature (RSA) you gave with--signature=into a PKCS#7 signature using the certificate from--certificate=, and writes it to the file specified with--output=, in PKCS#7 format (p7s). if--content=is provided, it's included in the p7s β otherwise you get a "detached" signature. and the--hash-algorithm=option (which defaults to"SHA256") says what hash algorithm was used to generate the signature. π§
Added in version 258.
π OPTIONS π
here's what she understands, bestie:
--private-key=PATH/URI,--private-key-source=TYPE[:NAME],--certificate=PATH,--certificate-source=TYPE[:NAME]β set the private key and certificate to use. the--certificate=option takes a path to a PEM encoded X.509 certificate, or a URI that gets passed to the OpenSSL provider configured with--certificate-source.--certificate-sourcetakes either"file"or"provider"β and the latter gets followed by a specific provider identifier, separated with a colon, like"provider:pkcs11". meanwhile--private-key=can take a path or a URI that'll be passed to the OpenSSL engine or provider, as specified by--private-key-source=as a"type:name"tuple, such as"engine:pkcs11". iconic behavior tbh π
Added in version 257.
--signature=PATHβ input PKCS#1 signature for thepkcs7command. π
Added in version 258.
--content=PATHβ input data that corresponds to the PKCS#1 signature for thepkcs7command, used for generating inline (i.e. non-"detached") PKCS#7 signatures. π
Added in version 258.
--hash-algorithm=ALGORITHMβ the hash algorithm used to generate the PKCS#1 signature for thepkcs7command. this should be a validopenssldigest algorithm; run"openssl list -digest-algorithms"to see a list of valid algorithms on your system. defaults to"SHA256". β¨
Added in version 258.
--output=PATHβ output PKCS#7 signature for thepkcs7command. πΎ
Added in version 258.
-h,--helpβ print a short help text and exit. classic. π--versionβ print a short version string and exit. π
π SEE ALSO π
systemd-sbsign(1), systemd-measure(1)
and that's the whole page, bestie π«Ά this was systemd 262.1 talking about SYSTEMD-KEYUTIL(1) β go forth and handle your keys responsibly, mwah πβ¨
π¦ where this page comes from
- arch rolling: systemd 262.1-1 Β· LGPL-2.1-or-later AND CC0-1.0 AND GPL-2.0-or-later AND MIT-0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms