laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42789?usp=email )
Change subject: CCID: Successful case 1 APDU test ......................................................................
CCID: Successful case 1 APDU test
A MANAGE CHANNEL APDU has no data and must respond without any data, just the status words.
Change-Id: I7d5ee9bbd8bb2505a762e3fd80238db658940c16 --- M ccid/CCID_Tests.ttcn 1 file changed, 27 insertions(+), 0 deletions(-)
Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified
diff --git a/ccid/CCID_Tests.ttcn b/ccid/CCID_Tests.ttcn index 6a8efc9..346cacd 100644 --- a/ccid/CCID_Tests.ttcn +++ b/ccid/CCID_Tests.ttcn @@ -39,6 +39,7 @@
const octetstring c_UICC_SELECT_MF := '00a40004023f00'O; const octetstring c_SIM_SELECT_MF := 'a0a40004023f00'O; +const octetstring c_UICC_MANAGE_CHANNEL := '0070800100'O; const octetstring c_UICC_GET_RESPONSE_BASE := 'a0c00000'O;
/* Table 7 of ISO7816-3 */ @@ -382,6 +383,31 @@ f_start_and_wait(); }
+/* manage channel (Case 1) */ +private function f_TC_successful_case_1() runs on Slot_CT +{ + var octetstring res; + + f_ccid_power_on(); + res := f_ccid_xfr(c_UICC_MANAGE_CHANNEL, '??'O); + if (res != '6200'O) { + setverdict(fail, "Unexpected SW1/SW2"); + mtc.stop; + } +} +testcase TC_successful_case_1() runs on Test_CT +{ + var integer i; + + f_init(); + + for (i := 0; i < mp_use_slot_count; i := i+1) { + f_start_handler(refers(f_TC_successful_case_1), i); + } + + f_start_and_wait(); +} + /* GET RESPONSE (Case 4) */ private function f_TC_successful_case_4() runs on Slot_CT { @@ -538,6 +564,7 @@ } execute( TC_set_params_nochange() ); execute( TC_successful_case_4() ); + execute( TC_successful_case_1() );
/* error handling */ execute( TC_inval_slot() );