Commit b442b991 authored by garciay's avatar garciay
Browse files

STF545: Start ATS development

parent e747b75b
......@@ -55,16 +55,26 @@ module ItsPki_Functions {
) runs on ItsGeoNetworking return GeoNetworkingPdu {
// Local variables
var GnNonSecuredPacket v_gnNonSecuredPacket;
var octetstring v_encMsg;
var octetstring v_gnPayload;
var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); // Use NodeB
var template (value) Ieee1609Dot2Data v_securedMessage := {};
// Encode the unsecured payload
v_encMsg := bit2oct(encvalue(valueof(p_innerEcRequest)));
//f_buildGnSecuredOtherMessage(v_securedMessage,
v_gnPayload := bit2oct(encvalue(valueof(p_innerEcRequest)));
// Build signed Ieee1609Dot2Data
v_gnNonSecuredPacket := valueof(
m_geoNwUnicastPacket(
m_geoNwUnicastPacket_with_payload(
v_longPosVectorNodeB,
f_getIutShortPosVector(),
vc_localSeqNumber
vc_localSeqNumber,
c_defaultHopLimit,
m_trafficClass,
v_gnPayload
));
// Encode it
......
......@@ -68,6 +68,7 @@ module ItsPki_TestCases {
var LongPosVector v_longPosVectorIut;
var GeoNetworkingPdu v_securedGnPdu;
var GnRawPayload v_sentRawPayload;
var EtsiTs103097Certificate v_certificate;
// Test control
if (not(PICS_GN_SECURITY)) {
......@@ -78,6 +79,7 @@ module ItsPki_TestCases {
// Test component configuration
f_cf01Up();
v_longPosVectorIut := f_getPosition(c_compIut);
f_readCertificate(vc_hashedId8ToBeUsed, v_certificate);
// Test adapter configuration
......@@ -87,15 +89,22 @@ module ItsPki_TestCases {
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
/*v_securedGnPdu := f_prepareEnrollmentRequest(
v_securedGnPdu := f_prepareEnrollmentRequest(
cc_taCert_A,
m_InnerEcRequest(
in template (value) charstring p_itsId,
in template (value) PublicKeys p_publicKeys,
in template (value) CertificateSubjectAttributes p_requestedSubjectAttributes //(WITH COMPONENTS{certIssuePermissions ABSENT}),
m_innerEcRequest(
"TODO",
m_publicKeys(
v_certificate.toBeSigned.verifyKeyIndicator.verificationKey,
v_certificate.toBeSigned.encryptionKey
),
m_certificateSubjectAttributes(
v_certificate.toBeSigned.appPermissions,
v_certificate.toBeSigned.validityPeriod,
v_certificate.toBeSigned.region,
v_certificate.toBeSigned.assuranceLevel
));
f_sendGeoNetMessage(valueof(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)));*/
)));
f_sendGeoNetMessage(valueof(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)));
tc_ac.start;
alt {
[] geoNetworkingPort.receive(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment