Commits (2)
[submodule "lib/asn1"]
path = lib/asn1
url = https://forge.etsi.org/rep/ITS/asn1/sec_ts103097.git
branch = testing
This diff is collapsed.
/**
* @author ETSI / STF481 / STF507 / STF517 / STF538 / STF545
* @version $Url: https://oldforge.etsi.org/svn/ITS/tags/20170222_STF527_Final/ttcn/AtsSecurity/ItsSecurity_Templates.ttcn $
* $Id: ItsSecurity_Templates.ttcn 2655 2017-01-26 10:46:08Z filatov $
* @desc Module containing templates for secured GeoNetworking ATS
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
*
*/
module ItsSecurity_Templates {
// // LibIts
// import from DENM_PDU_Descriptions language "ASN.1:1997" all;
// import from ITS_Container language "ASN.1:1997" all;
//
// LibItsBtp
/* import from LibItsBtp_TypesAndValues all; */
/* import from LibItsBtp_Templates all; */
/* import from LibItsBtp_Pixits all; */
// LibItsGeoNet
import from LibItsGeoNetworking_TypesAndValues all;
// import from LibItsGeoNetworking_Templates all;
// template (present) BtpPayload mw_btpCamPayload := {
// decodedPayload := {
// camPacket := ?
// },
// rawPayload := ?
// } // End of template mw_btpCamPayload
//
//
// template (present) BtpPayload mw_btpDenmPayload := {
// decodedPayload := {
// denmPacket := ?
// },
// rawPayload := ?
// } // End of template mw_btpDenmPayload
//
// template (present) Payload mw_secCamPayload := {
// decodedPayload := {
// btpPacket := mw_btpB(
// PX_DESTINATION_PORT,
// ?,
// mw_btpCamPayload
// )
// },
// rawPayload := ?
//
// } // End of template mw_secCamPayload
//
// template (present) Payload mw_secDenmPayload := {
// decodedPayload := {
// btpPacket := mw_btpB(
// PX_DESTINATION_PORT,
// ?,
// mw_btpDenmPayload
// )
// },
// rawPayload := ?
//
// } // End of template mw_secCamPayload
} // End of module ItsSecurity_Templates
This diff is collapsed.
/**
* @author ETSI / STF481 / STF507 / STF517
* @version $Url$
* $Id$
* @desc Test Control file for Security Protocol
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
*
*/
module ItsSecurity_TestControl {
// LibItsGeoNetworking
import from LibItsGeoNetworking_Pics all;
// ItsSecurity
import from ItsSecurity_TestCases all;
import from LibItsSecurity_Pics all;
// Test Execution
control {
/**
* @desc Sending behaviour test cases
* @see ETSI TS 103 096-2 V1.2.2 (2016-01) Clause 5.2 Sending behaviour
*/
if (PICS_GN_SECURITY) {
execute(TC_SEC_ITSS_SND_MSG_01_BV());
/**
* @desc Sending behaviour test cases for CAM profile
* @see ETSI TS 103 096-2 V1.2.2 (2016-01) Clause 5.2.4 CAM profile
*/
execute(TC_SEC_ITSS_SND_CAM_01_BV());
execute(TC_SEC_ITSS_SND_CAM_02_BV());
execute(TC_SEC_ITSS_SND_CAM_03_BV());
execute(TC_SEC_ITSS_SND_CAM_04_BV());
execute(TC_SEC_ITSS_SND_CAM_05_BV());
execute(TC_SEC_ITSS_SND_CAM_06_BV());
execute(TC_SEC_ITSS_SND_CAM_07_BV());
execute(TC_SEC_ITSS_SND_CAM_08_BV());
execute(TC_SEC_ITSS_SND_CAM_09_BV());
execute(TC_SEC_ITSS_SND_CAM_10_BV());
execute(TC_SEC_ITSS_SND_CAM_11_01_BV());
execute(TC_SEC_ITSS_SND_CAM_11_02_BV());
execute(TC_SEC_ITSS_SND_CAM_12_BV());
execute(TC_SEC_ITSS_SND_CAM_13_BV());
execute(TC_SEC_ITSS_SND_CAM_14_BV());
execute(TC_SEC_ITSS_SND_CAM_15_BV());
execute(TC_SEC_ITSS_SND_CAM_16_BV());
execute(TC_SEC_ITSS_SND_CAM_17_BV());
execute(TC_SEC_ITSS_SND_CAM_18_BV());
execute(TC_SEC_ITSS_SND_CAM_19_BV());
execute(TC_SEC_ITSS_SND_CAM_20_BV());
execute(TC_SEC_ITSS_SND_CAM_21_BV());
execute(TC_SEC_ITSS_SND_CAM_22_BV());
execute(TC_SEC_ITSS_SND_CAM_23_BV());
execute(TC_SEC_ITSS_SND_CAM_24_BV());
execute(TC_SEC_ITSS_SND_CAM_25_BV());
execute(TC_SEC_ITSS_SND_CAM_26_BV());
execute(TC_SEC_ITSS_SND_CAM_27_BV());
/**
* @desc Sending behaviour test cases for DENM profile
* @see ETSI TS 103 096-2 V1.2.2 (2016-01) Clause 5.2.5 DENM profile
*/
execute(TC_SEC_ITSS_SND_DENM_01_BV());
execute(TC_SEC_ITSS_SND_DENM_02_BV());
execute(TC_SEC_ITSS_SND_DENM_03_BV());
execute(TC_SEC_ITSS_SND_DENM_04_BV());
execute(TC_SEC_ITSS_SND_DENM_05_BV());
execute(TC_SEC_ITSS_SND_DENM_06_BV());
execute(TC_SEC_ITSS_SND_DENM_07_BV());
//execute(TC_SEC_ITSS_SND_DENM_08_BV()); Removed
execute(TC_SEC_ITSS_SND_DENM_09_BV());
execute(TC_SEC_ITSS_SND_DENM_10_BV());
execute(TC_SEC_ITSS_SND_DENM_11_BV());
execute(TC_SEC_ITSS_SND_DENM_12_BV());
execute(TC_SEC_ITSS_SND_DENM_13_BV());
execute(TC_SEC_ITSS_SND_DENM_14_BV());
execute(TC_SEC_ITSS_SND_DENM_15_BV());
execute(TC_SEC_ITSS_SND_DENM_16_BV());
execute(TC_SEC_ITSS_SND_DENM_17_BV());
execute(TC_SEC_ITSS_SND_DENM_18_BV());
/**
* @desc Sending behaviour test cases for DENM profile
* @see ETSI TS 103 096-2 V1.2.2 (2016-01) Clause 5.2.6 Generic signed message profile
*/
execute(TC_SEC_ITSS_SND_GENMSG_01_BV());
execute(TC_SEC_ITSS_SND_GENMSG_02_BV());
execute(TC_SEC_ITSS_SND_GENMSG_03_BV());
execute(TC_SEC_ITSS_SND_GENMSG_04_BV());
execute(TC_SEC_ITSS_SND_GENMSG_05_BV());
execute(TC_SEC_ITSS_SND_GENMSG_06_BV());
execute(TC_SEC_ITSS_SND_GENMSG_07_BV());
execute(TC_SEC_ITSS_SND_GENMSG_08_BV());
}
} // End of 'control' statement
} // End of module ItsSecurity_TestControl
/**
* @author ETSI / STF481 / STF507 / STF517 / STF538 / STF545
* @version $Url: https://oldforge.etsi.org/svn/ITS/tags/20170222_STF527_Final/ttcn/AtsSecurity/ItsSecurity_TestSystem.ttcn $
* $Id: ItsSecurity_TestSystem.ttcn 2655 2017-01-26 10:46:08Z filatov $
* @desc Module containing t fest system description for the secured GN ATS
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
*
*/
module ItsSecurity_TestSystem {
import from LibItsCam_TestSystem all;
import from LibItsDenm_TestSystem all;
import from LibItsGeoNetworking_TestSystem all;
/**
* @desc Secured GN test system description
* @member acPort Test Adapter control port
* @member geoNetworkingPort GeoNetworking port
* @member utPort GeoNetworking UT port
* @member denmUtPort DENM UT port
* @member cammUtPort CAM UT port
*/
type component ItsSecSystem {
port LibItsGeoNetworking_TestSystem.AdapterControlPort acPort;
// NT2 ports
port LibItsGeoNetworking_TestSystem.UpperTesterPort utPort;
port GeoNetworkingPort geoNetworkingPort;
// FA ports
port LibItsDenm_TestSystem.UpperTesterPort denmUtPort;
port LibItsCam_TestSystem.UpperTesterPort camUtPort;
} // End of ItsSecSystem
} // End of module ItsSecurity_TestSystem
Copyright 2021 ETSI
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
module LibItsSecurity_EncdecDeclarations {
// LibIts
//import from Ieee1609Dot2BaseTypes language "ASN.1:1997" all;
import from Ieee1609Dot2 language "ASN.1:1997" all;
//import from EtsiTs103097Module language "ASN.1:1997" all;
// LibItsSecurity
import from LibItsSecurity_TypesAndValues all;
/**
* @desc Encoding function for EtsiTs103097Certificate certificate
* @param p The certificate to encode
* @return The encode message in OER format
*/
external function fx_enc_CertificateBase(in Ieee1609Dot2.CertificateBase p) return bitstring
with {extension "prototype(convert) encode(PER)"}
external function fx_dec_CertificateBase(inout bitstring b, out Ieee1609Dot2.CertificateBase p) return integer
with {extension "prototype(sliding) decode(PER)"}
/**
* @desc Encoding function for Ieee1609Dot2.ToBeSignedCertificate
* @param p The ToBeSign part of the certificate
* @return The encode message in OER format
*/
external function fx_enc_ToBeSignedCertificate(in Ieee1609Dot2.ToBeSignedCertificate p) return bitstring
with {extension "prototype(convert) encode(PER)"}
/**
* @desc Encoding function for Ieee1609Dot2.Ieee1609Dot2Data
* @param p The Ieee1609Dot2Data part of the certificate
* @return The encode message in OER format
*/
external function fx_enc_Ieee1609Dot2Data(in Ieee1609Dot2.Ieee1609Dot2Data p) return bitstring
with {extension "prototype(convert) encode(PER)"}
external function fx_dec_Ieee1609Dot2Data(inout bitstring p_data, out Ieee1609Dot2.Ieee1609Dot2Data p_ieee1609Dot2Data) return integer
with {extension "prototype(sliding) decode(PER)"}
external function fx_enc_Ieee1609Dot2ToBeSignedData(in Ieee1609Dot2.ToBeSignedData p) return bitstring
with {extension "prototype(convert) encode(PER)"}
external function fx_dec_Ieee1609Dot2ToBeSignedData(inout bitstring p_data, out Ieee1609Dot2.ToBeSignedData p_toBeSignedData) return integer
with {extension "prototype(sliding) decode(PER)"}
external function fx_enc_SspCAM (LibItsSecurity_TypesAndValues.SspCAM p_ssp) return bitstring
with {extension "prototype(convert) encode(LibItsSecurity)"}
external function fx_dec_SspCAM (inout bitstring p_data, out LibItsSecurity_TypesAndValues.SspCAM p_ssp) return integer
with {extension "prototype(sliding) decode(LibItsSecurity)"}
external function fx_enc_SspDENM (LibItsSecurity_TypesAndValues.SspDENM p_ssp) return bitstring
with {extension "prototype(convert) encode(LibItsSecurity)"}
external function fx_dec_SspDENM (inout bitstring p_data, out LibItsSecurity_TypesAndValues.SspDENM p_ssp) return integer
with {extension "prototype(sliding) decode(LibItsSecurity)"}
} // End of module LibItsSecurity_EncdecDeclarations
/**
* @author ETSI / STF481 / STF507 / STF517
* @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/Security/LibItsSecurity_Pics.ttcn3 $
* $Id: LibItsSecurity_Pics.ttcn3 1318 2017-01-26 10:20:53Z filatov $
* @desc Module containing Pics for Security Protocol
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
*
*/
module LibItsSecurity_Pics {
// LibIts
import from Ieee1609Dot2BaseTypes language "ASN.1:1997" all;
import from Ieee1609Dot2 language "ASN.1:1997" all;
import from EtsiTs103097Module language "ASN.1:1997" all;
// LibItsSecurity
import from LibItsSecurity_TypesAndValues all;
/**
* Does the IUT support SHA-256 digest
*/
modulepar boolean PICS_SEC_SHA256 := true;
/**
* Does the IUT support SHA-384 digest
*/
modulepar boolean PICS_SEC_SHA384 := false;
/**
* Does the IUT support NIST P256 algorithm
*/
modulepar boolean PICS_SEC_NIST_P256 := true;
/**
* Does the IUT support Brainpool P256r1 algorithm
*/
modulepar boolean PICS_SEC_BRAINPOOL_P256R1 := false;
/**
* Does the IUT support Brainpool P384r1 algorithm
*/
modulepar boolean PICS_SEC_BRAINPOOL_P384R1 := false;
/**
* Is the IUT able to distribute AT certificates
*/
modulepar boolean PICS_SEC_P2P_AT_DISTRIBUTION := true;
/**
* Is the IUT able to distribute AA certificates
*/
modulepar boolean PICS_SEC_P2P_AA_DISTRIBUTION := true;
/**
* Is the IUT support certificates pushing
*/
modulepar boolean PICS_SEC_CERTIFICATE_SELECTION := true;
/**
* Is the IUT support circular region geographical restriction
*/
modulepar boolean PICS_SEC_CIRCULAR_REGION := true;
/**
* Does the IUT support rectangular region geographical restriction
*/
modulepar boolean PICS_SEC_RECTANGULAR_REGION := true;
/**
* Does the IUT support polygonal region geographical restriction
*/
modulepar boolean PICS_SEC_POLYGONAL_REGION := true;
/**
* Is the IUT support identified region geographical restriction
*/
modulepar boolean PICS_SEC_IDENTIFIED_REGION := true;
/**
* Does the IUT support identified region/UN geographical restriction
*/
//TODO Remove modulepar boolean PICS_SEC_UN_STATS_REGION_DICTIONARY := true;
/**
* Does the IUT support identified region/ISO31661 geographical restriction
*/
//TODO Remove modulepar boolean PICS_ISO31661_REGION_DICTIONARY := true;
/**
* Does the IUT support ITS-AID for Generic profile?
*/
modulepar boolean PICS_SEC_ITS_AID_OTHER := true;
} // End of module LibItsSecurity_Pics
/**
* @author ETSI / STF481 / STF507 / STF517 / STF538
* @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/Security/LibItsSecurity_Pixits.ttcn3 $
* $Id: LibItsSecurity_Pixits.ttcn3 1318 2017-01-26 10:20:53Z filatov $
* @desc Module containing Pixits for Security Protocol
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
*
*/
module LibItsSecurity_Pixits {
// LibCommon
import from LibCommon_BasicTypesAndValues all;
import from LibCommon_DataStrings all;
// LibIts
import from Ieee1609Dot2BaseTypes language "ASN.1:1997" all;
import from Ieee1609Dot2 language "ASN.1:1997" all;
import from EtsiTs103097Module language "ASN.1:1997" all;
/**
* @desc Root path to access certificate stored in files, identified by certficate ID
*/
modulepar charstring PX_CERTIFICATE_POOL_PATH := "data/v3/certificates";
/**
* @desc Configuration sub-directory to access certificate stored in files
*/
modulepar charstring PX_IUT_SEC_CONFIG_NAME := "";
/**
* @desc The certficate the IUT should use. Default: CERT_IUT_A_AT
* @remark If the IUT cannot use the test certificates, set this PIXIT to CERT_NONE
*/
modulepar charstring PX_IUT_DEFAULT_CERTIFICATE := "CERT_IUT_A_AT";
/**
* @desc The certficate the IUT should use. Default: CERT_TS_B_AT
* @remark Possible values: CERT_TS_C_AT, CERT_TS_D_AT, or CERT_TS_E_AT
*/
modulepar charstring PX_AT_CERTIFICATE := "CERT_TS_B_AT";
/**
* @desc ITS-AID value for other profile. Default: 38
*/
modulepar Psid PX_OTHER_ITS_AID := 141; // Assign to GN-MGMT, Other than CA, DEN, MAP, SPAT, IVI, SRE, SSE & GN-MGMT: 38
/**
* @desc Invalid protocol version. Default: 3
*/
modulepar UInt8 PX_WRONG_PROTOCOL_VERSION := 4;
/**
* @desc Invalid WGS longitude
*/
modulepar SecLongitude PX_WGSLONGITUDE := 0;
/**
* @desc Invalid WGS latitude. Default: 1
*/
modulepar SecLatitude PX_WGSLATITUDE := 0;
} // End of module LibItsSecurity_Pixits
This diff is collapsed.
This diff is collapsed.
Subproject commit c4d138571dcbca3e83970256b4780b566fcb4580
sources := \
LibItsSecurity_EncdecDeclarations.ttcn \
LibItsSecurity_Pics.ttcn \
LibItsSecurity_Pixits.ttcn \
LibItsSecurity_Templates.ttcn \
LibItsSecurity_TypesAndValues.ttcn \
asn1/EtsiTs103097ExtensionModule.asn \
asn1/EtsiTs103097Module.asn \
asn1/ieee1609dot2/Ieee1609Dot2.asn \
asn1/ieee1609dot2/Ieee1609Dot2BaseTypes.asn \
This diff is collapsed.
/**
* @author ETSI / STF481 / STF507 / STF517 / STF538
* @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/Security/LibItsSecurity_TestSystem.ttcn3 $
* $Id: LibItsSecurity_TestSystem.ttcn3 1318 2017-01-26 10:20:53Z filatov $
* @desc Test System module for Security Protocol
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
*
*/
module LibItsSecurity_TestSystem {
// LibCommon
import from LibCommon_DataStrings all;
// LibIts
import from Ieee1609Dot2BaseTypes language "ASN.1:1997" all;
import from Ieee1609Dot2 language "ASN.1:1997" all;
import from EtsiTs103097Module language "ASN.1:1997" all;
// LibItsSecurity
import from LibItsSecurity_TypesAndValues all;
import from LibItsSecurity_Pixits all;
group componentDefinitions {
/**
* @desc ITS Security Component
*/
type component ItsSecurityBaseComponent {
// Certificates
var Certificate vc_aaCertificate; /** Test Adapter AA certificate */
var Certificate vc_atCertificate; /** Test Adapter AT certificate */
var Certificate vc_lastAtCertificateUsed; /** Last Test Adapter certificate used in 'f_buildGnSecuredXXX' functions */
var charstring vc_hashedId8ToBeUsed := PX_IUT_DEFAULT_CERTIFICATE; /** Digest value of the AT certificate to be used by the IUT. Default: CERT_IUT_A_AT */
// Private keys
var octetstring vc_signingPrivateKey;
var octetstring vc_encryptPrivateKey;
// Generation position. See Draft ETSI TS 103 097 V1.1.14 Clause 7.2 Security profiles for DENMs
var ThreeDLocation vc_location;
} // End of ItsSecurityBaseComponent
} // End of group componentDefinitions
} // End of module LibItsSecurity_TestSystem
\ No newline at end of file
sources := \
LibItsSecurity_Functions.ttcn \
LibItsSecurity_TestSystem.ttcn \
suite := AtsSecurity
sources := ItsSecurity_Functions.ttcn \
ItsSecurity_Templates.ttcn \
ItsSecurity_TestCases.ttcn \
ItsSecurity_TestControl.ttcn \
ItsSecurity_TestSystem.ttcn
modules := lib \
lib_system \
../LibCommon \
../LibIts \
../AtsCAM/lib \
../AtsCAM/lib_system \
../AtsDENM/lib \
../AtsDENM/lib_system \
../AtsGeoNetworking/lib \
../AtsGeoNetworking/lib_system \
../AtsIPv6OverGeoNetworking/lib \
../AtsIPv6OverGeoNetworking/lib_system \
../AtsBTP/lib \
../AtsBTP/lib_system \
/ccsrc/Ports/LibIts_ports \
/ccsrc/Ports/LibIts_ports/CAM_ports \
/ccsrc/Ports/LibIts_ports/DENM_ports \
/ccsrc/Ports/LibIts_ports/GN_ports \
/ccsrc/Ports/LibIts_ports/IPv6oGN_ports \
/ccsrc/Ports/LibIts_ports/BTP_ports \
/ccsrc/EncDec \
/ccsrc/Framework \
/ccsrc/Externals \
/ccsrc/geospacial \
/ccsrc/loggers \
/ccsrc/Asn1c \
/ccsrc/Protocols/CAM \
/ccsrc/Protocols/DENM \
/ccsrc/Protocols/GeoNetworking \
/ccsrc/Protocols/BTP \
/ccsrc/Protocols/Pcap \
/ccsrc/Protocols/ETH \
/ccsrc/Protocols/UpperTester \
/ccsrc/Protocols/Security \
# ../AtsIS/lib \
# ../../ccsrc/Protocols/Http \
# ../../ccsrc/Protocols/IVIM \
# ../../ccsrc/Protocols/MapemSpatem \
# ../../ccsrc/Protocols/SremSsem \