[INFOCAMERE STARCOS 2.3 CARD] Invalid ASN.1 object

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

[INFOCAMERE STARCOS 2.3 CARD] Invalid ASN.1 object

Pier Paolo Bortone
Hi all,
finally I succesfully installed SCB (scb-0.5-pre1e.exe).
 
Anyway my problem with InfoCamere 1202 card (STARCOS 2.3) remains.
 
Now, I try to list all necessary elements (3 commands) to analize this problem.

NOTE: I tested card with InfoCamere owner product
        (Dike) http://www.card.infocamere.it/software/software_home.htm
        and all seems to run correctly.
 
If someone needs further specific elements, please let me know.
       
Thanks in advance at all.
 
First element *********************************************************
DUMP COMMAND RESULT + RELATIVE ERRORS LOG
C:\Programmi\Smart card bundle>p15dump.exe
Using libopensc version 0.9.4.
Card detected in reader 'CASTLES EZ100PU 0'
Connecting... connected.
ATR = 3b:b7:94:00:81:31:fe:65:53:50:4b:32:33:90:00:d1
Looking for a PKCS#15 compatible Smart Card... found.
PKCS#15 Card [Infocamere 1202 Card]:
        Version        : 0
        Serial number  : d2760000012590154800131c13
        Manufacturer ID: Infocamere
        Flags          :
Enumerating PIN codes... 1 found.
PIN [Non-repudiation PIN]
        Com. Flags  : private, modifiable
        Auth ID     : 02
        Flags       : [0x31], case-sensitive, initialized, needs-padding
        Length      : min_len:5, max_len:8, stored_len:8
        Pad char    : 0x00
        Reference   : 153
        Encoding    : ASCII-numeric
        Path        : 3F00DF01
        Tries left  : 3
Enumerating Private keys... 1 found.
Private RSA key [Non repudiation Key]
        Com. Flags  : private
        Com. Auth ID: 02
        Usage       : [0x200], nonRepudiation
        Access Flags: [0x1D], sensitive, alwaysSensitive, neverExtract, local
        ModLength   : 1024
        Key ref     : 132
        Native      : yes
        Path        : 3F00DF01
        ID          : 02
Enumerating Public keys... none found.
Enumerating X.509 certificates... 2 found.
X.509 Certificate [User Non-repudiation Certificate]
        Com. Flags  : modifiable
        Authority   : no
        Path        : df01c000
        ID          : 02
X.509 Certificate [CA Certificate]
        Com. Flags  : modifiable
        Authority   : yes
        Path        : df01c008
        ID          : 03
Enumerating data objects... none found.
 
opensc-errors.log:
 
File not found
card-starcos.c:317:starcos_select_fid: returning with: File not found
card.c:759:sc_select_file: returning with: File not found
***********************************************************************
 
Second element ********************************************************
TRY TO READ CERTIFICATE WITH ID 03 + RELATIVE DEBUG & ERRORS LOG
C:\Programmi\Smart card bundle>pkcs15-tool.exe --read-certificate 03
Certificate read failed: Invalid ASN.1 object
 
opensc-errors.log:
 
File not found
card-starcos.c:317:starcos_select_fid: returning with: File not found
card.c:759:sc_select_file: returning with: File not found
X.509 certificate not found
 
opensc-debug.log: (I omitted pre-card-matching debug)
 
opensc version: 0.9.4
sc.c:142:sc_detect_card_presence: called
sc.c:147:sc_detect_card_presence: returning with: 1
card.c:368:sc_connect_card: called
ATR     : 3b:b7:94:00:81:31:fe:65:53:50:4b:32:33:90:00:d1
ATR try : 3b:6e:00:ff:45:73:74:45:49:44:20:76:65:72:20:31:2e:30
ATR try : 3b:fe:94:00:ff:80:b1:fa:45:1f:03:45:73:74:45:49:44:20:76:65:72:20:31:2e:30:43
matching configured ATRs
matching built-in ATRs
... omitted ...
trying driver: starcos
ATR     : 3b:b7:94:00:81:31:fe:65:53:50:4b:32:33:90:00:d1
ATR try : 3B:B7:94:00:c0:24:31:fe:65:53:50:4b:32:33:90:00:b4
ATR try : 3B:B7:94:00:81:31:fe:65:53:50:4b:32:33:90:00:d1
matched: STARCOS SPK 2.3
card info: STARCOS SPK 2.3, 7001, 0x0
card.c:477:sc_connect_card: returning with: 0
card.c:514:sc_lock: called
pkcs15.c:611:sc_pkcs15_bind: called
trying normal pkcs15 processing
called; type=2, path=3f002f00
card-starcos.c:375:starcos_select_file: called
current path (path, valid):  (len: 0)
card.c:250:sc_transmit_apdu: called
Sending 8 bytes (resp. 258 bytes):
00 A4 00 00 02 3F 00 00 .....?..
Received 0 bytes (SW1=62 SW2=84)
card.c:250:sc_transmit_apdu: called
Sending 7 bytes (resp. 258 bytes):
00 A4 00 0C 02 3F 00 .....?.
Received 0 bytes (SW1=90 SW2=00)
card-starcos.c:361:starcos_select_fid: returning with: 0
card.c:250:sc_transmit_apdu: called
Sending 8 bytes (resp. 258 bytes):
00 A4 00 00 02 2F 00 00 ...../..
Received 0 bytes (SW1=6A SW2=82)
sw1 = 0x6a, sw2 = 0x82
File not found
card-starcos.c:317:starcos_select_fid: returning with: -1201
card.c:759:sc_select_file: returning with: -1201
called; type=2, path=3f005015
card-starcos.c:375:starcos_select_file: called
current path (path, valid): 3F00 (len: 2)
card.c:250:sc_transmit_apdu: called
Sending 8 bytes (resp. 258 bytes):
00 A4 00 00 02 50 15 00 .....P..
Received 0 bytes (SW1=6A SW2=82)
sw1 = 0x6a, sw2 = 0x82
File not found
card-starcos.c:317:starcos_select_fid: returning with: -1201
card.c:759:sc_select_file: returning with: -1201
called; type=2, path=3f005031
card-starcos.c:375:starcos_select_file: called
current path (path, valid): 3F00 (len: 2)
card.c:250:sc_transmit_apdu: called
Sending 8 bytes (resp. 258 bytes):
00 A4 00 00 02 50 31 00 .....P1.
Received 0 bytes (SW1=6A SW2=82)
sw1 = 0x6a, sw2 = 0x82
pkcs15-syn.c:85:sc_pkcs15_bind_synthetic: called
use builtin drivers
trying esteid
trying openpgp
trying tcos
trying starcert
called; type=2, path=3f00fe13
card-starcos.c:375:starcos_select_file: called
current path (path, valid): 3F00 (len: 2)
card.c:250:sc_transmit_apdu: called
Sending 8 bytes (resp. 258 bytes):
00 A4 00 00 02 FE 13 00 ........
Received 0 bytes (SW1=6A SW2=82)
sw1 = 0x6a, sw2 = 0x82
File not found
card-starcos.c:317:starcos_select_fid: returning with: -1201
card.c:759:sc_select_file: returning with: -1201
trying infocamere
called; type=2, path=3f002f02
card-starcos.c:375:starcos_select_file: called
current path (path, valid): 3F00 (len: 2)
card.c:250:sc_transmit_apdu: called
Sending 8 bytes (resp. 258 bytes):
00 A4 00 00 02 2F 02 00 ...../..
Received 9 bytes (SW1=90 SW2=00)
6F 07 80 02 00 1A 82 01 01 o........
card.c:250:sc_transmit_apdu: called
Sending 5 bytes (resp. 258 bytes):
00 B0 00 00 01 .....
Received 1 bytes (SW1=90 SW2=00)
5A Z
processing FCI bytes
  bytes in file: 26
  type: working EF
  EF structure: transparent
card-starcos.c:361:starcos_select_fid: returning with: 0
card.c:759:sc_select_file: returning with: 0
called; 26 bytes at index 0
card.c:250:sc_transmit_apdu: called
Sending 5 bytes (resp. 258 bytes):
00 B0 00 00 1A .....
Received 26 bytes (SW1=90 SW2=00)
5A 0D D2 76 00 00 01 25 90 15 48 00 13 1C 13 5F Z..v...%..H...._
20 08 12 02 05 00 00 77 78 25                    ......wx%
iso7816.c:126:iso7816_read_binary: returning with: 26
card.c:640:sc_read_binary: returning with: 26
called; type=2, path=11111a02
card-starcos.c:375:starcos_select_file: called
current path (path, valid): 3F00 (len: 2)
card.c:250:sc_transmit_apdu: called
Sending 8 bytes (resp. 258 bytes):
00 A4 00 00 02 11 11 00 ........
Received 0 bytes (SW1=62 SW2=84)
card.c:250:sc_transmit_apdu: called
Sending 7 bytes (resp. 258 bytes):
00 A4 00 0C 02 11 11 .......
Received 0 bytes (SW1=90 SW2=00)
card-starcos.c:361:starcos_select_fid: returning with: 0
card-starcos.c:375:starcos_select_file: called
current path (path, valid): 3F001111 (len: 4)
card.c:250:sc_transmit_apdu: called
Sending 8 bytes (resp. 258 bytes):
00 A4 00 00 02 1A 02 00 ........
Received 0 bytes (SW1=6A SW2=82)
sw1 = 0x6a, sw2 = 0x82
File not found
card-starcos.c:317:starcos_select_fid: returning with: -1201
card.c:759:sc_select_file: returning with: -1201
called; type=2, path=df01c000
card-starcos.c:375:starcos_select_file: called
current path (path, valid): 3F001111 (len: 4)
card.c:250:sc_transmit_apdu: called
Sending 8 bytes (resp. 258 bytes):
00 A4 00 00 02 DF 01 00 ........
Received 0 bytes (SW1=62 SW2=84)
card.c:250:sc_transmit_apdu: called
Sending 7 bytes (resp. 258 bytes):
00 A4 00 0C 02 DF 01 .......
Received 0 bytes (SW1=90 SW2=00)
card-starcos.c:361:starcos_select_fid: returning with: 0
card-starcos.c:375:starcos_select_file: called
current path (path, valid): 3F00DF01 (len: 4)
card.c:250:sc_transmit_apdu: called
Sending 8 bytes (resp. 258 bytes):
00 A4 00 00 02 C0 00 00 ........
Received 9 bytes (SW1=90 SW2=00)
6F 07 80 02 0A 00 82 01 01 o........
card.c:250:sc_transmit_apdu: called
Sending 5 bytes (resp. 258 bytes):
00 B0 00 00 01 .....
Received 1 bytes (SW1=90 SW2=00)
08 .
card-starcos.c:361:starcos_select_fid: returning with: 0
card.c:759:sc_select_file: returning with: 0
called; 2 bytes at index 0
card.c:250:sc_transmit_apdu: called
Sending 5 bytes (resp. 258 bytes):
00 B0 00 00 02 .....
Received 2 bytes (SW1=90 SW2=00)
08 05 ..
iso7816.c:126:iso7816_read_binary: returning with: 2
card.c:640:sc_read_binary: returning with: 2
called; type=2, path=df01c008
card-starcos.c:375:starcos_select_file: called
current path (path, valid): 3F00DF01 (len: 4)
card.c:250:sc_transmit_apdu: called
Sending 8 bytes (resp. 258 bytes):
00 A4 00 00 02 C0 08 00 ........
Received 9 bytes (SW1=90 SW2=00)
6F 07 80 02 06 00 82 01 01 o........
card.c:250:sc_transmit_apdu: called
Sending 5 bytes (resp. 258 bytes):
00 B0 00 00 01 .....
Received 1 bytes (SW1=90 SW2=00)
00 .
card-starcos.c:361:starcos_select_fid: returning with: 0
card.c:759:sc_select_file: returning with: 0
called; 2 bytes at index 0
card.c:250:sc_transmit_apdu: called
Sending 5 bytes (resp. 258 bytes):
00 B0 00 00 02 .....
Received 2 bytes (SW1=90 SW2=00)
00 00 ..
iso7816.c:126:iso7816_read_binary: returning with: 2
card.c:640:sc_read_binary: returning with: 2
called; type=2, path=3f00
card-starcos.c:375:starcos_select_file: called
current path (path, valid): 3F00DF01 (len: 4)
card.c:250:sc_transmit_apdu: called
Sending 8 bytes (resp. 258 bytes):
00 A4 00 00 02 3F 00 00 .....?..
Received 0 bytes (SW1=62 SW2=84)
card.c:250:sc_transmit_apdu: called
Sending 7 bytes (resp. 258 bytes):
00 A4 00 0C 02 3F 00 .....?.
Received 0 bytes (SW1=90 SW2=00)
card-starcos.c:361:starcos_select_fid: returning with: 0
card.c:759:sc_select_file: returning with: 0
pkcs15-cert.c:115:sc_pkcs15_read_certificate: called
called, path=df01c008, index=2, count=0
called; type=2, path=df01c008
card-starcos.c:375:starcos_select_file: called
current path (path, valid): 3F00 (len: 2)
card.c:250:sc_transmit_apdu: called
Sending 8 bytes (resp. 258 bytes):
00 A4 00 00 02 DF 01 00 ........
Received 0 bytes (SW1=62 SW2=84)
card.c:250:sc_transmit_apdu: called
Sending 7 bytes (resp. 258 bytes):
00 A4 00 0C 02 DF 01 .......
Received 0 bytes (SW1=90 SW2=00)
card-starcos.c:361:starcos_select_fid: returning with: 0
card-starcos.c:375:starcos_select_file: called
current path (path, valid): 3F00DF01 (len: 4)
card.c:250:sc_transmit_apdu: called
Sending 8 bytes (resp. 258 bytes):
00 A4 00 00 02 C0 08 00 ........
Received 9 bytes (SW1=90 SW2=00)
6F 07 80 02 06 00 82 01 01 o........
card.c:250:sc_transmit_apdu: called
Sending 5 bytes (resp. 258 bytes):
00 B0 00 00 01 .....
Received 1 bytes (SW1=90 SW2=00)
00 .
processing FCI bytes
  bytes in file: 1536
  type: working EF
  EF structure: transparent
card-starcos.c:361:starcos_select_fid: returning with: 0
card.c:759:sc_select_file: returning with: 0
called; 0 bytes at index 2
pkcs15.c:686:sc_pkcs15_unbind: called
card.c:534:sc_unlock: called
Calling card logout function
card.c:250:sc_transmit_apdu: called
Sending 7 bytes (resp. 258 bytes):
00 A4 00 0C 02 3F 00 .....?.
Received 0 bytes (SW1=90 SW2=00)
sw1 = 0x90, sw2 = 0x00
card.c:489:sc_disconnect_card: called
card.c:504:sc_disconnect_card: returning with: 0
ctx.c:709:sc_release_context: called
***********************************************************************
 
Third element *********************************************************
PKCS11 TEST COMMAND + RELATIVE DEBUG & ERRORS LOG
C:\Programmi\Smart card bundle>pkcs11-tool.exe --login --test
Please enter User PIN:
C_SeedRandom() and C_GenerateRandom():
  not implemented
Digests:
  all 4 digest functions seem to work
  MD5: OK
  SHA-1: OK
  RIPEMD160: OK
Signatures (currently only RSA signatures)
  testing key 0 (Non repudiation Key)
error: PKCS11 function C_SignFinal failed: rv = CKR_GENERAL_ERROR (0x5)
Aborting.
 
opensc-errors.log:
 
File not found
card-starcos.c:317:starcos_select_fid: returning with: File not found
card.c:759:sc_select_file: returning with: File not found
X.509 certificate not found
Conditions of use not satisfied
card-starcos.c:1152:starcos_set_security_env: returning with: Not allowed
sec.c:67:sc_set_security_env: returning with: Not allowed
pkcs15-sec.c:312:sc_pkcs15_compute_signature: sc_set_security_env() failed: Not allowed
 
opensc-debug.log: (I omitted pre-card-matching debug)
 
opensc version: 0.9.4
0: Detecting smart card
sc.c:142:sc_detect_card_presence: called
sc.c:147:sc_detect_card_presence: returning with: 1
0: Connecting to smart card
card.c:368:sc_connect_card: called
ATR     : 3b:b7:94:00:81:31:fe:65:53:50:4b:32:33:90:00:d1
ATR try : 3b:6e:00:ff:45:73:74:45:49:44:20:76:65:72:20:31:2e:30
ATR try : 3b:fe:94:00:ff:80:b1:fa:45:1f:03:45:73:74:45:49:44:20:76:65:72:20:31:2e:30:43
matching configured ATRs
matching built-in ATRs
... omitted ...
trying driver: starcos
ATR     : 3b:b7:94:00:81:31:fe:65:53:50:4b:32:33:90:00:d1
ATR try : 3B:B7:94:00:c0:24:31:fe:65:53:50:4b:32:33:90:00:b4
ATR try : 3B:B7:94:00:81:31:fe:65:53:50:4b:32:33:90:00:d1
matched: STARCOS SPK 2.3
card info: STARCOS SPK 2.3, 7001, 0x0
card.c:477:sc_connect_card: returning with: 0
0: Detecting Framework
pkcs15.c:611:sc_pkcs15_bind: called
card.c:514:sc_lock: called
trying normal pkcs15 processing
called; type=2, path=3f002f00
card-starcos.c:375:starcos_select_file: called
current path (path, valid):  (len: 0)
card.c:250:sc_transmit_apdu: called
Sending 8 bytes (resp. 258 bytes):
00 A4 00 00 02 3F 00 00 .....?..
Received 0 bytes (SW1=62 SW2=84)
card.c:250:sc_transmit_apdu: called
Sending 7 bytes (resp. 258 bytes):
00 A4 00 0C 02 3F 00 .....?.
Received 0 bytes (SW1=90 SW2=00)
card-starcos.c:361:starcos_select_fid: returning with: 0
card.c:250:sc_transmit_apdu: called
Sending 8 bytes (resp. 258 bytes):
00 A4 00 00 02 2F 00 00 ...../..
Received 0 bytes (SW1=6A SW2=82)
sw1 = 0x6a, sw2 = 0x82
File not found
card-starcos.c:317:starcos_select_fid: returning with: -1201
card.c:759:sc_select_file: returning with: -1201
called; type=2, path=3f005015
card-starcos.c:375:starcos_select_file: called
current path (path, valid): 3F00 (len: 2)
card.c:250:sc_transmit_apdu: called
Sending 8 bytes (resp. 258 bytes):
00 A4 00 00 02 50 15 00 .....P..
Received 0 bytes (SW1=6A SW2=82)
sw1 = 0x6a, sw2 = 0x82
File not found
card-starcos.c:317:starcos_select_fid: returning with: -1201
card.c:759:sc_select_file: returning with: -1201
called; type=2, path=3f005031
card-starcos.c:375:starcos_select_file: called
current path (path, valid): 3F00 (len: 2)
card.c:250:sc_transmit_apdu: called
Sending 8 bytes (resp. 258 bytes):
00 A4 00 00 02 50 31 00 .....P1.
Received 0 bytes (SW1=6A SW2=82)
sw1 = 0x6a, sw2 = 0x82
pkcs15-syn.c:85:sc_pkcs15_bind_synthetic: called
use builtin drivers
trying esteid
trying openpgp
trying tcos
trying starcert
called; type=2, path=3f00fe13
card-starcos.c:375:starcos_select_file: called
current path (path, valid): 3F00 (len: 2)
card.c:250:sc_transmit_apdu: called
Sending 8 bytes (resp. 258 bytes):
00 A4 00 00 02 FE 13 00 ........
Received 0 bytes (SW1=6A SW2=82)
sw1 = 0x6a, sw2 = 0x82
File not found
card-starcos.c:317:starcos_select_fid: returning with: -1201
card.c:759:sc_select_file: returning with: -1201
trying infocamere
called; type=2, path=3f002f02
card-starcos.c:375:starcos_select_file: called
current path (path, valid): 3F00 (len: 2)
card.c:250:sc_transmit_apdu: called
Sending 8 bytes (resp. 258 bytes):
00 A4 00 00 02 2F 02 00 ...../..
Received 9 bytes (SW1=90 SW2=00)
6F 07 80 02 00 1A 82 01 01 o........
card.c:250:sc_transmit_apdu: called
Sending 5 bytes (resp. 258 bytes):
00 B0 00 00 01 .....
Received 1 bytes (SW1=90 SW2=00)
5A Z
processing FCI bytes
  bytes in file: 26
  type: working EF
  EF structure: transparent
card-starcos.c:361:starcos_select_fid: returning with: 0
card.c:759:sc_select_file: returning with: 0
called; 26 bytes at index 0
card.c:250:sc_transmit_apdu: called
Sending 5 bytes (resp. 258 bytes):
00 B0 00 00 1A .....
Received 26 bytes (SW1=90 SW2=00)
5A 0D D2 76 00 00 01 25 90 15 48 00 13 1C 13 5F Z..v...%..H...._
20 08 12 02 05 00 00 77 78 25                    ......wx%
iso7816.c:126:iso7816_read_binary: returning with: 26
card.c:640:sc_read_binary: returning with: 26
called; type=2, path=11111a02
card-starcos.c:375:starcos_select_file: called
current path (path, valid): 3F00 (len: 2)
card.c:250:sc_transmit_apdu: called
Sending 8 bytes (resp. 258 bytes):
00 A4 00 00 02 11 11 00 ........
Received 0 bytes (SW1=62 SW2=84)
card.c:250:sc_transmit_apdu: called
Sending 7 bytes (resp. 258 bytes):
00 A4 00 0C 02 11 11 .......
Received 0 bytes (SW1=90 SW2=00)
card-starcos.c:361:starcos_select_fid: returning with: 0
card-starcos.c:375:starcos_select_file: called
current path (path, valid): 3F001111 (len: 4)
card.c:250:sc_transmit_apdu: called
Sending 8 bytes (resp. 258 bytes):
00 A4 00 00 02 1A 02 00 ........
Received 0 bytes (SW1=6A SW2=82)
sw1 = 0x6a, sw2 = 0x82
File not found
card-starcos.c:317:starcos_select_fid: returning with: -1201
card.c:759:sc_select_file: returning with: -1201
called; type=2, path=df01c000
card-starcos.c:375:starcos_select_file: called
current path (path, valid): 3F001111 (len: 4)
card.c:250:sc_transmit_apdu: called
Sending 8 bytes (resp. 258 bytes):
00 A4 00 00 02 DF 01 00 ........
Received 0 bytes (SW1=62 SW2=84)
card.c:250:sc_transmit_apdu: called
Sending 7 bytes (resp. 258 bytes):
00 A4 00 0C 02 DF 01 .......
Received 0 bytes (SW1=90 SW2=00)
card-starcos.c:361:starcos_select_fid: returning with: 0
card-starcos.c:375:starcos_select_file: called
current path (path, valid): 3F00DF01 (len: 4)
card.c:250:sc_transmit_apdu: called
Sending 8 bytes (resp. 258 bytes):
00 A4 00 00 02 C0 00 00 ........
Received 9 bytes (SW1=90 SW2=00)
6F 07 80 02 0A 00 82 01 01 o........
card.c:250:sc_transmit_apdu: called
Sending 5 bytes (resp. 258 bytes):
00 B0 00 00 01 .....
Received 1 bytes (SW1=90 SW2=00)
08 .
card-starcos.c:361:starcos_select_fid: returning with: 0
card.c:759:sc_select_file: returning with: 0
called; 2 bytes at index 0
card.c:250:sc_transmit_apdu: called
Sending 5 bytes (resp. 258 bytes):
00 B0 00 00 02 .....
Received 2 bytes (SW1=90 SW2=00)
08 05 ..
iso7816.c:126:iso7816_read_binary: returning with: 2
card.c:640:sc_read_binary: returning with: 2
called; type=2, path=df01c008
card-starcos.c:375:starcos_select_file: called
current path (path, valid): 3F00DF01 (len: 4)
card.c:250:sc_transmit_apdu: called
Sending 8 bytes (resp. 258 bytes):
00 A4 00 00 02 C0 08 00 ........
Received 9 bytes (SW1=90 SW2=00)
6F 07 80 02 06 00 82 01 01 o........
card.c:250:sc_transmit_apdu: ca
Reply | Threaded
Open this post in threaded view
|

Re: [INFOCAMERE STARCOS 2.3 CARD] Invalid ASN.1 object

Nils Larsch
Pier Paolo Bortone wrote:
...

> First element *********************************************************
> DUMP COMMAND RESULT + RELATIVE ERRORS LOG
> C:\Programmi\Smart card bundle>p15dump.exe
> Using libopensc version 0.9.4.
> Card detected in reader 'CASTLES EZ100PU 0'
> Connecting... connected.
> ATR = 3b:b7:94:00:81:31:fe:65:53:50:4b:32:33:90:00:d1
> Looking for a PKCS#15 compatible Smart Card... found.
> PKCS#15 Card [Infocamere 1202 Card]:
>         Version        : 0
>         Serial number  : d2760000012590154800131c13
>         Manufacturer ID: Infocamere
>         Flags          :
> Enumerating PIN codes... 1 found.
> PIN [Non-repudiation PIN]
>         Com. Flags  : private, modifiable
>         Auth ID     : 02
>         Flags       : [0x31], case-sensitive, initialized, needs-padding
>         Length      : min_len:5, max_len:8, stored_len:8
>         Pad char    : 0x00
>         Reference   : 153
>         Encoding    : ASCII-numeric
>         Path        : 3F00DF01
>         Tries left  : 3
> Enumerating Private keys... 1 found.
> Private RSA key [Non repudiation Key]
>         Com. Flags  : private
>         Com. Auth ID: 02
>         Usage       : [0x200], nonRepudiation
>         Access Flags: [0x1D], sensitive, alwaysSensitive, neverExtract,
> local
>         ModLength   : 1024
>         Key ref     : 132
>         Native      : yes
>         Path        : 3F00DF01
>         ID          : 02
> Enumerating Public keys... none found.
> Enumerating X.509 certificates... 2 found.
> X.509 Certificate [User Non-repudiation Certificate]
>         Com. Flags  : modifiable
>         Authority   : no
>         Path        : df01c000
>         ID          : 02
> X.509 Certificate [CA Certificate]
>         Com. Flags  : modifiable
>         Authority   : yes
>         Path        : df01c008
>         ID          : 03
> Enumerating data objects... none found.
>  
> opensc-errors.log:
>  
> File not found
> card-starcos.c:317:starcos_select_fid: returning with: File not found
> card.c:759:sc_select_file: returning with: File not found

is the above dump correct or is there something missing/wrong ?

> ***********************************************************************
>  
> Second element ********************************************************
> TRY TO READ CERTIFICATE WITH ID 03 + RELATIVE DEBUG & ERRORS LOG
> C:\Programmi\Smart card bundle>pkcs15-tool.exe --read-certificate 03
> Certificate read failed: Invalid ASN.1 object

could you verify the there's a certificate in 3F00/DF01/C008
(using opensc-explorer with the get command, and could you send
me the file dump).

...

> trying infocamere
> called; type=2, path=3f002f02
> card-starcos.c:375:starcos_select_file: called
> current path (path, valid): 3F00 (len: 2)
> card.c:250:sc_transmit_apdu: called
> Sending 8 bytes (resp. 258 bytes):
> 00 A4 00 00 02 2F 02 00 ...../..
> Received 9 bytes (SW1=90 SW2=00)
> 6F 07 80 02 00 1A 82 01 01 o........
> card.c:250:sc_transmit_apdu: called
> Sending 5 bytes (resp. 258 bytes):
> 00 B0 00 00 01 .....
> Received 1 bytes (SW1=90 SW2=00)
> 5A Z
> processing FCI bytes
>   bytes in file: 26
>   type: working EF
>   EF structure: transparent
> card-starcos.c:361:starcos_select_fid: returning with: 0
> card.c:759:sc_select_file: returning with: 0
> called; 26 bytes at index 0
> card.c:250:sc_transmit_apdu: called
> Sending 5 bytes (resp. 258 bytes):
> 00 B0 00 00 1A .....
> Received 26 bytes (SW1=90 SW2=00)
> 5A 0D D2 76 00 00 01 25 90 15 48 00 13 1C 13 5F Z..v...%..H...._
> 20 08 12 02 05 00 00 77 78 25                    ......wx%
> iso7816.c:126:iso7816_read_binary: returning with: 26
> card.c:640:sc_read_binary: returning with: 26
> called; type=2, path=11111a02
> card-starcos.c:375:starcos_select_file: called
> current path (path, valid): 3F00 (len: 2)
> card.c:250:sc_transmit_apdu: called
> Sending 8 bytes (resp. 258 bytes):
> 00 A4 00 00 02 11 11 00 ........
> Received 0 bytes (SW1=62 SW2=84)
> card.c:250:sc_transmit_apdu: called
> Sending 7 bytes (resp. 258 bytes):
> 00 A4 00 0C 02 11 11 .......
> Received 0 bytes (SW1=90 SW2=00)
> card-starcos.c:361:starcos_select_fid: returning with: 0
> card-starcos.c:375:starcos_select_file: called
> current path (path, valid): 3F001111 (len: 4)
> card.c:250:sc_transmit_apdu: called
> Sending 8 bytes (resp. 258 bytes):
> 00 A4 00 00 02 1A 02 00 ........
> Received 0 bytes (SW1=6A SW2=82)
> sw1 = 0x6a, sw2 = 0x82
> File not found
> card-starcos.c:317:starcos_select_fid: returning with: -1201
> card.c:759:sc_select_file: returning with: -1201
> called; type=2, path=df01c000
> card-starcos.c:375:starcos_select_file: called

according to the infocamere driver there should be 1A02
DF on your token ...

Cheers,
Nils
_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-user
Reply | Threaded
Open this post in threaded view
|

Re: [INFOCAMERE STARCOS 2.3 CARD] Invalid ASN.1 object

Antonio Iacono
On Tuesday 04 October 2005 20:42, Nils Larsch wrote:
> Pier Paolo Bortone wrote:
[...]
> > card-starcos.c:317:starcos_select_fid: returning with: -1201
> > card.c:759:sc_select_file: returning with: -1201
> > called; type=2, path=df01c000
> > card-starcos.c:375:starcos_select_file: called
>
> according to the infocamere driver there should be 1A02
> DF on your token ...
>

Hi Pier, Nils and all

this certificate (1A02) is optional [1]. This and other bug have been
corrected in the trunk version of pkcs15-infocamere.c
Please, considers the idea to insert it in the stable version
Thanks,

Antonio

[1] ...
/* Get the authentication certificate length */

        sc_format_path(infocamere_auth_certpath[ef_gdo[len_iccsn+6]-2],
&path);

        card->ctx->suppress_errors++;
        r = sc_select_file(card, &path, NULL);
        card->ctx->suppress_errors--;

        if (r >= 0) {
...

--
http://opensignature.sourceforge.net
_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-user
Reply | Threaded
Open this post in threaded view
|

Re: [INFOCAMERE STARCOS 2.3 CARD] Invalid ASN.1 object

Nils Larsch
[hidden email] wrote:

> On Tuesday 04 October 2005 20:42, Nils Larsch wrote:
>
>>Pier Paolo Bortone wrote:
>
> [...]
>
>>>card-starcos.c:317:starcos_select_fid: returning with: -1201
>>>card.c:759:sc_select_file: returning with: -1201
>>>called; type=2, path=df01c000
>>>card-starcos.c:375:starcos_select_file: called
>>
>>according to the infocamere driver there should be 1A02
>>DF on your token ...
>>
>
>
> Hi Pier, Nils and all
>
> this certificate (1A02) is optional [1]. This and other bug have been
> corrected in the trunk version of pkcs15-infocamere.c
> Please, considers the idea to insert it in the stable version

quite soon the trunk version will be the stable version (0.10
is approaching) and afaik the scb version Pier tested should
already use a recent snapshot from the trunk.

Cheers,
Nils
_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-user
Reply | Threaded
Open this post in threaded view
|

Re: [INFOCAMERE STARCOS 2.3 CARD] Invalid ASN.1 object

Nils Larsch
In reply to this post by Pier Paolo Bortone
Pier Paolo Bortone wrote:
...
> First element *********************************************************
> DUMP COMMAND RESULT + RELATIVE ERRORS LOG
> C:\Programmi\Smart card bundle>p15dump.exe
...

> X.509 Certificate [CA Certificate]
>         Com. Flags  : modifiable
>         Authority   : yes
>         Path        : df01c008
>         ID          : 03
> Enumerating data objects... none found.
>  
> opensc-errors.log:
>  
> File not found
> card-starcos.c:317:starcos_select_fid: returning with: File not found
> card.c:759:sc_select_file: returning with: File not found

I think this one is caused by the opensc pkcs15 routines trying to
check whether the card has a pkcs15 compliant layout. It might be a
good idea to suppress errors there as well ... Setting
"try_emulation_first = yes;" in your opensc.conf file might 'fix'
this 'error' message.

Cheers,
Nils
_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-user
Reply | Threaded
Open this post in threaded view
|

Re: [INFOCAMERE STARCOS 2.3 CARD] Invalid ASN.1 object

Andreas Jellinghaus-2
On Tuesday 04 October 2005 23:24, Nils Larsch wrote:
> I think this one is caused by the opensc pkcs15 routines trying to
> check whether the card has a pkcs15 compliant layout. It might be a
> good idea to suppress errors there as well ... Setting
> "try_emulation_first = yes;" in your opensc.conf file might 'fix'
> this 'error' message.

shall we do that for the default opensc.conf? (or is it already?)

Andreas
_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-user
Reply | Threaded
Open this post in threaded view
|

Re: [INFOCAMERE STARCOS 2.3 CARD] Invalid ASN.1 object

Nils Larsch
Andreas Jellinghaus wrote:

> On Tuesday 04 October 2005 23:24, Nils Larsch wrote:
>
>>I think this one is caused by the opensc pkcs15 routines trying to
>>check whether the card has a pkcs15 compliant layout. It might be a
>>good idea to suppress errors there as well ... Setting
>>"try_emulation_first = yes;" in your opensc.conf file might 'fix'
>>this 'error' message.
>
>
> shall we do that for the default opensc.conf? (or is it already?)

no, this would make the pkcs15 parsing slower for normal pkcs15
cards (as the emulation driver are tried first).

Cheers,
Nils
_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-user
Reply | Threaded
Open this post in threaded view
|

R: [INFOCAMERE STARCOS 2.3 CARD] Invalid ASN.1 object

Pier Paolo Bortone
In reply to this post by Pier Paolo Bortone
Re: [opensc-user] [INFOCAMERE STARCOS 2.3 CARD] Invalid ASN.1 object
Hi Nils,
I think the DUMP infos is correct, but I'm not sure. I inserted dump infos
to a better analisys.
 
As you said, I tried the command:
C:\Programmi\Smart card bundle>opensc-explorer.exe
OpenSC Explorer version 0.9.4
OpenSC [3F00]> cd DF01
OpenSC [3F00/DF01]> get C008
Total of 1536 bytes read from C008 and saved to 3F00_DF01_C008.
OpenSC [3F00/DF01]>
 
The file saved is a sequence of 1536 bytes (2 "00" + 1534 "FF").
 
Here is the log of the of "get" command:
called; type=2, path=3f00df01c008
card-starcos.c:375:starcos_select_file: called
current path (path, valid): 3F00DF01 (len: 4)
card.c:250:sc_transmit_apdu: called
Sending 8 bytes (resp. 258 bytes):
00 A4 00 00 02 C0 08 00 ........
Received 9 bytes (SW1=90 SW2=00)
6F 07 80 02 06 00 82 01 01 o........
card.c:250:sc_transmit_apdu: called
Sending 5 bytes (resp. 258 bytes):
00 B0 00 00 01 .....
Received 1 bytes (SW1=90 SW2=00)
00 .
processing FCI bytes
  bytes in file: 1536
  type: working EF
  EF structure: transparent
card-starcos.c:361:starcos_select_fid: returning with: 0
card.c:759:sc_select_file: returning with: 0
called; 256 bytes at index 0
called; 128 bytes at index 0
card.c:250:sc_transmit_apdu: called
Sending 5 bytes (resp. 258 bytes):
00 B0 00 00 80 .....
Received 128 bytes (SW1=90 SW2=00)
00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
iso7816.c:126:iso7816_read_binary: returning with: 128
card.c:640:sc_read_binary: returning with: 128
called; 128 bytes at index 128
card.c:250:sc_transmit_apdu: called
Sending 5 bytes (resp. 258 bytes):
00 B0 00 80 80 .....
Received 128 bytes (SW1=90 SW2=00)
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
iso7816.c:126:iso7816_read_binary: returning with: 128
card.c:640:sc_read_binary: returning with: 128
card.c:637:sc_read_binary: returning with: 256
called; 256 bytes at index 256
called; 128 bytes at index 256
card.c:250:sc_transmit_apdu: called
Sending 5 bytes (resp. 258 bytes):
00 B0 01 00 80 .....
Received 128 bytes (SW1=90 SW2=00)
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
iso7816.c:126:iso7816_read_binary: returning with: 128
card.c:640:sc_read_binary: returning with: 128
called; 128 bytes at index 384
card.c:250:sc_transmit_apdu: called
Sending 5 bytes (resp. 258 bytes):
00 B0 01 80 80 .....
Received 128 bytes (SW1=90 SW2=00)
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
iso7816.c:126:iso7816_read_binary: returning with: 128
card.c:640:sc_read_binary: returning with: 128
card.c:637:sc_read_binary: returning with: 256
called; 256 bytes at index 512
called; 128 bytes at index 512
card.c:250:sc_transmit_apdu: called
Sending 5 bytes (resp. 258 bytes):
00 B0 02 00 80 .....
Received 128 bytes (SW1=90 SW2=00)
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
iso7816.c:126:iso7816_read_binary: returning with: 128
card.c:640:sc_read_binary: returning with: 128
called; 128 bytes at index 640
card.c:250:sc_transmit_apdu: called
Sending 5 bytes (resp. 258 bytes):
00 B0 02 80 80 .....
Received 128 bytes (SW1=90 SW2=00)
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
iso7816.c:126:iso7816_read_binary: returning with: 128
card.c:640:sc_read_binary: returning with: 128
card.c:637:sc_read_binary: returning with: 256
called; 256 bytes at index 768
called; 128 bytes at index 768
card.c:250:sc_transmit_apdu: called
Sending 5 bytes (resp. 258 bytes):
00 B0 03 00 80 .....
Received 128 bytes (SW1=90 SW2=00)
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
iso7816.c:126:iso7816_read_binary: returning with: 128
card.c:640:sc_read_binary: returning with: 128
called; 128 bytes at index 896
card.c:250:sc_transmit_apdu: called
Sending 5 bytes (resp. 258 bytes):
00 B0 03 80 80 .....
Received 128 bytes (SW1=90 SW2=00)
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
iso7816.c:126:iso7816_read_binary: returning with: 128
card.c:640:sc_read_binary: returning with: 128
card.c:637:sc_read_binary: returning with: 256
called; 256 bytes at index 1024
called; 128 bytes at index 1024
card.c:250:sc_transmit_apdu: called
Sending 5 bytes (resp. 258 bytes):
00 B0 04 00 80 .....
Received 128 bytes (SW1=90 SW2=00)
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
iso7816.c:126:iso7816_read_binary: returning with: 128
card.c:640:sc_read_binary: returning with: 128
called; 128 bytes at index 1152
card.c:250:sc_transmit_apdu: called
Sending 5 bytes (resp. 258 bytes):
00 B0 04 80 80 .....
Received 128 bytes (SW1=90 SW2=00)
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
iso7816.c:126:iso7816_read_binary: returning with: 128
card.c:640:sc_read_binary: returning with: 128
card.c:637:sc_read_binary: returning with: 256
called; 256 bytes at index 1280
called; 128 bytes at index 1280
card.c:250:sc_transmit_apdu: called
Sending 5 bytes (resp. 258 bytes):
00 B0 05 00 80 .....
Received 128 bytes (SW1=90 SW2=00)
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
iso7816.c:126:iso7816_read_binary: returning with: 128
card.c:640:sc_read_binary: returning with: 128
called; 128 bytes at index 1408
card.c:250:sc_transmit_apdu: called
Sending 5 bytes (resp. 258 bytes):
00 B0 05 80 80 .....
Received 128 bytes (SW1=90 SW2=00)
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
iso7816.c:126:iso7816_read_binary: returning with: 128
card.c:640:sc_read_binary: returning with: 128
card.c:637:sc_read_binary: returning with: 256
called; type=2, path=3f00df01
card-starcos.c:375:starcos_select_file: called
current path (path, valid): 3F00DF01 (len: 4)
cache hit
card.c:759:sc_select_file: returning with: 0
 
 
 
 
Pier Paolo Bortone wrote:
...
> First element *********************************************************
> DUMP COMMAND RESULT + RELATIVE ERRORS LOG
> C:\Programmi\Smart card bundle>p15dump.exe
> Using libopensc version 0.9.4.
> Card detected in reader 'CASTLES EZ100PU 0'
> Connecting... connected.
> ATR = 3b:b7:94:00:81:31:fe:65:53:50:4b:32:33:90:00:d1
> Looking for a PKCS#15 compatible Smart Card... found.
> PKCS#15 Card [Infocamere 1202 Card]:
>         Version        : 0
>         Serial number  : d2760000012590154800131c13
>         Manufacturer ID: Infocamere
>         Flags          :
> Enumerating PIN codes... 1 found.
> PIN [Non-repudiation PIN]
>         Com. Flags  : private, modifiable
>         Auth ID     : 02
>         Flags       : [0x31], case-sensitive, initialized, needs-padding
>         Length      : min_len:5, max_len:8, stored_len:8
>         Pad char    : 0x00
>         Reference   : 153
>         Encoding    : ASCII-numeric
>         Path        : 3F00DF01
>         Tries left  : 3
> Enumerating Private keys... 1 found.
> Private RSA key [Non repudiation Key]
>         Com. Flags  : private
>         Com. Auth ID: 02
>         Usage       : [0x200], nonRepudiation
>         Access Flags: [0x1D], sensitive, alwaysSensitive, neverExtract,
> local
>         ModLength   : 1024
>         Key ref     : 132
>         Native      : yes
>         Path        : 3F00DF01
>         ID          : 02
> Enumerating Public keys... none found.
> Enumerating X.509 certificates... 2 found.
> X.509 Certificate [User Non-repudiation Certificate]
>         Com. Flags  : modifiable
>         Authority   : no
>         Path        : df01c000
>         ID          : 02
> X.509 Certificate [CA Certificate]
>         Com. Flags  : modifiable
>         Authority   : yes
>         Path        : df01c008
>         ID          : 03
> Enumerating data objects... none found.

> opensc-errors.log:

> File not found
> card-starcos.c:317:starcos_select_fid: returning with: File not found
> card.c:759:sc_select_file: returning with: File not found

is the above dump correct or is there something missing/wrong ?

> ***********************************************************************

> Second element ********************************************************
> TRY TO READ CERTIFICATE WITH ID 03 + RELATIVE DEBUG & ERRORS LOG
> C:\Programmi\Smart card bundle>pkcs15-tool.exe --read-certificate 03
> Certificate read failed: Invalid ASN.1 object

could you verify the there's a certificate in 3F00/DF01/C008
(using opensc-explorer with the get command, and could you send
me the file dump).

...
> trying infocamere
> called; type=2, path=3f002f02
> card-starcos.c:375:starcos_select_file: called
> current path (path, valid): 3F00 (len: 2)
> card.c:250:sc_transmit_apdu: called
> Sending 8 bytes (resp. 258 bytes):
> 00 A4 00 00 02 2F 02 00 ...../..
> Received 9 bytes (SW1=90 SW2=00)
> 6F 07 80 02 00 1A 82 01 01 o........
> card.c:250:sc_transmit_apdu: called
> Sending 5 bytes (resp. 258 bytes):
> 00 B0 00 00 01 .....
> Received 1 bytes (SW1=90 SW2=00)
> 5A Z
> processing FCI bytes
>   bytes in file: 26
>   type: working EF
>   EF structure: transparent
> card-starcos.c:361:starcos_select_fid: returning with: 0
> card.c:759:sc_select_file: returning with: 0
> called; 26 bytes at index 0
> card.c:250:sc_transmit_apdu: called
> Sending 5 bytes (resp. 258 bytes):
> 00 B0 00 00 1A .....
> Received 26 bytes (SW1=90 SW2=00)
> 5A 0D D2 76 00 00 01 25 90 15 48 00 13 1C 13 5F Z..v...%..H...._
> 20 08 12 02 05 00 00 77 78 25                    ......wx%
> iso7816.c:126:iso7816_read_binary: returning with: 26
> card.c:640:sc_read_binary: returning with: 26
> called; type=2, path=11111a02
> card-starcos.c:375:starcos_select_file: called
> current path (path, valid): 3F00 (len: 2)
> card.c:250:sc_transmit_apdu: called
> Sending 8 bytes (resp. 258 bytes):
> 00 A4 00 00 02 11 11 00 ........
> Received 0 bytes (SW1=62 SW2=84)
> card.c:250:sc_transmit_apdu: called
> Sending 7 bytes (resp. 258 bytes):
> 00 A4 00 0C 02 11 11 .......
> Received 0 bytes (SW1=90 SW2=00)
> card-starcos.c:361:starcos_select_fid: returning with: 0
> card-starcos.c:375:starcos_select_file: called
> current path (path, valid): 3F001111 (len: 4)
> card.c:250:sc_transmit_apdu: called
> Sending 8 bytes (resp. 258 bytes):
> 00 A4 00 00 02 1A 02 00 ........
> Received 0 bytes (SW1=6A SW2=82)
> sw1 = 0x6a, sw2 = 0x82
> File not found
> card-starcos.c:317:starcos_select_fid: returning with: -1201
> card.c:759:sc_select_file: returning with: -1201
> called; type=2, path=df01c000
> card-starcos.c:375:starcos_select_file: called

according to the infocamere driver there should be 1A02
DF on your token ...

Cheers,
Nils


_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-user
Reply | Threaded
Open this post in threaded view
|

R: [INFOCAMERE STARCOS 2.3 CARD] Invalid ASN.1 object

Pier Paolo Bortone
In reply to this post by Pier Paolo Bortone
Re: [opensc-user] [INFOCAMERE STARCOS 2.3 CARD] Invalid ASN.1 object
Hi Antonio,
I'm using scb 0.5-pre1e and it should already use fixed version
of opensc.
 
Other suggestions?
 
Thanks in advance.
 
Pier Paolo


Da: [hidden email] per conto di [hidden email]
Inviato: mar 04/10/2005 21.58
A: [hidden email]
Oggetto: Re: [opensc-user] [INFOCAMERE STARCOS 2.3 CARD] Invalid ASN.1 object

On Tuesday 04 October 2005 20:42, Nils Larsch wrote:
> Pier Paolo Bortone wrote:
[...]
> > card-starcos.c:317:starcos_select_fid: returning with: -1201
> > card.c:759:sc_select_file: returning with: -1201
> > called; type=2, path=df01c000
> > card-starcos.c:375:starcos_select_file: called
>
> according to the infocamere driver there should be 1A02
> DF on your token ...
>

Hi Pier, Nils and all

this certificate (1A02) is optional [1]. This and other bug have been
corrected in the trunk version of pkcs15-infocamere.c
Please, considers the idea to insert it in the stable version
Thanks,

Antonio

[1] ...
/* Get the authentication certificate length */

        sc_format_path(infocamere_auth_certpath[ef_gdo[len_iccsn+6]-2],
&path);

        card->ctx->suppress_errors++;
        r = sc_select_file(card, &path, NULL);
        card->ctx->suppress_errors--;

        if (r >= 0) {
...

--
http://opensignature.sourceforge.net
_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-user


_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-user
Reply | Threaded
Open this post in threaded view
|

R: [INFOCAMERE STARCOS 2.3 CARD] Invalid ASN.1 object

Pier Paolo Bortone
In reply to this post by Pier Paolo Bortone
Re: [opensc-user] [INFOCAMERE STARCOS 2.3 CARD] Invalid ASN.1 object
Yes.
Setting "try_emulation_first=yes" fix the error message.
 
Thanks.

Pier Paolo Bortone wrote:
...
> First element *********************************************************
> DUMP COMMAND RESULT + RELATIVE ERRORS LOG
> C:\Programmi\Smart card bundle>p15dump.exe
...
> X.509 Certificate [CA Certificate]
>         Com. Flags  : modifiable
>         Authority   : yes
>         Path        : df01c008
>         ID          : 03
> Enumerating data objects... none found.

> opensc-errors.log:

> File not found
> card-starcos.c:317:starcos_select_fid: returning with: File not found
> card.c:759:sc_select_file: returning with: File not found

I think this one is caused by the opensc pkcs15 routines trying to
check whether the card has a pkcs15 compliant layout. It might be a
good idea to suppress errors there as well ... Setting
"try_emulation_first = yes;" in your opensc.conf file might 'fix'
this 'error' message.

Cheers,
Nils


_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-user
Reply | Threaded
Open this post in threaded view
|

Re: R: [INFOCAMERE STARCOS 2.3 CARD] Invalid ASN.1 object

Nils Larsch
In reply to this post by Pier Paolo Bortone
Pier Paolo Bortone wrote:

> Hi Nils,
> I think the DUMP infos is correct, but I'm not sure. I inserted dump infos
> to a better analisys.
>  
> As you said, I tried the command:
> C:\Programmi\Smart card bundle>opensc-explorer.exe
> OpenSC Explorer version 0.9.4
> OpenSC [3F00]> cd DF01
> OpenSC [3F00/DF01]> get C008
> Total of 1536 bytes read from C008 and saved to 3F00_DF01_C008.

ok, the file is empty. Should there be a ca certificate on the token ?

Cheers,
Nils
_______________________________________________
opensc-user mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-user