Loading ttcn/AtsPki/ItsPki_Functions.ttcn +5 −6 Original line number Original line Diff line number Diff line Loading @@ -56,7 +56,7 @@ module ItsPki_Functions { ) runs on ItsPki { ) runs on ItsPki { // Local variables // Local variables var octetstring v_encMsg; var octetstring v_encMsg; var octetstring v_gnPayload; var octetstring v_raw_payload_to_be_signed; var EtsiTs103097Data v_securedMessage := {}; var EtsiTs103097Data v_securedMessage := {}; var HeaderLines v_headers; var HeaderLines v_headers; Loading @@ -79,10 +79,8 @@ module ItsPki_Functions { p_configId p_configId ); ); // Encode secured Gn packet // Send HTTP request v_securedGnPdu := valueof(m_geoNwSecPdu(v_gnNonSecuredPacket, v_securedMessage)); v_encMsg := bit2oct(encvalue(v_securedMessage)); v_encMsg := bit2oct(encvalue(v_securedGnPdu)); // Send secured Gn packet f_init_default_headers_list(v_headers); f_init_default_headers_list(v_headers); httpPort.send(m_http_request(m_http_request_post("/", v_headers, m_http_message_body_binary(m_binary_body_raw(v_encMsg))))); httpPort.send(m_http_request(m_http_request_post("/", v_headers, m_http_message_body_binary(m_binary_body_raw(v_encMsg))))); } } Loading @@ -93,7 +91,7 @@ module ItsPki_Functions { in SignerIdentifier p_signerIdentifierType, in SignerIdentifier p_signerIdentifierType, in charstring p_certificateName := ""/*, in charstring p_certificateName := ""/*, in boolean p_addMissingHeaders := true*/ in boolean p_addMissingHeaders := true*/ ) runs on ItsPki { ) runs on ItsPki return boolean { // Local variables // Local variables var EtsiTs103097Certificate v_aaCertificate, v_atCertificate; var EtsiTs103097Certificate v_aaCertificate, v_atCertificate; Loading Loading @@ -173,6 +171,7 @@ module ItsPki_Functions { } } log("f_buildSecuredPki: p_securedMessage = ", p_securedMessage); log("f_buildSecuredPki: p_securedMessage = ", p_securedMessage); return true; } // End of function f_buildSecuredPki } // End of function f_buildSecuredPki } // End of module ItsPki_Functions } // End of module ItsPki_Functions No newline at end of file ttcn/AtsPki/ItsPki_TestCases.ttcn +3 −3 Original line number Original line Diff line number Diff line Loading @@ -78,15 +78,16 @@ module ItsPki_TestCases { } } // Test component configuration // Test component configuration f_cf01Up(); // Initialise IUT with CERT_IUT_A_AT signed with CERT_IUT_A_AA vc_hashedId8ToBeUsed := "CERT_IUT_F_AT"; f_cf01Up(); // Initialise IUT with CERT_IUT_F_AT signed with CERT_IUT_F_AA v_longPosVectorIut := f_getPosition(c_compIut); v_longPosVectorIut := f_getPosition(c_compIut); log("v_longPosVectorIut = ", v_longPosVectorIut); f_readCertificate(vc_hashedId8ToBeUsed, v_certificate); f_readCertificate(vc_hashedId8ToBeUsed, v_certificate); // Test adapter configuration // Test adapter configuration // Preamble // Preamble f_prNeighbour(); f_prNeighbour(); f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); // Authorize the TA to forward the received beacons f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body // Test Body Loading Loading @@ -130,7 +131,6 @@ module ItsPki_TestCases { } // End of 'alt' statement } // End of 'alt' statement // Postamble // Postamble f_acTriggerEvent(m_stopPassBeaconing); f_poNeighbour(); f_poNeighbour(); f_cf01Down(); f_cf01Down(); Loading Loading
ttcn/AtsPki/ItsPki_Functions.ttcn +5 −6 Original line number Original line Diff line number Diff line Loading @@ -56,7 +56,7 @@ module ItsPki_Functions { ) runs on ItsPki { ) runs on ItsPki { // Local variables // Local variables var octetstring v_encMsg; var octetstring v_encMsg; var octetstring v_gnPayload; var octetstring v_raw_payload_to_be_signed; var EtsiTs103097Data v_securedMessage := {}; var EtsiTs103097Data v_securedMessage := {}; var HeaderLines v_headers; var HeaderLines v_headers; Loading @@ -79,10 +79,8 @@ module ItsPki_Functions { p_configId p_configId ); ); // Encode secured Gn packet // Send HTTP request v_securedGnPdu := valueof(m_geoNwSecPdu(v_gnNonSecuredPacket, v_securedMessage)); v_encMsg := bit2oct(encvalue(v_securedMessage)); v_encMsg := bit2oct(encvalue(v_securedGnPdu)); // Send secured Gn packet f_init_default_headers_list(v_headers); f_init_default_headers_list(v_headers); httpPort.send(m_http_request(m_http_request_post("/", v_headers, m_http_message_body_binary(m_binary_body_raw(v_encMsg))))); httpPort.send(m_http_request(m_http_request_post("/", v_headers, m_http_message_body_binary(m_binary_body_raw(v_encMsg))))); } } Loading @@ -93,7 +91,7 @@ module ItsPki_Functions { in SignerIdentifier p_signerIdentifierType, in SignerIdentifier p_signerIdentifierType, in charstring p_certificateName := ""/*, in charstring p_certificateName := ""/*, in boolean p_addMissingHeaders := true*/ in boolean p_addMissingHeaders := true*/ ) runs on ItsPki { ) runs on ItsPki return boolean { // Local variables // Local variables var EtsiTs103097Certificate v_aaCertificate, v_atCertificate; var EtsiTs103097Certificate v_aaCertificate, v_atCertificate; Loading Loading @@ -173,6 +171,7 @@ module ItsPki_Functions { } } log("f_buildSecuredPki: p_securedMessage = ", p_securedMessage); log("f_buildSecuredPki: p_securedMessage = ", p_securedMessage); return true; } // End of function f_buildSecuredPki } // End of function f_buildSecuredPki } // End of module ItsPki_Functions } // End of module ItsPki_Functions No newline at end of file
ttcn/AtsPki/ItsPki_TestCases.ttcn +3 −3 Original line number Original line Diff line number Diff line Loading @@ -78,15 +78,16 @@ module ItsPki_TestCases { } } // Test component configuration // Test component configuration f_cf01Up(); // Initialise IUT with CERT_IUT_A_AT signed with CERT_IUT_A_AA vc_hashedId8ToBeUsed := "CERT_IUT_F_AT"; f_cf01Up(); // Initialise IUT with CERT_IUT_F_AT signed with CERT_IUT_F_AA v_longPosVectorIut := f_getPosition(c_compIut); v_longPosVectorIut := f_getPosition(c_compIut); log("v_longPosVectorIut = ", v_longPosVectorIut); f_readCertificate(vc_hashedId8ToBeUsed, v_certificate); f_readCertificate(vc_hashedId8ToBeUsed, v_certificate); // Test adapter configuration // Test adapter configuration // Preamble // Preamble f_prNeighbour(); f_prNeighbour(); f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); // Authorize the TA to forward the received beacons f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body // Test Body Loading Loading @@ -130,7 +131,6 @@ module ItsPki_TestCases { } // End of 'alt' statement } // End of 'alt' statement // Postamble // Postamble f_acTriggerEvent(m_stopPassBeaconing); f_poNeighbour(); f_poNeighbour(); f_cf01Down(); f_cf01Down(); Loading