Commit 68adc9ba authored by YannGarcia's avatar YannGarcia
Browse files

Minor bug fixed

parent 5358032d
Loading
Loading
Loading
Loading
+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;
+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.
+0 −0

File mode changed from 100644 to 100755.

+0 −0

File mode changed from 100644 to 100755.

+0 −0

File mode changed from 100644 to 100755.

Loading