File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / strongswan / src / pki / man / pki---keyid.1.in
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Wed Jun 3 09:46:44 2020 UTC (4 years, 1 month ago) by misho
CVS tags: MAIN, HEAD
Initial revision

.TH "PKI \-\-KEYID" 1 "2019-04-29" "@PACKAGE_VERSION@" "strongSwan"
.
.SH "NAME"
.
pki \-\-keyid \- Calculate key identifiers of a key or certificate
.
.SH "SYNOPSIS"
.
.SY pki\ \-\-keyid
.RB [ \-\-in
.IR file | \fB\-\-keyid\fR
.IR hex ]
.OP \-\-type type
.OP \-\-id id-type
.OP \-\-format format
.OP \-\-debug level
.YS
.
.SY pki\ \-\-keyid
.BI \-\-options\~ file
.YS
.
.SY "pki \-\-keyid"
.B \-h
|
.B \-\-help
.YS
.
.SH "DESCRIPTION"
.
This sub-command of
.BR pki (1)
calculates key identifiers of private keys and certificates.
.
.SH "OPTIONS"
.
.TP
.B "\-h, \-\-help"
Print usage information with a summary of the available options.
.TP
.BI "\-v, \-\-debug " level
Set debug level, default: 1.
.TP
.BI "\-+, \-\-options " file
Read command line options from \fIfile\fR.
.TP
.BI "\-i, \-\-in " file
Input file. If not given the input is read from \fISTDIN\fR.
.TP
.BI "\-x, \-\-keyid " hex
Smartcard or TPM private key object handle in hex format with an optional
0x prefix.
.TP
.BI "\-t, \-\-type " type
Type of input. One of \fIpriv\fR (private key), \fIrsa\fR (RSA private key),
\fIecdsa\fR (ECDSA private key), \fIbliss\fR (BLISS private key),
\fIpub\fR (public key), \fIpkcs10\fR (PKCS#10 certificate request),
\fIx509\fR (X.509 certificate), defaults to \fIpriv\fR.
.TP
.BI "\-I, \-\-id " id-type
Type of identifier. One of \fIall\fR (all identifiers), \fIspk\fR (SHA-1 hash
of subjectPublicKey), \fIspki\fR (SHA-1 hash of subjectPublicKeyInfo), defaults
to \fIall\fR.
.TP
.BI "\-f, \-\-format " format
Output format. One of \fIpretty\fR (user-readable output), \fIhex\fR
(hexadecimal encoding), \fIbase64\fR (Base64 encoding), \fIbin\fR (raw binary
data), defaults to \fIpretty\fR.
.
.SH "EXAMPLES"
.
Calculate key identifiers of an RSA private key:
.PP
.EX
  $ 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...
.EE
.PP
Calculate key identifiers of an X.509 certificate:
.PP
.EX
  $ 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...
.EE
.PP
Calculate keyid in simple hex encoding of an X.509 certificate:
.PP
.EX
  $ pki --keyid --in cert.der --type x509 --id spki --format hex
  6e55dc7e9ca558d95be3c71314e1...
.EE
.PP
.
.SH "SEE ALSO"
.
.BR pki (1)

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>