Commit 8c809dc8 authored by Yann Garcia's avatar Yann Garcia
Browse files

Merge branch 'STF525' of https://forge.etsi.org/gitlab/ITS/ITS into STF525

parents b5b43e17 e71dfbb9
Loading
Loading
Loading
Loading

STF525.tpd

100755 → 100644
+0 −0

File mode changed from 100755 to 100644.

STF525_Win.tpd

100755 → 100644
+0 −0

File mode changed from 100755 to 100644.

+5 −5
Original line number Diff line number Diff line
@@ -395,10 +395,10 @@ int security_ecc::generate_and_derive_ephemeral_key(const encryption_algotithm p
  int result = ::ECDH_compute_key(
                                  (unsigned char*)static_cast<const unsigned char*>(_secret_key),
                                  _secret_key.lengthof(),
                                  ec_point, // From sender's public key
                                  _ec_key,  // From recipient's private key
                                  ec_point, // From recipient's public key
                                  _ec_key,  // From ephemeral's private key
                                  nullptr);
  if (result == -1) {
  if (result != _secret_key.lengthof()) {
    loggers::get_instance().warning("security_ecc::generate_and_derive_ephemeral_key (1): Failed to generate shared secret key");
    ::EC_POINT_free(ec_point);
    return -1;
@@ -438,7 +438,7 @@ int security_ecc::generate_and_derive_ephemeral_key(const encryption_algotithm p
  hmac_256.generate(static_cast<const unsigned char*>(_enc_sym_key), _enc_sym_key.lengthof(), static_cast<const unsigned char*>(k2), k2.lengthof(), _tag);
  loggers::get_instance().log_msg("security_ecc::generate_and_derive_ephemeral_key (1): _tag: ", _tag);
  
  // Generate random IV (nonce
  // Generate random IV (nonce)
  BIGNUM* r = ::BN_new();
  ::BN_pseudo_rand(r, nonce_length * 8, -1, 0);
  _nonce = int2oct(0, nonce_length);
@@ -517,7 +517,7 @@ int security_ecc::generate_and_derive_ephemeral_key(const encryption_algotithm p
                                  ec_point, // From recipient's private key
                                  _ec_key,  // From sender's public key
                                  nullptr);
  if (result == -1) {
  if (result != _secret_key.lengthof()) {
    loggers::get_instance().warning("security_ecc::generate_and_derive_ephemeral_key (2): Failed to compute shared secret key");
    ::EC_POINT_free(ec_point);
    return -1;
+8 −1
Original line number Diff line number Diff line
@@ -469,7 +469,14 @@ int security_services::sign_payload(const OCTETSTRING& p_unsecured_gn_payload, O
  // Set secured field according to the payload!
  header_info.psid() = converter::get_instance().string_to_int(p_params[params::its_aid]);
  header_info.expiryTime().set_to_omit();
  if (p_params[params::its_aid].compare("37") == 0) { // Only used by AtsRSUSimulator
    // Mandatory for DENM payload
    OPTIONAL<IEEE1609dot2BaseTypes::ThreeDLocation> location(IEEE1609dot2BaseTypes::ThreeDLocation(_latitude, _longitude, _elevation));
    header_info.generationLocation() = location;
    loggers::get_instance().log_msg("security_services::sign_payload: generationLocation: ", header_info.generationLocation());
  } else {
    header_info.generationLocation().set_to_omit();
  }
  header_info.p2pcdLearningRequest().set_to_omit();
  header_info.missingCrlIdentifier().set_to_omit();
  if (_params[params::encrypted_mode].compare("1") == 0) {
+7 −7
Original line number Diff line number Diff line
@@ -49,13 +49,13 @@ LogEventTypes:= Yes

[TESTPORT_PARAMETERS]
# Multiple HTTP component ports for ITS-S, EA and TC_SECPKI_AA_AUTH_RCV_*
#system.httpEcPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(server=ea.utopia.plugtests2019.innovation.keynectis.net)"
#system.httpAtVPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(server=ea.utopia.plugtests2019.innovation.keynectis.net)"
#system.httpAtPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(server=aa.utopia.plugtests2019.innovation.keynectis.net)"
system.httpEcPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(server=ea.utopia.plugtests2019.innovation.keynectis.net)"
system.httpAtVPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(server=ea.utopia.plugtests2019.innovation.keynectis.net)"
system.httpAtPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(server=aa.utopia.plugtests2019.innovation.keynectis.net)"

# Multiple HTTP component ports for TC_SECPKI_AA_AUTHVAL_*
system.httpAtVPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(debug=1,server_mode=1,server=192.168.1.252,local_port=8080)"
system.httpAtPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(server=aa.utopia.plugtests2019.innovation.keynectis.net)"
#system.httpAtVPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(debug=1,server_mode=1,server=192.168.1.252,local_port=8080)"
#system.httpAtPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(server=aa.utopia.plugtests2019.innovation.keynectis.net)"

[EXECUTE]
# The EnrolmentResponse message shall be sent by the EA to the ITS-S across the interface at reference point S3 in response to a received EnrolmentRequest message
@@ -82,7 +82,7 @@ system.httpAtPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/
#ItsPki_TestCases.TC_SECPKI_EA_AUTHVAL_RCV_01_BV

#
#ItsPki_TestCases.TC_SECPKI_AA_AUTH_RCV_01_BV
ItsPki_TestCases.TC_SECPKI_AA_AUTH_RCV_01_BV
#ItsPki_TestCases.TC_SECPKI_AA_AUTH_RCV_03_BI
#ItsPki_TestCases.TC_SECPKI_AA_AUTH_RCV_04_BI
#ItsPki_TestCases.TC_SECPKI_AA_AUTH_RCV_05_BI
@@ -96,7 +96,7 @@ system.httpAtPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/
#ItsPki_TestCases.TC_SECPKI_AA_AUTH_RCV_13_BI
#ItsPki_TestCases.TC_SECPKI_AA_AUTH_RCV_14_BI

ItsPki_TestCases.TC_SECPKI_AA_AUTHVAL_01_BV
#ItsPki_TestCases.TC_SECPKI_AA_AUTHVAL_01_BV

[MAIN_CONTROLLER]
# The options herein control the behavior of MC.
Loading