Commit ac25a27f authored by Yann Garcia's avatar Yann Garcia
Browse files

Add PIXIT for timer factors; Bug fixed in module.mk; Add PICS for implicit certificates

parent fceed992
Loading
Loading
Loading
Loading
+20 −20
Original line number Diff line number Diff line
@@ -939,7 +939,7 @@ module ItsSecurity_TestCases {
                // Local variables
                const integer c_cntTimeLimit := 10;
                const float c_certificateGenerationTime := 1.0;
                timer t_maxTransInterval := c_certificateGenerationTime * 1.3;//1.15;
                timer t_maxTransInterval := c_certificateGenerationTime * PX_INC_TIMER_CONTROL_FACTOR_INC;
                var integer v_cntTime := 0;
                var GeoNetworkingInd v_geoNwInd;
                var ItsCam v_component;
@@ -1248,7 +1248,7 @@ module ItsSecurity_TestCases {
                // Local variables
                const float c_certificateGenerationTime := 1.0;
                
                timer t_maxTransInterval := c_certificateGenerationTime * 0.9;
                timer t_maxTransInterval := c_certificateGenerationTime * PX_DEC_TIMER_CONTROL_FACTOR;
                var GeoNetworkingInd v_geoNwInd;
                var SignerIdentifier v_signerIdentifier;
                var ItsCam v_component;
@@ -1817,7 +1817,7 @@ module ItsSecurity_TestCases {
                // Local variables
                const float c_certificateGenerationTime := 1.0;
                
                timer t_maxTransInterval := c_certificateGenerationTime * 0.9;
                timer t_maxTransInterval := c_certificateGenerationTime * PX_DEC_TIMER_CONTROL_FACTOR;
                var GeoNetworkingInd v_geoNwInd;
                var ItsCam v_component;
                var HashedId8 v_hashedId8;
@@ -2019,7 +2019,7 @@ module ItsSecurity_TestCases {
                // Local variables
                const float c_certificateGenerationTime := 1.0;
                
                timer t_maxTransInterval := c_certificateGenerationTime * 0.9;
                timer t_maxTransInterval := c_certificateGenerationTime * PX_DEC_TIMER_CONTROL_FACTOR;
                var GeoNetworkingInd v_geoNwInd;
                var ItsCam v_component;
                var Certificate v_aa_certificate;
@@ -2213,7 +2213,7 @@ module ItsSecurity_TestCases {
                // Local variables
                const float c_certificateGenerationTime := 1.0;
                
                timer t_maxTransInterval := c_certificateGenerationTime * 0.9;
                timer t_maxTransInterval := c_certificateGenerationTime * PX_DEC_TIMER_CONTROL_FACTOR;
                var GeoNetworkingInd v_geoNwInd;
                var ItsCam v_component;
                var Certificate v_aa_certificate;
@@ -2375,7 +2375,7 @@ module ItsSecurity_TestCases {
                // Local variables
                const float c_certificateGenerationTime := 0.8;
                
                timer t_maxTransInterval := c_certificateGenerationTime * 0.9;
                timer t_maxTransInterval := c_certificateGenerationTime * PX_DEC_TIMER_CONTROL_FACTOR;
                var GeoNetworkingInd v_geoNwInd;
                var ItsCam v_component;
                var Certificate v_aa_certificate;
@@ -4290,7 +4290,7 @@ module ItsSecurity_TestCases {
            /**
             * @desc Check that IUT supports usage of implicit certificate for signing message.
             * <pre>
             * Pics Selection: PICS_GN_SECURITY and (PICS_SEC_NIST_P256 or PICS_SEC_BRAINPOOL_P256R1)
             * Pics Selection: PICS_GN_SECURITY and PICS_SEC_IMPLICIT_CERTIFICATES and (PICS_SEC_NIST_P256 or PICS_SEC_BRAINPOOL_P256R1)
             * Config Id: CF01
             * Initial conditions:
             *  with {
@@ -4331,8 +4331,8 @@ module ItsSecurity_TestCases {
                var HashedId8               v_certificate_digest;
                
                // Test control
                if (not(PICS_GN_SECURITY and (PICS_SEC_NIST_P256 or PICS_SEC_BRAINPOOL_P256R1))) {
                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and (PICS_SEC_NIST_P256 or PICS_SEC_BRAINPOOL_P256R1)' required for executing the TC ***");
                if (not(PICS_GN_SECURITY and PICS_SEC_IMPLICIT_CERTIFICATES and (PICS_SEC_NIST_P256 or PICS_SEC_BRAINPOOL_P256R1))) {
                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and PICS_SEC_IMPLICIT_CERTIFICATES and (PICS_SEC_NIST_P256 or PICS_SEC_BRAINPOOL_P256R1)' required for executing the TC ***");
                    stop;
                }
                
@@ -4414,7 +4414,7 @@ module ItsSecurity_TestCases {
            /**
             * @desc    Check that IUT accepts a valid secured CAM message signed with a known implicit certificate
             * <pre>
             * Pics Selection: PICS_GN_SECURITY and (PICS_SEC_NIST_P256 or PICS_SEC_BRAINPOOL_P256R1)
             * Pics Selection: PICS_GN_SECURITY and PICS_SEC_IMPLICIT_CERTIFICATES and (PICS_SEC_NIST_P256 or PICS_SEC_BRAINPOOL_P256R1)
             * Config Id: CF01
             * Initial conditions:
             *  with {
@@ -4458,8 +4458,8 @@ module ItsSecurity_TestCases {
                var GnRawPayload v_sentRawPayload;
                
                // Test adapter configuration
                if (not(PICS_GN_SECURITY and (PICS_SEC_NIST_P256 or PICS_SEC_BRAINPOOL_P256R1))) {
                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and (PICS_SEC_NIST_P256 or PICS_SEC_BRAINPOOL_P256R1)' required for executing the TC ***");
                if (not(PICS_GN_SECURITY and PICS_SEC_IMPLICIT_CERTIFICATES and (PICS_SEC_NIST_P256 or PICS_SEC_BRAINPOOL_P256R1))) {
                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and PICS_SEC_IMPLICIT_CERTIFICATES and (PICS_SEC_NIST_P256 or PICS_SEC_BRAINPOOL_P256R1)' required for executing the TC ***");
                    stop;
                }
                
@@ -4504,7 +4504,7 @@ module ItsSecurity_TestCases {
            /**
             * @desc    Check that IUT accepts a valid secured CAM message signed with an unknown implicit certificate
             * <pre>
             * Pics Selection: PICS_GN_SECURITY and (PICS_SEC_NIST_P256 or PICS_SEC_BRAINPOOL_P256R1)
             * Pics Selection: PICS_GN_SECURITY and PICS_SEC_IMPLICIT_CERTIFICATES and (PICS_SEC_NIST_P256 or PICS_SEC_BRAINPOOL_P256R1)
             * Config Id: CF01
             * Initial conditions:
             *  with {
@@ -4549,8 +4549,8 @@ module ItsSecurity_TestCases {
                var GnRawPayload v_sentRawPayload;
                
                // Test adapter configuration
                if (not(PICS_GN_SECURITY and (PICS_SEC_NIST_P256 or PICS_SEC_BRAINPOOL_P256R1))) {
                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and (PICS_SEC_NIST_P256 or PICS_SEC_BRAINPOOL_P256R1)' required for executing the TC ***");
                if (not(PICS_GN_SECURITY and PICS_SEC_IMPLICIT_CERTIFICATES and (PICS_SEC_NIST_P256 or PICS_SEC_BRAINPOOL_P256R1))) {
                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and PICS_SEC_IMPLICIT_CERTIFICATES and (PICS_SEC_NIST_P256 or PICS_SEC_BRAINPOOL_P256R1)' required for executing the TC ***");
                    stop;
                }
                
@@ -4600,7 +4600,7 @@ module ItsSecurity_TestCases {
            /**
             * @desc    Check that IUT discards a valid secured CAM message signed with implicit certificate containing signature
             * <pre>
             * Pics Selection: PICS_GN_SECURITY and (PICS_SEC_NIST_P256 or PICS_SEC_BRAINPOOL_P256R1)
             * Pics Selection: PICS_GN_SECURITY and PICS_SEC_IMPLICIT_CERTIFICATES and (PICS_SEC_NIST_P256 or PICS_SEC_BRAINPOOL_P256R1)
             * Config Id: CF01
             * Initial conditions:
             *  with {
@@ -4643,8 +4643,8 @@ module ItsSecurity_TestCases {
                var GnRawPayload v_sentRawPayload;
                
                // Test adapter configuration
                if (not(PICS_GN_SECURITY and (PICS_SEC_NIST_P256 or PICS_SEC_BRAINPOOL_P256R1))) {
                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and (PICS_SEC_NIST_P256 or PICS_SEC_BRAINPOOL_P256R1)' required for executing the TC ***");
                if (not(PICS_GN_SECURITY and PICS_SEC_IMPLICIT_CERTIFICATES and (PICS_SEC_NIST_P256 or PICS_SEC_BRAINPOOL_P256R1))) {
                    log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY and PICS_SEC_IMPLICIT_CERTIFICATES and (PICS_SEC_NIST_P256 or PICS_SEC_BRAINPOOL_P256R1)' required for executing the TC ***");
                    stop;
                }
                
@@ -8286,7 +8286,7 @@ module ItsSecurity_TestCases {
            
            // Test Body
            v_securedGnPdu := f_sendSecuredCam(
                                               cc_taCert_A_B,
                                               cc_taCert_B1,
                                               valueof(m_headerInfo_cam(-, (f_getCurrentTime() * 1000)/*us*/)),
                                               valueof(m_signerIdentifier_certificate(v_atCertificate)), // Add certificate
                                               f_getTsStationId()
@@ -9439,7 +9439,7 @@ module ItsSecurity_TestCases {
            
            // Test Body
            v_securedGnPdu := f_sendSecuredDenm(
                                               cc_taCert_A_B,
                                               cc_taCert_B1,
                                                valueof(m_headerInfo_denm(
                                                                          -,
                                                                          (f_getCurrentTime() * 1000)/*us*/,
+5 −0
Original line number Diff line number Diff line
@@ -19,6 +19,11 @@ module LibItsSecurity_Pics {
  // LibItsSecurity
  import from LibItsSecurity_TypesAndValues all;

  /**
   * Is the IUT support implicit certificates
   */
  modulepar boolean PICS_SEC_IMPLICIT_CERTIFICATES := false;

  /**
   * Does the IUT support SHA-256 digest
   */
+11 −1
Original line number Diff line number Diff line
@@ -105,4 +105,14 @@ module LibItsSecurity_Pixits {
   */
  modulepar boolean PX_USE_BFK_MODE := false;

  /**
   * @desc Multiply timer value by this control factor to increase it 
   */
  modulepar float PX_INC_TIMER_CONTROL_FACTOR_INC := 1.10;

  /**
   * @desc Multiply timer value by this control factor to decrease it 
   */
  modulepar float PX_DEC_TIMER_CONTROL_FACTOR := 0.9;

} // End of module LibItsSecurity_Pixits
+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ module LibItsSecurity_TypesAndValues {
        const charstring cc_taCert_A2   := "CERT_TS_A_A2_AT"; /** Default certificate, without region validity restriction, to be used when secured messages are sent from TA to IUT */
        const charstring cc_taCert_A3   := "CERT_TS_A_A3_AT"; /** Default certificate, without region validity restriction, to be used when secured messages are sent from TA to IUT */
        const charstring cc_taCert_B    := "CERT_TS_B_AT";   /** Default certificate, with circular region, to be used when secured messages are sent from TA to IUT */
        const charstring cc_taCert_B1   := "CERT_TS_B_1_AT";
        const charstring cc_taCert_B1   := "CERT_TS_B1_AT";
        const charstring cc_taCert_B_AA := "CERT_TS_B_1_AA";
        const charstring cc_taCert_A_B  := "CERT_TS_A_B_AT";
        const charstring cc_taCert_A_B3 := "CERT_TS_A_B3_AT";
+3 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ modules := lib \
            /titan-test-system-framework/ccsrc/loggers \
            /titan-test-system-framework/ccsrc/Protocols/Pcap \
            /titan-test-system-framework/ccsrc/Protocols/ETH \
            /titan-test-system-framework/ccsrc/Protocols/Tcp \
            /titan-test-system-framework/ccsrc/Protocols/Xml \
            /titan-test-system-framework/ccsrc/Helpers \
            /titan-test-system-framework/ccsrc/security \
@@ -50,6 +51,8 @@ modules := lib \
            /ccsrc/Protocols/GeoNetworking \
            /ccsrc/Protocols/BTP \
            /ccsrc/Protocols/BTP_layers \
            /ccsrc/Protocols/LTE \
            /ccsrc/Protocols/Qualcomm \
            /ccsrc/Protocols/UpperTester \
            /ccsrc/Protocols/Security \
            ../modules/titan.TestPorts.Common_Components.Abstract_Socket \