Commits (2)
......@@ -18,8 +18,6 @@ module LibItsCommon_Templates {
group taPrimitives {
//FIXME RGY the simple boolean result has been changed to a union
// template (value) AcSecResponse m_acSecResponseSuccess := true;
template (value) AdapterControlResults m_acSecResponseSuccess := {acSecResponse:=true};
/**
......@@ -44,18 +42,16 @@ module LibItsCommon_Templates {
}
} // End of template m_acDisableSecurity
//FIXME RGY As discussed, port in type is changed to a top-level union type
// template AcGnssResponse m_acGnssResponseSuccess := true;
template AdapterControlResults m_acGnssResponseSuccess := {acGnssResponse:=true};
//FIXME RGY As discussed, port in type is changed to a top-level union type
// template AcGnssDistanceCovered m_acGnssDistanceCovered := true;
template AdapterControlResults m_acGnssDistanceCovered := {acGnssDistanceCovered:=true};
template (value) AdapterControlResults m_acGnssDistanceCovered := {
acGnssDistanceCovered:=true
};
/**
* @desc Testsystem will load GNSS scenario
*/
template AcGnssPrimitive m_loadScenario(Scenario p_scenario) := {
template (value) AcGnssPrimitive m_loadScenario(Scenario p_scenario) := {
loadScenario := {
scenario := p_scenario
}
......@@ -64,7 +60,7 @@ module LibItsCommon_Templates {
/**
* @desc Testsystem will start GNSS scenario
*/
template AcGnssPrimitive m_startScenario := {
template (value) AcGnssPrimitive m_startScenario := {
startScenario := {
}
}
......@@ -72,7 +68,7 @@ module LibItsCommon_Templates {
/**
* @desc Testsystem will stop GNSS scenario
*/
template AcGnssPrimitive m_stopScenario := {
template (value) AcGnssPrimitive m_stopScenario := {
stopScenario := {
}
}
......@@ -80,7 +76,7 @@ module LibItsCommon_Templates {
/**
* @desc Testsystem will request indication if distance was covered
*/
template AcGnssPrimitive m_distanceToCover(float p_distance) := {
template (value) AcGnssPrimitive m_distanceToCover(float p_distance) := {
distanceToCover := {
distance := p_distance
}
......@@ -89,7 +85,7 @@ module LibItsCommon_Templates {
/**
* @desc Testsystem will change the speed (delta value)
*/
template AcGnssPrimitive m_changeScenarioSpeed(SpeedValue p_deltaSpeedValue) := {
template (value) AcGnssPrimitive m_changeScenarioSpeed(SpeedValue p_deltaSpeedValue) := {
changeSpeed := {
deltaSpeed := p_deltaSpeedValue
}
......@@ -98,7 +94,7 @@ module LibItsCommon_Templates {
/**
* @desc Testsystem will change the heading (delta value)
*/
template AcGnssPrimitive m_changeScenarioHeading(HeadingValue p_deltaHeadingValue) := {
template (value) AcGnssPrimitive m_changeScenarioHeading(HeadingValue p_deltaHeadingValue) := {
changeHeading := {
deltaHeading := p_deltaHeadingValue
}
......
......@@ -314,7 +314,7 @@ module LibItsDenm_Templates {
* @param p_protocolVersion The expected protocol version (Default: current DEN protocol version)
* @param p_messageID The expected message id (Default: DEN message id)
*/
template ItsPduHeader mw_itsPduHeader(
template (present) ItsPduHeader mw_itsPduHeader(
template (present) StationID p_stationID := ?,
template (present) ItsPduHeader.protocolVersion p_protocolVersion := LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_protocolVersion_currentVersion_,
template (present) ItsPduHeader.messageID p_messageID := LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_messageID_denm_
......@@ -431,7 +431,7 @@ module LibItsDenm_Templates {
* @param p_location The expected location Container (Default: any or omit)
* @param p_alacarte The expected Alacarte Container (Default: any or omit)
*/
template (present) DecentralizedEnvironmentalNotificationMessage mw_denm(
template DecentralizedEnvironmentalNotificationMessage mw_denm(
template (present) ManagementContainer p_management := ?,
template SituationContainer p_situation := *,
template LocationContainer p_location := *,
......@@ -500,7 +500,7 @@ module LibItsDenm_Templates {
* @param p_detectionTime The detection time (Default: current time)
* @param p_referenceTime The reference time (Default: current time)
*/
template (value) ManagementContainer m_denmMgmtConTermination (
template (omit) ManagementContainer m_denmMgmtConTermination (
template (value) ActionID p_actionID,
template (value) StationType p_stationType := f_getTsStationType(),
template (value) ValidityDuration p_validityDuration := defaultValidity,
......@@ -522,7 +522,7 @@ module LibItsDenm_Templates {
* @param p_detectionTime The detection time (Default: current time)
* @param p_referenceTime The reference time (Default: current time)
*/
template (present) ManagementContainer mw_denmMgmtConTermination (
template ManagementContainer mw_denmMgmtConTermination (
template (present) ActionID p_actionID,
template (present) StationType p_stationType := f_getIutStationType(),
template (present) TimestampIts p_referenceTime := ?,
......@@ -541,7 +541,7 @@ module LibItsDenm_Templates {
* @param p_validityDuration The expected validity duration (Default: any or omit)
* @param p_transmissionInterval The expected transmission interval (Default: any or omit)
*/
template (present) ManagementContainer mw_denmMgmtCon(
template ManagementContainer mw_denmMgmtCon(
template (present) ActionID p_actionID,
template (present) StationType p_stationType := f_getIutStationType(),
template (present) TimestampIts p_referenceTime := ?,
......
......@@ -161,7 +161,7 @@ module LibItsGeoNetworking_Functions {
* NodeB being close to the area center
*/
//FIXME RGY Titan doesn't support mtc and system clauses yet
function f_cf01Up(Scenario p_scenario := e_staticPosition) runs on ItsGeoNetworking /* TITAN TODO: system ItsGeoNetworkingSystem */ {
function f_cf01Up(Scenario p_scenario := e_staticPosition) runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
// Variables
var PositionTable v_positionTable := {};
......@@ -190,7 +190,7 @@ module LibItsGeoNetworking_Functions {
} // end f_cf01Up
//FIXME RGY Titan doesn't support mtc and system clauses yet
function f_cf01Down() runs on ItsGeoNetworking /* TITAN TODO: system ItsGeoNetworkingSystem */ {
function f_cf01Down() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
f_uninitialiseSecuredMode();
......@@ -217,7 +217,7 @@ module LibItsGeoNetworking_Functions {
*/
//FIXME RGY Titan doesn't support mtc and system clauses yet
function f_cf02Up(in charstring p_mainUtComponent := c_compMTC, Scenario p_scenario := e_staticPosition) runs on ItsMtc /* TITAN TODO: mtc ItsMtc system ItsGeoNetworkingSystem */ {
function f_cf02Up(in charstring p_mainUtComponent := c_compMTC, Scenario p_scenario := e_staticPosition) runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem {
// Variables
var LongPosVector v_longPosVectorIut := valueof(m_dummyLongPosVector);
......@@ -286,7 +286,7 @@ module LibItsGeoNetworking_Functions {
*/
//FIXME RGY Titan doesn't support mtc and system clauses yet
function f_cf02Down() runs on ItsMtc /* TITAN TODO: mtc ItsMtc system ItsGeoNetworkingSystem */ {
function f_cf02Down() runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem {
// Local variables
var integer i;
......@@ -318,7 +318,7 @@ module LibItsGeoNetworking_Functions {
* @param p_mainUtComponent Name of the component that will initialize IUT and handle default UT messages
*/
//FIXME RGY Titan doesn't support mtc and system clauses yet
function f_cf03Up(in charstring p_mainUtComponent := c_compMTC, Scenario p_scenario := e_staticPosition) runs on ItsMtc /* TITAN TODO: mtc ItsMtc system ItsGeoNetworkingSystem */ {
function f_cf03Up(in charstring p_mainUtComponent := c_compMTC, Scenario p_scenario := e_staticPosition) runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem {
// Variables
var LongPosVector v_longPosVectorIut := valueof(m_dummyLongPosVector);
......@@ -386,7 +386,7 @@ module LibItsGeoNetworking_Functions {
*/
//FIXME RGY Titan doesn't support mtc and system clauses yet
function f_cf03Down() runs on ItsMtc /* TITAN TODO: mtc ItsMtc system ItsGeoNetworkingSystem */ {
function f_cf03Down() runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem {
// Local variables
var integer i;
......@@ -421,7 +421,7 @@ module LibItsGeoNetworking_Functions {
*/
//FIXME RGY Titan doesn't support mtc and system clauses yet
function f_cf04Up(in charstring p_mainUtComponent := c_compMTC, Scenario p_scenario := e_staticPosition) runs on ItsMtc /* TITAN TODO: mtc ItsMtc system ItsGeoNetworkingSystem */ {
function f_cf04Up(in charstring p_mainUtComponent := c_compMTC, Scenario p_scenario := e_staticPosition) runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem {
// Variables
var LongPosVector v_longPosVectorIut := valueof(m_dummyLongPosVector);
......@@ -489,7 +489,7 @@ module LibItsGeoNetworking_Functions {
*/
//FIXME RGY Titan doesn't support mtc and system clauses yet
function f_cf04Down() runs on ItsMtc /* TITAN TODO: mtc ItsMtc system ItsGeoNetworkingSystem */{
function f_cf04Down() runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem {
// Local variables
var integer i;
......@@ -520,7 +520,7 @@ module LibItsGeoNetworking_Functions {
*/
//FIXME RGY Titan doesn't support mtc and system clauses yet
function f_cf05Up(in charstring p_mainUtComponent := c_compMTC, Scenario p_scenario := e_staticPosition) runs on ItsMtc /* TITAN TODO: mtc ItsMtc system ItsGeoNetworkingSystem */ {
function f_cf05Up(in charstring p_mainUtComponent := c_compMTC, Scenario p_scenario := e_staticPosition) runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem {
// Variables
var LongPosVector v_longPosVectorIut := valueof(m_dummyLongPosVector);
......@@ -587,7 +587,7 @@ module LibItsGeoNetworking_Functions {
*/
//FIXME RGY Titan doesn't support mtc and system clauses yet
function f_cf05Down() runs on ItsMtc /* TITAN TODO: mtc ItsMtc system ItsGeoNetworkingSystem */ {
function f_cf05Down() runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem {
// Local variables
var integer i;
......@@ -618,7 +618,7 @@ module LibItsGeoNetworking_Functions {
* @param p_mainUtComponent Name of the component that will initialize IUT and handle default UT messages
*/
//FIXME RGY Titan doesn't support mtc and system clauses yet
function f_cf06Up(in charstring p_mainUtComponent := c_compMTC, Scenario p_scenario := e_staticPosition) runs on ItsMtc /* TITAN TODO: mtc ItsMtc system ItsGeoNetworkingSystem */ {
function f_cf06Up(in charstring p_mainUtComponent := c_compMTC, Scenario p_scenario := e_staticPosition) runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem {
// Variables
var LongPosVector v_longPosVectorIut := valueof(m_dummyLongPosVector);
......@@ -685,7 +685,7 @@ module LibItsGeoNetworking_Functions {
*/
//FIXME RGY Titan doesn't support mtc and system clauses yet
function f_cf06Down() runs on ItsMtc /* TITAN TODO: mtc ItsMtc system ItsGeoNetworkingSystem */ {
function f_cf06Down() runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem {
// Local variables
var integer i;
......@@ -716,7 +716,7 @@ module LibItsGeoNetworking_Functions {
*/
//FIXME RGY Titan doesn't support mtc and system clauses yet
function f_cf07Up(in charstring p_mainUtComponent := c_compMTC, Scenario p_scenario := e_staticPosition) runs on ItsMtc /* TITAN TODO mtc ItsMtc system ItsGeoNetworkingSystem */{
function f_cf07Up(in charstring p_mainUtComponent := c_compMTC, Scenario p_scenario := e_staticPosition) runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem {
// Variables
var LongPosVector v_longPosVectorIut := valueof(m_dummyLongPosVector);
......@@ -782,7 +782,7 @@ module LibItsGeoNetworking_Functions {
* @desc Deletes configuration cf06
*/
//FIXME RGY Titan doesn't support mtc and system clauses yet
function f_cf07Down() runs on ItsMtc /* TITAN TODO: mtc ItsMtc system ItsGeoNetworkingSystem */ {
function f_cf07Down() runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem {
// Local variables
var integer i;
......@@ -978,9 +978,8 @@ module LibItsGeoNetworking_Functions {
position := p_positionValue
};
}
//FIXME RGY Titan doesn't support @deterministic yet
// function @deterministic f_fillTimestamp(inout LongPosVector v_vector)
function f_fillTimestamp(inout LongPosVector v_vector)
function @deterministic f_fillTimestamp(in LongPosVector v_vector)
return LongPosVector {
if (v_vector.timestamp_ == 0) {
v_vector.timestamp_ := f_computeGnTimestamp();
......@@ -1339,7 +1338,7 @@ module LibItsGeoNetworking_Functions {
/**
* @desc Default handling cf01 de-initialisation.
*/
altstep a_cf01Down() runs on ItsGeoNetworking {
altstep a_cf01Down() runs on ItsGeoNetworking system ItsGeoNetworkingSystem {
[] a_shutdown() {
f_poDefault();
f_cf01Down();
......@@ -1351,7 +1350,7 @@ module LibItsGeoNetworking_Functions {
/**
* @desc Default handling cf02 de-initialisation.
*/
altstep a_cf02Down() runs on ItsMtc {
altstep a_cf02Down() runs on ItsMtc system ItsGeoNetworkingSystem {
[] a_shutdown() {
f_cf02Down();
log("*** a_cf02Down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***");
......@@ -1362,7 +1361,7 @@ module LibItsGeoNetworking_Functions {
/**
* @desc Default handling cf03 de-initialisation.
*/
altstep a_cf03Down() runs on ItsMtc {
altstep a_cf03Down() runs on ItsMtc system ItsGeoNetworkingSystem {
[] a_shutdown() {
f_cf03Down();
log("*** a_cf03Down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***");
......@@ -1373,7 +1372,7 @@ module LibItsGeoNetworking_Functions {
/**
* @desc Default handling cf04 de-initialisation.
*/
altstep a_cf04Down() runs on ItsMtc {
altstep a_cf04Down() runs on ItsMtc system ItsGeoNetworkingSystem {
[] a_shutdown() {
f_cf04Down();
log("*** a_cf04Down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***");
......@@ -1384,7 +1383,7 @@ module LibItsGeoNetworking_Functions {
/**
* @desc Default handling cf05 de-initialisation.
*/
altstep a_cf05Down() runs on ItsMtc {
altstep a_cf05Down() runs on ItsMtc system ItsGeoNetworkingSystem {
[] a_shutdown() {
f_cf05Down();
log("*** a_cf05Down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***");
......@@ -1395,7 +1394,7 @@ module LibItsGeoNetworking_Functions {
/**
* @desc Default handling cf06 de-initialisation.
*/
altstep a_cf06Down() runs on ItsMtc {
altstep a_cf06Down() runs on ItsMtc system ItsGeoNetworkingSystem {
[] a_shutdown() {
f_cf06Down();
log("*** a_cf06Down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***");
......@@ -1406,7 +1405,7 @@ module LibItsGeoNetworking_Functions {
/**
* @desc Default handling cf07 de-initialisation.
*/
altstep a_cf07Down() runs on ItsMtc {
altstep a_cf07Down() runs on ItsMtc system ItsGeoNetworkingSystem {
[] a_shutdown() {
f_cf07Down();
log("*** a_cf07Down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***");
......
......@@ -74,8 +74,8 @@ module LibItsGeoNetworking_Templates {
* @desc Receive template for GeoNetworking packet (GeonetworkingPort Primitive)
* @param p_geoNwMsg GeoNetworking packet to be received
*/
template GeoNetworkingInd mw_geoNwInd(
template (present) GeoNetworkingPdu p_geoNwMsg
template(present) GeoNetworkingInd mw_geoNwInd(
template (present) GeoNetworkingPdu p_geoNwMsg := ?
) := {
msgIn := p_geoNwMsg,
macDestinationAddress := ?,
......@@ -88,9 +88,9 @@ module LibItsGeoNetworking_Templates {
* @param p_geoNwMsg GeoNetworking packet to be received
* @param p_llDestinationAdress Link-layer destination address
*/
template GeoNetworkingInd mw_geoNwInd_withLinkLayerDestination(
template (present) GeoNetworkingPdu p_geoNwMsg,
template (present) MacAddress p_llDestinationAdress
template (present) GeoNetworkingInd mw_geoNwInd_withLinkLayerDestination(
template (present) GeoNetworkingPdu p_geoNwMsg := ?,
template (present) MacAddress p_llDestinationAdress := ?
) modifies mw_geoNwInd := {
macDestinationAddress := p_llDestinationAdress
}
......@@ -396,8 +396,8 @@ module LibItsGeoNetworking_Templates {
* @desc Testsystem will pass received to the TTCN-3
* @param p_beaconHeader The neighbor information
*/
template AcGnPrimitive m_startPassBeaconing(
template (value) BeaconHeader p_beaconHeader
template (value) AcGnPrimitive m_startPassBeaconing(
in template (value) BeaconHeader p_beaconHeader
) := {
startPassBeaconing := {
beaconHeader := p_beaconHeader
......@@ -407,7 +407,7 @@ module LibItsGeoNetworking_Templates {
/**
* @desc Testsystem will stop passing beacon information to the TTCN-3
*/
template AcGnPrimitive m_stopPassBeaconing := {
template (value) AcGnPrimitive m_stopPassBeaconing := {
stopPassBeaconing := {
}
}
......@@ -431,7 +431,7 @@ module LibItsGeoNetworking_Templates {
* @desc Testsystem will stop beaconing for multiple neighbors
* @param p_compName The neighbor
*/
template AcGnPrimitive m_stopBeaconingMultipleNeighbour := {
template (value) AcGnPrimitive m_stopBeaconingMultipleNeighbour := {
stopBeaconingMultipleNeighbour:= {
}
}
......@@ -441,7 +441,7 @@ module LibItsGeoNetworking_Templates {
* found in received beacon information to the TTCN-3
* @param p_gnAddress The GN address included in the LongPosVector
*/
template AcGnPrimitive m_getLongPosVector(GN_Address p_gnAddress) := {
template (value) AcGnPrimitive m_getLongPosVector(GN_Address p_gnAddress) := {
getLongPosVector := {
gnAddress := p_gnAddress
}
......@@ -678,7 +678,7 @@ module LibItsGeoNetworking_Templates {
* @param payload Expected GN payload
*/
template (present) GnNonSecuredPacket mw_geoNwAnyPacket_withPayload(
template (present) GnRawPayload p_payload
template (present) GnRawPayload p_payload := ?
) := {
commonHeader := mw_commonHeader(
?,
......@@ -868,8 +868,8 @@ module LibItsGeoNetworking_Templates {
* @param p_seqNumber Sequence number of GeoAnycast packet
*/
template (present) GnNonSecuredPacket mw_geoNwAnycastPacket(
in template (present) LongPosVector p_sourceLongPosVec,
in template (present) UInt16 p_seqNumber
template (present) LongPosVector p_sourceLongPosVec := ?,
template (present) UInt16 p_seqNumber := ?
) := {
commonHeader := mw_commonHeader(
PX_GN_UPPER_LAYER,
......@@ -889,9 +889,9 @@ module LibItsGeoNetworking_Templates {
* @param p_anycastArea Destination GeoArea
*/
template (present) GnNonSecuredPacket mw_geoNwAnycastPacketWithArea(
in template (present) LongPosVector p_sourceLongPosVec,
in template (present) UInt16 p_seqNumber,
in template (present) GeoAnycastArea p_anycastArea
template (present) LongPosVector p_sourceLongPosVec := ?,
template (present) UInt16 p_seqNumber := ?,
template (present) GeoAnycastArea p_anycastArea := ?
) := {
commonHeader := mw_commonHeader(
PX_GN_UPPER_LAYER,
......@@ -1142,8 +1142,8 @@ module LibItsGeoNetworking_Templates {
* @param p_mid Searched GN_Address MID
*/
template (present) GnNonSecuredPacket mw_geoNwLsRequestPacket(
in template (present) UInt16 p_seqNumber,
in template (present) GN_Address.mid p_mid
template (present) UInt16 p_seqNumber := ?,
template (present) GN_Address.mid p_mid := ?
) := {
commonHeader := mw_commonHeader(
e_any,
......@@ -1185,8 +1185,8 @@ module LibItsGeoNetworking_Templates {
* @param p_destinationLongPosVec Short position vector of destination
*/
template (present) GnNonSecuredPacket mw_geoNwLsReplyPacket(
in template (present) LongPosVector p_sourceLongPosVec,
in template (present) ShortPosVector p_destinationLongPosVec
template (present) LongPosVector p_sourceLongPosVec := ?,
template (present) ShortPosVector p_destinationLongPosVec := ?
) := {
commonHeader := mw_commonHeader(
e_any,
......@@ -1578,9 +1578,9 @@ module LibItsGeoNetworking_Templates {
* @param p_nextHeader Id of next header
* @param p_headerTypeSubType Header's type and sub-type
*/
template CommonHeader mw_commonHeader (
in template (present) NextHeader p_nextHeader,
in template (present) HeaderTST p_headerTypeSubType
template (present) CommonHeader mw_commonHeader (
template (present) NextHeader p_nextHeader := ?,
template (present) HeaderTST p_headerTypeSubType := ?
) := {
nextHeader := p_nextHeader,
reserved := ?,
......@@ -1597,9 +1597,9 @@ module LibItsGeoNetworking_Templates {
* @param p_nextHeader Id of next header
* @param p_headerTypeSubType Header's type and sub-type
*/
template CommonHeader mw_commonHeader_noPayload (
in template (present) NextHeader p_nextHeader,
in template (present) HeaderTST p_headerTypeSubType
template (present) CommonHeader mw_commonHeader_noPayload (
in template (present) NextHeader p_nextHeader := ?,
in template (present) HeaderTST p_headerTypeSubType := ?
) modifies mw_commonHeader := {
plLength := 0
}
......@@ -1611,10 +1611,10 @@ module LibItsGeoNetworking_Templates {
* @param p_hopLimit Maximum number of hops
* @see mw_commonHeader
*/
template CommonHeader mw_commonHeaderWithHopLimit (
in template (present) NextHeader p_nextHeader,
in template (present) HeaderTST p_headerTypeSubType,
in template (present) UInt8 p_hopLimit
template (present) CommonHeader mw_commonHeaderWithHopLimit (
in template (present) NextHeader p_nextHeader := ?,
in template (present) HeaderTST p_headerTypeSubType := ?,
in template (present) UInt8 p_hopLimit := ?
) modifies mw_commonHeader := {
maxHopLimit := p_hopLimit
}
......@@ -1628,11 +1628,11 @@ module LibItsGeoNetworking_Templates {
* @param p_flags Flags in the common header
* @see mw_commonHeaderWithHopLimit
*/
template CommonHeader mw_commonHeaderWithHopLimitAndFlags (
in template (present) NextHeader p_nextHeader,
in template (present) HeaderTST p_headerTypeSubType,
in template (present) UInt8 p_hopLimit,
in template (present) Bit8 p_flags
template (present) CommonHeader mw_commonHeaderWithHopLimitAndFlags (
in template (present) NextHeader p_nextHeader := ?,
in template (present) HeaderTST p_headerTypeSubType := ?,
in template (present) UInt8 p_hopLimit := ?,
in template (present) Bit8 p_flags := ?
) modifies mw_commonHeaderWithHopLimit := {
flags := p_flags
}
......@@ -1644,10 +1644,10 @@ module LibItsGeoNetworking_Templates {
* @param p_headerTypeSubType Header's type and sub-type
* @param p_trafficClass Packet's traffic class
*/
template CommonHeader mw_commonHeaderWithTrafficClass (
in template (present) NextHeader p_nextHeader,
in template (present) HeaderTST p_headerTypeSubType,
in template (present) TrafficClass p_trafficClass
template (present) CommonHeader mw_commonHeaderWithTrafficClass (
in template (present) NextHeader p_nextHeader := ?,
in template (present) HeaderTST p_headerTypeSubType := ?,
in template (present) TrafficClass p_trafficClass := ?
) modifies mw_commonHeader := {
trafficClass := p_trafficClass
}
......@@ -1699,8 +1699,8 @@ module LibItsGeoNetworking_Templates {
* @desc Receive template for long position vector with specific GN_Address
* @param p_gnAddress GN_Address to be contained in the long position vector
*/
template LongPosVector mw_longPosVectorAny(
in template (present) GN_Address p_gnAddress
template (present) LongPosVector mw_longPosVectorAny(
in template (present) GN_Address p_gnAddress := ?
) := {
gnAddr := p_gnAddress,
timestamp_ := ?,
......@@ -1715,8 +1715,8 @@ module LibItsGeoNetworking_Templates {
* @desc Receive template for long position vector with strict position check
* @param p_longPosVector The base long position vector
*/
template LongPosVector mw_longPosVectorPosition(
in template (value) LongPosVector p_longPosVector
template (present) LongPosVector mw_longPosVectorPosition(
template (present) LongPosVector p_longPosVector := ?
) := {
gnAddr := p_longPosVector.gnAddr,
timestamp_ := ?,
......@@ -1732,8 +1732,8 @@ module LibItsGeoNetworking_Templates {
* @desc Receive template for short position vector with strict position check
* @param p_shortPosVector The base short position vector
*/
template ShortPosVector mw_shortPosVectorPosition(
in template (value) ShortPosVector p_shortPosVector
template (present) ShortPosVector mw_shortPosVectorPosition(
template (present) ShortPosVector p_shortPosVector := ?
) := {
gnAddr := p_shortPosVector.gnAddr,
timestamp_ := ?,
......@@ -1745,8 +1745,8 @@ module LibItsGeoNetworking_Templates {
* @desc Receive template for short position vector without position check
* @param p_shortPosVector The base short position vector
*/
template ShortPosVector mw_shortPosVectorPosition_anyPos(
in template (value) ShortPosVector p_shortPosVector
template (present) ShortPosVector mw_shortPosVectorPosition_anyPos(
template (present) ShortPosVector p_shortPosVector := ?
) modifies mw_shortPosVectorPosition := {
latitude := ?,
longitude := ?
......@@ -1803,9 +1803,9 @@ module LibItsGeoNetworking_Templates {
* @param p_destinationShortPosVec Long position vector of destination
* @param p_seqNumber Sequence number of GeoUnicast packet
*/
template ExtendedHeader mw_geoUnicastHeader(
in template (present) ShortPosVector p_destinationShortPosVec,
in template (present) UInt16 p_seqNumber
template (present) ExtendedHeader mw_geoUnicastHeader(
template (present) ShortPosVector p_destinationShortPosVec := ?,
template (present) UInt16 p_seqNumber := ?
) := {
geoUnicastHeader := {
seqNumber := p_seqNumber,
......@@ -1822,10 +1822,10 @@ module LibItsGeoNetworking_Templates {
* @param p_srcLongPosVec Long position vector of source
* @see mw_geoUnicastHeader
*/
template ExtendedHeader mw_geoUnicastHeaderWithSourcePv(
in template (present) ShortPosVector p_destinationShortPosVec,
in template (present) UInt16 p_seqNumber,
in template (present) LongPosVector p_srcLongPosVec
template (present) ExtendedHeader mw_geoUnicastHeaderWithSourcePv(
template (present) ShortPosVector p_destinationShortPosVec := ?,
template (present) UInt16 p_seqNumber := ?,
template (present) LongPosVector p_srcLongPosVec := ?
) modifies mw_geoUnicastHeader := {
geoUnicastHeader := {
srcPosVector := p_srcLongPosVec
......@@ -1886,9 +1886,9 @@ module LibItsGeoNetworking_Templates {
* @param p_senderLongPosVec Long position vector of sender
* @param p_seqNumber Sequence number of GeoBroadcast packet
*/
template ExtendedHeader mw_geoBroadcastHeader(
in template (present) LongPosVector p_sourceLongPosVec,
in template (present) UInt16 p_seqNumber
template (present) ExtendedHeader mw_geoBroadcastHeader(
template (present) LongPosVector p_sourceLongPosVec := ?,
template (present) UInt16 p_seqNumber := ?
) := {
geoBroadcastHeader := {
seqNumber := p_seqNumber,
......@@ -1911,10 +1911,10 @@ module LibItsGeoNetworking_Templates {
* @param p_broadcastArea Destination GeoArea
* @see mw_geoBroadcastHeader
*/
template ExtendedHeader mw_geoBroadcastHeaderWithArea (
in template (present) LongPosVector p_sourceLongPosVec,
in template (present) UInt16 p_seqNumber,
in template (present) GeoBroadcastArea p_broadcastArea
template (present) ExtendedHeader mw_geoBroadcastHeaderWithArea (
template (present) LongPosVector p_sourceLongPosVec := ?,
template (present) UInt16 p_seqNumber := ?,
template (present) GeoBroadcastArea p_broadcastArea := ?
) modifies mw_geoBroadcastHeader := {
geoBroadcastHeader := {
geoAreaPosLatitude := p_broadcastArea.geoBroadcastArea.geoAreaPosLatitude,
......@@ -1941,7 +1941,7 @@ module LibItsGeoNetworking_Templates {
/**
* @desc Receive template for GeoBroadcast header type
*/
template HeaderTST mw_geoBroadcastHeaderType := {
template (present) HeaderTST mw_geoBroadcastHeaderType := {
geoBroadcastHdr := {
headerType := e_geoBroadcast,
headerSubType := ?
......@@ -1953,8 +1953,8 @@ module LibItsGeoNetworking_Templates {
* @param p_headerSubType Packet's subtype
* @see mw_geoBroadcastHeaderType
*/
template HeaderTST mw_geoBroadcastHeaderTypeWithSubType(
in template (present) HeaderSubTypeGeoBroadcast p_headerSubType
template (present) HeaderTST mw_geoBroadcastHeaderTypeWithSubType(
template (present) HeaderSubTypeGeoBroadcast p_headerSubType := ?
) modifies mw_geoBroadcastHeaderType := {
geoBroadcastHdr := {
headerSubType := p_headerSubType
......@@ -1995,9 +1995,9 @@ module LibItsGeoNetworking_Templates {
* @param p_senderLongPosVec Long position vector of sender
* @param p_seqNumber Sequence number of GeoAnycast packet
*/
template ExtendedHeader mw_geoAnycastHeader(
in template (present) LongPosVector p_sourceLongPosVec,
in template (present) UInt16 p_seqNumber
template (present) ExtendedHeader mw_geoAnycastHeader(
template (present) LongPosVector p_sourceLongPosVec := ?,
template (present) UInt16 p_seqNumber := ?
) := {
geoAnycastHeader := {
seqNumber := p_seqNumber,
......@@ -2020,10 +2020,10 @@ module LibItsGeoNetworking_Templates {
* @param p_anycastArea Destination GeoArea
* @see mw_geoAnycastHeader
*/
template ExtendedHeader mw_geoAnycastHeaderWithArea (
in template (present) LongPosVector p_sourceLongPosVec,
in template (present) UInt16 p_seqNumber,
in template (present) GeoAnycastArea p_anycastArea
template (present) ExtendedHeader mw_geoAnycastHeaderWithArea (
template (present) LongPosVector p_sourceLongPosVec := ?,
template (present) UInt16 p_seqNumber := ?,
template (present) GeoAnycastArea p_anycastArea := ?
) modifies mw_geoAnycastHeader := {
geoAnycastHeader := {
geoAreaPosLatitude := p_anycastArea.geoAnycastArea.geoAreaPosLatitude,
......@@ -2050,7 +2050,7 @@ module LibItsGeoNetworking_Templates {
/**
* @desc Receive template for GeoAnycast header type with any sub-type
*/
template HeaderTST mw_geoAnycastHeaderType := {
template (present)HeaderTST mw_geoAnycastHeaderType := {
geoAnycastHdr := {
headerType := e_geoAnycast,
headerSubType := ?
......@@ -2062,8 +2062,8 @@ module LibItsGeoNetworking_Templates {
* @param p_headerSubType Packet's subtype
* @see mw_geoAnycastHeaderType
*/
template HeaderTST mw_geoAnycastHeaderTypeWithSubType(
in template (present) HeaderSubTypeGeoAnycast p_headerSubType
template (present) HeaderTST mw_geoAnycastHeaderTypeWithSubType(
template (present) HeaderSubTypeGeoAnycast p_headerSubType := ?
) modifies mw_geoAnycastHeaderType := {
geoAnycastHdr := {
headerSubType := p_headerSubType
......@@ -2098,9 +2098,9 @@ module LibItsGeoNetworking_Templates {
* @param p_seqNumber Sequence number of LS Request packet
* @param p_mid Searched GN_Address MID
*/
template ExtendedHeader mw_lsRequestHeader(
in template (present) UInt16 p_seqNumber,
in template (present) GN_Address.mid p_mid
template (present) ExtendedHeader mw_lsRequestHeader(
in template (present) UInt16 p_seqNumber := ?,
in template (present) GN_Address.mid p_mid := ?
) := {
lsRequestHeader := {
seqNumber := p_seqNumber,
......@@ -2156,7 +2156,7 @@ module LibItsGeoNetworking_Templates {
/**
* @desc Receive template for any LS Reply header
*/
template ExtendedHeader mw_lsReplyHeaderAny := {
template (present) ExtendedHeader mw_lsReplyHeaderAny := {
lsReplyHeader := {
seqNumber := ?,
reserved := ?,
......@@ -2171,10 +2171,10 @@ module LibItsGeoNetworking_Templates {
* @param p_destinationLongPosVec Short position vector of destination
* @see mw_lsReplyHeaderAny
*/
template ExtendedHeader mw_lsReplyHeader(
in template (present) LongPosVector p_sourceLongPosVec,
in template (present) ShortPosVector p_destinationLongPosVec)
modifies mw_lsReplyHeaderAny := {
template (present) ExtendedHeader mw_lsReplyHeader(
template (present) LongPosVector p_sourceLongPosVec := ?,
template (present) ShortPosVector p_destinationLongPosVec := ?
) modifies mw_lsReplyHeaderAny := {
lsReplyHeader := {
srcPosVector := p_sourceLongPosVec,
dstPosVector := p_destinationLongPosVec
......@@ -2212,8 +2212,8 @@ module LibItsGeoNetworking_Templates {
* @desc Receive template for Beacon header
* @param p_sourceLongPosVec Long position vector of source
*/
template ExtendedHeader mw_beaconHeader(
in template (present) LongPosVector p_sourceLongPosVec
template (present) ExtendedHeader mw_beaconHeader(
template (present) LongPosVector p_sourceLongPosVec := ?
) := {
beaconHeader := {
srcPosVector := p_sourceLongPosVec
......@@ -2422,7 +2422,9 @@ module LibItsGeoNetworking_Templates {
* @desc Receive template for GN_Address. Only M_ID field is discriminent
* @param p_mid Expected GN Address MID
*/
template GN_Address mw_gnAddressMid(in template (present) GN_Address.mid p_mid) := {
template (present) GN_Address mw_gnAddressMid(
template (present) GN_Address.mid p_mid := ?
) := {
typeOfAddress := ?,
stationType := ?,
stationCountryCode := ?,
......
......@@ -18,7 +18,8 @@ module LibItsHttp_Pics {
/**
* @desc
*/
modulepar charstring PICS_HEADER_CONTENT_TYPE := "application/x-its-request";
modulepar charstring PICS_HEADER_CONTENT_TYPE := "application/x-its-request";
modulepar charstring PICS_HEADER_CTL_CONTENT_TYPE := "application/x-its-crl";
/**
* @desc Set to false in TOKEN header shall not be used
......
......@@ -25,9 +25,10 @@ module LibItsHttp_TestSystem {
type component HttpComponent extends SelfSyncComp { // FIXME To be rename into HttpTest
port HttpPort httpPort;
port HttpPort httpPort_notif;
// timers
timer tc_wait := PX_TWAIT;
timer tc_ac := PX_TAC;
timer tc_noac := PX_TNOAC;
timer tc_wait := PX_TWAIT;
} // End of component HttpComponent
......
......@@ -54,7 +54,7 @@ module LibItsIvim_Templates {
* @param p_iviMsg The expected IVI Message
*/
template (present) IvimInd mw_ivimInd(
template (present) IVIM p_iviMsg
template (present) IVIM p_iviMsg := ?
) := {
msgIn := p_iviMsg,
gnNextHeader := *,
......@@ -77,10 +77,8 @@ module LibItsIvim_Templates {
* @param p_gnLifetime GN packet lifetime value (ms)
* @param p_gnTrafficClass GN traffic class value
*/
//FIXME RGY template should be (present), no omit is assigned to it as a whole; Titan currently requires that the modified templte has at least the same restirction as the base
// template IvimInd mw_ivimIndWithGnParameters (
template(present) IvimInd mw_ivimIndWithGnParameters (
template (present) IVIM p_iviMsg,
template IvimInd mw_ivimIndWithGnParameters(
template (present) IVIM p_iviMsg := ?,
in template UInt8 p_gnNextHeader := *,
in template UInt8 p_gnHeaderType := *,
in template UInt8 p_gnHeaderSubtype := *,
......@@ -100,10 +98,8 @@ module LibItsIvim_Templates {
* @param p_btpDestinationPort BTP destination port value
* @param p_btpInfo BTP destination port info value (if BTP-B) or BTP source port value (if BTP-A)
*/
//FIXME RGY template should be (present), no omit is assigned to it as a whole; Titan currently requires that the modified templte has at least the same restirction as the base
// template IvimInd mw_ivimIndWithBtpParameters (
template(present) IvimInd mw_ivimIndWithBtpParameters (
template (present) IVIM p_iviMsg,
template IvimInd mw_ivimIndWithBtpParameters(
template (present) IVIM p_iviMsg := ?,
template UInt16 p_btpDestinationPort := *,
template UInt16 p_btpInfo := *
) modifies mw_ivimInd := {
......@@ -117,9 +113,8 @@ module LibItsIvim_Templates {
* @param p_ssp SSP security parameter
* @param p_its_aid ITS-AID value
*/
//FIXME RGY template should be (present), no omit is assigned to it as a whole; Titan currently requires that the modified templte has at least the same restirction as the base
template(present) IvimInd mw_ivimIndWithSecurityParameters (
template (present) IVIM p_iviMsg,
template IvimInd mw_ivimIndWithSecurityParameters(
template (present) IVIM p_iviMsg := ?,
template Bit256 p_ssp := *,
template UInt32 p_its_aid := *
) modifies mw_ivimInd := {
......@@ -167,7 +162,7 @@ module LibItsIvim_Templates {
* @param p_connectedIviStructures List of ConnectedIviStructure (Default: omit)
* @param p_optional_ Optional field (Default: omit)
*/
template (value) UtIvimUpdate m_utIvimUpdateEvent(
template (omit) UtIvimUpdate m_utIvimUpdateEvent(
template (value) IviIdentificationNumber p_iviIdentificationNumber,
template (omit) TimestampIts p_timeStamp := c_duration_2sec,
template (omit) TimestampIts p_validFrom := omit,
......@@ -221,7 +216,7 @@ module LibItsIvim_Templates {
* @param p_protocolVersion The expected protocol version (Default: current IVI protocol version)
* @param p_messageID The expected message id (Default: IVI message id)
*/
template ItsPduHeader mw_itsPduHeader(
template (present) ItsPduHeader mw_itsPduHeader(
template (present) StationID p_stationID := ?,
template (present) ItsPduHeader.protocolVersion p_protocolVersion := LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_protocolVersion_currentVersion_,
template (present) ItsPduHeader.messageID p_messageID := LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_messageID_ivim_
......@@ -269,7 +264,7 @@ module LibItsIvim_Templates {
* @param p_messageID The expected message id (Default: IVI message id)
*/
template (present) IVIM mw_ivimPdu(
template (present) IviStructure p_ivim,
template (present) IviStructure p_ivim := ?,
template (present) StationID p_stationID := ?,
template (present) ItsPduHeader.protocolVersion p_protocolVersion := LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_protocolVersion_currentVersion_,
template (present) ItsPduHeader.messageID p_messageID := LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_messageID_ivim_
......@@ -300,7 +295,7 @@ module LibItsIvim_Templates {
* @param p_mandatory The Management Container
* @param p_optional_ A list of IVI Container (Default: omit)
*/
template (present) IviStructure mw_ivimStructure(
template IviStructure mw_ivimStructure(
template (present) IVIManagementContainer p_mandatory := ?,
template IviStructure.optional_ p_optional_ := *
) := {
......@@ -315,7 +310,7 @@ module LibItsIvim_Templates {
template (value) IviStructure m_ivimStructureCancellation(
in template (value) IviIdentificationNumber p_iviIdentificationNumber
) := {
mandatory := valueof(m_iviManagementContainer(f_getProvider(), valueof(p_iviIdentificationNumber), LibItsIvim_ASN1_IVInamedNumbers.IviStatus_cancellation_)),
mandatory := valueof(m_iviManagementContainer(f_getProvider(), valueof(p_iviIdentificationNumber), IviStatus_cancellation_)),
optional_ := omit
} // End of template m_ivimStructureCancellation
......@@ -509,7 +504,7 @@ module LibItsIvim_Templates {
zone := p_zone
} // End of template m_glcPart
template (present) GlcPart mw_glcPart(
template GlcPart mw_glcPart(
template (present) Zid p_zoneId := ?,
template LanePosition p_laneNumber := *,
template GlcPart.zoneExtension p_zoneExtension := *,
......
......@@ -313,7 +313,7 @@ module LibItsMapemSpatem_Templates {
* @param p_protocolVersion The expected protocol version (Default: current MAPEM SPATEM protocol version)
* @param p_messageID The expected message id (Default: MAPEM id)
*/
template ItsPduHeader mw_itsPduHeaderMapem(
template (present) ItsPduHeader mw_itsPduHeaderMapem(
template (present) StationID p_stationID := ?,
template (present) ItsPduHeader.protocolVersion p_protocolVersion := LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_protocolVersion_currentVersion_,
template (present) ItsPduHeader.messageID p_messageID := LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_messageID_mapem_
......@@ -329,7 +329,7 @@ module LibItsMapemSpatem_Templates {
* @param p_protocolVersion The expected protocol version (Default: current MAPEM SPATEM protocol version)
* @param p_messageID The expected message id (Default: SPATEM id)
*/
template ItsPduHeader mw_itsPduHeaderSpatem(
template (present) ItsPduHeader mw_itsPduHeaderSpatem(
template (present) StationID p_stationID := ?,
template (present) ItsPduHeader.protocolVersion p_protocolVersion := LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_protocolVersion_currentVersion_,
template (present) ItsPduHeader.messageID p_messageID := LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_messageID_spatem_
......@@ -571,9 +571,7 @@ module LibItsMapemSpatem_Templates {
/**
* @desc Send template for SPAT Message
*/
//FIXME RGY template should be (present), no omit is assigned to it as a whole; Titan currently requires that the modified templte has at least the same restirction as the base
// template (omit) SPAT m_spatem(
template (value) SPAT m_spatem(
template (omit) SPAT m_spatem(
in template (value) IntersectionStateList p_intersections,
in template (omit) DescriptiveName p_name := omit
) modifies m_defaultSpatem:= {
......@@ -585,12 +583,12 @@ module LibItsMapemSpatem_Templates {
template (value) IntersectionStateList m_intersections := { m_intersection };
template (value) IntersectionState m_intersection := {
template (omit) IntersectionState m_intersection := {
name := omit, // Human readable name for intersection to be used only in debug mode
id := m_intersectionReferenceID, // A globally unique value set, consisting of a regionID and
// intersection ID assignment provides a unique mapping to the intersection MAP in question which provides complete location and approach/move/lane data
revision := PX_INTERSECTIONSTATE_REVISION,
status := LibItsCommon_ASN1_ISDSRC_NamedNumbers.IntersectionStatusObject_manualControlIsEnabled_,
status := IntersectionStatusObject_manualControlIsEnabled_,
// General status of the controller(s)
moy := omit, // Minute of current UTC year used only with messages to be archived
timeStamp := omit, // The mSec point in the current UTC minute that this message was constructed
......@@ -602,7 +600,7 @@ module LibItsMapemSpatem_Templates {
template (value) MovementList m_movements := { m_movement };
template (value) MovementState m_movement := {
template (omit) MovementState m_movement := {
movementName := omit,
signalGroup := PX_SIGNAL_GROUP_ID,
state_time_speed := m_movementEventList,
......
......@@ -26,6 +26,7 @@ module LibItsPki_Functions {
import from EtsiTs102941TypesAuthorization language "ASN.1:1997" all;
import from EtsiTs102941TypesAuthorizationValidation language "ASN.1:1997" all;
import from EtsiTs102941MessagesCa language "ASN.1:1997" all;
import from EtsiTs102941TrustLists language "ASN.1:1997" all;
import from EtsiTs103097Module language "ASN.1:1997" all;
import from ITS_Container language "ASN.1:1997" all;
import from CAM_PDU_Descriptions language "ASN.1:1997" all;
......@@ -107,7 +108,7 @@ module LibItsPki_Functions {
}
f_connect4SelfOrClientSync();
f_initialiseSecuredMode(p_ea_certificate_id, p_aa_certificate_id); // TODO To be removed???
f_initialiseSecuredMode(p_ea_certificate_id, p_aa_certificate_id);
// Setup EA certificate shared with PKI EA entity
f_readCertificate(p_ea_certificate_id, vc_eaCertificate);
......@@ -144,6 +145,27 @@ module LibItsPki_Functions {
}
} // End of function f_cfHttpUp
/**
* @desc Setups default configuration
*/
function f_cfHttpUp_ca() runs on ItsPkiHttp /* TITAN TODO: system ItsPkiHttpSystem */ {
if (PICS_MULTIPLE_END_POINT == false) {
map(self:httpPort, system:httpPort);
} else {
map(self:httpCaPort, system:httpCaPort);
}
f_connect4SelfOrClientSync();
f_initialiseSecuredMode();
if (PICS_MULTIPLE_END_POINT == false) {
activate(a_default_pki_http());
} else {
activate(a_default_pki_http_ca());
}
} // End of function f_cfHttpUp_ca
/**
* @desc Setups default configuration
* @param p_certificate_id The certificate identifier the TA shall use in case of secured IUT
......@@ -292,6 +314,19 @@ module LibItsPki_Functions {
f_uninitialiseSecuredMode();
} // End of function f_cfHttpDown
/**
* @desc Deletes default configuration
*/
function f_cfHttpDown_ca() runs on ItsPkiHttp /* TITAN TODO: system ItsPkiHttpSystem */ {
if (PICS_MULTIPLE_END_POINT == false) {
unmap(self:httpPort, system:httpPort);
} else {
unmap(self:httpCaPort, system:httpCaPort);
}
f_disconnect4SelfOrClientSync();
f_uninitialiseSecuredMode();
} // End of function f_cfHttpDown_ca
/**
* @desc Deletes default configuration
*/
......@@ -636,6 +671,15 @@ module LibItsPki_Functions {
p_http_message.response.header := p_headers;
}
httpAtPort.send(p_http_message);
} else if (v_content_text == { "ca_request" }) {
log("f_http_send: Send on CA end point");
f_set_headers_list({ c_header_host }, { PICS_HEADER_HOST_CA }, p_headers);
if (ischosen(p_http_message.request)) {
p_http_message.request.header := p_headers;
} else {
p_http_message.response.header := p_headers;
}
httpCaPort.send(p_http_message);
} else {
log("f_http_send: Invalid header value: ", v_content_text);
}
......@@ -2863,6 +2907,116 @@ module LibItsPki_Functions {
} // End of group authorization_validation_xxx
group rca {
function f_verify_rca_response_message(
in Ieee1609Dot2Data p_ieee1609dot2_signed_data,
in boolean p_check_security := true,
out ToBeSignedRcaCtl p_to_be_signed_rca_ctl
) return boolean {
var bitstring v_etsi_ts_102941_data_msg;
var bitstring v_tbs;
var Certificate v_certificate;
var charstring v_certificate_id;
var Oct32 v_issuer;
var EtsiTs102941Data v_etsi_ts_102941_data;
log(">>> f_verify_rca_response_message: p_ieee1609dot2_signed_data= ", p_ieee1609dot2_signed_data);
// 1. Verify signature
log("f_verify_rca_response_message: p_ieee1609dot2_signed_data.content.signedData.tbsData= ", p_ieee1609dot2_signed_data.content.signedData.tbsData);
v_tbs := encvalue(p_ieee1609dot2_signed_data.content.signedData.tbsData);
if (f_getCertificateFromDigest(p_ieee1609dot2_signed_data.content.signedData.signer.digest, v_certificate, v_certificate_id) == false) {
if (p_check_security == true) {
return false;
}
}
f_getCertificateHash256(v_certificate_id, v_issuer);
if (f_verifyEcdsa(bit2oct(v_tbs), v_issuer, p_ieee1609dot2_signed_data.content.signedData.signature_, v_certificate.toBeSigned.verifyKeyIndicator.verificationKey) == false) {
if (p_check_security == true) {
return false;
}
}
v_etsi_ts_102941_data_msg := oct2bit(p_ieee1609dot2_signed_data.content.signedData.tbsData.payload.data.content.unsecuredData);
if (decvalue(v_etsi_ts_102941_data_msg, v_etsi_ts_102941_data) != 0) {
log("f_verify_rca_response_message: Failed to decode EtsiTs102941Data");
return false;
} else {
log("f_verify_rca_response_message: v_etsi_ts_102941_data= ", v_etsi_ts_102941_data);
log("f_verify_pki_response_message: RcaCertificateTrustListMessage matching= ", match(v_etsi_ts_102941_data, mw_etsiTs102941Data_to_be_signed_rca_ctl));
if (match(v_etsi_ts_102941_data, mw_etsiTs102941Data_to_be_signed_rca_ctl) == false) {
log("f_verify_rca_response_message: Failed to decode certificateTrustListRca");
return false;
} else {
p_to_be_signed_rca_ctl := v_etsi_ts_102941_data.content.certificateTrustListRca;
log("f_verify_rca_response_message: p_to_be_signed_rca_ctl= ", p_to_be_signed_rca_ctl);
}
}
return true;
}
function f_verify_full_ctl(
in ToBeSignedRcaCtl p_to_be_signed_rca_ctl
) return boolean {
log(">>> f_verify_full_ctl: p_to_be_signed_rca_ctl= ", p_to_be_signed_rca_ctl);
// 1. Check mandatory fields
log("f_verify_full_ctl matching= ", match(p_to_be_signed_rca_ctl, mw_to_be_signed_rca_full_ctl));
if (match(p_to_be_signed_rca_ctl, mw_to_be_signed_rca_full_ctl) == false) {
return false;
}
log("f_verify_full_ctl: ctlCommands length: ", lengthof(p_to_be_signed_rca_ctl.ctlCommands));
for (var integer v_i := 0; v_i < lengthof(p_to_be_signed_rca_ctl.ctlCommands); v_i := v_i + 1) {
var CtlCommand v_ctl_command := p_to_be_signed_rca_ctl.ctlCommands[v_i];
if (ischosen(v_ctl_command.delete)) {
log("f_verify_full_ctl: ctlCommands shall not contains 'delete' variant");
return false;
} else {
if (f_verify_ctl_entry(v_ctl_command.add) == false) {
log("f_verify_full_ctl: ctlCommands contains inavlid entries");
return false;
}
}
} // End of 'for' statements
return true;
}
function f_verify_ctl_entry(
in CtlEntry p_ctl_entry
) return boolean {
if (ischosen(p_ctl_entry.rca)) {
if (match(p_ctl_entry.rca, mw_root_ca_entry(mw_etsiTs103097Certificate)) == false) {
return false;
}
} else if (ischosen(p_ctl_entry.ea)) {
if (match(p_ctl_entry.ea, mw_ea_entry(mw_etsiTs103097Certificate)) == false) {
return false;
}
} else if (ischosen(p_ctl_entry.aa)) {
if (match(p_ctl_entry.aa, mw_aa_entry(mw_etsiTs103097Certificate)) == false) {
return false;
}
} else if (ischosen(p_ctl_entry.dc)) {
if (match(p_ctl_entry.dc, mw_dc_entry) == false) {
return false;
}
} else if (ischosen(p_ctl_entry.tlm)) {
if (match(p_ctl_entry.tlm, mw_tlm_entry(mw_etsiTs103097Certificate)) == false) {
return false;
}
} else {
return false;
}
return true;
}
} // End of group rca
group awaiting_messages {
function f_await_http_inner_ec_request_response(
......@@ -3568,6 +3722,7 @@ module LibItsPki_Functions {
var octetstring v_msg;
var Ieee1609Dot2Data v_ieee1609dot2_signed_data;
var Certificate v_certificate;
var charstring v_certificate_id;
log(">>> f_verify_pki_request_message: p_private_enc_key= ", p_private_enc_key);
log(">>> f_verify_pki_request_message: p_salt= ", p_salt);
......@@ -3641,7 +3796,7 @@ module LibItsPki_Functions {
}
//return false;
} else {
if (f_getCertificateFromDigest(f_HashedId8FromSha256(p_issuer), v_certificate) == false) {
if (f_getCertificateFromDigest(f_HashedId8FromSha256(p_issuer), v_certificate, v_certificate_id) == false) {
if (p_check_security == true) {
return false;
}
......@@ -3702,6 +3857,7 @@ module LibItsPki_Functions {
var octetstring v_plain_message;
var Ieee1609Dot2Data v_ieee1609dot2_signed_data;
var Certificate v_certificate;
var charstring v_certificate_id;
var bitstring v_etsi_ts_102941_data_msg;
var bitstring v_tbs;
var boolean v_ret;
......@@ -3732,7 +3888,7 @@ module LibItsPki_Functions {
// 3. Check the signature
log("f_verify_pki_response_message: v_ieee1609dot2_signed_data.content.signedData.tbsData= ", v_ieee1609dot2_signed_data.content.signedData.tbsData);
v_tbs := encvalue(v_ieee1609dot2_signed_data.content.signedData.tbsData);
if (f_getCertificateFromDigest(v_ieee1609dot2_signed_data.content.signedData.signer.digest, v_certificate) == false) {
if (f_getCertificateFromDigest(v_ieee1609dot2_signed_data.content.signedData.signer.digest, v_certificate, v_certificate_id) == false) {
if (p_check_security == true) {
return false;
}
......@@ -4029,6 +4185,37 @@ module LibItsPki_Functions {
}
} // End of altstep a_default_pki_http_at
altstep a_default_pki_http_ca() runs on ItsPkiHttp {
[PICS_MULTIPLE_END_POINT] httpCaPort.receive(
mw_http_response(
mw_http_response_ko
)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Unexpected message received ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
}
[PICS_MULTIPLE_END_POINT] httpCaPort.receive(mw_http_request) {
tc_ac.stop;
log("*** a_default: ERROR: Unexpected HTTP Request received ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
[PICS_MULTIPLE_END_POINT] httpCaPort.receive(mw_http_response) {
tc_ac.stop;
log("*** a_default: ERROR: Unexpected HTTP Response received ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
[PICS_MULTIPLE_END_POINT] httpCaPort.receive {
tc_ac.stop;
log("*** a_default: ERROR: Unexpected HTTP message received ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
[] a_shutdown() {
log("*** a_default: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***");
stop;
}
} // End of altstep a_default_pki_http_ca
altstep a_await_ec_http_request_from_iut(
template HttpMessage p_http_message,
out HttpMessage p_response
......
......@@ -15,6 +15,11 @@ module LibItsPki_Pics {
*/
modulepar boolean PICS_IUT_AA_ROLE := true;
/**
* @desc Does the IUT act as CA device?
*/
modulepar boolean PICS_IUT_CA_ROLE := true;
/**
* @desc Does the IUT support enrolment?
*/
......@@ -100,6 +105,11 @@ module LibItsPki_Pics {
*/
modulepar charstring PICS_HEADER_HOST_AT := "www.its.at.org";
/**
* @desc End point for the CA
*/
modulepar charstring PICS_HEADER_HOST_CA := "www.its.ca.org";
/**
* @desc Certificate used by the Test System
*/
......@@ -136,6 +146,11 @@ module LibItsPki_Pics {
*/
modulepar charstring PICS_HTTP_POST_URI_ATV := "/authorize_validate";
/**
* @desc HTTP GET URI for Certificate Trusted List
*/
modulepar charstring PICS_HTTP_GET_URI_CTL := "/dc/getctl";
/**
* @desc Factory private key for verification Nist P256
*/
......
......@@ -29,9 +29,11 @@ module LibItsPki_Templates {
import from EtsiTs102941TypesAuthorization language "ASN.1:1997" all;
import from EtsiTs102941TypesAuthorizationValidation language "ASN.1:1997" all;
import from EtsiTs102941MessagesCa language "ASN.1:1997" all;
import from EtsiTs102941TrustLists language "ASN.1:1997" all;
import from EtsiTs103097Module language "ASN.1:1997" all;
// LibItsSecurity
import from LibItsSecurity_TypesAndValues all;
import from LibItsSecurity_Templates all;
// LibItsPki
......@@ -129,6 +131,15 @@ module LibItsPki_Templates {
) modifies mw_etsiTs103097Data_encrypted := {
} // End of template mw_authorizationValidationResponseMessage
template (present) EtsiTs102941Data mw_etsiTs102941Data_to_be_signed_rca_ctl(
template (present) ToBeSignedRcaCtl p_to_be_signed_rca_ctl := ?
) := {
version := PkiProtocolVersion,
content := {
certificateTrustListRca := p_to_be_signed_rca_ctl
}
} // End of template mw_etsiTs102941Data_to_be_signed_rca_ctl
template (value) AuthorizationRequestMessage m_authorizationRequestMessage(
in template (value) EncryptedData p_encryptedData
) modifies m_etsiTs103097Data_encrypted := {
......@@ -518,5 +529,62 @@ module LibItsPki_Templates {
appPermissions := p_appPermissions,
certIssuePermissions := p_certIssuePermissions
} // End of template mw_certificate_subject_attributes
template (present) ToBeSignedRcaCtl mw_to_be_signed_rca_full_ctl := {
version := 1,
nextUpdate := ?,
isFullCtl := true,
ctlSequence := ?,
ctlCommands := ?
} // End of template mw_to_be_signed_rca_ful_ctl
template (present) ToBeSignedRcaCtl mw_to_be_signed_rca_delta_ctl := {
version := 1,
nextUpdate := ?,
isFullCtl := false,
ctlSequence := ?,
ctlCommands := ?
} // End of template mw_to_be_signed_rca_delta_ctl
template (present) TlmEntry mw_tlm_entry(
template (present) EtsiTs103097Certificate p_selfSignedTLMCertificate := ?,
template (present) Url p_accessPoint := ?
) := {
selfSignedTLMCertificate := p_selfSignedTLMCertificate,
linkTLMCertificate := *,
accessPoint := p_accessPoint
} // End of template mw_tlm_entry
template (present) RootCaEntry mw_root_ca_entry(
template (present) EtsiTs103097Certificate p_selfsignedRootCa := ?
) := {
selfsignedRootCa := p_selfsignedRootCa,
linkRootCaCertificate := *
} // End of template mw_root_ca_entry
template (present) EaEntry mw_ea_entry(
template (present) EtsiTs103097Certificate p_eaCertificate := ?,
template (present) Url p_aaAccessPoint := ?
) := {
eaCertificate := p_eaCertificate,
aaAccessPoint := p_aaAccessPoint,
itsAccessPoint := *
} // End of linkRootCaCertificate mw_ea_entry
template (present) AaEntry mw_aa_entry(
template (present) EtsiTs103097Certificate p_aaCertificate := ?,
template (present) Url p_accessPoint := ?
) := {
aaCertificate := p_aaCertificate,
accessPoint := p_accessPoint
} // End of template mw_aa_entry
template (present) DcEntry mw_dc_entry(
template (present) Url p_url := ?,
template (present) HashedId8s p_cert := ?
) := {
url := p_url,
cert := p_cert
} // End of template mw_dc_entry
} // End of module LibItsPki_Templates
......@@ -63,6 +63,7 @@ module LibItsPki_TestSystem {
port HttpPort httpEcPort; /** Enrolment end point */
port HttpPort httpAtVPort; /** Authorization Validation end point */
port HttpPort httpAtPort; /** Authorization end point */
port HttpPort httpCaPort; /** CA CTL/CRL end point */
} // End of component ItsPkiHttpSystem
/**
......@@ -73,6 +74,7 @@ module LibItsPki_TestSystem {
port HttpPort httpEcPort; /** Enrolment end point */
port HttpPort httpAtVPort; /** Authorization Validation end point */
port HttpPort httpAtPort; /** Authorization end point */
port HttpPort httpCaPort; /** CA CTL/CRL end point */
var Certificate vc_eaCertificate; /** Test Adapter EA certificate */
var octetstring vc_eaPrivateKey; /** Test Adapter EA private key for signature */
var octetstring vc_eaPrivateEncKey; /** Test Adapter EA private key for encryption */
......
<
......@@ -764,12 +764,13 @@ module LibItsSecurity_Functions {
out EtsiTs103097Certificate p_aaCertificate,
out EtsiTs103097Certificate p_atCertificate
) runs on ItsSecurityBaseComponent return boolean {
var charstring v_certificate_id;
//log(">>> f_prepareCertificates: ", p_certificateName);
// Load certificates if required
if ((lengthof(p_certificateName) > 0) and (valueof(p_certificateName) != cc_taCert_A)) {
var HashedId8 v_digest;
var charstring v_cert;
if (f_readCertificate(valueof(p_certificateName), p_atCertificate) == false){
log("f_prepareCertificates: Failed to read certificate ", p_certificateName);
......@@ -783,7 +784,7 @@ module LibItsSecurity_Functions {
log("f_prepareCertificates: Invalid certificate issuer ", p_atCertificate.issuer);
return false;
}
if (f_getCertificateFromDigest(v_digest, p_aaCertificate) == false) {
if (f_getCertificateFromDigest(v_digest, p_aaCertificate, v_certificate_id) == false) {
log("f_prepareCertificates: Failed to read certificate issuer ", v_digest);
return false;
}
......@@ -1211,7 +1212,7 @@ module LibItsSecurity_Functions {
// Local variables
var EtsiTs103097Certificate v_aaCertificate, v_atCertificate;
var HeaderInfo v_mandatoryHeaders;
var HeaderInfo v_mandatoryHeaders := valueof(m_ieee1609Dot2_headerInfo(0));
var HeaderInfo v_signerInfo;
// Load certificates if required
......@@ -1286,7 +1287,7 @@ module LibItsSecurity_Functions {
// Local variables
var EtsiTs103097Certificate v_aaCertificate, v_atCertificate;
var HeaderInfo v_mandatoryHeaders;
var HeaderInfo v_mandatoryHeaders := valueof(m_ieee1609Dot2_headerInfo(0));
var HeaderInfo v_signerInfo;
// Load certificates if required
......@@ -1363,7 +1364,7 @@ module LibItsSecurity_Functions {
// Local variables
var EtsiTs103097Certificate v_aaCertificate, v_atCertificate;
var HeaderInfo v_mandatoryHeaders;
var HeaderInfo v_mandatoryHeaders := valueof(m_ieee1609Dot2_headerInfo(0));
var HeaderInfo v_signerInfo;
// Load certificates if required
......@@ -1433,7 +1434,7 @@ module LibItsSecurity_Functions {
// Local variables
var EtsiTs103097Certificate v_aaCertificate, v_atCertificate;
var HeaderInfo v_mandatoryHeaders;
var HeaderInfo v_mandatoryHeaders := valueof(m_ieee1609Dot2_headerInfo(0));
var HeaderInfo v_signerInfo;
// Load certificates if required
......@@ -1508,7 +1509,7 @@ module LibItsSecurity_Functions {
// Local variables
var EtsiTs103097Certificate v_aaCertificate, v_atCertificate;
var HeaderInfo v_mandatoryHeaders;
var HeaderInfo v_mandatoryHeaders := valueof(m_ieee1609Dot2_headerInfo(0));
var HeaderInfo v_signerInfo;
// Load certificates if required
......@@ -1570,8 +1571,6 @@ module LibItsSecurity_Functions {
in charstring p_certificateName
) runs on ItsSecurityBaseComponent return HashedId8 {
// Local variables
// FIXME (DF) UNUSED
// var EtsiTs103097Certificate v_atCertificate;
var HashedId8 v_hashedId8 := '0000000000000000'O;
// Sanity check
......@@ -2175,6 +2174,8 @@ module LibItsSecurity_Functions {
function f_loadCertificates(
in charstring p_configId
) runs on ItsSecurityBaseComponent return boolean {
var charstring v_certificate_id;
// Setup certificates memory cache
if (fx_loadCertificates(PX_CERTIFICATE_POOL_PATH, p_configId) == true) {
// Setup security component variables
......@@ -2190,7 +2191,7 @@ module LibItsSecurity_Functions {
return false;
}
log("Selected issuer: ", v_issuer);
if (f_getCertificateFromDigest(v_issuer, vc_aaCertificate)) {
if (f_getCertificateFromDigest(v_issuer, vc_aaCertificate, v_certificate_id)) {
if (f_readSigningKey(cc_taCert_A, vc_signingPrivateKey) == true) {
f_readEncryptingKey(cc_taCert_A, vc_encryptPrivateKey);
return true;
......@@ -2300,15 +2301,15 @@ module LibItsSecurity_Functions {
function f_getCertificateFromDigest(
in HashedId8 p_digest,
out EtsiTs103097Certificate p_certificate
out EtsiTs103097Certificate p_certificate,
out charstring p_certificate_id
) return boolean {
var charstring v_certificate_id;
if (not(fx_readCertificateFromDigest(p_digest, v_certificate_id))) {
if (not(fx_readCertificateFromDigest(p_digest, p_certificate_id))) {
log("f_getCertificateFromDigest: Failed to retrieve digest for ", p_digest);