Commit 0dad412c authored by YannGarcia's avatar YannGarcia
Browse files

Reorganize patch_lib_common_titan

parent f4e58675
Loading
Loading
Loading
Loading
+17 −13
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ https://forge.etsi.org/etsi-software-license
## STFs

The following STFs were or are currently involved in the evolutions of the ETSI ITS protocols project:
- STF 405, STF 422, STF 424, STF 455, STF 462, STF 481, STF 484, STF 507, STF 517, STF 525, STF 538, STF 545, STF 594, TTF T002, TTF T011
- STF 405, STF 422, STF 424, STF 455, STF 462, STF 481, STF 484, STF 507, STF 517, STF 525, STF 538, STF 545, STF 594, TTF T002, TTF T011, TTF T024


## Installation
@@ -209,10 +209,14 @@ Procedure:
- Clone the ETSI ITS protocols project into $HOME/dev folder

```sh
$ git clone --recurse-submodules --single-branch https://forge.etsi.org/gitlab/ITS/TS.ITS.git ./TTF011_Its
$ git clone --recurse-submodules --single-branch https://forge.etsi.org/gitlab/ITS/TS.ITS.git
$ cd ${HOME}/dev/TS.ITS/
$ cp ./ttcn/patch_lib_common/module.mk ./ttcn/LibCommon/
$ cp ./ttcn/patch_lib_common/ttcn/* ./ttcn/LibCommon/ttcn

```

- Update your default environment with the content of the script $HOME/dev/TTF011_Its/scripts/devenv.bash.ubuntu
- Update your default environment with the content of the script $HOME/dev/TS.ITS/scripts/devenv.bash.ubuntu
- Switch to the next clause (Usage)


@@ -230,7 +234,7 @@ These two files are used create the ETSI ITS project workspace on Eclipse TITAN.

NOTE: When the Eclipse TITAN workspace is created, you have to build manually the librairy 'libasn1c.so' following the commands below:
```sh
$ cd <eclipse workspace>/TTF011_Its
$ cd <eclipse workspace>/TS.ITS
$ mkdir -p ./bin/asn1
$ cd ./bin/asn1
$ make CC=gcc -f ../../asn1/Makefile
@@ -250,7 +254,7 @@ Pre-requisites:
- Your are logged as 'etsi' or 'vagrant' user
- Procedure using TITAN command line (only):
    - Open several SSH session (PuTTY...)
    - Change to the directory ~/dev/TTF011_Its/
    - Change to the directory ~/dev/TS.ITS/
    - Modify the file config.mk according to your system:
        - On Linux, comment all the lines using the '#' character
        - On Windows, update the path accordingly
@@ -269,7 +273,7 @@ $ make
- To run the test suitem, execute the following command:

```sh
$ cd ~/dev/TTF011_Its/scripts
$ cd ~/dev/TS.ITS/scripts
$ ../run_all.bash
...
```
@@ -303,21 +307,21 @@ $ make

### Generate the certificates

After applying the previous clause, change to the folder '~/dev/TTF011_Its/data/certificates' and execute 'make' command:
After applying the previous clause, change to the folder '~/dev/TS.ITS/data/certificates' and execute 'make' command:
```
$ cd ~/dev/TTF011_Its/data/certificates
$ cd ~/dev/TS.ITS/data/certificates
$ make
```
The certificates will be located in the folder '~/dev/TTF011_Its/data/certificates/certificates'.
The certificates will be located in the folder '~/dev/TS.ITS/data/certificates/certificates'.

To use this newly generated certificates, you shall update two parameters located in the TTCN-3 file LibItsSecurity_Pixits. These are:
- LibItsSecurity_Pixits.PX_CERTIFICATE_POOL_PATH, which is the path the certificates folder (e.g. LibItsSecurity_Pixits.PX_CERTIFICATE_POOL_PATH := "/home/<user>/dev/TTF011_Its/data/certificates")
- LibItsSecurity_Pixits.PX_CERTIFICATE_POOL_PATH, which is the path the certificates folder (e.g. LibItsSecurity_Pixits.PX_CERTIFICATE_POOL_PATH := "/home/<user>/dev/TS.ITS/data/certificates")
- LibItsSecurity_Pixits.PX_IUT_SEC_CONFIG_NAME, which is the name of the certificates folder (e.g. LibItsSecurity_Pixits.PX_IUT_SEC_CONFIG_NAME := "certificates")


### Modify or create new certificates

The folder '~/dev/TTF011_Its/data/profiles' contains an XML file for each certificate to be generated.
The folder '~/dev/TS.ITS/data/profiles' contains an XML file for each certificate to be generated.
This XML file describes the certificate content (e.g. CERT_IUT_A_RCA.xml describes the root certificate for all CERT_IUT_A certificates).

By modifying these files, you can change create new certificate with different geographical area, different validity periods or different SSPs.
@@ -338,7 +342,7 @@ In this cases, the following parameters shall be modified to match the ITS devic
In addition, the Test System shall be configured to support the security modifying the following settings as described below:
- device_mode=1
- secured_mode=1
- sec_db_path=/home/<user>/dev/TTF011_Its/data/certificates/certificates
- sec_db_path=/home/<user>/dev/TS.ITS/data/certificates/certificates


### ITS Protocol Test suites for Transport layer
@@ -351,7 +355,7 @@ In this cases, the following parameters shall be modified to match the ITS devic
In addition, the Test System shall be configured to support the security modifying the following settings as described below:
- device_mode=1
- secured_mode=1
- sec_db_path=/home/<user>/dev/TTF011_Its/data/certificates/certificates
- sec_db_path=/home/<user>/dev/TS.ITS/data/certificates/certificates


### ITS Protocol Test suites for Security
+9 −0
Original line number Diff line number Diff line
sources := \
    ttcn/LibCommon_AbstractData.ttcn \
    ttcn/LibCommon_BasicTypesAndValues.ttcn \
    ttcn/LibCommon_DataStrings.ttcn \
    ttcn/LibCommon_Sync.ttcn \
    ttcn/LibCommon_TextStrings.ttcn \
    ttcn/LibCommon_Time.ttcn \
    ttcn/LibCommon_VerdictControl.ttcn 
+247 −0
Original line number Diff line number Diff line
/**
 *  @author   ETSI
 *  @version  $URL$
 *            $Id$
 *  @desc     A collection of basic type and value definitions which may be 
 *            useful in the implementation of any TTCN-3 test suite. <br><br>
 *  @remark   End users should be aware that any changes made to the  in
 *            definitions this module may be overwritten in future releases.
 *            End users are encouraged to contact the distributers of this  
 *            module regarding their modifications or additions so that future 
 *            updates will include your changes.
 *  @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 LibCommon_BasicTypesAndValues {
  
  /** 
   *  @remark Number in subtype name always indicates encoding length 
   *          in _bits_
   */
  group unsignedIntegerDefintions {

    const integer c_uInt1Max := 1;
    const integer c_uInt2Max := 3;
    const integer c_uInt3Max := 7;
    const integer c_uInt4Max := 15;
    const integer c_uInt5Max := 31;
    const integer c_uInt6Max := 63;
    const integer c_uInt7Max := 127;
    const integer c_uInt8Max := 255;
    const integer c_uInt9Max := 511;
    const integer c_uInt10Max := 1023;
    const integer c_uInt11Max := 2047;
    const integer c_uInt12Max := 4095;
    const integer c_uInt13Max := 8191;
    const integer c_uInt14Max := 16383;
    const integer c_uInt15Max := 32767;
    const integer c_uInt16Max := 65535;
    const integer c_uInt17Max := 131071;
    const integer c_uInt18Max := 262143;
    const integer c_uInt19Max := 524287;
    const integer c_uInt20Max := 1048575;
    const integer c_uInt21Max := 2097151;
    const integer c_uInt22Max := 4194303;
    const integer c_uInt23Max := 8388607;
    const integer c_uInt24Max := 16777215;
    const integer c_uInt25Max := 33554431;
    const integer c_uInt26Max := 67108863;
    const integer c_uInt27Max := 134217727;
    const integer c_uInt28Max := 268435456;
    const integer c_uInt29Max := 536870911;
    const integer c_uInt30Max := 1073741823;
    const integer c_uInt31Max := 2147483647;
    const integer c_uInt32Max := 4294967295;
    const integer c_uInt36Max := 68719476735;
    const integer c_uInt48Max := 281474976710655;
    const integer c_uInt52Max := 4503599627370495;
    const integer c_uInt64Max := 18446744073709551615;

    type integer  UInt  (0 .. infinity);
    type integer  UInt1 (0 .. c_uInt1Max) with {variant "unsigned 1 bit"};
    type integer  UInt2 (0 .. c_uInt2Max) with {variant "unsigned 2 bit"};
    type integer  UInt3 (0 .. c_uInt3Max) with {variant "unsigned 3 bit"};
    type integer  UInt4 (0 .. c_uInt4Max) with {variant "unsigned 4 bit"};
    type integer  UInt5 (0 .. c_uInt5Max) with {variant "unsigned 5 bit"};
    type integer  UInt6 (0 .. c_uInt6Max) with {variant "unsigned 6 bit"};
    type integer  UInt7 (0 .. c_uInt7Max) with {variant "unsigned 7 bit"};
    type integer  UInt8 (0 .. c_uInt8Max) with {variant "unsigned 8 bit"};
    type integer  UInt9 (0 .. c_uInt9Max) with {variant "unsigned 9 bit"};
    type integer  UInt10 (0 .. c_uInt10Max) with {variant "unsigned 10 bit"};
    type integer  UInt11 (0 .. c_uInt11Max) with {variant "unsigned 11 bit"};
    type integer  UInt12 (0 .. c_uInt12Max) with {variant "unsigned 12 bit"};
    type integer  UInt13 (0 .. c_uInt13Max) with {variant "unsigned 13 bit"};
    type integer  UInt14 (0 .. c_uInt14Max) with {variant "unsigned 14 bit"};
    type integer  UInt15 (0 .. c_uInt15Max) with {variant "unsigned 15 bit"};
    type integer  UInt16 (0 .. c_uInt16Max) with {variant "unsigned 16 bit"};
    type integer  UInt17 (0 .. c_uInt17Max) with {variant "unsigned 17 bit"};
    type integer  UInt18 (0 .. c_uInt18Max) with {variant "unsigned 18 bit"};
    type integer  UInt19 (0 .. c_uInt19Max) with {variant "unsigned 19 bit"};
    type integer  UInt20 (0 .. c_uInt20Max) with {variant "unsigned 20 bit"};
    type integer  UInt21 (0 .. c_uInt21Max) with {variant "unsigned 21 bit"};
    type integer  UInt22 (0 .. c_uInt22Max) with {variant "unsigned 22 bit"};
    type integer  UInt23 (0 .. c_uInt23Max) with {variant "unsigned 23 bit"};
    type integer  UInt24 (0 .. c_uInt24Max) with {variant "unsigned 24 bit"};
    type integer  UInt25 (0 .. c_uInt25Max) with {variant "unsigned 25 bit"};
    type integer  UInt26 (0 .. c_uInt26Max) with {variant "unsigned 26 bit"};
    type integer  UInt27 (0 .. c_uInt27Max) with {variant "unsigned 27 bit"};
    type integer  UInt28 (0 .. c_uInt28Max) with {variant "unsigned 28 bit"};
    type integer  UInt29 (0 .. c_uInt29Max) with {variant "unsigned 29 bit"};
    type integer  UInt30 (0 .. c_uInt30Max) with {variant "unsigned 30 bit"};
    type integer  UInt31 (0 .. c_uInt31Max) with {variant "unsigned 31 bit"};
    type integer  UInt32 (0 .. c_uInt32Max) with {variant "unsigned 32 bit"};
    type integer  UInt36 (0 .. c_uInt36Max) with {variant "unsigned 36 bit"};
    type integer  UInt48 (0 .. c_uInt48Max) with {variant "unsigned 48 bit"};
    type integer  UInt52 (0 .. c_uInt52Max) with {variant "unsigned 52 bit"};
    type integer  UInt64 (0 .. c_uInt64Max) with {variant "unsigned 64 bit"};
    
  } // end group unsignedIntegerDefintions
    
  /** 
   * @remark Number in subtype name always indicates encoding length 
   *         in _bits_
   */
  group signedIntegerDefintions {

    const integer c_int1Min := -1;
    const integer c_int1Max := 0;
    const integer c_int2Min := -2;
    const integer c_int2Max := 1;
    const integer c_int3Min := -4;
    const integer c_int3Max := 3;
    const integer c_int4Min := -8;
    const integer c_int4Max := 7;
    const integer c_int5Min := -16;
    const integer c_int5Max := 15;
    const integer c_int6Min := -32;
    const integer c_int6Max := 31;
    const integer c_int7Min := -64;
    const integer c_int7Max := 63;
    const integer c_int8Min := -128;
    const integer c_int8Max := 127;
    const integer c_int9Min := -256;
    const integer c_int9Max := 255;
    const integer c_int10Min := -512;
    const integer c_int10Max := 511;
    const integer c_int11Min := -1024;
    const integer c_int11Max := 1023;
    const integer c_int12Min := -2048;
    const integer c_int12Max := 2047;
    const integer c_int13Min := -4096;
    const integer c_int13Max := 4095;
    const integer c_int14Min := -8192;
    const integer c_int14Max := 8191;
    const integer c_int15Min := -16384;
    const integer c_int15Max := 16383;
    const integer c_int16Min := -32768;
    const integer c_int16Max := 32767;
    const integer c_int17Min := -65536;
    const integer c_int17Max := 65535;
    const integer c_int18Min := -131072;
    const integer c_int18Max := 131071;
    const integer c_int19Min := -262144;
    const integer c_int19Max := 262143;
    const integer c_int20Min := -524288;
    const integer c_int20Max := 524287;
    const integer c_int21Min := -1048576;
    const integer c_int21Max := 1048575;
    const integer c_int22Min := -2097152;
    const integer c_int22Max := 2097151;
    const integer c_int23Min := -4194304;
    const integer c_int23Max := 4194303;
    const integer c_int24Min := -8388608;
    const integer c_int24Max := 8388607;
    const integer c_int25Min := -16777216;
    const integer c_int25Max := 16777215;
    const integer c_int26Min := -33554432;
    const integer c_int26Max := 33554431;
    const integer c_int27Min := -67108864;
    const integer c_int27Max := 67108863;
    const integer c_int28Min := -134217728;
    const integer c_int28Max := 134217727;
    const integer c_int29Min := -268435456;
    const integer c_int29Max := 268435456;
    const integer c_int30Min := -536870912;
    const integer c_int30Max := 536870911;
    const integer c_int31Min := -1073741824;
    const integer c_int31Max := 1073741823;
    const integer c_int32Min := -2147483648;
    const integer c_int32Max := 2147483647;

    type integer  Int;
    type integer  Int1  (c_int1Min .. c_int1Max) with { variant "1 bit"};
    type integer  Int2  (c_int2Min .. c_int2Max) with { variant "2 bit"};
    type integer  Int3  (c_int3Min .. c_int3Max) with { variant "3 bit"};
    type integer  Int4  (c_int4Min .. c_int4Max) with { variant "4 bit"};
    type integer  Int5  (c_int5Min .. c_int5Max) with { variant "5 bit"};
    type integer  Int6  (c_int6Min .. c_int6Max) with { variant "6 bit"};
    type integer  Int7  (c_int7Min .. c_int7Max) with { variant "7 bit"};
    type integer  Int8  (c_int8Min .. c_int8Max) with { variant "8 bit"};
    type integer  Int9  (c_int9Min .. c_int9Max) with { variant "9 bit"};
    type integer  Int10  (c_int10Min .. c_int10Max) with { variant "10 bit"};
    type integer  Int11  (c_int11Min .. c_int11Max) with { variant "11 bit"};
    type integer  Int12  (c_int12Min .. c_int12Max) with { variant "12 bit"};
    type integer  Int13  (c_int13Min .. c_int13Max) with { variant "13 bit"};
    type integer  Int14  (c_int14Min .. c_int14Max) with { variant "14 bit"};
    type integer  Int15  (c_int15Min .. c_int15Max) with { variant "15 bit"};
    type integer  Int16  (c_int16Min .. c_int16Max) with { variant "16 bit"};
    type integer  Int17  (c_int17Min .. c_int17Max) with { variant "17 bit"};
    type integer  Int18  (c_int18Min .. c_int18Max) with { variant "18 bit"};
    type integer  Int19  (c_int19Min .. c_int19Max) with { variant "19 bit"};
    type integer  Int20  (c_int20Min .. c_int20Max) with { variant "20 bit"};
    type integer  Int21  (c_int21Min .. c_int21Max) with { variant "21 bit"};
    type integer  Int22  (c_int22Min .. c_int22Max) with { variant "22 bit"};
    type integer  Int23  (c_int23Min .. c_int23Max) with { variant "23 bit"};
    type integer  Int24  (c_int24Min .. c_int24Max) with { variant "24 bit"};
    type integer  Int25  (c_int25Min .. c_int25Max) with { variant "25 bit"};
    type integer  Int26  (c_int26Min .. c_int26Max) with { variant "26 bit"};
    type integer  Int27  (c_int27Min .. c_int27Max) with { variant "27 bit"};
    type integer  Int28  (c_int28Min .. c_int28Max) with { variant "28 bit"};
    type integer  Int29  (c_int29Min .. c_int29Max) with { variant "29 bit"};
    type integer  Int30  (c_int30Min .. c_int30Max) with { variant "30 bit"};
    type integer  Int31  (c_int31Min .. c_int31Max) with { variant "31 bit"};
    type integer  Int32  (c_int32Min .. c_int32Max) with { variant "32 bit"};

  } // end group signedIntegerDefintions

  group zeroedIntegers {

    const UInt1   c_uInt1Zero := 0;
    const UInt2   c_uInt2Zero := 0;
    const UInt3   c_uInt3Zero := 0;
    const UInt4   c_uInt4Zero := 0;
    const UInt5   c_uInt5Zero := 0;
    const UInt6   c_uInt6Zero := 0;
    const UInt7   c_uInt7Zero := 0;
    const UInt8   c_uInt8Zero := 0;
    const UInt10  c_uInt10Zero := 0;
    const UInt12  c_uInt12Zero := 0;
    const UInt14  c_uInt14Zero := 0;
    const UInt16  c_uInt16Zero := 0;
    const UInt24  c_uInt24Zero := 0;
    const UInt32  c_uInt32Zero := 0;
    const UInt48  c_uInt48Zero := 0;
    
  }//end group zeroedInt

  /** 
   * @remark Number in subtype name always indicates encoding length 
   *       in _bits_
   */
  group booleanDefintions {

    type boolean  Bool1 with { variant "1 bit" };
    type boolean  Bool2 with { variant "2 bit" };
    type boolean  Bool3 with { variant "3 bit" };
    type boolean  Bool4 with { variant "4 bit" };
    type boolean  Bool5 with { variant "5 bit" };
    type boolean  Bool6 with { variant "6 bit" };
    type boolean  Bool7 with { variant "7 bit" };
    type boolean  Bool8 with { variant "8 bit" };
  
  } // end group booleanDefintions

} // end module LibCommon_BasicTypesAndValues
+168 −0

File added.

Preview size limit exceeded, changes collapsed.

+1359 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading