Skip to content
ItsPki_TestCases.ttcn 861 KiB
Newer Older
            var ToBeSignedTlmCtl v_to_be_signed_tlm_ctl;

            tc_wait.stop;
            f_init_default_headers_list(-, "ca_response", v_headers);
            // Send message
            f_build_tlm(
                        v_tlm_certificate_id,
                        v_rca_certificate_id,
                        v_to_be_signed_tlm_ctl
                        );
            log("*** " & testcasename() & ": INFO: v_to_be_signed_tlm_ctl: ", v_to_be_signed_tlm_ctl);
            f_sign_dc_ctl(v_rca_certificate_id, v_to_be_signed_tlm_ctl, v_ieee1609dot2_signed_and_encrypted_data);
            log("*** " & testcasename() & ": INFO: v_ieee1609dot2_signed_and_encrypted_data: ", v_ieee1609dot2_signed_and_encrypted_data);
            v_response := m_http_response(m_http_response_ok(m_http_message_body_binary(m_binary_body_ieee1609dot2_data(v_ieee1609dot2_signed_and_encrypted_data)), v_headers));
            f_http_send(v_headers, v_response);
            log("*** " & testcasename() & ": INFO: ToBeSignedTlmCtl sent ***");

            tc_wait.start;
            repeat;
          }
          [] a_await_any_http_request_from_iut(
                                               mw_http_request,
                                               v_request
                                               ) {
            tc_wait.stop;
            f_init_default_headers_list(-, "ca_response", v_headers);

            v_response := m_http_response(m_http_response_400_bad_request(m_http_message_body_html("<!DOCTYPE html><html><body><h1>ETSI ITS PKI Infrastructure L0 simulator</h1><p>Request not supported</p></body></html>"), v_headers));
            f_http_send(v_headers, v_response);

            tc_wait.start;
            repeat;
          }
          [] tc_wait.timeout {
            //log("*** " & testcasename() & ": PASS: Terminate Generation/Distrbution server ***");
            //f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
            tc_wait.start;
            repeat;
          }
        } // End of 'alt' statement
        f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);

        // Postamble
        f_cfHttpDown_ca();

      } // End of testcase TC_PKI_PLTF_RCV_BV_01

  } // End of group pki_platform_simu

ASN.1 Documenter's avatar
ASN.1 Documenter committed
} // End of module ItsPki_TestCases