A little script to re-initialize the card (erase and load)

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

A little script to re-initialize the card (erase and load)

Jan Schermer
Hi,
I wrote this because from time to time (2x a Month) my PIN gets locked
out - usually because I'm drunk and can't type, but sometimes because of
a software bug (ssh is such a b*tch to me). I have never been able to
unblock the PIN with the PUK and this is where my script comes handy...

It is very straightforward and simple, yet (I hope) flexible to customize.

It prompts user for the passwords (SOPIN, SOPUK, PIN, PUK, passphrase
for private keys) and a list of certificates to store on the key.
It then creates separate auth-id for every certificate and stores the
associated certificate.

The default profile used is "pkcs15+oberthur", without it, I couldn't
store 4 different IDs to my iKey 3000.

Comments are welcome (is using a separate auth-id for everything a good
idea?)

If you make a change, please CC me directly.

Thank you

--
Jan Schermer
Freelance UNIX Specialist

GSM: +420-608022225
email: [hidden email]
ICQ: 19466257
WWW: http://www.zviratko.net


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

mkcard.sh (3K) Download Attachment
smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: A little script to re-initialize the card (erase and load) [u]

Andreas Jellinghaus-2
Hi Jan,

if you have a spare ikey3000, could you initialize it,
block the pin, and then create a debug log file with
runing the unblock command? I don't know starcos
well, but I guess unblocking should be possible,
and if it is not, we should fix it.

Also please note: the "oberthur" option was for
the oberthur cards only, I'm not sure which side
effects you might get on other cards. so if you
could file a bug report with details what you
want to do, so we can see why it doesn't work
and fix it, that would be nice.

of course I can add your script to the contrib
section (/files/contrib), or maybe we start
such a section in the wiki (I think you can
attach files to wikipages, only I haven't tried
so far myself)? but getting those bugs fixed
would be the best option IMO.

Regards, 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: A little script to re-initialize the card (erase and load) [u]

Jan Schermer
Hi,
the debug file is attached, tell me if you need something more.

I don't have a "spare" iKey, but thanks to my little script I don't
worry about erasing my card no more :o)

I blanked the card, created auth-id 01 with PIN "pinpin" and PUK "pukpuk"
blocked it with --change-pin
then
pkcs15-tool -v -v -v -v -v -v -v -v -u -a 01 >unblock-debug

and here it goes...

I used the default profile for creation of the token (pkcs15)

I am normally using oberthur because the default settings wouldn't allow
me to create more than 3 auth-ids (and I use 4). I noticed no side effects.
My card actually holds 1 SO identity, 4 user auth-ids and three
certificate chains of thawte freemail certificates for different email
addresses (only 6 certs get stored because of duplicities).

Jan Schermer
Freelance UNIX Specialist

GSM: +420-608022225
email: [hidden email]
ICQ: 19466257
WWW: http://www.zviratko.net



Andreas Jellinghaus [c] wrote:

>Hi Jan,
>
>if you have a spare ikey3000, could you initialize it,
>block the pin, and then create a debug log file with
>runing the unblock command? I don't know starcos
>well, but I guess unblocking should be possible,
>and if it is not, we should fix it.
>
>Also please note: the "oberthur" option was for
>the oberthur cards only, I'm not sure which side
>effects you might get on other cards. so if you
>could file a bug report with details what you
>want to do, so we can see why it doesn't work
>and fix it, that would be nice.
>
>of course I can add your script to the contrib
>section (/files/contrib), or maybe we start
>such a section in the wiki (I think you can
>attach files to wikipages, only I haven't tried
>so far myself)? but getting those bugs fixed
>would be the best option IMO.
>
>Regards, Andreas
>_______________________________________________
>opensc-user mailing list
>[hidden email]
>http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-user
>  
>

sc.c:120:sc_detect_card_presence: called
reader-openct.c:193:openct_reader_detect_card_presence: called
sc.c:125:sc_detect_card_presence: returning with: 1
Connecting to card in reader Rainbow iKey 3000...
card.c:346:sc_connect_card: called
reader-openct.c:217:openct_reader_connect: called
card.c:401:sc_connect_card: trying driver: Siemens CardOS
card.c:401:sc_connect_card: trying driver: Schlumberger Multiflex/Cryptoflex
card.c:401:sc_connect_card: trying driver: Schlumberger Cyberflex
card.c:401:sc_connect_card: trying driver: Gemplus GPK driver
card.c:401:sc_connect_card: trying driver: MioCOS 1.1 cards
card.c:401:sc_connect_card: trying driver: MICARDO 2.1
card.c:401:sc_connect_card: trying driver: Setec smartcards
card.c:401:sc_connect_card: trying driver: driver for STARCOS SPK 2.3 cards
card.c:407:sc_connect_card: matched: driver for STARCOS SPK 2.3 cards
card.c:431:sc_connect_card: returning with: 0
Using card driver driver for STARCOS SPK 2.3 cards.
card.c:468:sc_lock: called
reader-openct.c:373:openct_reader_lock: called
pkcs15.c:594:sc_pkcs15_bind: called
pkcs15.c:474:sc_pkcs15_bind_internal: trying normal pkcs15 processing
card.c:691:sc_select_file: called; type=2, path=3f002f00
card-starcos.c:412:starcos_select_file: current path (path, valid):  (len: 0)
card.c:229:sc_transmit_apdu: called
card.c:196:sc_transceive: Sending 8 bytes (resp. 260 bytes):
00 A4 00 00 02 3F 00 00 .....?..
card.c:249:sc_transmit_apdu: Received 0 bytes (SW1=62 SW2=84)
card.c:229:sc_transmit_apdu: called
card.c:196:sc_transceive: Sending 7 bytes (resp. 2 bytes):
00 A4 00 0C 02 3F 00 .....?.
card.c:249:sc_transmit_apdu: Received 0 bytes (SW1=90 SW2=00)
card-starcos.c:386:starcos_select_fid: returning with: 0
card.c:229:sc_transmit_apdu: called
card.c:196:sc_transceive: Sending 8 bytes (resp. 260 bytes):
00 A4 00 00 02 2F 00 00 ...../..
card.c:249:sc_transmit_apdu: Received 9 bytes (SW1=90 SW2=00)
6F 07 80 02 00 80 82 01 01 o........
card.c:229:sc_transmit_apdu: called
card.c:196:sc_transceive: Sending 5 bytes (resp. 4 bytes):
00 B0 00 00 01 .....
card.c:249:sc_transmit_apdu: Received 1 bytes (SW1=90 SW2=00)
61 a
card-starcos.c:163:process_fci: processing FCI bytes
card-starcos.c:185:process_fci:   bytes in file: 128
card-starcos.c:234:process_fci:   type: working EF
card-starcos.c:235:process_fci:   EF structure: transparent
card-starcos.c:386:starcos_select_fid: returning with: 0
card.c:713:sc_select_file: returning with: 0
card.c:563:sc_read_binary: called; 128 bytes at index 0
card.c:229:sc_transmit_apdu: called
card.c:196:sc_transceive: Sending 5 bytes (resp. 130 bytes):
00 B0 00 00 80 .....
card.c:249:sc_transmit_apdu: Received 128 bytes (SW1=90 SW2=00)
61 21 4F 0C A0 00 00 00 63 50 4B 43 53 2D 31 35 a!O.....cPKCS-15
50 0B 4F 70 65 6E 53 43 20 43 61 72 64 51 04 3F P.OpenSC CardQ.?
00 50 15 00 00 00 00 00 00 00 00 00 00 00 00 00 .P..............
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
iso7816.c:126:iso7816_read_binary: returning with: 128
card.c:594:sc_read_binary: returning with: 128
asn1.c:1035:asn1_decode: called, left=128, depth 0
asn1.c:1060:asn1_decode: Looking for 'dirRecord', tag 0x11000001
asn1.c:859:asn1_decode_entry: decoding 'dirRecord'
asn1.c:1035:asn1_decode:  called, left=33, depth 1
asn1.c:1060:asn1_decode: Looking for 'aid', tag 0x1000000f
asn1.c:859:asn1_decode_entry:  decoding 'aid'
asn1.c:1060:asn1_decode: Looking for 'label', tag 0x10000010, OPTIONAL
asn1.c:859:asn1_decode_entry:  decoding 'label'
asn1.c:1060:asn1_decode: Looking for 'path', tag 0x10000011, OPTIONAL
asn1.c:859:asn1_decode_entry:  decoding 'path'
asn1.c:1060:asn1_decode: Looking for 'ddo', tag 0x11000013, OPTIONAL
asn1.c:1076:asn1_decode: not present
asn1.c:1111:asn1_decode: returning with: 0
asn1.c:1111:asn1_decode: returning with: 0
asn1.c:1035:asn1_decode: called, left=93, depth 0
card.c:691:sc_select_file: called; type=2, path=3f005015
card-starcos.c:412:starcos_select_file: current path (path, valid): 3F00 (len: 2)
card.c:229:sc_transmit_apdu: called
card.c:196:sc_transceive: Sending 8 bytes (resp. 260 bytes):
00 A4 00 00 02 50 15 00 .....P..
card.c:249:sc_transmit_apdu: Received 0 bytes (SW1=62 SW2=84)
card.c:229:sc_transmit_apdu: called
card.c:196:sc_transceive: Sending 7 bytes (resp. 2 bytes):
00 A4 00 0C 02 50 15 .....P.
card.c:249:sc_transmit_apdu: Received 0 bytes (SW1=90 SW2=00)
card-starcos.c:386:starcos_select_fid: returning with: 0
card.c:713:sc_select_file: returning with: 0
card.c:691:sc_select_file: called; type=2, path=3f0050155031
card-starcos.c:412:starcos_select_file: current path (path, valid): 3F005015 (len: 4)
card.c:229:sc_transmit_apdu: called
card.c:196:sc_transceive: Sending 8 bytes (resp. 260 bytes):
00 A4 00 00 02 50 31 00 .....P1.
card.c:249:sc_transmit_apdu: Received 9 bytes (SW1=90 SW2=00)
6F 07 80 02 01 00 82 01 01 o........
card.c:229:sc_transmit_apdu: called
card.c:196:sc_transceive: Sending 5 bytes (resp. 4 bytes):
00 B0 00 00 01 .....
card.c:249:sc_transmit_apdu: Received 1 bytes (SW1=90 SW2=00)
A8 .
card-starcos.c:163:process_fci: processing FCI bytes
card-starcos.c:185:process_fci:   bytes in file: 256
card-starcos.c:234:process_fci:   type: working EF
card-starcos.c:235:process_fci:   EF structure: transparent
card-starcos.c:386:starcos_select_fid: returning with: 0
card.c:713:sc_select_file: returning with: 0
card.c:563:sc_read_binary: called; 256 bytes at index 0
card.c:563:sc_read_binary: called; 128 bytes at index 0
card.c:229:sc_transmit_apdu: called
card.c:196:sc_transceive: Sending 5 bytes (resp. 130 bytes):
00 B0 00 00 80 .....
card.c:249:sc_transmit_apdu: Received 128 bytes (SW1=90 SW2=00)
A8 0A 30 08 04 06 3F 00 50 15 44 01 FF FF FF FF ..0...?.P.D.....
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
FF FF FF FF FF FF FF FF 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:594:sc_read_binary: returning with: 128
card.c:563:sc_read_binary: called; 128 bytes at index 128
card.c:229:sc_transmit_apdu: called
card.c:196:sc_transceive: Sending 5 bytes (resp. 130 bytes):
00 B0 00 80 80 .....
card.c:249:sc_transmit_apdu: 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:594:sc_read_binary: returning with: 128
card.c:591:sc_read_binary: returning with: 256
asn1.c:1035:asn1_decode: called, left=256, depth 0, choice
asn1.c:1060:asn1_decode: Looking for 'privateKeys', tag 0x21000000, CHOICE
asn1.c:1076:asn1_decode: not present
asn1.c:1060:asn1_decode: Looking for 'publicKeys', tag 0x21000001, CHOICE
asn1.c:1076:asn1_decode: not present
asn1.c:1060:asn1_decode: Looking for 'trustedPublicKeys', tag 0x21000002, CHOICE
asn1.c:1076:asn1_decode: not present
asn1.c:1060:asn1_decode: Looking for 'certificates', tag 0x21000004, CHOICE
asn1.c:1076:asn1_decode: not present
asn1.c:1060:asn1_decode: Looking for 'trustedCertificates', tag 0x21000005, CHOICE
asn1.c:1076:asn1_decode: not present
asn1.c:1060:asn1_decode: Looking for 'usefulCertificates', tag 0x21000006, CHOICE
asn1.c:1076:asn1_decode: not present
asn1.c:1060:asn1_decode: Looking for 'dataObjects', tag 0x21000007, CHOICE
asn1.c:1076:asn1_decode: not present
asn1.c:1060:asn1_decode: Looking for 'authObjects', tag 0x21000008, CHOICE
asn1.c:859:asn1_decode_entry: decoding 'authObjects'
asn1.c:1035:asn1_decode:  called, left=10, depth 1
asn1.c:1060:asn1_decode: Looking for 'path', tag 0x1000010
asn1.c:859:asn1_decode_entry:  decoding 'path'
asn1.c:1035:asn1_decode:   called, left=8, depth 2
asn1.c:1060:asn1_decode: Looking for 'path', tag 0x4
asn1.c:859:asn1_decode_entry:   decoding 'path'
asn1.c:1060:asn1_decode: Looking for 'index', tag 0x2, OPTIONAL
asn1.c:1076:asn1_decode: not present
asn1.c:1060:asn1_decode: Looking for 'length', tag 0x20000000, OPTIONAL
asn1.c:1076:asn1_decode: not present
asn1.c:1111:asn1_decode: returning with: 0
asn1.c:1111:asn1_decode: returning with: 0
asn1.c:1110:asn1_decode: returning with: 7
asn1.c:1035:asn1_decode: called, left=244, depth 0, choice
pkcs15.c:542:sc_pkcs15_bind_internal: The following DFs were found:
pkcs15.c:547:sc_pkcs15_bind_internal:   DF type 8, path 3f0050154401, index 0, count -1
card.c:691:sc_select_file: called; type=2, path=3f0050155032
card-starcos.c:412:starcos_select_file: current path (path, valid): 3F005015 (len: 4)
card.c:229:sc_transmit_apdu: called
card.c:196:sc_transceive: Sending 8 bytes (resp. 260 bytes):
00 A4 00 00 02 50 32 00 .....P2.
card.c:249:sc_transmit_apdu: Received 9 bytes (SW1=90 SW2=00)
6F 07 80 02 00 2A 82 01 01 o....*...
card.c:229:sc_transmit_apdu: called
card.c:196:sc_transceive: Sending 5 bytes (resp. 4 bytes):
00 B0 00 00 01 .....
card.c:249:sc_transmit_apdu: Received 1 bytes (SW1=90 SW2=00)
30 0
card-starcos.c:163:process_fci: processing FCI bytes
card-starcos.c:185:process_fci:   bytes in file: 42
card-starcos.c:234:process_fci:   type: working EF
card-starcos.c:235:process_fci:   EF structure: transparent
card-starcos.c:386:starcos_select_fid: returning with: 0
card.c:713:sc_select_file: returning with: 0
card.c:563:sc_read_binary: called; 42 bytes at index 0
card.c:229:sc_transmit_apdu: called
card.c:196:sc_transceive: Sending 5 bytes (resp. 44 bytes):
00 B0 00 00 2A ....*
card.c:249:sc_transmit_apdu: Received 42 bytes (SW1=90 SW2=00)
30 28 02 01 00 04 02 00 00 0C 0E 4F 70 65 6E 53 0(.........OpenS
43 20 50 72 6F 6A 65 63 74 80 0B 4F 70 65 6E 53 C Project..OpenS
43 20 43 61 72 64 03 02 04 10                   C Card....
iso7816.c:126:iso7816_read_binary: returning with: 42
card.c:594:sc_read_binary: returning with: 42
asn1.c:1035:asn1_decode: called, left=42, depth 0
asn1.c:1060:asn1_decode: Looking for 'TokenInfo', tag 0x1000010
asn1.c:859:asn1_decode_entry: decoding 'TokenInfo'
asn1.c:1035:asn1_decode:  called, left=40, depth 1
asn1.c:1060:asn1_decode: Looking for 'version', tag 0x2
asn1.c:859:asn1_decode_entry:  decoding 'version'
asn1.c:1060:asn1_decode: Looking for 'serialNumber', tag 0x4
asn1.c:859:asn1_decode_entry:  decoding 'serialNumber'
asn1.c:1060:asn1_decode: Looking for 'manufacturerID', tag 0xc, OPTIONAL
asn1.c:859:asn1_decode_entry:  decoding 'manufacturerID'
asn1.c:1060:asn1_decode: Looking for 'label', tag 0x20000000, OPTIONAL
asn1.c:859:asn1_decode_entry:  decoding 'label'
asn1.c:1060:asn1_decode: Looking for 'tokenflags', tag 0x3
asn1.c:859:asn1_decode_entry:  decoding 'tokenflags'
asn1.c:1060:asn1_decode: Looking for 'seInfo', tag 0x1000010, OPTIONAL
asn1.c:1076:asn1_decode: not present
asn1.c:1060:asn1_decode: Looking for 'recordInfo', tag 0x21000001, OPTIONAL
asn1.c:1076:asn1_decode: not present
asn1.c:1060:asn1_decode: Looking for 'supportedAlgorithms', tag 0x21000002, OPTIONAL
asn1.c:1076:asn1_decode: not present
asn1.c:1111:asn1_decode: returning with: 0
asn1.c:1111:asn1_decode: returning with: 0
pkcs15.c:1255:sc_pkcs15_read_file: called, path=3f0050154401, index=0, count=-1
card.c:691:sc_select_file: called; type=2, path=3f0050154401
card-starcos.c:412:starcos_select_file: current path (path, valid): 3F005015 (len: 4)
card.c:229:sc_transmit_apdu: called
card.c:196:sc_transceive: Sending 8 bytes (resp. 260 bytes):
00 A4 00 00 02 44 01 00 .....D..
card.c:249:sc_transmit_apdu: Received 9 bytes (SW1=90 SW2=00)
6F 07 80 02 01 00 82 01 01 o........
card.c:229:sc_transmit_apdu: called
card.c:196:sc_transceive: Sending 5 bytes (resp. 4 bytes):
00 B0 00 00 01 .....
card.c:249:sc_transmit_apdu: Received 1 bytes (SW1=90 SW2=00)
30 0
card-starcos.c:163:process_fci: processing FCI bytes
card-starcos.c:185:process_fci:   bytes in file: 256
card-starcos.c:234:process_fci:   type: working EF
card-starcos.c:235:process_fci:   EF structure: transparent
card-starcos.c:386:starcos_select_fid: returning with: 0
card.c:713:sc_select_file: returning with: 0
card.c:563:sc_read_binary: called; 256 bytes at index 0
card.c:563:sc_read_binary: called; 128 bytes at index 0
card.c:229:sc_transmit_apdu: called
card.c:196:sc_transceive: Sending 5 bytes (resp. 130 bytes):
00 B0 00 00 80 .....
card.c:249:sc_transmit_apdu: Received 128 bytes (SW1=90 SW2=00)
30 43 30 1A 0C 14 53 65 63 75 72 69 74 79 20 4F 0C0...Security O
66 66 69 63 65 72 20 50 49 4E 03 02 06 C0 30 03 fficer PIN....0.
04 01 FF A1 20 30 1E 03 02 00 0D 0A 04 FF FF FF .... 0..........
FF 02 01 06 02 01 08 80 01 01 04 01 00 30 06 04 .............0..
04 3F 00 50 15 30 2D 30 04 03 02 06 C0 30 03 04 .?.P.0-0.....0..
01 01 A1 20 30 1E 03 02 02 4C 0A 04 FF FF FF FF ... 0....L......
02 01 04 02 01 08 80 01 83 04 01 00 30 06 04 04 ............0...
3F 00 50 15 00 00 00 00 00 00 00 00 00 00 00 00 ?.P.............
iso7816.c:126:iso7816_read_binary: returning with: 128
card.c:594:sc_read_binary: returning with: 128
card.c:563:sc_read_binary: called; 128 bytes at index 128
card.c:229:sc_transmit_apdu: called
card.c:196:sc_transceive: Sending 5 bytes (resp. 130 bytes):
00 B0 00 80 80 .....
card.c:249:sc_transmit_apdu: Received 128 bytes (SW1=90 SW2=00)
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
iso7816.c:126:iso7816_read_binary: returning with: 128
card.c:594:sc_read_binary: returning with: 128
card.c:591:sc_read_binary: returning with: 256
asn1.c:1035:asn1_decode: called, left=256, depth 0
asn1.c:1060:asn1_decode: Looking for 'pin', tag 0x1000010
asn1.c:859:asn1_decode_entry: decoding 'pin'
asn1.c:1035:asn1_decode:  called, left=67, depth 1
asn1.c:1060:asn1_decode: Looking for 'commonObjectAttributes', tag 0x1000010
asn1.c:859:asn1_decode_entry:  decoding 'commonObjectAttributes'
asn1.c:1035:asn1_decode:   called, left=26, depth 2
asn1.c:1060:asn1_decode: Looking for 'label', tag 0xc, OPTIONAL
asn1.c:859:asn1_decode_entry:   decoding 'label'
asn1.c:1060:asn1_decode: Looking for 'flags', tag 0x3, OPTIONAL
asn1.c:859:asn1_decode_entry:   decoding 'flags'
asn1.c:1060:asn1_decode: Looking for 'authId', tag 0x4, OPTIONAL
asn1.c:1076:asn1_decode: not present
asn1.c:1060:asn1_decode: Looking for 'userConsent', tag 0x2, OPTIONAL
asn1.c:1076:asn1_decode: not present
asn1.c:1060:asn1_decode: Looking for 'accessControlRules', tag 0x1000010, OPTIONAL
asn1.c:1076:asn1_decode: not present
asn1.c:1111:asn1_decode: returning with: 0
asn1.c:1060:asn1_decode: Looking for 'classAttributes', tag 0x1000010
asn1.c:859:asn1_decode_entry:  decoding 'classAttributes'
asn1.c:1035:asn1_decode:   called, left=3, depth 2
asn1.c:1060:asn1_decode: Looking for 'authId', tag 0x4
asn1.c:859:asn1_decode_entry:   decoding 'authId'
asn1.c:1111:asn1_decode: returning with: 0
asn1.c:1060:asn1_decode: Looking for 'subClassAttributes', tag 0x21000000, OPTIONAL
asn1.c:1076:asn1_decode: not present
asn1.c:1060:asn1_decode: Looking for 'typeAttributes', tag 0x21000001
asn1.c:859:asn1_decode_entry:  decoding 'typeAttributes'
asn1.c:1035:asn1_decode:   called, left=32, depth 2
asn1.c:1060:asn1_decode: Looking for 'pinAttributes', tag 0x1000010
asn1.c:859:asn1_decode_entry:   decoding 'pinAttributes'
asn1.c:1035:asn1_decode:    called, left=30, depth 3
asn1.c:1060:asn1_decode: Looking for 'pinFlags', tag 0x3
asn1.c:859:asn1_decode_entry:    decoding 'pinFlags'
asn1.c:1060:asn1_decode: Looking for 'pinType', tag 0xa
asn1.c:859:asn1_decode_entry:    decoding 'pinType'
asn1.c:1060:asn1_decode: Looking for 'minLength', tag 0x2
asn1.c:859:asn1_decode_entry:    decoding 'minLength'
asn1.c:1060:asn1_decode: Looking for 'storedLength', tag 0x2
asn1.c:859:asn1_decode_entry:    decoding 'storedLength'
asn1.c:1060:asn1_decode: Looking for 'maxLength', tag 0x2, OPTIONAL
asn1.c:1076:asn1_decode: not present
asn1.c:1060:asn1_decode: Looking for 'pinReference', tag 0x20000000, OPTIONAL
asn1.c:859:asn1_decode_entry:    decoding 'pinReference'
asn1.c:1060:asn1_decode: Looking for 'padChar', tag 0x4, OPTIONAL
asn1.c:859:asn1_decode_entry:    decoding 'padChar'
asn1.c:1060:asn1_decode: Looking for 'lastPinChange', tag 0x18, OPTIONAL
asn1.c:1076:asn1_decode: not present
asn1.c:1060:asn1_decode: Looking for 'path', tag 0x1000010, OPTIONAL
asn1.c:859:asn1_decode_entry:    decoding 'path'
asn1.c:1035:asn1_decode:     called, left=6, depth 4
asn1.c:1060:asn1_decode: Looking for 'path', tag 0x4
asn1.c:859:asn1_decode_entry:     decoding 'path'
asn1.c:1060:asn1_decode: Looking for 'index', tag 0x2, OPTIONAL
asn1.c:1076:asn1_decode: not present
asn1.c:1060:asn1_decode: Looking for 'length', tag 0x20000000, OPTIONAL
asn1.c:1076:asn1_decode: not present
asn1.c:1111:asn1_decode: returning with: 0
asn1.c:1111:asn1_decode: returning with: 0
asn1.c:1111:asn1_decode: returning with: 0
asn1.c:1111:asn1_decode: returning with: 0
asn1.c:1111:asn1_decode: returning with: 0
asn1.c:1035:asn1_decode: called, left=187, depth 0
asn1.c:1060:asn1_decode: Looking for 'pin', tag 0x1000010
asn1.c:859:asn1_decode_entry: decoding 'pin'
asn1.c:1035:asn1_decode:  called, left=45, depth 1
asn1.c:1060:asn1_decode: Looking for 'commonObjectAttributes', tag 0x1000010
asn1.c:859:asn1_decode_entry:  decoding 'commonObjectAttributes'
asn1.c:1035:asn1_decode:   called, left=4, depth 2
asn1.c:1060:asn1_decode: Looking for 'label', tag 0xc, OPTIONAL
asn1.c:1076:asn1_decode: not present
asn1.c:1060:asn1_decode: Looking for 'flags', tag 0x3, OPTIONAL
asn1.c:859:asn1_decode_entry:   decoding 'flags'
asn1.c:1060:asn1_decode: Looking for 'authId', tag 0x4, OPTIONAL
asn1.c:1076:asn1_decode: not present
asn1.c:1060:asn1_decode: Looking for 'userConsent', tag 0x2, OPTIONAL
asn1.c:1076:asn1_decode: not present
asn1.c:1060:asn1_decode: Looking for 'accessControlRules', tag 0x1000010, OPTIONAL
asn1.c:1076:asn1_decode: not present
asn1.c:1111:asn1_decode: returning with: 0
asn1.c:1060:asn1_decode: Looking for 'classAttributes', tag 0x1000010
asn1.c:859:asn1_decode_entry:  decoding 'classAttributes'
asn1.c:1035:asn1_decode:   called, left=3, depth 2
asn1.c:1060:asn1_decode: Looking for 'authId', tag 0x4
asn1.c:859:asn1_decode_entry:   decoding 'authId'
asn1.c:1111:asn1_decode: returning with: 0
asn1.c:1060:asn1_decode: Looking for 'subClassAttributes', tag 0x21000000, OPTIONAL
asn1.c:1076:asn1_decode: not present
asn1.c:1060:asn1_decode: Looking for 'typeAttributes', tag 0x21000001
asn1.c:859:asn1_decode_entry:  decoding 'typeAttributes'
asn1.c:1035:asn1_decode:   called, left=32, depth 2
asn1.c:1060:asn1_decode: Looking for 'pinAttributes', tag 0x1000010
asn1.c:859:asn1_decode_entry:   decoding 'pinAttributes'
asn1.c:1035:asn1_decode:    called, left=30, depth 3
asn1.c:1060:asn1_decode: Looking for 'pinFlags', tag 0x3
asn1.c:859:asn1_decode_entry:    decoding 'pinFlags'
asn1.c:1060:asn1_decode: Looking for 'pinType', tag 0xa
asn1.c:859:asn1_decode_entry:    decoding 'pinType'
asn1.c:1060:asn1_decode: Looking for 'minLength', tag 0x2
asn1.c:859:asn1_decode_entry:    decoding 'minLength'
asn1.c:1060:asn1_decode: Looking for 'storedLength', tag 0x2
asn1.c:859:asn1_decode_entry:    decoding 'storedLength'
asn1.c:1060:asn1_decode: Looking for 'maxLength', tag 0x2, OPTIONAL
asn1.c:1076:asn1_decode: not present
asn1.c:1060:asn1_decode: Looking for 'pinReference', tag 0x20000000, OPTIONAL
asn1.c:859:asn1_decode_entry:    decoding 'pinReference'
asn1.c:1060:asn1_decode: Looking for 'padChar', tag 0x4, OPTIONAL
asn1.c:859:asn1_decode_entry:    decoding 'padChar'
asn1.c:1060:asn1_decode: Looking for 'lastPinChange', tag 0x18, OPTIONAL
asn1.c:1076:asn1_decode: not present
asn1.c:1060:asn1_decode: Looking for 'path', tag 0x1000010, OPTIONAL
asn1.c:859:asn1_decode_entry:    decoding 'path'
asn1.c:1035:asn1_decode:     called, left=6, depth 4
asn1.c:1060:asn1_decode: Looking for 'path', tag 0x4
asn1.c:859:asn1_decode_entry:     decoding 'path'
asn1.c:1060:asn1_decode: Looking for 'index', tag 0x2, OPTIONAL
asn1.c:1076:asn1_decode: not present
asn1.c:1060:asn1_decode: Looking for 'length', tag 0x20000000, OPTIONAL
asn1.c:1076:asn1_decode: not present
asn1.c:1111:asn1_decode: returning with: 0
asn1.c:1111:asn1_decode: returning with: 0
asn1.c:1111:asn1_decode: returning with: 0
asn1.c:1111:asn1_decode: returning with: 0
asn1.c:1111:asn1_decode: returning with: 0
card.c:691:sc_select_file: called; type=2, path=3f005015
card-starcos.c:412:starcos_select_file: current path (path, valid): 3F005015 (len: 4)
card-starcos.c:506:starcos_select_file: cache hit
card.c:713:sc_select_file: returning with: 0
sec.c:157:sc_pin_cmd: called
card.c:229:sc_transmit_apdu: called
card.c:196:sc_transceive: Sending 21 bytes (resp. 2 bytes, sensitive):
00 2C 00 83 10 70 75 6B 70 75 6B 00 00 61 73 64 .,...pukpuk..asd
61 73 64 00 00                                  asd..
card.c:249:sc_transmit_apdu: Received 0 bytes (SW1=69 SW2=83)
card-starcos.c:1324:starcos_check_sw: sw1 = 0x69, sw2 = 0x83
pkcs15.c:667:sc_pkcs15_unbind: called
card.c:488:sc_unlock: called
card.c:493:sc_unlock: Calling card logout function
card.c:229:sc_transmit_apdu: called
card.c:196:sc_transceive: Sending 7 bytes (resp. 2 bytes):
00 A4 00 0C 02 3F 00 .....?.
card.c:249:sc_transmit_apdu: Received 0 bytes (SW1=90 SW2=00)
card-starcos.c:1324:starcos_check_sw: sw1 = 0x90, sw2 = 0x00
reader-openct.c:400:openct_reader_unlock: called
card.c:443:sc_disconnect_card: called
reader-openct.c:266:openct_reader_disconnect: called
card.c:458:sc_disconnect_card: returning with: 0
ctx.c:618:sc_release_context: called
reader-openct.c:171:openct_reader_release: called
reader-openct.c:171:openct_reader_release: called
reader-openct.c:171:openct_reader_release: called
reader-openct.c:171:openct_reader_release: called
reader-openct.c:171:openct_reader_release: called
reader-openct.c:157:openct_reader_finish: called

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