Commit 9490350e authored by Yann Garcia's avatar Yann Garcia
Browse files

First implementation of BFK TPs

parent 4bca0b49
Loading
Loading
Loading
Loading
+49 −11
Original line number Diff line number Diff line
@@ -11139,6 +11139,9 @@ module ItsPki_TestCases {
        * <pre>
        * Pics Selection: PICS_IUT_EA_ROLE
        * Initial conditions:
        *     the EA in 'operational' state
        *         authorized with CERT_EA certificate
        *     and the ITS-S in 'enrolled' state
        * Expected behaviour:
        *     ensure that {
        *         when {
@@ -11169,7 +11172,7 @@ module ItsPki_TestCases {
        * </pre>
        * 
        * @see       ETSI TS 103 525-2 v1.2.2 TP SECPKI_EA_BFK_AUTH_01_BV
        * @reference ETSI TS 102 941 [1], clause 6.2.3.5.1, 6.2.3.5.3
        * @reference ETSI TS 102 941 [1], clause 6.2.3.5.3
        */
        testcase TC_SECPKI_EA_BFK_AUTH_01_BV() runs on ItsPkiHttp system ItsPkiHttpSystem {
          // Local variables
@@ -11259,13 +11262,16 @@ module ItsPki_TestCases {
        * <pre>
        * Pics Selection: PICS_IUT_EA_ROLE
        * Initial conditions:
        *     the EA in 'operational' state
        *         authorized with CERT_EA certificate
        *     and the ITS-S in 'enrolled' state
        * Expected behaviour:
        *     ensure that {
        *         when {
        *             the IUT receives a ButterflyAuthorizationRequestMessage message (REQ)
        *         }
        *         then {
        *             the IUT send an EtsiTs103097Data to the ITS-S
        *             the IUT send to the ITS-S a ButterflyAuthorizationResponseMessage
        *                 containing butterflyCertificateResponse
        *                     containing RaEeCertInfo
        *                         containing version
@@ -11480,6 +11486,11 @@ module ItsPki_TestCases {
        * <pre>
        * Pics Selection: PICS_IUT_EA_ROLE
        * Initial conditions:
        *     the EA in 'operational' state
        *         authorized with CERT_EA certificate
        *     and the AA is emulated by TS and
        *         authorized with CERT_AA certificate
        *     and EA is configured to use emulated AA to generate certificates
        * Expected behaviour:
        *     ensure that {
        *         when {
@@ -11617,6 +11628,15 @@ module ItsPki_TestCases {
        * <pre>
        * Pics Selection: PICS_IUT_EA_ROLE
        * Initial conditions:
        *     the EA in 'operational' state
        *         authorized with CERT_EA certificate
        *     and the EA already received the ButterflyAuthorizationRequestMessage
        *         indicating the sha256 message hash MSG_HASH
        *     and the EA already responded with ButterflyAuthorizationResponseMessage
        *         containing EtsiTs102941Data
        *             containing butterflyAuthorizationResponse
        *                 containing nextDlTime
        *                     indicating DNL_TIME
        * Expected behaviour:
        *     ensure that {
        *         when {
@@ -11753,6 +11773,11 @@ module ItsPki_TestCases {
        * @desc Check that the butterfly certificate request message contains expanded cocoon key
        * <pre>
        * Pics Selection: PICS_IUT_EA_ROLE
        *     the EA in 'operational' state
        *         authorized with CERT_EA certificate
        *     and the AA in 'operational' state
        *         authorized with CERT_AA certificate
        *     and EA is configured to use AA of the current configuration to generate certificates
        * Initial conditions:
        * Expected behaviour:
        *     ensure that {
@@ -11884,6 +11909,19 @@ module ItsPki_TestCases {
        * <pre>
        * Pics Selection: PICS_IUT_EA_ROLE
        * Initial conditions:
        *     the EA in 'operational' state
        *         authorized with CERT_EA certificate
        *     and the EA already responded with ButterflyAuthorizationResponseMessage (MSG_RESPONSE)
        *         containing EtsiTs102941Data
        *             containing butterflyAuthorizationResponse
        *                 containing nextDlTime
        *                     indicating DNL_TIME
        *                 and containing currentI
        *                     indicating I_VALUE
        *                 and containing requestHash
        *                     indicating MSG_HASH
        *     and the EA already received from emullated AA one or more ButterflyCertResponse messages
        *         containing AcaEeCertResponsePrivateSpdu (CERT_RESPONSE)
        * Expected behaviour:
        *     ensure that {
        *         when {
@@ -11907,7 +11945,7 @@ module ItsPki_TestCases {
        * </pre>
        * 
        * @see       ETSI TS 103 525-2 v1.2.2 TP SECPKI_EA_BFK_AUTH_06_BV
        * @reference ETSI TS 102 941 [1], clause 6.2.3.5.4
        * @reference ETSI TS 102 941 [1], clause 6.2.3.5.1, 6.2.3.5.3
        */
        testcase TC_SECPKI_EA_BFK_AUTH_06_BV() runs on ItsPkiHttp system ItsPkiHttpSystem {
          // Local variables
@@ -11962,7 +12000,7 @@ module ItsPki_TestCases {
                                                                  mw_http_response_ok(
                                                                                      mw_http_message_body_binary(
                                                                                                                  mw_binary_body_ieee1609dot2_data(
                                                                                                                                                   mw_butterflyAuthorizationResponse(
                                                                                                                                                   mw_butterfly_cert_response(
                                                                                                                                                                              mw_encryptedData(
                                                                                                                                                                                               { *, mw_recipientInfo_pskRecipInfo(v_aes_sym_key_hashed_id8), * },
                                                                                                                                                                                               mw_symmetricCiphertext_aes128ccm
@@ -11975,8 +12013,8 @@ module ItsPki_TestCases {
                log("*** " & testcasename() & ": FAIL: Failed to verify PKI message ***");
                f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
              } else {
                log(match(v_etsi_ts_102941_data, mw_etsiTs102941Data_ra_ee_cert_info(mw_ra_ee_cert_info)));
                if (match(v_etsi_ts_102941_data, mw_etsiTs102941Data_ra_ee_cert_info(mw_ra_ee_cert_info)) == true) {
                log(match(v_etsi_ts_102941_data, mw_etsiTs102941Data_ra_aca_cert_response(mw_ra_aca_cert_response)));
                if (match(v_etsi_ts_102941_data, mw_etsiTs102941Data_ra_aca_cert_response(mw_ra_aca_cert_response)) == true) {
                  log("*** " & testcasename() & ": PASS: Well formated ButterflyAuthorizationResponseMessage received ***");
                  f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
                } else {
+7 −0
Original line number Diff line number Diff line
@@ -87,6 +87,13 @@ module ItsPki_TestControl {

      execute(TC_SECPKI_EA_AUTHVAL_RCV_01_BV());
      execute(TC_SECPKI_EA_AUTHVAL_RCV_02_BI());

      execute(TC_SECPKI_EA_BFK_AUTH_01_BV());
      execute(TC_SECPKI_EA_BFK_AUTH_02_BV());
      execute(TC_SECPKI_EA_BFK_AUTH_03_BV());
      execute(TC_SECPKI_EA_BFK_AUTH_04_BV());
      execute(TC_SECPKI_EA_BFK_AUTH_05_BV());
      execute(TC_SECPKI_EA_BFK_AUTH_06_BV());
    }

    if (PICS_IUT_AA_ROLE) {
+21 −21
Original line number Diff line number Diff line
@@ -228,37 +228,37 @@ module LibItsPki_Templates {
                                                                                ) modifies mw_etsiTs103097Data_encrypted := {
  } // End of template mw_authorizationValidationResponseMessage

  template (value) EtsiTs103097Data/*AuthorizationRequestMessage*/ m_authorizationRequestMessage(
  template (value) EtsiTs103097Data m_authorizationRequestMessage(
                                                                  in template (value) EncryptedData p_encryptedData
                                                                  ) modifies m_etsiTs103097Data_encrypted := {
  } // End of template m_authorizationRequestMessage

  template (present) EtsiTs103097Data/*AuthorizationRequestMessage*/ mw_authorizationRequestMessage(
  template (present) EtsiTs103097Data mw_authorizationRequestMessage(
                                                                     template (present) EncryptedData p_encryptedData := ?
                                                                     ) modifies mw_etsiTs103097Data_encrypted := {
  } // End of template mw_authorizationRequestMessage

  template (value) EtsiTs103097Data/*AuthorizationResponseMessage*/ m_authorizationResponseMessage(
  template (value) EtsiTs103097Data m_authorizationResponseMessage(
                                                                   in template (value) EncryptedData p_encryptedData
                                                                   ) modifies m_etsiTs103097Data_encrypted := {
  } // End of template m_authorizationResponseMessage

  template (present) EtsiTs103097Data/*EnrolmentResponseMessage*/mw_butterflyAuthorizationRequest(
  template (present) EtsiTs103097Data mw_butterflyAuthorizationRequest(
                                                                       template (present) EncryptedData p_encryptedData := ?
                                                                       ) modifies mw_etsiTs103097Data_encrypted := {
  } // End of template mw_butterflyAuthorizationRequest

  template (present) EtsiTs103097Data/*EnrolmentResponseMessage*/mw_butterflyAuthorizationResponse(
  template (present) EtsiTs103097Data mw_butterflyAuthorizationResponse(
                                                                        template (present) EncryptedData p_encryptedData := ?
                                                                        ) modifies mw_etsiTs103097Data_encrypted := {
  } // End of template mw_butterflyAuthorizationResponse

  template (present) EtsiTs103097Data/*EnrolmentResponseMessage*/mw_butterfly_cert_request(
  template (present) EtsiTs103097Data mw_butterfly_cert_request(
                                                                template (present) EncryptedData p_encryptedData := ?
                                                                ) modifies mw_etsiTs103097Data_encrypted := {
  } // End of template mw_butterfly_cert_request

  template (present) EtsiTs103097Data/*EnrolmentResponseMessage*/mw_butterfly_cert_response(
  template (present) EtsiTs103097Data mw_butterfly_cert_response(
                                                                 template (present) EncryptedData p_encryptedData := ?
                                                                 ) modifies mw_etsiTs103097Data_encrypted := {
  } // End of template mw_butterfly_cert_response