PKI---KEYID(1)
π PKI --KEYID(1) π
okay bestie, welcome to the strongSwan manual page for the pki --keyid sub-command. It's giving "calculate key identifiers" energy, and honestly? iconic. β¨
β¨ NAME β¨
pki --keyid β calculate key identifiers of a key or certificate
π SYNOPSIS π
pki --keyid [--in file|--keyid hex] [--type type] [--id id-type]
[--format format] [--debug level]
pki --keyid --options file
pki --keyid -h | --help
πΈ DESCRIPTION πΈ
So this sub-command of pki(1) calculates key identifiers of private keys and certificates. That's the whole vibe: private keys, certificates, key identifiers. periodt. π
π OPTIONS π
-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_. π-i,--in fileβ input file. If not given the input is read fromSTDIN. β¨οΈ-x,--keyid hexβ smartcard or TPM private key object handle in hex format with an optional0xprefix. π-t,--type typeβ type of input. One ofpriv(private key),rsa(RSA private key),ecdsa(ECDSA private key),pub(public key),pkcs10(PKCS#10 certificate request),x509(X.509 certificate), defaults topriv. π-I,--id id-typeβ type of identifier. One ofall(all identifiers),spk(SHA-1 hash ofsubjectPublicKey),spki(SHA-1 hash ofsubjectPublicKeyInfo), defaults toall. π«-f,--format formatβ output format. One ofpretty(user-readable output),hex(hexadecimal encoding),base64(Base64 encoding),bin(raw binary data), defaults topretty. π
π₯ EXAMPLES π₯
Calculate key identifiers of an RSA private key:
$ pki --keyid --in key.der
subjkey (SHA-1 of subjectPublicKey):
6a:9c:74:d1:f8:89:79:89:f6:5a:94:e9:89:f1...
keyid (SHA-1 of subjectPublicKeyInfo):
6e:55:dc:7e:9c:a5:58:d9:5b:e3:c7:13:14:e1...
Calculate key identifiers of an X.509 certificate:
$ pki --keyid --in cert.der --type x509
subjkey (SHA-1 of subjectPublicKey):
6a:9c:74:d1:f8:89:79:89:f6:5a:94:e9:89:f1...
keyid (SHA-1 of subjectPublicKeyInfo):
6e:55:dc:7e:9c:a5:58:d9:5b:e3:c7:13:14:e1...
Calculate keyid in simple hex encoding of an X.509 certificate:
$ pki --keyid --in cert.der --type x509 --id spki --format hex
6e55dc7e9ca558d95be3c71314e1...
π¦ SEE ALSO π¦
pki(1)β yes bestie, that's the one. Go read it. π«Ά
mwah π β strongSwan 6.1.0, 2019-04-29. that's the tea, 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