1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
|
.\"Generated by db2man.xsl. Don't modify this, modify the source.
.de Sh \" Subsection
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Ip \" List item
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.TH "PKCS11-TOOL" 1 "" "" "OpenSC"
.SH NAME
pkcs11-tool \- utility for managing and using PKCS #11 security tokens
.SH "SYNOPSIS"
.PP
\fBpkcs11\-tool\fR [OPTIONS]
.SH "DESCRIPTION"
.PP
The \fBpkcs11\-tool\fR utility is used to manage the data objects on smart cards and similar PKCS #11 security tokens\&. Users can list and read PINs, keys and certificates stored on the token\&. User PIN authentication is performed for those operations that require it\&.
.SH "OPTIONS"
.PP
.TP
\fB\-\-login, \-l\fR
Authenticate to the token before performing other operations\&. This option is not needed if a PIN is provided on the command line\&.
.TP
\fB\-\-pin\fR \fIpin\fR, \fB\-p\fR \fIpin\fR
Use the given \fIpin\fR for token operations\&. WARNING: Be careful using this option as other users may be able to read the command line from the system or if it is embedded in a script\&.
.TP
\fB\-\-so\-pin\fR \fIpin\fR
Use the given \fIpin\fR as the Security Officer PIN for some token operations (token initialization, user PIN initialization, etc)\&. The same warning as \-\-pin also applies here\&.
.TP
\fB\-\-init\-token\fR
Initializes a token: set the token label as well as a Security Officer PIN (the label must be specified using \-\-label)\&.
.TP
\fB\-\-init\-pin\fR
Initializes the user PIN\&. This option differs from \-\-change\-pin in that it sets the user PIN for the first time\&. Once set, the user PIN can be changed using \-\-change\-pin\&.
.TP
\fB\-\-change\-pin, \-c\fR
Change the user PIN on the token
.TP
\fB\-\-test, \-t\fR
Performs some tests on the token\&. This option is most useful when used with either \-\-login or \-\-pin\&.
.TP
\fB\-\-show\-info, \-I\fR
Displays general token information\&.
.TP
\fB\-\-list\-slots, \-L\fR
Displays a list of available slots on the token\&.
.TP
\fB\-\-list\-mechanisms, \-M\fR
Displays a list of mechanisms supported by the token\&.
.TP
\fB\-\-list\-objects, \-O\fR
Displays a list of objects\&.
.TP
\fB\-\-sign, s\fR
Sign some data\&.
.TP
\fB\-\-hash, \-h\fR
Hash some data\&.
.TP
\fB\-\-mechanism\fR \fImechanism\fR, \fB\-m\fR \fImechanism\fR
Use the specified \fImechanism\fR for token operations\&. See \-M for a list of mechanisms supported by your token\&.
.TP
\fB\-\-keypairgen, \-k\fR
Generate a new key pair (public and private pair\&.)
.TP
\fB\-\-write\-object\fR \fIid\fR, \fB\-w\fR \fIid\fR
Write a key or certificate object to the token\&.
.TP
\fB\-\-type\fR \fItype\fR, \fB\-y\fR \fItype\fR
Specify the type of object to operate on\&. Examples are \fIcert\fR, \fIprivkey\fR and \fIpubkey\fR\&.
.TP
\fB\-\-id\fR \fIid\fR, \fB\-d\fR \fIid\fR
Specify the id of the object to operate on\&.
.TP
\fB\-\-label\fR \fIname\fR, \fB\-a\fR \fIname\fR
Specify the name of the object to operate on (or the token label when \-\-init\-token is used)\&.
.TP
\fB\-\-slot\fR \fIid\fR
Specify the id of the slot to use\&.
.TP
\fB\-\-slot\-id\fR \fIname\fR
Specify the name of the slot to use\&.
.TP
\fB\-\-set\-id\fR \fIid\fR, \fB\-e\fR \fIid\fR
Set the CKA_ID of the object\&.
.TP
\fB\-\-attr\-from\fR \fIpath\fR
Extract information from \fIpath\fR (DER\-encoded certificate file) and create the corresponding attributes when writing an object to the token\&. Example: the certificate subject name is used to create the CKA_SUBJECT attribute\&.
.TP
\fB\-\-input\-file\fR \fIpath\fR, \fB\-i\fR \fIpath\fR
Specify the path to a file for input\&.
.TP
\fB\-\-output\-file\fR \fIpath\fR, \fB\-o\fR \fIpath\fR
Specify the path to a file for output\&.
.TP
\fB\-\-module\fR \fImod\fR
Specify a module to load\&.
.TP
\fB\-\-moz\-cert\fR \fIpath\fR, \fB\-z\fR \fIpath\fR
Tests a Mozilla\-like keypair generation and certificate request\&. Specify the \fIpath\fR to the certificate file\&.
.TP
\fB\-\-verbose, \-v\fR
Causes \fBpkcs11\-tool\fR to be more verbose\&. Specify this flag several times to enable debug output in the OpenSC library\&.
.SH "SEE ALSO"
.PP
opensc(7)
|