User Tools

Site Tools


smartcard:etoken

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
smartcard:etoken [2017/10/20 14:42] – angelegt Martinsmartcard:etoken [2017/10/20 15:10] (current) – [Nutzung eines SafeNet eToken PRO unter Linux] Martin
Line 9: Line 9:
 <code> <code>
 $ pkcs11-tool --module /usr/lib/libeToken.so --init-token --label <Etikett> $ pkcs11-tool --module /usr/lib/libeToken.so --init-token --label <Etikett>
 +Using slot 0 with a present token (0x0)
 +Please enter the new SO PIN: 
 +Please enter the new SO PIN (again): 
 +Token successfully initialized
 +</code>
 +Setzen der Benutzer-PIN
 +<code>
 +$ pkcs11-tool -l --init-pin 
 +Using slot 0 with a present token (0x0)
 +Logging in to "MB".
 +Please enter SO PIN: 
 +Please enter the new PIN: 
 +Please enter the new PIN again: 
 +User PIN successfully initialized
 </code> </code>
  
Line 15: Line 29:
 $ pkcs11-tool --module /usr/lib/libeToken.so \ $ pkcs11-tool --module /usr/lib/libeToken.so \
   -l -k --key-type RSA:1024 -d 1 -a "<Etikett>"   -l -k --key-type RSA:1024 -d 1 -a "<Etikett>"
 +Using slot 0 with a present token (0x0)
 +Logging in to "MB".
 +Please enter User PIN: 
 +Key pair generated:
 +Private Key Object; RSA 
 +  label:      <Etikett>
 +  ID:         01
 +  Usage:      decrypt, sign, unwrap
 +Public Key Object; RSA 1024 bits
 +  label:      <Etikett>
 +  ID:         01
 +  Usage:      encrypt, verify, wrap
 </code> </code>
  
-Zertifikatsanfrage erstellen. Als Vorarbeit muss der Pfad zur Bibliothek der zur OpenSSL-Version passenden PKCS#11-Engine gefunden werden. +Zertifikatsanfrage erstellen, signieren und in das benötigte DER-Format konvertieren. Als Vorarbeit muss der Pfad zur Bibliothek der zur OpenSSL-Version passenden PKCS#11-Engine gefunden werden. 
 <code> <code>
 $ openssl version $ openssl version
Line 36: Line 62:
 OpenSSL> engine dynamic -pre SO_PATH:/usr/lib/x86_64-linux-gnu/engines-1.1/pkcs11.so \ OpenSSL> engine dynamic -pre SO_PATH:/usr/lib/x86_64-linux-gnu/engines-1.1/pkcs11.so \
   -pre ID:pkcs11 -pre LIST_ADD:<Schlüssel ID> -pre LOAD -pre MODULE_PATH:libeToken.so   -pre ID:pkcs11 -pre LIST_ADD:<Schlüssel ID> -pre LOAD -pre MODULE_PATH:libeToken.so
 +OpenSSL> req -engine pkcs11 -new -key 1 -keyform engine -x509 -out <Dateiname>.pem -text
 +OpenSSL> x509 -in <Dateiname>.pem -out <Dateiname>.der -outform der
 </code> </code>
 Schließlich können wir dieses Zertifikat in den eToken schreiben. Achtung: Korrekte ID (-d) und Label (-a) verwenden. Schließlich können wir dieses Zertifikat in den eToken schreiben. Achtung: Korrekte ID (-d) und Label (-a) verwenden.
 +<code>
 +pkcs11-tool --module /usr/lib/libeToken.so -l -w <Dateiname>.der -y cert -d <Schlüssel ID> -a "<Etikett>"
 +Using slot 0 with a present token (0x0)
 +Logging in to "MB".
 +Please enter User PIN: 
 +Created certificate:
 +Certificate Object, type = X.509 cert
 +  label:      <Etikett>
 +  ID:         01
 +</code>
 +
 +===== Links =====
 +[[https://r3blog.nl/index.php/etoken-pro-72k/]]
 +
smartcard/etoken.1508510538.txt.gz · Last modified: 2017/10/20 14:42 by Martin