Hello list,

Karsten, thanks again for the answer.
 

[snip]
Try this:

install_for_load -pkgAID a000000001 -sdAID a0000000030000 -nvCodeLimit
<fileSize>
Instead install -file bin/CardEdge.bin

you can try the complete command with all possible options:

install -file bin/CardEdge.bin -priv 00 -sdAID a0000000030000
-nvCodeLimit <fileSize> -AID a00000000101 -pkgAID a00000000101 -instAID
a00000000101 -nvDataLimit 5000 (or whatever)

Heres what I tried.

===================
mode_201
enable_trace
establish_context
card_connect
select -AID a0000000030000
open_sc -security 1 -keyind 0 -keyver 0 -mac_key 404142434445464748494a4b4c4d4e4f -enc_key 404142434445464748494a4b4c4d4e4f // Open secure channel

install -file CardEdge.bin
--> 80E602001705A00000000107A00000000300000006EF04C6024C300000
<-- 6A80
install_for_load() returns 0x80206A80 (6A80: Wrong data / Incorrect values in command data.)
===================

The I tried (19488 is the binfile size)

===================
install_for_load -pkgAID a000000001 -sdAID a0000000030000 -nvCodeLimit 19488
--> 80E602001705A00000000107A00000000300000006EF04C6024C300000
<-- 6A80
install_for_load() returns 0x80206A80 (6A80: Wrong data / Incorrect values in command data.)
===================

Then again:

===================
install -file CardEdge.bin -priv 00 -sdAID a0000000030000 -nvCodeLimit 19488 -AID a00000000101 -pkgAID a000000001 -instAID a00000000101 -nvDataLimit 7000
--> 80E602001B05A00000000107A0000000030000000AEF08C6024C30C7021B580000
<-- 6A80
install_for_load() returns 0x80206A80 (6A80: Wrong data / Incorrect values in command data.)
===================

Everything I tried gave me the same result with gpshell1.2. Again, it works if I revert back to gpshell1.1.

Im attaching the globalplatform log file in case you find it useful. Im going to debug gpshell and see what this new version is doing different from the previous one, maybe it helps.

Thanks

16/01 11:46:56 +establish_context in GlobalPlatform.c at line 496 : start
16/01 11:46:56  -establish_context in GlobalPlatform.c at line 506 : end RV(0x0)
16/01 11:46:56 +list_readers in GlobalPlatform.c at line 540 : start
16/01 11:46:56 readerSize: 26
16/01 11:46:56  -list_readers in GlobalPlatform.c at line 577 : end RV(0x0)
16/01 11:46:56 +card_connect in GlobalPlatform.c at line 599 : start
16/01 11:46:56  -card_connect in GlobalPlatform.c at line 624 : end RV(0x0)
16/01 11:46:56 +select_application in GlobalPlatform.c at line 1463 : start
16/01 11:46:56 select_application: Data to send: 
16/01 11:46:56  0x00
16/01 11:46:56  0xa4
16/01 11:46:56  0x04
16/01 11:46:56  0x00
16/01 11:46:56  0x07
16/01 11:46:56  0xa0
16/01 11:46:56  0x00
16/01 11:46:56  0x00
16/01 11:46:56  0x00
16/01 11:46:56  0x03
16/01 11:46:56  0x00
16/01 11:46:56  0x00
16/01 11:46:56 +send_APDU in GlobalPlatform.c at line 1040 : start
16/01 11:46:56 +wrap_command in GlobalPlatform.c at line 680 : start
16/01 11:46:56  -wrap_command in GlobalPlatform.c at line 923 : end RV(0x0)
16/01 11:46:56 +check_R_MAC in GlobalPlatform.c at line 946 : start
16/01 11:46:56  -check_R_MAC in GlobalPlatform.c at line 1002 : end RV(0x0)
16/01 11:46:56  -send_APDU in GlobalPlatform.c at line 1446 : end RV(0x0)
16/01 11:46:56 select_application: Data: 
16/01 11:46:56  0x6f
16/01 11:46:56  0x19
16/01 11:46:56  0x84
16/01 11:46:56  0x08
16/01 11:46:56  0xa0
16/01 11:46:56  0x00
16/01 11:46:56  0x00
16/01 11:46:56  0x00
16/01 11:46:56  0x03
16/01 11:46:56  0x00
16/01 11:46:56  0x00
16/01 11:46:56  0x00
16/01 11:46:56  0xa5
16/01 11:46:56  0x0d
16/01 11:46:57  0x9f
16/01 11:46:57  0x6e
16/01 11:46:57  0x06
16/01 11:46:57  0x40
16/01 11:46:57  0x51
16/01 11:46:57  0x30
16/01 11:46:57  0x23
16/01 11:46:57  0x20
16/01 11:46:57  0x17
16/01 11:46:57  0x9f
16/01 11:46:57  0x65
16/01 11:46:57  0x01
16/01 11:46:57  0xff
16/01 11:46:57  0x90
16/01 11:46:57  0x00
16/01 11:46:57  -select_application in GlobalPlatform.c at line 1507 : end 
RV(0x0)
16/01 11:46:57 +mutual_authentication in GlobalPlatform.c at line 5431 : start
16/01 11:46:57 Secure Channel Protocol: 0x01
16/01 11:46:57 Secure Channel Protocol Implementation: 0x05
16/01 11:46:57 Generated Host Challenge: 
16/01 11:46:57 0x84 
16/01 11:46:57 0x89 
16/01 11:46:57 0x28 
16/01 11:46:57 0x9f 
16/01 11:46:57 0x2f 
16/01 11:46:57 0x51 
16/01 11:46:57 0x89 
16/01 11:46:57 0xf0 
16/01 11:46:57 mutual_authentication: INITIALIZE UPDATE Data to send: 
16/01 11:46:57  0x80
16/01 11:46:57  0x50
16/01 11:46:57  0x00
16/01 11:46:57  0x00
16/01 11:46:57  0x08
16/01 11:46:57  0x84
16/01 11:46:57  0x89
16/01 11:46:57  0x28
16/01 11:46:57  0x9f
16/01 11:46:57  0x2f
16/01 11:46:57  0x51
16/01 11:46:57  0x89
16/01 11:46:57  0xf0
16/01 11:46:57  0x00
16/01 11:46:57 +send_APDU in GlobalPlatform.c at line 1040 : start
16/01 11:46:57 +wrap_command in GlobalPlatform.c at line 680 : start
16/01 11:46:57  -wrap_command in GlobalPlatform.c at line 923 : end RV(0x0)
16/01 11:46:57 +check_R_MAC in GlobalPlatform.c at line 946 : start
16/01 11:46:57  -check_R_MAC in GlobalPlatform.c at line 1002 : end RV(0x0)
16/01 11:46:57  -send_APDU in GlobalPlatform.c at line 1446 : end RV(0x0)
16/01 11:46:57 mutual_authentication: INITIALIZE UPDATE Data: 
16/01 11:46:57  0x00
16/01 11:46:57  0x00
16/01 11:46:57  0x30
16/01 11:46:57  0x87
16/01 11:46:57  0x00
16/01 11:46:57  0x07
16/01 11:46:57  0x69
16/01 11:46:57  0x90
16/01 11:46:57  0x22
16/01 11:46:57  0x36
16/01 11:46:57  0xff
16/01 11:46:57  0x01
16/01 11:46:57  0x48
16/01 11:46:57  0xea
16/01 11:46:57  0x30
16/01 11:46:57  0x77
16/01 11:46:57  0xa7
16/01 11:46:57  0xc4
16/01 11:46:57  0x62
16/01 11:46:57  0x1f
16/01 11:46:57  0x95
16/01 11:46:57  0x7f
16/01 11:46:57  0x37
16/01 11:46:57  0x6f
16/01 11:46:57  0xd7
16/01 11:46:58  0x7b
16/01 11:46:58  0x72
16/01 11:46:58  0x7a
16/01 11:46:58  0x90
16/01 11:46:58  0x00
16/01 11:46:58 Key Diversification Data: 
16/01 11:46:58 0x00 
16/01 11:46:58 0x00 
16/01 11:46:58 0x30 
16/01 11:46:58 0x87 
16/01 11:46:58 0x00 
16/01 11:46:58 0x07 
16/01 11:46:58 0x69 
16/01 11:46:58 0x90 
16/01 11:46:58 0x22 
16/01 11:46:58 0x36 
16/01 11:46:58 Key Information Data: 
16/01 11:46:58 0xff 
16/01 11:46:58 0x01 
16/01 11:46:58 Card Challenge: 
16/01 11:46:58 0x48 
16/01 11:46:58 0xea 
16/01 11:46:58 0x30 
16/01 11:46:58 0x77 
16/01 11:46:58 0xa7 
16/01 11:46:58 0xc4 
16/01 11:46:58 0x62 
16/01 11:46:58 0x1f 
16/01 11:46:58 Retrieved Card Cryptogram: 
16/01 11:46:58 0x95 
16/01 11:46:58 0x7f 
16/01 11:46:58 0x37 
16/01 11:46:58 0x6f 
16/01 11:46:58 0xd7 
16/01 11:46:58 0x7b 
16/01 11:46:58 0x72 
16/01 11:46:58 0x7a 
16/01 11:46:58 +create_session_key_SCP01 in GlobalPlatform.c at line 4896 : 
start
16/01 11:46:58 +calculate_enc_ecb_two_key_triple_des in GlobalPlatform.c at 
line 4960 : start
16/01 11:46:58  -calculate_enc_ecb_two_key_triple_des in GlobalPlatform.c at 
line 5003 : end RV(0x0)
16/01 11:46:58  -create_session_key_SCP01 in GlobalPlatform.c at line 4908 : 
end RV(0x0)
16/01 11:46:58 +create_session_key_SCP01 in GlobalPlatform.c at line 4896 : 
start
16/01 11:46:58 +calculate_enc_ecb_two_key_triple_des in GlobalPlatform.c at 
line 4960 : start
16/01 11:46:58  -calculate_enc_ecb_two_key_triple_des in GlobalPlatform.c at 
line 5003 : end RV(0x0)
16/01 11:46:58  -create_session_key_SCP01 in GlobalPlatform.c at line 4908 : 
end RV(0x0)
16/01 11:46:58 S-ENC Session Key: 
16/01 11:46:58 0xa3 
16/01 11:46:58 0x66 
16/01 11:46:58 0x17 
16/01 11:46:58 0x08 
16/01 11:46:58 0xb6 
16/01 11:46:58 0xc4 
16/01 11:46:58 0x0a 
16/01 11:46:58 0x66 
16/01 11:46:58 0x03 
16/01 11:46:58 0x59 
16/01 11:46:58 0xf2 
16/01 11:46:58 0x6f 
16/01 11:46:58 0xad 
16/01 11:46:58 0x3b 
16/01 11:46:58 0x50 
16/01 11:46:58 0xc6 
16/01 11:46:58 C-MAC Session Key: 
16/01 11:46:58 0xa3 
16/01 11:46:58 0x66 
16/01 11:46:58 0x17 
16/01 11:46:58 0x08 
16/01 11:46:58 0xb6 
16/01 11:46:58 0xc4 
16/01 11:46:58 0x0a 
16/01 11:46:58 0x66 
16/01 11:46:58 0x03 
16/01 11:46:58 0x59 
16/01 11:46:58 0xf2 
16/01 11:46:58 0x6f 
16/01 11:46:58 0xad 
16/01 11:46:58 0x3b 
16/01 11:46:58 0x50 
16/01 11:46:58 0xc6 
16/01 11:46:58 Date Encryption Key: 
16/01 11:46:58 0x40 
16/01 11:46:58 0x41 
16/01 11:46:58 0x42 
16/01 11:46:58 0x43 
16/01 11:46:58 0x44 
16/01 11:46:59 0x45 
16/01 11:46:59 0x46 
16/01 11:46:59 0x47 
16/01 11:46:59 0x48 
16/01 11:46:59 0x49 
16/01 11:46:59 0x4a 
16/01 11:46:59 0x4b 
16/01 11:46:59 0x4c 
16/01 11:46:59 0x4d 
16/01 11:46:59 0x4e 
16/01 11:46:59 0x4f 
16/01 11:46:59 +calculate_card_cryptogram_SCP01 in GlobalPlatform.c at line 
5260 : start
16/01 11:46:59 +calculate_MAC in GlobalPlatform.c at line 5084 : start
16/01 11:46:59  -calculate_MAC in GlobalPlatform.c at line 5121 : end RV(0x0)
16/01 11:46:59  -calculate_card_cryptogram_SCP01 in GlobalPlatform.c at line 
5269 : end RV(0x0)
16/01 11:46:59 Card Cryptogram to compare: 
16/01 11:46:59 0x95 
16/01 11:46:59 0x7f 
16/01 11:46:59 0x37 
16/01 11:46:59 0x6f 
16/01 11:46:59 0xd7 
16/01 11:46:59 0x7b 
16/01 11:46:59 0x72 
16/01 11:46:59 0x7a 
16/01 11:46:59 +calculate_host_cryptogram_SCP01 in GlobalPlatform.c at line 
5317 : start
16/01 11:46:59 +calculate_MAC in GlobalPlatform.c at line 5084 : start
16/01 11:46:59  -calculate_MAC in GlobalPlatform.c at line 5121 : end RV(0x0)
16/01 11:46:59  -calculate_host_cryptogram_SCP01 in GlobalPlatform.c at line 
5326 : end RV(0x0)
16/01 11:46:59 +calculate_MAC in GlobalPlatform.c at line 5084 : start
16/01 11:46:59  -calculate_MAC in GlobalPlatform.c at line 5121 : end RV(0x0)
16/01 11:46:59 mutual_authentication: EXTERNAL AUTHENTICATE Data to send: 
16/01 11:46:59  0x84
16/01 11:46:59  0x82
16/01 11:46:59  0x01
16/01 11:46:59  0x00
16/01 11:46:59  0x10
16/01 11:46:59  0x05
16/01 11:46:59  0xe4
16/01 11:46:59  0xc7
16/01 11:46:59  0x94
16/01 11:46:59  0xe2
16/01 11:46:59  0x80
16/01 11:46:59  0xa7
16/01 11:46:59  0x1a
16/01 11:46:59  0xe7
16/01 11:46:59  0x68
16/01 11:46:59  0x1f
16/01 11:46:59  0x81
16/01 11:46:59  0xf7
16/01 11:46:59  0xb3
16/01 11:46:59  0x4c
16/01 11:46:59  0x38
16/01 11:46:59 +send_APDU in GlobalPlatform.c at line 1040 : start
16/01 11:46:59 +wrap_command in GlobalPlatform.c at line 680 : start
16/01 11:46:59  -wrap_command in GlobalPlatform.c at line 923 : end RV(0x0)
16/01 11:46:59 +check_R_MAC in GlobalPlatform.c at line 946 : start
16/01 11:46:59  -check_R_MAC in GlobalPlatform.c at line 1002 : end RV(0x0)
16/01 11:46:59  -send_APDU in GlobalPlatform.c at line 1446 : end RV(0x0)
16/01 11:46:59 mutual_authentication: EXTERNAL AUTHENTICATE Data: 
16/01 11:46:59  0x90
16/01 11:46:59  0x00
16/01 11:46:59  -mutual_authentication in GlobalPlatform.c at line 5744 : end 
RV(0x0)
16/01 11:46:59 +read_executable_load_file_paramaters in GlobalPlatform.c at 
line 7717 : start
16/01 11:46:59  -read_executable_load_file_paramaters in GlobalPlatform.c at 
line 7959 : end RV(0x0)
16/01 11:46:59 +install_for_load in GlobalPlatform.c at line 3292 : start
16/01 11:46:59 +get_load_data in GlobalPlatform.c at line 4274 : start
16/01 11:46:59 get_load_data: Gathered data : 
16/01 11:46:59  0x02
16/01 11:46:59  0x00
16/01 11:46:59  0x96
16/01 11:46:59  0x05
16/01 11:46:59  0xa0
16/01 11:46:59  0x00
16/01 11:46:59  0x00
16/01 11:46:59  0x00
16/01 11:46:59  0x01
16/01 11:46:59  0x07
16/01 11:46:59  0xa0
16/01 11:46:59  0x00
16/01 11:47:00  0x00
16/01 11:47:00  0x00
16/01 11:47:00  0x03
16/01 11:47:00  0x00
16/01 11:47:00  0x00
16/01 11:47:00  0x00
16/01 11:47:00  0x06
16/01 11:47:00  0xef
16/01 11:47:00  0x04
16/01 11:47:00  0xc6
16/01 11:47:00  0x02
16/01 11:47:00  0x4c
16/01 11:47:00  0x30
16/01 11:47:00  -get_load_data in GlobalPlatform.c at line 4349 : end RV(0x0)
16/01 11:47:00 install_for_load: Data to send: 
16/01 11:47:00  0x80
16/01 11:47:00  0xe6
16/01 11:47:00  0x02
16/01 11:47:00  0x00
16/01 11:47:00  0x17
16/01 11:47:00  0x05
16/01 11:47:00  0xa0
16/01 11:47:00  0x00
16/01 11:47:00  0x00
16/01 11:47:00  0x00
16/01 11:47:00  0x01
16/01 11:47:00  0x07
16/01 11:47:00  0xa0
16/01 11:47:00  0x00
16/01 11:47:00  0x00
16/01 11:47:00  0x00
16/01 11:47:00  0x03
16/01 11:47:00  0x00
16/01 11:47:00  0x00
16/01 11:47:00  0x00
16/01 11:47:00  0x06
16/01 11:47:00  0xef
16/01 11:47:00  0x04
16/01 11:47:00  0xc6
16/01 11:47:00  0x02
16/01 11:47:00  0x4c
16/01 11:47:00  0x30
16/01 11:47:00  0x00
16/01 11:47:00  0x00
16/01 11:47:00 +send_APDU in GlobalPlatform.c at line 1040 : start
16/01 11:47:00 +wrap_command in GlobalPlatform.c at line 680 : start
16/01 11:47:00 +calculate_MAC in GlobalPlatform.c at line 5084 : start
16/01 11:47:00  -calculate_MAC in GlobalPlatform.c at line 5121 : end RV(0x0)
16/01 11:47:00  -wrap_command in GlobalPlatform.c at line 923 : end RV(0x0)
16/01 11:47:00 +check_R_MAC in GlobalPlatform.c at line 946 : start
16/01 11:47:00  -check_R_MAC in GlobalPlatform.c at line 1002 : end RV(0x0)
16/01 11:47:00  -send_APDU in GlobalPlatform.c at line 1446 : end RV(0x80206A80)
16/01 11:47:00  -install_for_load in GlobalPlatform.c at line 3334 : end 
RV(0x80206A80)
_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle

Reply via email to