Loading ttcn/Pki/LibItsPki_Functions.ttcn +37 −5 Original line number Diff line number Diff line Loading @@ -45,7 +45,9 @@ module LibItsPki_Functions { import from LibItsHttp_TestSystem all; // LibItsPki import from LibItsPki_TypesAndValues all; import from LibItsPki_Templates all; import from LibItsPki_Pics all; import from LibItsPki_TestSystem all; group pkiConfigurationFunctions { Loading Loading @@ -130,6 +132,36 @@ module LibItsPki_Functions { } // End of pkiConfigurationFunctions group ac_port { function f_sendAcPkiPrimitive( in octetstring p_private_key, in octetstring p_publicKeyCompressed, in integer p_compressedMode ) runs on ItsPki { var AcSetSecurityData v_ac_set_security_data; v_ac_set_security_data := { PICS_TS_CERTIFICATE_ID, PICS_IUT_CERTIFICATE_ID, p_private_key, p_publicKeyCompressed, p_compressedMode }; acPkiPort.send(AcPkiPrimitive: { acSetSecurityData := v_ac_set_security_data }); tc_ac.start; alt { [] acPkiPort.receive(AcPkiResponse: { result := true }) { tc_ac.stop; } [] acPkiPort.receive(AcPkiResponse: { result := false }) { tc_ac.stop; log("*** f_sendAcPkiPrimitive: ERROR: Received unexpected message ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] tc_ac.timeout { log("*** f_sendAcPkiPrimitive: ERROR: Timeout while waiting for adapter control event result ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } } // End of 'alt' statement } } // End of group ac_port group inner_ec_xxx { function f_generate_inner_ec_request( Loading ttcn/Pki/LibItsPki_Pics.ttcn 0 → 100644 +28 −0 Original line number Diff line number Diff line module LibItsPki_Pics { /** * @desc Does the IUT act as ITS-S device? */ modulepar boolean PICS_IUT_ITS_S_ROLE := false; /** * @desc Does the IUT act as EA device? */ modulepar boolean PICS_IUT_EA_ROLE := true; /** * @desc Does the IUT act as AA device? */ modulepar boolean PICS_IUT_AA_ROLE := false; /** * @desc Certificate used by the IUT */ modulepar charstring PICS_IUT_CERTIFICATE_ID := "CERT_IUT_A_EA"; /** * @desc Certificate used by the Test System */ modulepar charstring PICS_TS_CERTIFICATE_ID := "CERT_TS_A_EA"; } // End of module LibItsPki_Pics Loading
ttcn/Pki/LibItsPki_Functions.ttcn +37 −5 Original line number Diff line number Diff line Loading @@ -45,7 +45,9 @@ module LibItsPki_Functions { import from LibItsHttp_TestSystem all; // LibItsPki import from LibItsPki_TypesAndValues all; import from LibItsPki_Templates all; import from LibItsPki_Pics all; import from LibItsPki_TestSystem all; group pkiConfigurationFunctions { Loading Loading @@ -130,6 +132,36 @@ module LibItsPki_Functions { } // End of pkiConfigurationFunctions group ac_port { function f_sendAcPkiPrimitive( in octetstring p_private_key, in octetstring p_publicKeyCompressed, in integer p_compressedMode ) runs on ItsPki { var AcSetSecurityData v_ac_set_security_data; v_ac_set_security_data := { PICS_TS_CERTIFICATE_ID, PICS_IUT_CERTIFICATE_ID, p_private_key, p_publicKeyCompressed, p_compressedMode }; acPkiPort.send(AcPkiPrimitive: { acSetSecurityData := v_ac_set_security_data }); tc_ac.start; alt { [] acPkiPort.receive(AcPkiResponse: { result := true }) { tc_ac.stop; } [] acPkiPort.receive(AcPkiResponse: { result := false }) { tc_ac.stop; log("*** f_sendAcPkiPrimitive: ERROR: Received unexpected message ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] tc_ac.timeout { log("*** f_sendAcPkiPrimitive: ERROR: Timeout while waiting for adapter control event result ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } } // End of 'alt' statement } } // End of group ac_port group inner_ec_xxx { function f_generate_inner_ec_request( Loading
ttcn/Pki/LibItsPki_Pics.ttcn 0 → 100644 +28 −0 Original line number Diff line number Diff line module LibItsPki_Pics { /** * @desc Does the IUT act as ITS-S device? */ modulepar boolean PICS_IUT_ITS_S_ROLE := false; /** * @desc Does the IUT act as EA device? */ modulepar boolean PICS_IUT_EA_ROLE := true; /** * @desc Does the IUT act as AA device? */ modulepar boolean PICS_IUT_AA_ROLE := false; /** * @desc Certificate used by the IUT */ modulepar charstring PICS_IUT_CERTIFICATE_ID := "CERT_IUT_A_EA"; /** * @desc Certificate used by the Test System */ modulepar charstring PICS_TS_CERTIFICATE_ID := "CERT_TS_A_EA"; } // End of module LibItsPki_Pics