...
Сгенерируйте ключи на устройстве, для этого введите следующую команду:
Test |
---|
pkcs11-tool --slot 0 0x1ffff --login --pin 12345678 11111111 --keypairgen --key-type rsa:2048 --id 33 --label “2fa_test1_key” key” --module /usr/lib/libjcPKCS11-2.so |
Image RemovedImage Added
Примечание |
---|
-keypairgen --key-type rsa:2048 — указывает, что должны быть сгенерированы RSA ключи длиной 2048 бит; --id 33 — устанавливает атрибут CKA_ID ключа. CKA_ID может быть любым; --label “test1 key” — устанавливает атрибут CKA_LABEL(имя) ключа. Атрибут может быть любым; |
...
OpenSSL> req -engine pkcs11 -new -key 0131071:33 -keyform engine -out client.req
engine "pkcs11" set .
Enter PKCS
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.' , the field will be left blank.
-----
Country Name (2 letter code) [AU]:RU
State or Province Name (full name) [Some-State]:Moscow
Locality Name (eg, city) []:
Organization Name (eg, company) [Internet Widgits Pty Ltd]: Rusbitech
Organizational Unit Name (eg, section) []: Astra
Common Name (e.g. server FQDN or YOUR name) []:test1 (!Ваш_Пользователь!)
Email Address []:shuhrat@astralinux.ru
OpenSSL> exit
|
Примечание |
---|
-new -key 0131071:33, где 0131071— номер виртуального слота с устройством (0x1ffff) , 33— атрибут CKA_ID раннее сгенерированных ключей. в CN = следует указать имя пользователя |
...