1PKCS15-TOOL(1) OpenSC Tools PKCS15-TOOL(1)
2
3
4
6 pkcs15-tool - utility for manipulating PKCS #15 data structures on
7 smart cards and similar security tokens
8
10 pkcs15-tool [OPTIONS]
11
13 The pkcs15-tool utility is used to manipulate the PKCS #15 data
14 structures on smart cards and similar security tokens. Users can list
15 and read PINs, keys and certificates stored on the token. User PIN
16 authentication is performed for those operations that require it.
17
19 --version,
20 Print the OpenSC package release version.
21
22 --aid aid
23 Specify in a hexadecimal form the AID of the on-card PKCS#15
24 application to bind to.
25
26 --auth-id pin, -a pin
27 Specifies the auth id of the PIN to use for the operation. This is
28 useful with the --change-pin operation.
29
30 --change-pin
31 Changes a PIN or PUK stored on the token. User authentication is
32 required for this operation.
33
34 --dump, -D
35 List all card objects.
36
37 --list-applications
38 List the on-card PKCS#15 applications
39
40 --list-certificates, -c
41 List all certificates stored on the token.
42
43 --list-data-objects, -C
44 List all data objects stored on the token. For some cards the
45 PKCS#15 attributes of the private data objects are protected for
46 reading and need the authentication with the User PIN. In such a
47 case the --verify-pin option has to be used.
48
49 --list-keys, -k
50 List all private keys stored on the token. General information
51 about each private key is listed (eg. key name, id and algorithm).
52 Actual private key values are not displayed. For some cards the
53 PKCS#15 attributes of the private keys are protected for reading
54 and need the authentication with the User PIN. In such a case the
55 --verify-pin option has to be used.
56
57 --list-pins
58 List all PINs stored on the token. General information about each
59 PIN is listed (eg. PIN name). Actual PIN values are not shown.
60
61 --list-public-keys
62 List all public keys stored on the token, including key name, id,
63 algorithm and length information.
64
65 --short -s
66 Output lists in compact format.
67
68 --no-cache
69 Disables token data caching.
70
71 --clear-cache
72 Removes the user's cache directory. On Windows, this option
73 additionally removes the system's caching directory (requires
74 administrator privileges).
75
76 --output filename, -o filename
77 Specifies where key output should be written. If filename already
78 exists, it will be overwritten. If this option is not given, keys
79 will be printed to standard output.
80
81 --raw
82 Changes how --read-data-object prints the content to standard
83 output. By default, when --raw is not given, it will print the
84 content in hex notation. If --raw is set, it will print the binary
85 data directly. This does not affect the output that is written to
86 the file specified by the --output option. Data written to a file
87 will always be in raw binary.
88
89 --read-certificate cert, -r cert
90 Reads the certificate with the given id.
91
92 --read-data-object cert, -R data
93 Reads data object with OID, applicationName or label. The content
94 is printed to standard output in hex notation, unless the --raw
95 option is given. If an output file is given with the --output
96 option, the content is additionally written to the file. Output to
97 the file is always written in raw binary mode, the --raw only
98 affects standard output behavior.
99
100 --read-public-key id
101 Reads the public key with id id, allowing the user to extract and
102 store or use the public key.
103
104 --read-ssh-key id
105 Reads the public key with id id, writing the output in format
106 suitable for $HOME/.ssh/authorized_keys.
107
108 The key label, if any will be shown in the 'Comment' field.
109
110 --rfc4716
111 When used in conjunction with option --read-ssh-key the output
112 format of the public key follows rfc4716.
113
114 The default output format is a single line (openssh).
115
116 --reader num
117 Forces pkcs15-tool to use reader number num for operations. The
118 default is to use reader number 0, the first reader in the system.
119
120 --unblock-pin, -u
121 Unblocks a PIN stored on the token. Knowledge of the Pin Unblock
122 Key (PUK) is required for this operation.
123
124 --verbose, -v
125 Causes pkcs15-tool to be more verbose. Specify this flag several
126 times to enable debug output in the OpenSC library.
127
128 --verify-pin
129 Verify PIN after card binding and before issuing any command
130 (without 'auth-id' the first non-SO, non-Unblock PIN will be
131 verified)
132
133 --use-pinpad
134 Do not prompt the user; if no PINs supplied, pinpad will be used.
135
137 pkcs15-init(1), pkcs15-crypt(1)
138
139
140
141opensc 10/30/2018 PKCS15-TOOL(1)