Menu

jeudi 7 mars 2013

Smart card PKCS#15


Dans cette étape, j'utilise la carte à puce: Oberthur AuthentIC v5.

Cette commande est utilisée pour vérifier les lecteurs disponibles et les pilotes installés
 $ opensc-tool --list-readers  
 # Detected readers (pcsc)  
 Nr. Card Features Name  
 0   Yes           USB CCID Smart Card Reader 0  

La prochaine étape est de s'assurer si c'est la carte est connectée :
 $ opensc-tool -reader 0 --name  
 Using reader with a card: USB CCID Smart Card Reader 0  
 Failed to connect to card: Card not present  

Après l'insertion de la carte:
 $ opensc-tool -reader 0 --name  
 Using reader with a card: USB CCID Smart Card Reader 0  
 AuthentIC v5  

Pour lister les codes PIN existants :
 $ pkcs15-tool --list-pins  
 Using reader with a card: USB CCID Smart Card Reader 0  
 PIN [SO PIN]  
     Object Flags  : [0x3], private, modifiable  
     ID       : ff  
     Flags     : [0xB1], case-sensitive, initialized, needs-padding, soPin  
     Length     : min_len:4, max_len:64, stored_len:64  
     Pad char    : 0xFF  
     Reference   : 132 (0x84)  
     Type      : ascii-numeric  
     Tries left   : 3  
 PIN [SCM]  
     Object Flags  : [0x3], private, modifiable  
     ID       : 53434d  
     Flags     : [0x33], case-sensitive, local, initialized, needs-padding  
     Length     : min_len:4, max_len:64, stored_len:64  
     Pad char    : 0xFF  
     Reference   : 129 (0x81)  
     Type      : ascii-numeric  
     Path      : 3f005011  
     Tries left   : 1  

Il existe déjà un SO PIN (Security Officer PIN) d'une taille de 8 octets, pas de User PIN.

______________________________________________________________________________

Remarque :
Unless stated otherwise, a SmartCard-HSM is usually shipped uninitialized, meaning that no SO-PIN is set. You will first need to perform an initialization to set the SO-PIN and initial user PIN. See section Initialize the Device below.
______________________________________________________________________________

La prochaine commande consiste à initialiser la carte et de créer une structure PKI.

PKCS#15 réalisé par OpenSC est utilisé pour accèder à la carte.

 $ pkcs15-init -C --label "FirasCard"  
 Using reader with a card: USB CCID Smart Card Reader 0  
 New Security Officer PIN (Optional - press return for no PIN).  
 Please enter Security Officer PIN: Failed to create PKCS #15 meta structure: Sec  
 urity status not satisfied  

 $ pkcs15-init -C --label "FirasCard"  
 Using reader with a card: USB CCID Smart Card Reader 0  
 New Security Officer PIN (Optional - press return for no PIN).  
 Please enter Security Officer PIN: Please type again to verify: Failed to create  
  PKCS #15 meta structure: Security status not satisfied  





*** En cours ***

Aucun commentaire:

Enregistrer un commentaire