Commit 4a620079 authored by garciay's avatar garciay
Browse files

STF545: Validate first test case

parent f18d6e12
Loading
Loading
Loading
Loading
+37 −5
Original line number Original line Diff line number Diff line
@@ -45,7 +45,9 @@ module LibItsPki_Functions {
  import from LibItsHttp_TestSystem all;
  import from LibItsHttp_TestSystem all;
  
  
  // LibItsPki
  // LibItsPki
  import from LibItsPki_TypesAndValues all;
  import from LibItsPki_Templates all;
  import from LibItsPki_Templates all;
  import from LibItsPki_Pics all;
  import from LibItsPki_TestSystem all;
  import from LibItsPki_TestSystem all;
  
  
  group pkiConfigurationFunctions {
  group pkiConfigurationFunctions {
@@ -130,6 +132,36 @@ module LibItsPki_Functions {
        
        
  } // End of pkiConfigurationFunctions
  } // 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 {
  group inner_ec_xxx {
    
    
    function f_generate_inner_ec_request(
    function f_generate_inner_ec_request(
+28 −0
Original line number Original line 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