Loading ePassport/ttcn/ePassport_Testcases.ttcn +51 −4 Original line number Original line Diff line number Diff line Loading @@ -142,6 +142,15 @@ module ePassport_Testcases { var template IsVerdictList vt_expectedFailResults := {e_aisBacAuthentication, e_aisCommunication}; var template IsVerdictList vt_expectedFailResults := {e_aisBacAuthentication, e_aisCommunication}; var template IsVerdictList vt_expectedPassResults := {}; var template IsVerdictList vt_expectedPassResults := {}; var CommandSelect v_selectCommand; var CommandReadBinary v_readCommand; var integer v_logicalChannel; var octetstring v_data := ''O; var integer v_dataLength; var integer v_offset; var W1W2Status v_result; // Preamble // Preamble f_cfUp(); f_cfUp(); f_initializeMRTD("CFG.DFLT.BAC"); f_initializeMRTD("CFG.DFLT.BAC"); Loading @@ -152,11 +161,49 @@ module ePassport_Testcases { // because // because // the MAC data object is incorrect. The SSC is not increased when the first // the MAC data object is incorrect. The SSC is not increased when the first // command while reading the EF.DG1 is executed. // command while reading the EF.DG1 is executed. f_setIncrementSsc(false); // Test Body // Test Body t_ac.start(PXT_TWAIT); t_ac.start(PXT_TWAIT); alt { alt { [] mrtdport.receive(mw_readShortEF(c_fileDG1.shortFileId)) -> value v_readCommand { f_setIncrementSsc(false); // set current file for logical channel v_logicalChannel := f_getLogicalChannel(v_readCommand.class); vc_simu.currentFiles[v_logicalChannel] := getFileByShortId(c_fileDG1.shortFileId); log("**** Reading file: ", vc_simu.currentFiles[v_logicalChannel], " ****"); v_offset := v_readCommand.params.fileIdAndOffset.offset; v_dataLength := v_readCommand.lengthE; v_result := f_readFileData(vc_simu.currentFiles[v_logicalChannel], v_offset, v_dataLength, v_data); if(v_data == ''O ) { mrtdport.send(m_responseNOK(v_result)); } else { mrtdport.send(m_responseReadWithStatus(v_data, v_result)); } t_ac.start; repeat; } // SELECT Command [] mrtdport.receive(mw_selectByFileId(c_fileDG1.longFileId)) -> value v_selectCommand { // set current file for logical channel v_logicalChannel := f_getLogicalChannel(v_selectCommand.class); vc_simu.currentFiles[v_logicalChannel] := getFileByLongId(c_fileDG1.longFileId); mrtdport.send(m_responseOK); f_setIncrementSsc(false); t_ac.start; repeat; } [] a_standardInspectionProcedure(); [] a_standardInspectionProcedure(); [PXT_AUTOMATIC_TEST_INTERFACE] a_aisReports(); [PXT_AUTOMATIC_TEST_INTERFACE] a_aisReports(); Loading Loading
ePassport/ttcn/ePassport_Testcases.ttcn +51 −4 Original line number Original line Diff line number Diff line Loading @@ -142,6 +142,15 @@ module ePassport_Testcases { var template IsVerdictList vt_expectedFailResults := {e_aisBacAuthentication, e_aisCommunication}; var template IsVerdictList vt_expectedFailResults := {e_aisBacAuthentication, e_aisCommunication}; var template IsVerdictList vt_expectedPassResults := {}; var template IsVerdictList vt_expectedPassResults := {}; var CommandSelect v_selectCommand; var CommandReadBinary v_readCommand; var integer v_logicalChannel; var octetstring v_data := ''O; var integer v_dataLength; var integer v_offset; var W1W2Status v_result; // Preamble // Preamble f_cfUp(); f_cfUp(); f_initializeMRTD("CFG.DFLT.BAC"); f_initializeMRTD("CFG.DFLT.BAC"); Loading @@ -152,11 +161,49 @@ module ePassport_Testcases { // because // because // the MAC data object is incorrect. The SSC is not increased when the first // the MAC data object is incorrect. The SSC is not increased when the first // command while reading the EF.DG1 is executed. // command while reading the EF.DG1 is executed. f_setIncrementSsc(false); // Test Body // Test Body t_ac.start(PXT_TWAIT); t_ac.start(PXT_TWAIT); alt { alt { [] mrtdport.receive(mw_readShortEF(c_fileDG1.shortFileId)) -> value v_readCommand { f_setIncrementSsc(false); // set current file for logical channel v_logicalChannel := f_getLogicalChannel(v_readCommand.class); vc_simu.currentFiles[v_logicalChannel] := getFileByShortId(c_fileDG1.shortFileId); log("**** Reading file: ", vc_simu.currentFiles[v_logicalChannel], " ****"); v_offset := v_readCommand.params.fileIdAndOffset.offset; v_dataLength := v_readCommand.lengthE; v_result := f_readFileData(vc_simu.currentFiles[v_logicalChannel], v_offset, v_dataLength, v_data); if(v_data == ''O ) { mrtdport.send(m_responseNOK(v_result)); } else { mrtdport.send(m_responseReadWithStatus(v_data, v_result)); } t_ac.start; repeat; } // SELECT Command [] mrtdport.receive(mw_selectByFileId(c_fileDG1.longFileId)) -> value v_selectCommand { // set current file for logical channel v_logicalChannel := f_getLogicalChannel(v_selectCommand.class); vc_simu.currentFiles[v_logicalChannel] := getFileByLongId(c_fileDG1.longFileId); mrtdport.send(m_responseOK); f_setIncrementSsc(false); t_ac.start; repeat; } [] a_standardInspectionProcedure(); [] a_standardInspectionProcedure(); [PXT_AUTOMATIC_TEST_INTERFACE] a_aisReports(); [PXT_AUTOMATIC_TEST_INTERFACE] a_aisReports(); Loading