Loading ePassport/ttcn/ePassport_Altsteps.ttcn +1 −12 Original line number Diff line number Diff line Loading @@ -184,18 +184,7 @@ } // end a_isReports altstep a_aisConfiguration() runs on MRTD { [] mgmtport.receive(mw_getData_mrz) { mgmtport.send(m_responseRead(m_opticalMrz( substr(vc_simu.mrz, 0, lengthof(vc_simu.mrz)/2 ), substr(vc_simu.mrz, lengthof(vc_simu.mrz)/2, lengthof(vc_simu.mrz)/2)))); } [] mgmtport.receive(mw_getData_cert) { } } // end a_aisConfiguration } // end automaticInterfaceSpecificationAltsteps Loading ePassport/ttcn/ePassport_Functions.ttcn +54 −17 Original line number Diff line number Diff line Loading @@ -40,6 +40,13 @@ group securityExternalFunctions { /** * @desc Determine whether to increment SSC or not * @param p_incrementSsc boolean * @see TC_ISO7816_B08 */ external function fx_setIncrementSsc(boolean p_incrementSsc); /** * @desc Derive key seed from MRZ information fields (document number, date of birth and date of expiry) * @param p_mrz MRZ Loading Loading @@ -239,6 +246,10 @@ group securityFunctions { function f_setIncrementSsc(boolean p_incrementSsc) { fx_setIncrementSsc(p_incrementSsc); } // end fx_setIncrementSsc function f_generateRandomOctetstring(integer p_stringSize) return octetstring { return fx_randomOctetstring(p_stringSize); } // end f_generateRandomOctetstring Loading Loading @@ -594,6 +605,18 @@ } // end f_initializeMRTD altstep a_aisConfiguration() runs on MRTD { [] mgmtport.receive(mw_getData_mrz) { mgmtport.send(m_responseRead(m_opticalMrz( substr(vc_simu.mrz, 0, lengthof(vc_simu.mrz)/2 ), substr(vc_simu.mrz, lengthof(vc_simu.mrz)/2, lengthof(vc_simu.mrz)/2)))); } [] mgmtport.receive(mw_getData_cert) { } } // end a_aisConfiguration //function for initializing the system and start the ePassport procedure function f_initializeIS(in charstring p_specialOperatorMessage) runs on MRTD { Loading Loading @@ -621,6 +644,20 @@ log("**** Optical MRZ Line 1: ", v_opticalMrzLine1, " ****"); log("**** Optical MRZ Line 2: ", v_opticalMrzLine2, " ****"); } else { t_wait.start; alt{ [] a_aisConfiguration() { t_wait.stop; } [] t_wait.timeout { log("**** f_initializeIS: Timeout: IS Initialization finished ****"); } } } } // end f_initializeIS Loading ePassport/ttcn/ePassport_Templates.ttcn +2 −2 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ module ePassport_Templates { }, lengthC := omit, payload := omit, lengthE := 256 lengthE := ? } template CommandGetData mw_getData_mrz := { Loading @@ -55,7 +55,7 @@ module ePassport_Templates { }, lengthC := omit, payload := omit, lengthE := 256 lengthE := ? } template (value) PlainTextResponseData m_opticalMrz(in octetstring p_mrzLine1, in octetstring p_mrzLine2) Loading ePassport/ttcn/ePassport_Testcases.ttcn +16 −5 Original line number Diff line number Diff line Loading @@ -24,6 +24,16 @@ module ePassport_Testcases { // Tests of Application Selection group groupISO7816_A { testcase TC_test() runs on MRTD system MRTD_System { var CommandGetData v_pdu; var integer v_result; v_result := decvalue(oct2bit('01ca01f100'O), v_pdu); v_result := decvalue(oct2bit('01ca01f100ffff'O), v_pdu); } /** * @shortdesc Positive test with BAC ePassport * @desc This test verifies that the test item can successfully read an unprotected Loading Loading @@ -136,11 +146,12 @@ module ePassport_Testcases { f_initializeMRTD("CFG.DFLT.BAC"); f_initializeIS(""); // TODO: The simulator SHALL NOT increase the SSC for the computation // The simulator SHALL NOT increase the SSC for the computation // of a MAC, which forces a secure messaging failure in the first RAPDU // because // the MAC data object is incorrect. The SSC is not increased when the first // command while reading the EF.DG1 is executed. f_setIncrementSsc(false); // Test Body t_ac.start(PXT_TWAIT); Loading Loading
ePassport/ttcn/ePassport_Altsteps.ttcn +1 −12 Original line number Diff line number Diff line Loading @@ -184,18 +184,7 @@ } // end a_isReports altstep a_aisConfiguration() runs on MRTD { [] mgmtport.receive(mw_getData_mrz) { mgmtport.send(m_responseRead(m_opticalMrz( substr(vc_simu.mrz, 0, lengthof(vc_simu.mrz)/2 ), substr(vc_simu.mrz, lengthof(vc_simu.mrz)/2, lengthof(vc_simu.mrz)/2)))); } [] mgmtport.receive(mw_getData_cert) { } } // end a_aisConfiguration } // end automaticInterfaceSpecificationAltsteps Loading
ePassport/ttcn/ePassport_Functions.ttcn +54 −17 Original line number Diff line number Diff line Loading @@ -40,6 +40,13 @@ group securityExternalFunctions { /** * @desc Determine whether to increment SSC or not * @param p_incrementSsc boolean * @see TC_ISO7816_B08 */ external function fx_setIncrementSsc(boolean p_incrementSsc); /** * @desc Derive key seed from MRZ information fields (document number, date of birth and date of expiry) * @param p_mrz MRZ Loading Loading @@ -239,6 +246,10 @@ group securityFunctions { function f_setIncrementSsc(boolean p_incrementSsc) { fx_setIncrementSsc(p_incrementSsc); } // end fx_setIncrementSsc function f_generateRandomOctetstring(integer p_stringSize) return octetstring { return fx_randomOctetstring(p_stringSize); } // end f_generateRandomOctetstring Loading Loading @@ -594,6 +605,18 @@ } // end f_initializeMRTD altstep a_aisConfiguration() runs on MRTD { [] mgmtport.receive(mw_getData_mrz) { mgmtport.send(m_responseRead(m_opticalMrz( substr(vc_simu.mrz, 0, lengthof(vc_simu.mrz)/2 ), substr(vc_simu.mrz, lengthof(vc_simu.mrz)/2, lengthof(vc_simu.mrz)/2)))); } [] mgmtport.receive(mw_getData_cert) { } } // end a_aisConfiguration //function for initializing the system and start the ePassport procedure function f_initializeIS(in charstring p_specialOperatorMessage) runs on MRTD { Loading Loading @@ -621,6 +644,20 @@ log("**** Optical MRZ Line 1: ", v_opticalMrzLine1, " ****"); log("**** Optical MRZ Line 2: ", v_opticalMrzLine2, " ****"); } else { t_wait.start; alt{ [] a_aisConfiguration() { t_wait.stop; } [] t_wait.timeout { log("**** f_initializeIS: Timeout: IS Initialization finished ****"); } } } } // end f_initializeIS Loading
ePassport/ttcn/ePassport_Templates.ttcn +2 −2 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ module ePassport_Templates { }, lengthC := omit, payload := omit, lengthE := 256 lengthE := ? } template CommandGetData mw_getData_mrz := { Loading @@ -55,7 +55,7 @@ module ePassport_Templates { }, lengthC := omit, payload := omit, lengthE := 256 lengthE := ? } template (value) PlainTextResponseData m_opticalMrz(in octetstring p_mrzLine1, in octetstring p_mrzLine2) Loading
ePassport/ttcn/ePassport_Testcases.ttcn +16 −5 Original line number Diff line number Diff line Loading @@ -24,6 +24,16 @@ module ePassport_Testcases { // Tests of Application Selection group groupISO7816_A { testcase TC_test() runs on MRTD system MRTD_System { var CommandGetData v_pdu; var integer v_result; v_result := decvalue(oct2bit('01ca01f100'O), v_pdu); v_result := decvalue(oct2bit('01ca01f100ffff'O), v_pdu); } /** * @shortdesc Positive test with BAC ePassport * @desc This test verifies that the test item can successfully read an unprotected Loading Loading @@ -136,11 +146,12 @@ module ePassport_Testcases { f_initializeMRTD("CFG.DFLT.BAC"); f_initializeIS(""); // TODO: The simulator SHALL NOT increase the SSC for the computation // The simulator SHALL NOT increase the SSC for the computation // of a MAC, which forces a secure messaging failure in the first RAPDU // because // the MAC data object is incorrect. The SSC is not increased when the first // command while reading the EF.DG1 is executed. f_setIncrementSsc(false); // Test Body t_ac.start(PXT_TWAIT); Loading