1PKI --KEYID(1) strongSwan PKI --KEYID(1)
2
3
4
6 pki --keyid - Calculate key identifiers of a key or certificate
7
9 pki --keyid [--in file|--keyid hex] [--type type] [--id id-type]
10 [--format format] [--debug level]
11
12 pki --keyid --options file
13
14 pki --keyid -h | --help
15
17 This sub-command of pki(1) calculates key identifiers of private keys
18 and certificates.
19
21 -h, --help
22 Print usage information with a summary of the available options.
23
24 -v, --debug level
25 Set debug level, default: 1.
26
27 -+, --options file
28 Read command line options from file.
29
30 -i, --in file
31 Input file. If not given the input is read from STDIN.
32
33 -x, --keyid hex
34 Smartcard or TPM private key object handle in hex format with an
35 optional 0x prefix.
36
37 -t, --type type
38 Type of input. One of priv (private key), rsa (RSA private key),
39 ecdsa (ECDSA private key), bliss (BLISS private key), pub (pub‐
40 lic key), pkcs10 (PKCS#10 certificate request), x509 (X.509 cer‐
41 tificate), defaults to priv.
42
43 -I, --id id-type
44 Type of identifier. One of all (all identifiers), spk (SHA-1
45 hash of subjectPublicKey), spki (SHA-1 hash of subjectPublicKey‐
46 Info), defaults to all.
47
48 -f, --format format
49 Output format. One of pretty (user-readable output), hex (hexa‐
50 decimal encoding), base64 (Base64 encoding), bin (raw binary
51 data), defaults to pretty.
52
54 Calculate key identifiers of an RSA private key:
55
56 $ pki --keyid --in key.der
57 subjkey (SHA-1 of subjectPublicKey):
58 6a:9c:74:d1:f8:89:79:89:f6:5a:94:e9:89:f1...
59 keyid (SHA-1 of subjectPublicKeyInfo):
60 6e:55:dc:7e:9c:a5:58:d9:5b:e3:c7:13:14:e1...
61
62 Calculate key identifiers of an X.509 certificate:
63
64 $ pki --keyid --in cert.der --type x509
65 subjkey (SHA-1 of subjectPublicKey):
66 6a:9c:74:d1:f8:89:79:89:f6:5a:94:e9:89:f1...
67 keyid (SHA-1 of subjectPublicKeyInfo):
68 6e:55:dc:7e:9c:a5:58:d9:5b:e3:c7:13:14:e1...
69
70 Calculate keyid in simple hex encoding of an X.509 certificate:
71
72 $ pki --keyid --in cert.der --type x509 --id spki --format hex
73 6e55dc7e9ca558d95be3c71314e1...
74
76 pki(1)
77
78
79
805.9.2 2019-04-29 PKI --KEYID(1)