📄 pkcs15-init.1
字号:
.PU.ds nm \fBpkcs15-init\fR.TH pkcs15-init 1 "" "" OpenSCpkcs15-init \- smart card personalization utility.SH DESCRIPTIONThe \*(nm(1) utility can be used to create a PKCS #15structure on a smart card, and add key or certificateobjects. Details of the structure that will be createdare controlled via profiles. When invoking \*(nm,the user must specify the application profile using the.B \-pswitch. Currently, there is only one supported profile,which is.BR pkcs15 ..SH MODES OF OPERATION.SS InitializationThis is the first step during card personalization, andwill create the basic files on the card, and initializeuser PINs. To create the initial PKCS #15 structure,invoke the utility as.PP.B " pkcs15-init --create-pkcs15.PPYou will then be asked for several PINs (secret codes used to protecte.g. keys stored on the card), and PUKs. PUKs are secret codes that canbe used to.I unblocka PIN if too many incorrect values have been entered in a row..PPIf the card supports it, you can also request that the card is erasedprior to creating the PKCS #15 structure, by specifying the.B --erase-cardoption..SS Key Generation\*(nm lets you generate a new key and store it on the card.You can do this using:.PP.BI " pkcs15-init --generate-key " keyspec.PPwhere.I keyspecdescribes the algorithm and length of the key to be created,such as.BR rsa/512 .This will create a 512 bit RSA key. Currently, only RSA keygeneration is supported. Note that cards usually support justa few different key lengths. Almost all cards will support512 and 1024 bit keys, some will support 768 or 2048 as well..PPIn addition to storing the private portion of the key on thecard, \*(nm will also store the the public portion of the keyas a PKCS #15 public key object..PPOn-board key generation is not supported at the moment..SS Private Key DownloadYou can use a private key generated by other means and downloadit to the card. For instance, to download a private key containedin a file named.B okir.pem ,which is in PEM format, you would use.PP.B " pkcs15-init --store-private-key okir.pem --id 45.PPIf the key is protected by a pass phrase, \*(nm will promptyou for a pass phrase to unlock the key..PPIn addition to storing the private portion of the key on thecard, \*(nm will also store the the public portion of the keyas a PKCS #15 public key object..PPNote the use of the.B --idoption. The current.B pkcs15profile defines two key templates, one for authentication (key ID 45),and one for non-repudiation purposes (key ID 46). Other keytemplates will probably be added in the future. Note that you don'tspecify a key ID, \*(nm will pick just the first key templatedefined by the profile..PPIn addition to the PEM key file format, \*(nm also supports DER encodedkeys, and PKCS #12 files. The latter is the file format used byNetscape Navigator (among others) when exporting certificates toa file. Since PKCS #12 files usually contains the X.509 certificatecorresponding to the private key, \*(nm will store the certificateinstead of the public key portion..SS Public Key DownloadYou can also download individual public keys to the card usingthe.B \-\-store-public-keyoption, which takes a filename as an argument. This file is supposedto contain the public key. If you don't specify a key file formatusing the.B \-\-formatoption, \*(nm will assume PEM format.The only other supported public key file format is DER..PPSince the corresponding public keys are always downloadedautomatically when generating a new key, or when downloading aprivate key, you will probably use this option only very rarely..SS Certificate DownloadYou can download certificates to the card using the.B \-\-store-certificateoption, which takes a filename as an argument. This file is supposedto contain the DER encoded X.509 certificate..SH OPTIONS.TP.BR \-\-profile " \fIname\fP, " \-p " \fIname\fP"Tells \*(nm to load the specified general profile. Currently, theonly application profile defined is.BR pkcs15 ,but you can write your own profiles and specify them using thisoption..TP.BR \-\-card-profile " \fIname\fP, " \-c " \fIname\fP"Tells \*(nm to load the specified card profile option..TP.BR \-\-create-pkcs15 ", " \-CThis tells \*(nm to create a PKCS #15 structure on the card, andinitialize any PINs..TP.BR \-\-erase-card ", " \-EThis will erase the card prior to creating the PKCS #15 structure,if the card supports it. If the card does not support erasing,\*(nm will fail..TP.BR \-\-generate-key " \fIkeyspec\fP, " \-G " \fIkeyspec\fPTells the card to generate new key and store it on the card..I keyspecconsists of an algorithm name (currently, the only supportedname is.BR RSA ),optionally followed by a slash and the length of the key in bits.It is a good idea to specify the key ID along with thiscommand, using the.BR \-\-id " option..TP.BR \-\-store-private-key " \fIfilename\fP, " -S " \fIfilename\fP"Tells \*(nm to download the specified private key to the card.This command will also create a public key object containingthe public key portion.By default, the file is assumed to contain the key in PEM format.Alternative formats can be specified using.BR \-\-format .It is a good idea to specify the key ID along with thiscommand, using the.BR \-\-id " option..TP.BR \-\-store-public-key " \fIfilename\fP, " -P " \fIfilename\fP"Tells \*(nm to download the specified public key to the cardand create a public key object with the key ID specified via the.BR \-\-id " option.By default, the file is assumed to contain the key in PEM format.Alternative formats can be specified using.BR \-\-format ..TP.BR \-\-store-certificate " \fIfilename\fX, " -P " \fIfilename\fP"Tells \*(nm to store the certificate given in.I filenameon the card, creating a certificate object with the ID specifiedvia the .BR \-\-id " option. The file is assumed to contain theDER encoded certificate..TP.BR \-\-pin1 ", " \-\-pin1 ", " \-\-puk2 ", " \-\-puk2These options can be used to specify PIN values on thecommand line. Note that on most operation systems, anyuser can display the command line of any process on thesystem using utilities such as.BR ps (1).Therefore, you should use these options only on a securedsystem, or in an options file specified with.BR \-\-options-file ..TP.BR \-\-passphraseWhen downloading a private key,this option can be used to specify the pass phrase to unlockthe private key. The same caveat applies here as in thecase of the.B \-\-pinoptions..TP.BI \-\-options-file " filename"Tells \*(nm to read additional options from.IR filename .The file is supposed to contain one long option per line, withoutthe leading dashes, for instance:.IP.nf pin1 frank pin2 zappa.fi.PPYou can specify.B \-\-options-fileseveral times..TP.BR \-\-debug ", " \-dTurns on debugging output. Specifying this option more than onceincreases the verbosity of the output..SH SEE ALSO.BR pkcs15-profile (5) ..SH AUTHORS\*(nm was written by Olaf Kirch <okir@lst.de>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -