Commit b0c80fe9 authored by YannGarcia's avatar YannGarcia
Browse files

Update signature process

parent fba3bcf7
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -130,7 +130,6 @@ $ vi ../../etc/AtsCise/AtsCise.cfg # To update it
```
```


The paramaters to be updated are:
The paramaters to be updated are:
- PICS_CISE_SECURITY
- PICS_CISE_CERTIFICATES_DB_PATH
- PICS_CISE_CERTIFICATES_DB_PATH
- PICS_CISE_TS_CERTIFICATE
- PICS_CISE_TS_CERTIFICATE
- PICS_CISE_TS_SIGNING_PRIVATE_KEY
- PICS_CISE_TS_SIGNING_PRIVATE_KEY
+4 −4
Original line number Original line Diff line number Diff line
@@ -12,9 +12,6 @@
		{
		{
			"path": "../../tmp/ttcn_cisetp-main/ttcn_cisetp-main"
			"path": "../../tmp/ttcn_cisetp-main/ttcn_cisetp-main"
		},
		},
		{
			"path": "../../frameworks/cisedist"
		},
		{
		{
			"path": "../../frameworks/cise-sim"
			"path": "../../frameworks/cise-sim"
		}
		}
@@ -76,6 +73,9 @@
			"thread": "cpp",
			"thread": "cpp",
			"numeric": "cpp"
			"numeric": "cpp"
		},
		},
		"java.compile.nullAnalysis.mode": "automatic"
		"java.compile.nullAnalysis.mode": "automatic",
		"java.project.sourcePaths": [
			""
		]
	}
	}
}
}
 No newline at end of file
+6 −8
Original line number Original line Diff line number Diff line
@@ -6,8 +6,7 @@ LibCise_Pics.PICS_IUT_NODE := true
LibCise_Pics.PICS_IUT_ADAPTOR := true
LibCise_Pics.PICS_IUT_ADAPTOR := true


# LibCise
# LibCise
LibCise_Pics.PICS_CISE_SECURITY                  := true
LibCise_Pics.PICS_CISE_CERTIFICATES_DB_PATH      := "/home/yann/dev/cise-data-model/keystore"
LibCise_Pics.PICS_CISE_CERTIFICATES_DB_PATH      := "/home/yann/dev/cise/keystore"
LibCise_Pics.PICS_CISE_TS_CERTIFICATE            := "sim1_node01.node01.eucise.fr.pem"
LibCise_Pics.PICS_CISE_TS_CERTIFICATE            := "sim1_node01.node01.eucise.fr.pem"
LibCise_Pics.PICS_CISE_TS_SIGNING_PRIVATE_KEY    := "sim1_node01.node01.eucise.fr.pkcs8"
LibCise_Pics.PICS_CISE_TS_SIGNING_PRIVATE_KEY    := "sim1_node01.node01.eucise.fr.pkcs8"
#LibCise_Pics.PICS_CISE_CERTIFICATES_DB_PATH      := "/home/yann/var/ssl/live/yanngarcia.ddns.net"
#LibCise_Pics.PICS_CISE_CERTIFICATES_DB_PATH      := "/home/yann/var/ssl/live/yanngarcia.ddns.net"
@@ -21,6 +20,9 @@ LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/xml"
LibHttp_Pics.PICS_USE_TOKEN_HEADER    := true
LibHttp_Pics.PICS_USE_TOKEN_HEADER    := true
#LibHttp_Pics.PICS_TOKEN_HEADER       := "Basic WrongToken"
#LibHttp_Pics.PICS_TOKEN_HEADER       := "Basic WrongToken"


# LibCise test parameters
LibCise_Pixits.PX_CISE_REQUEST_ACK    := false

[LOGGING]
[LOGGING]
# In this section you can specify the name of the log file and the classes of events
# In this section you can specify the name of the log file and the classes of events
# you want to log into the file or display on console (standard error).
# you want to log into the file or display on console (standard error).
@@ -69,12 +71,8 @@ system.httpPort_notif.params := "HTTP(codecs=xml:xml_codec;json:json_codec)/TCP(
# In this section you can specify what parts of your test suite you want to execute.
# In this section you can specify what parts of your test suite you want to execute.
#AtsCise_TestControl.control
#AtsCise_TestControl.control


# Check that the IUT sends a PullResponse when recieving a PullRequest with no Acknowledgement
# Check that the IUT responds with an HTPP 200 OK Acknowledgment response when receiving a PullRequest from a known peer with a list of vessels in specified basin - no Acknowledgment required
#AtsCise_TestCases.TC_CDM_NODE_PULL_REQUEST_BV_01
AtsCise_TestCases.TC_CDM_NODE_PULL_REQUEST_BV_01
AtsCise_TestCases.TC_CDM_NODE_PULL_REQUEST_BV_02
#AtsCise_TestCases.TC_CDM_NODE_PULL_REQUEST_BV_03
# Check that the IUT is requested to send a PullRequest with no Acknowledgement, the IUT sends a PullRequest with entry Acknowledgement set to False
#AtsCise_TestCases.TC_CISE_yyy_BV_01


[GROUPS]
[GROUPS]
# In this section you can specify groups of hosts. These groups can be used inside the
# In this section you can specify groups of hosts. These groups can be used inside the
+2 −7
Original line number Original line Diff line number Diff line
@@ -6,7 +6,6 @@ LibCise_Pics.PICS_IUT_NODE := true
LibCise_Pics.PICS_IUT_ADAPTOR := true
LibCise_Pics.PICS_IUT_ADAPTOR := true


# LibCise
# LibCise
LibCise_Pics.PICS_CISE_SECURITY                  := true
LibCise_Pics.PICS_CISE_CERTIFICATES_DB_PATH      := "/home/yann/dev/cise-data-model/keystore"
LibCise_Pics.PICS_CISE_CERTIFICATES_DB_PATH      := "/home/yann/dev/cise-data-model/keystore"
LibCise_Pics.PICS_CISE_TS_CERTIFICATE            := "sim1_node01.node01.eucise.fr.pem"
LibCise_Pics.PICS_CISE_TS_CERTIFICATE            := "sim1_node01.node01.eucise.fr.pem"
LibCise_Pics.PICS_CISE_TS_SIGNING_PRIVATE_KEY    := "sim1_node01.node01.eucise.fr.pkcs8"
LibCise_Pics.PICS_CISE_TS_SIGNING_PRIVATE_KEY    := "sim1_node01.node01.eucise.fr.pkcs8"
@@ -69,12 +68,8 @@ system.httpPort_notif.params := "HTTP(codecs=xml:xml_codec;json:json_codec)/TCP(
# In this section you can specify what parts of your test suite you want to execute.
# In this section you can specify what parts of your test suite you want to execute.
#AtsCise_TestControl.control
#AtsCise_TestControl.control


# Check that the IUT sends a PullResponse when recieving a PullRequest with no Acknowledgement
# Check that the IUT responds with an HTPP 200 OK Acknowledgment response when receiving a PullRequest from a known peer with a list of vessels in specified basin - no Acknowledgment required
#AtsCise_TestCases.TC_CDM_NODE_PULL_REQUEST_BV_01
AtsCise_TestCases.TC_CDM_NODE_PULL_REQUEST_BV_01
AtsCise_TestCases.TC_CDM_NODE_PULL_REQUEST_BV_02
#AtsCise_TestCases.TC_CDM_NODE_PULL_REQUEST_BV_03
# Check that the IUT is requested to send a PullRequest with no Acknowledgement, the IUT sends a PullRequest with entry Acknowledgement set to False
#AtsCise_TestCases.TC_CISE_yyy_BV_01


[GROUPS]
[GROUPS]
# In this section you can specify groups of hosts. These groups can be used inside the
# In this section you can specify groups of hosts. These groups can be used inside the
+14 −121
Original line number Original line Diff line number Diff line
@@ -29,124 +29,17 @@ module AtsCise_TestCases {
  group PullRequest {
  group PullRequest {


    /**
    /**
     * @desc Check that the IUT sends a PullResponse when recieving a PullRequest with no Acknowledgement
     * @desc Check that the IUT responds with an HTPP 200 OK Acknowledgment response when receiving a PullRequest from a known peer with a list of vessels in specified basin - no Acknowledgment required
     * @see ETSI GS CDM 004 Clause 5.4.2 Pull
     * @see ETSI GS CDM 004 [1] Clause 5.4.2 Pull
     * @see ETSI GS CDM 004 [1] Clause 8.1.3 Pull (Request/Response)
     * @see ETSI GS CDM 004 [1] Clause 8.1.4 Pull Request Querying Mechanism
     */
     */
    testcase TC_CDM_NODE_PULL_REQUEST_BV_01() runs on HttpComponent system HttpTestAdapter {
    testcase TC_CDM_NODE_PULL_REQUEST_BV_01() runs on HttpComponent system HttpTestAdapter {
      // Local variables
      // Local variables
      var Headers v_headers;
      var Headers v_headers;
      var HttpMessage v_response;
      var HttpMessage v_response;
      var charstring v_date_time := f_get_current_date_time();
      var charstring v_date_time := f_get_current_date_time();
      var charstring v_message_id := f_generate_uuid();
      var charstring v_expected_date_time := substr(v_date_time, 0, lengthof(v_date_time) - 5);
      var charstring v_correlation_id := f_generate_uuid();

      // Test control
      if (not(PICS_IUT_NODE) or PICS_CISE_SECURITY) {
        log("*** " & testcasename() & ": PICS_IUT_NODE and not PICS_CISE_SECURITY required for executing the TC ***");
        setverdict(inconc);
        stop;
      }

      // Test component configuration
      f_cf_01_up();

      // Test adapter configuration

      // Preamble
      f_init_default_headers_list(-, -, v_headers);
      httpPort.send(
                    m_http_request(
                                   m_http_request_get(
                                                      PICS_ROOT_API & PX_CISE_PULL_REQUEST_URI & "/messageId=" & v_message_id,
                                                      v_headers,
                                                      mw_http_message_body_xml(
                                                                               m_xml_body_pull_request(
                                                                                                       m_pull_request(
                                                                                                                      v_date_time,
                                                                                                                      v_message_id,
                                                                                                                      high,
                                                                                                                      m_service( // Sender
                                                                                                                                { string := PX_CISE_SERVICE_ID }, //m_service_id(PX_CISE_SERVICE_ID),
                                                                                                                                pull,
                                                                                                                                -,
                                                                                                                                PX_CISE_SEA_BASSIN,
                                                                                                                                consumer,
                                                                                                                                online,
                                                                                                                                vesselService
                                                                                                                                ),
                                                                                                                      {},
                                                                                                                      request,
                                                                                                                      {}, 
                                                                                                                      -, -, -, 
                                                                                                                      v_correlation_id, 
                                                                                                                      false, // RequiresAck
                                                                                                                      m_service( // Recipient
                                                                                                                                { string := PX_CISE_SERVICE_ID }, //m_service_id(PX_CISE_SERVICE_ID),
                                                                                                                                acknowledgement,
                                                                                                                                -,
                                                                                                                                PX_CISE_SEA_BASSIN,
                                                                                                                                consumer,
                                                                                                                                online,
                                                                                                                                vesselService
                                                                                                                                ),
                                                                                                                      m_core_entity_payload_derivations_payload(
                                                                                                                                                                m_entity_payload( // Payload
                                                                                                                                                                                  nonClassified,
                                                                                                                                                                                  green,
                                                                                                                                                                                  nonSpecified,
                                                                                                                                                                                  {},
                                                                                                                                                                                  false,
                                                                                                                                                                                  -,
                                                                                                                                                                                  false
                                                                                                                                                                                  )
                                                                                                                                                                ),
                                                                                                                      -,
                                                                                                                      1000 // ResponseTimeOut
                    ))))));
      f_selfOrClientSyncAndVerdict(c_prDone, e_success);

      // Test Body
      tc_ac.start;
      alt {
        [] httpPort.receive(
                            mw_http_response(
                                             mw_http_response_ok(
                                                                 mw_http_message_body_xml(
                                                                                          mw_xml_body_pull_response(
                                                                                                                    mw_pull_response(
                                                                                                                                     v_date_time,
                                                                                                                                     v_message_id,
                                                                                                                                     high,
                                                                                                                                     -, -,
                                                                                                                                     success,
                                                                                                                                     -, -, -,
                                                                                                                                     v_correlation_id
                              )))))) -> value v_response {
            tc_ac.stop;
              
            log("*** " & testcasename() & ": PASS: IUT successfully received PullResponse ***");
            f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
          }
          [] tc_ac.timeout {
            log("*** " & testcasename() & ": INCONC: Expected message not received ***");
            f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
          }
      } // End of 'alt' statement

      // Postamble
      f_cf_01_down();
    
    } // End of testcase TC_CDM_NODE_PULL_REQUEST_BV_01

    /**
     * @desc Check that the IUT sends a PullResponse when recieving a PullRequest with no Acknowledgement, with security
     * @see ETSI GS CDM 004 Clause 5.4.2 Pull
     */
    testcase TC_CDM_NODE_PULL_REQUEST_BV_02() runs on HttpComponent system HttpTestAdapter {
      // Local variables
      var Headers v_headers;
      var HttpMessage v_response;
      var charstring v_date_time := f_get_current_date_time();
      var charstring v_message_id := f_generate_uuid();
      var charstring v_message_id := f_generate_uuid();
      var charstring v_correlation_id := f_generate_uuid();
      var charstring v_correlation_id := f_generate_uuid();
      // var charstring v_date_time := "2023-02-15T09:47:23+0100"; // For debug purpose with Mockoon
      // var charstring v_date_time := "2023-02-15T09:47:23+0100"; // For debug purpose with Mockoon
@@ -159,8 +52,8 @@ module AtsCise_TestCases {
      var integer v_result;
      var integer v_result;


      // Test control
      // Test control
      if (not(PICS_IUT_NODE) or not(PICS_CISE_SECURITY)) {
      if (not(PICS_IUT_NODE)) {
        log("*** " & testcasename() & ": PICS_IUT_NODE and PICS_CISE_SECURITY required for executing the TC ***");
        log("*** " & testcasename() & ": PICS_IUT_NODE required for executing the TC ***");
        setverdict(inconc);
        setverdict(inconc);
        stop;
        stop;
      }
      }
@@ -243,8 +136,8 @@ module AtsCise_TestCases {
                                                                                             mw_http_message_body_xml(
                                                                                             mw_http_message_body_xml(
                                                                                                                      mw_xml_body_acknowledgement(
                                                                                                                      mw_xml_body_acknowledgement(
                                                                                                                                                  mw_acknowledgement(
                                                                                                                                                  mw_acknowledgement(
                                                                                                                                                                     v_date_time,
                                                                                                                                                                     ?,
                                                                                                                                                                     v_message_id,
                                                                                                                                                                     ?, //pattern "v_message_id*",
                                                                                                                                                                     -, -, -, -, -, -,
                                                                                                                                                                     -, -, -, -, -, -,
                                                                                                                                                                     v_correlation_id
                                                                                                                                                                     v_correlation_id
                            )))))) -> value v_response {
                            )))))) -> value v_response {
@@ -262,8 +155,8 @@ module AtsCise_TestCases {
                                                                          mw_http_message_body_xml(
                                                                          mw_http_message_body_xml(
                                                                                                   mw_xml_body_acknowledgement(
                                                                                                   mw_xml_body_acknowledgement(
                                                                                                                               mw_acknowledgement(
                                                                                                                               mw_acknowledgement(
                                                                                                                                                  v_date_time,
                                                                                                                                                  ?,
                                                                                                                                                  v_message_id,
                                                                                                                                                  ?, //pattern "v_message_id*",
                                                                                                                                                  -, -, -, -, -, -,
                                                                                                                                                  -, -, -, -, -, -,
                                                                                                                                                  v_correlation_id
                                                                                                                                                  v_correlation_id
                            )))))) -> value v_response {
                            )))))) -> value v_response {
@@ -278,8 +171,8 @@ module AtsCise_TestCases {
                                                                          mw_http_message_body_xml(
                                                                          mw_http_message_body_xml(
                                                                                                   mw_xml_body_pull_response(
                                                                                                   mw_xml_body_pull_response(
                                                                                                                             mw_pull_response(
                                                                                                                             mw_pull_response(
                                                                                                                                              v_date_time,
                                                                                                                                              ?,
                                                                                                                                              v_message_id,
                                                                                                                                              ?, // pattern "v_message_id*",
                                                                                                                                              high,
                                                                                                                                              high,
                                                                                                                                              -, -,
                                                                                                                                              -, -,
                                                                                                                                              success,
                                                                                                                                              success,
@@ -305,7 +198,7 @@ module AtsCise_TestCases {
      // Postamble
      // Postamble
      f_cf_01_down();
      f_cf_01_down();
    
    
    } // End of testcase TC_CDM_NODE_PULL_REQUEST_BV_02
    } // End of testcase TC_CDM_NODE_PULL_REQUEST_BV_01


  } // Enf of group PullRequest
  } // Enf of group PullRequest


Loading