Commit 00841bd7 authored by garciay's avatar garciay
Browse files

AtsPki validation with Gemalto

parent f68d322f
...@@ -620,7 +620,7 @@ namespace LibItsSecurity__Functions ...@@ -620,7 +620,7 @@ namespace LibItsSecurity__Functions
p__publicEphemeralKeyCompressed = ec.public_key_compressed(); p__publicEphemeralKeyCompressed = ec.public_key_compressed();
loggers::get_instance().log_msg("fx__encryptWithEciesNistp256WithSha256: Ephemeral public compressed key: ", p__publicEphemeralKeyCompressed); loggers::get_instance().log_msg("fx__encryptWithEciesNistp256WithSha256: Ephemeral public compressed key: ", p__publicEphemeralKeyCompressed);
p__ephemeralCompressedMode = (ec.public_key_compressed_mode() == ecc_compressed_mode::compressed_y_0) ? 0 : 1; p__ephemeralCompressedMode = (ec.public_key_compressed_mode() == ecc_compressed_mode::compressed_y_0) ? 0 : 1;
loggers::get_instance().log("fx__encryptWithEciesNistp256WithSha256: Ephemeral public compressed mode: %d: ", p__ephemeralCompressedMode); loggers::get_instance().log("fx__encryptWithEciesNistp256WithSha256: Ephemeral public compressed mode: %d", p__ephemeralCompressedMode);
// 3. Retrieve AES 128 parameters // 3. Retrieve AES 128 parameters
p__nonce = ec.nonce(); p__nonce = ec.nonce();
loggers::get_instance().log_msg("fx__encryptWithEciesNistp256WithSha256: p__nonce: ", p__nonce); loggers::get_instance().log_msg("fx__encryptWithEciesNistp256WithSha256: p__nonce: ", p__nonce);
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include "IVIM_ports/AdapterControlPort_IVIM.partC" #include "IVIM_ports/AdapterControlPort_IVIM.partC"
#include "MapemSpatem_ports/AdapterControlPort_MapemSpatem.partC" #include "MapemSpatem_ports/AdapterControlPort_MapemSpatem.partC"
#include "SremSsem_ports/AdapterControlPort_SremSsem.partC" #include "SremSsem_ports/AdapterControlPort_SremSsem.partC"
#include "Pki_ports/AdapterControlPort_Pki.partC" //#include "Pki_ports/AdapterControlPort_Pki.partC"
//#include "V2G_ports/AdapterControlPort_V2G.partC" //#include "V2G_ports/AdapterControlPort_V2G.partC"
#else //_NO_SOFTLINKS_ #else //_NO_SOFTLINKS_
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include "AdapterControlPort_MapemSpatem.partC" #include "AdapterControlPort_MapemSpatem.partC"
#include "AdapterControlPort_SremSsem.partC" #include "AdapterControlPort_SremSsem.partC"
#include "AdapterControlPort_GN.partC" #include "AdapterControlPort_GN.partC"
#include "AdapterControlPort_Pki.partC" //#include "AdapterControlPort_Pki.partC"
/* /*
#include "AdapterControlPort_IVIM.partC" #include "AdapterControlPort_IVIM.partC"
#include "AdapterControlPort_MapemSpatem.partC" #include "AdapterControlPort_MapemSpatem.partC"
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include "IVIM_ports/AdapterControlPort_IVIM.partH" #include "IVIM_ports/AdapterControlPort_IVIM.partH"
#include "MapemSpatem_ports/AdapterControlPort_MapemSpatem.partH" #include "MapemSpatem_ports/AdapterControlPort_MapemSpatem.partH"
#include "SremSsem_ports/AdapterControlPort_SremSsem.partH" #include "SremSsem_ports/AdapterControlPort_SremSsem.partH"
#include "Pki_ports/AdapterControlPort_Pki.partH" //#include "Pki_ports/AdapterControlPort_Pki.partH"
//#include "V2G_ports/AdapterControlPort_V2G.partH" //#include "V2G_ports/AdapterControlPort_V2G.partH"
#else //_NO_SOFTLINKS_ #else //_NO_SOFTLINKS_
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "AdapterControlPort_MapemSpatem.partH" #include "AdapterControlPort_MapemSpatem.partH"
#include "AdapterControlPort_SremSsem.partH" #include "AdapterControlPort_SremSsem.partH"
#include "AdapterControlPort_GN.partH" #include "AdapterControlPort_GN.partH"
#include "AdapterControlPort_Pki.partH" //#include "AdapterControlPort_Pki.partH"
/* /*
#include "AdapterControlPort_IVIM.partH" #include "AdapterControlPort_IVIM.partH"
#include "AdapterControlPort_MapemSpatem.partH" #include "AdapterControlPort_MapemSpatem.partH"
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include "IVIM_ports/UpperTesterPort_IVIM.partC" #include "IVIM_ports/UpperTesterPort_IVIM.partC"
#include "MapemSpatem_ports/UpperTesterPort_MapemSpatem.partC" #include "MapemSpatem_ports/UpperTesterPort_MapemSpatem.partC"
#include "SremSsem_ports/UpperTesterPort_SremSsem.partC" #include "SremSsem_ports/UpperTesterPort_SremSsem.partC"
#include "Pki_ports/UpperTesterPort_Pki.partC" //#include "Pki_ports/UpperTesterPort_Pki.partC"
//#include "V2G_ports/UpperTesterPort_V2G.partC" //#include "V2G_ports/UpperTesterPort_V2G.partC"
#else //_NO_SOFTLINKS_ #else //_NO_SOFTLINKS_
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include "UpperTesterPort_MapemSpatem.partC" #include "UpperTesterPort_MapemSpatem.partC"
#include "UpperTesterPort_SremSsem.partC" #include "UpperTesterPort_SremSsem.partC"
#include "UpperTesterPort_GN.partC" #include "UpperTesterPort_GN.partC"
#include "UpperTesterPort_Pki.partC" //#include "UpperTesterPort_Pki.partC"
/* /*
#include "UpperTesterPort_IVIM.partC" #include "UpperTesterPort_IVIM.partC"
//#include "UpperTesterPort_MapSpat.partC" //#include "UpperTesterPort_MapSpat.partC"
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include "IVIM_ports/UpperTesterPort_IVIM.partH" #include "IVIM_ports/UpperTesterPort_IVIM.partH"
#include "MapemSpatem_ports/UpperTesterPort_MapemSpatem.partH" #include "MapemSpatem_ports/UpperTesterPort_MapemSpatem.partH"
#include "SremSsem_ports/UpperTesterPort_SremSsem.partH" #include "SremSsem_ports/UpperTesterPort_SremSsem.partH"
#include "Pki_ports/UpperTesterPort_Pki.partH" //#include "Pki_ports/UpperTesterPort_Pki.partH"
//#include "V2G_ports/UpperTesterPort_V2G.partH" //#include "V2G_ports/UpperTesterPort_V2G.partH"
#else //_NO_SOFTLINKS_ #else //_NO_SOFTLINKS_
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include "UpperTesterPort_MapemSpatem.partH" #include "UpperTesterPort_MapemSpatem.partH"
#include "UpperTesterPort_SremSsem.partH" #include "UpperTesterPort_SremSsem.partH"
#include "UpperTesterPort_GN.partH" #include "UpperTesterPort_GN.partH"
#include "UpperTesterPort_Pki.partH" //#include "UpperTesterPort_Pki.partH"
/* /*
#include "UpperTesterPort_IVIM.partH" #include "UpperTesterPort_IVIM.partH"
//#include "UpperTesterPort_MapSpat.partH" //#include "UpperTesterPort_MapSpat.partH"
......
...@@ -398,6 +398,12 @@ int http_codec::encode_body(const LibItsHttp__MessageBodyTypes::HttpMessageBody& ...@@ -398,6 +398,12 @@ int http_codec::encode_body(const LibItsHttp__MessageBodyTypes::HttpMessageBody&
if (it != _codecs.cend()) { if (it != _codecs.cend()) {
loggers::get_instance().log("http_codec::encode_body: Call '%s'", it->first.c_str()); loggers::get_instance().log("http_codec::encode_body: Call '%s'", it->first.c_str());
_codecs["http_its"]->encode((Record_Type&)binary_body.ieee1609dot2__data(), p_encoding_buffer); // TODO Use params _codecs["http_its"]->encode((Record_Type&)binary_body.ieee1609dot2__data(), p_encoding_buffer); // TODO Use params
// TODO Encode in hex string
CHARSTRING buf = oct2str(p_encoding_buffer);
p_encoding_buffer = OCTETSTRING(buf.lengthof(), (const unsigned char*)(static_cast<const char*>(buf)));
loggers::get_instance().log_msg("http_codec::encode_body: Convert binary to string: ", p_encoding_buffer);
processed = true; processed = true;
} }
} // TODO Add new HTTP message codec here } // TODO Add new HTTP message codec here
......
...@@ -93,6 +93,10 @@ void pki_layer::sendMsg(const EtsiTs102941TypesEnrolment::InnerEcResponse& p_inn ...@@ -93,6 +93,10 @@ void pki_layer::sendMsg(const EtsiTs102941TypesEnrolment::InnerEcResponse& p_inn
if (sign_and_encrypt_payload(etsi_ts_103097_data_enc, secured_inner_ec_response, p_param) == 0) { if (sign_and_encrypt_payload(etsi_ts_103097_data_enc, secured_inner_ec_response, p_param) == 0) {
send_data(secured_inner_ec_response, _params); send_data(secured_inner_ec_response, _params);
} }
loggers::get_instance().log_msg("<<< pki_layer::sendMsg: etsi_ts_102941_data:", secured_inner_ec_response);
send_data(secured_inner_ec_response, _params);
} }
void pki_layer::sendMsg(const EtsiTs102941TypesAuthorizationValidation::AuthorizationValidationRequest& p_authorization_validation_request, params& p_param) { void pki_layer::sendMsg(const EtsiTs102941TypesAuthorizationValidation::AuthorizationValidationRequest& p_authorization_validation_request, params& p_param) {
...@@ -109,18 +113,24 @@ void pki_layer::sendMsg(const EtsiTs102941TypesAuthorizationValidation::Authoriz ...@@ -109,18 +113,24 @@ void pki_layer::sendMsg(const EtsiTs102941TypesAuthorizationValidation::Authoriz
etsi_ts_102941_data.content().authorizationValidationRequest() = p_authorization_validation_request; etsi_ts_102941_data.content().authorizationValidationRequest() = p_authorization_validation_request;
loggers::get_instance().log_msg("pki_layer::sendMsg: AuthorizationValidationRequest: ", etsi_ts_102941_data); loggers::get_instance().log_msg("pki_layer::sendMsg: AuthorizationValidationRequest: ", etsi_ts_102941_data);
OCTETSTRING authorization_validation_request; // Encode it
_etsi_ts102941_types_authorization_validation_request.encode(p_authorization_validation_request, authorization_validation_request); OCTETSTRING etsi_ts_103097_data_enc;
_codec_etsi_ts102941_data.encode(etsi_ts_102941_data, etsi_ts_103097_data_enc);
if (!etsi_ts_103097_data_enc.is_bound()) {
loggers::get_instance().warning("pki_layer::sendMsg: Failed to encode AuthorizationValidationRequest");
}
loggers::get_instance().log_msg("pki_layer::sendMsg: etsi_ts_103097_data_enc: ", etsi_ts_103097_data_enc);
// Secured the EtsiTs102941Data layer // Secured the EtsiTs102941Data layer
OCTETSTRING etsi_ts_102941_data; OCTETSTRING secured_authorization_validation_request;
if (sign_and_encrypt_payload(authorization_validation_request, etsi_ts_102941_data, _params) == -1) { if (sign_and_encrypt_payload(etsi_ts_103097_data_enc, secured_authorization_validation_request, _params) == -1) {
loggers::get_instance().warning("pki_layer::sendMsg: Failed to secure Pki message"); loggers::get_instance().warning("pki_layer::sendMsg: Failed to secure Pki message");
return; return;
} }
loggers::get_instance().log_msg("<<< pki_layer::generate_authorization_validation_request: ", etsi_ts_102941_data); loggers::get_instance().log_msg("<<< pki_layer::sendMsg: generate_authorization_validation_request: ", secured_authorization_validation_request);
send_data(etsi_ts_102941_data, _params); send_data(secured_authorization_validation_request, _params);
} }
void pki_layer::send_data(OCTETSTRING& data, params& params) { void pki_layer::send_data(OCTETSTRING& data, params& params) {
......
...@@ -7,7 +7,7 @@ LibItsCommon_Pixits.PX_IUT_STATION_ID := 2533729309 ...@@ -7,7 +7,7 @@ LibItsCommon_Pixits.PX_IUT_STATION_ID := 2533729309
LibItsGeoNetworking_Pixits.PX_GN_UPPER_LAYER := e_btpB LibItsGeoNetworking_Pixits.PX_GN_UPPER_LAYER := e_btpB
LibItsCam_Pics.PICS_DANGEROUSGOODS := false LibItsCam_Pics.PICS_DANGEROUSGOODS := true
LibItsCam_Pics.PICS_IS_IUT_SECURED := true LibItsCam_Pics.PICS_IS_IUT_SECURED := true
[LOGGING] [LOGGING]
...@@ -90,8 +90,10 @@ LogEventTypes:= Yes ...@@ -90,8 +90,10 @@ LogEventTypes:= Yes
# time_offset : Time offset, used to skip packets with time offset < time_offset # time_offset : Time offset, used to skip packets with time offset < time_offset
# save_mode : Set to 1 to save sent packet, 0 otherwise # save_mode : Set to 1 to save sent packet, 0 otherwise
#system.camPort.params := "CAM(next_header=btpB,header_type=tsb,header_sub_type=sh)/BTP/GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=1,secured_mode=1,sec_db_path=/home/vagrant/tmp/asn1c_cert)/ETH(mac_src=080027500f9b)/PCAP(mac_src=080027500f9b,nic=eth2,filter=and ether proto 0x8947)" #system.camPort.params := "CAM(next_header=btpB,header_type=tsb,header_sub_type=sh)/BTP/GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=1,secured_mode=1,sec_db_path=/home/vagrant/tmp/asn1c_cert)/ETH(mac_src=e2b7b30429eb)/PCAP(mac_src=e2b7b30429eb,nic=eth2,filter=and ether proto 0x8947)"
system.camPort.params := "CAM(next_header=btpB,header_type=tsb,header_sub_type=sh)/BTP/GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=1)/ETH(mac_src=080027500f9b)/PCAP(mac_src=080027500f9b,nic=tap0,filter=and ether proto 0x8947)" # Nordsys
#system.camPort.params := "CAM(next_header=btpB,header_type=tsb,header_sub_type=sh)/BTP/GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=1)/ETH(mac_src=e2b7b30429eb)/PCAP(mac_src=e2b7b30429eb,nic=tap0,filter=and ether proto 0x8947)" # Nordsys non secured
system.camPort.params := "CAM(next_header=btpB,header_type=tsb,header_sub_type=sh)/BTP/GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=1,secured_mode=1,sec_db_path=/home/vagrant/tmp/asn1c_cert)/ETH(mac_src=e2b7b30429eb)/PCAP(mac_src=e2b7b30429eb,nic=tap0,filter=and ether proto 0x8947)" # Nordsys secured
# CAM UpperTester port based on UDP # CAM UpperTester port based on UDP
#system.utPort.params := "UT_CAM/UDP(dst_ip=192.168.2.3,dst_port=8000)" #system.utPort.params := "UT_CAM/UDP(dst_ip=192.168.2.3,dst_port=8000)"
......
...@@ -87,7 +87,7 @@ LogEventTypes:= Yes ...@@ -87,7 +87,7 @@ LogEventTypes:= Yes
# time_offset : Time offset, used to skip packets with time offset < time_offset # time_offset : Time offset, used to skip packets with time offset < time_offset
# save_mode : Set to 1 to save sent packet, 0 otherwise # save_mode : Set to 1 to save sent packet, 0 otherwise
system.denmPort.params := "DENM(next_header=btpB,header_type=tsb)/BTP(dst_port=2002)/GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=1)/ETH(mac_src=080027500f9b)/PCAP(mac_src=080027500f9b,nic=tap0,filter=and ether proto 0x8947)" system.denmPort.params := "DENM(next_header=btpB,header_type=tsb)/BTP(dst_port=2002)/GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=1)/ETH(mac_src=e2b7b30429eb)/PCAP(mac_src=e2b7b30429eb,nic=tap0,filter=and ether proto 0x8947)"
# DENM UpperTester port based on UDP (ETSI Wlan) # DENM UpperTester port based on UDP (ETSI Wlan)
system.utPort.params := "UT_DENM/UDP(dst_ip=172.23.0.1,dst_port=8000)" system.utPort.params := "UT_DENM/UDP(dst_ip=172.23.0.1,dst_port=8000)"
......
...@@ -16,8 +16,10 @@ LibItsGeoNetworking_Pics.PICS_GN_LOCAL_GN_ADDR := { ...@@ -16,8 +16,10 @@ LibItsGeoNetworking_Pics.PICS_GN_LOCAL_GN_ADDR := {
LibItsGeoNetworking_Pixits.PX_GN_UPPER_LAYER := e_btpB LibItsGeoNetworking_Pixits.PX_GN_UPPER_LAYER := e_btpB
LibItsGeoNetworking_Pixits.PX_NEIGHBOUR_DISCOVERY_DELAY := 2.0 LibItsGeoNetworking_Pixits.PX_NEIGHBOUR_DISCOVERY_DELAY := 2.0
LibItsHttp_Pics.PICS_HEADER_HOST := "127.0.0.1" #"ptsv2.com" #LibItsHttp_Pics.PICS_HEADER_HOST := "127.0.0.1" #"ptsv2.com"
LibItsHttp_Pics.PICS_HEADER_HOST := "etsi.ea.msi-dev.acloud.gemalto.com"
LibItsHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/x-its-request" LibItsHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/x-its-request"
LibItsPki_Pics.PICS_HTTP_GET_URI := "/"
# Enable Security support # Enable Security support
LibItsGeoNetworking_Pics.PICS_GN_SECURITY := true LibItsGeoNetworking_Pics.PICS_GN_SECURITY := true
...@@ -27,7 +29,7 @@ LibItsSecurity_Pixits.PX_CERTIFICATE_POOL_PATH := "/home/vagrant/tmp" ...@@ -27,7 +29,7 @@ LibItsSecurity_Pixits.PX_CERTIFICATE_POOL_PATH := "/home/vagrant/tmp"
LibItsSecurity_Pixits.PX_IUT_SEC_CONFIG_NAME := "asn1c_cert" LibItsSecurity_Pixits.PX_IUT_SEC_CONFIG_NAME := "asn1c_cert"
# Seed # Seed
LibItsSecurity_Pics.PICS_SEC_FIXED_KEYS := true LibItsSecurity_Pics.PICS_SEC_FIXED_KEYS := false
[LOGGING] [LOGGING]
# In this section you can specify the name of the log file and the classes of events # In this section you can specify the name of the log file and the classes of events
...@@ -115,7 +117,8 @@ LogEventTypes:= Yes ...@@ -115,7 +117,8 @@ LogEventTypes:= Yes
# Single GeoNetworking component port # Single GeoNetworking component port
system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730)/ETH(mac_src=080027500f9b)/PCAP(mac_src=080027500f9b,nic=eth2)" system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730)/ETH(mac_src=080027500f9b)/PCAP(mac_src=080027500f9b,nic=eth2)"
#system.httpPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(debug=1,server=ptsv2.com,use_ssl=0)" #system.httpPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(debug=1,server=ptsv2.com,use_ssl=0)"
system.httpPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(server=127.0.0.1,port=8000,use_ssl=0)" #system.httpPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(server=127.0.0.1,port=8000,use_ssl=0)"
system.httpPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(server=etsi.ea.msi-dev.acloud.gemalto.com,port=80,use_ssl=0)"
system.pkiPort.params := "PKI/HTTP(device_mode=1,uri=/its/inner_ec_request,host=httpbin.org,content_type=application/x-its-request)/TCP(server=127.0.0.1,port=8000,use_ssl=0)" system.pkiPort.params := "PKI/HTTP(device_mode=1,uri=/its/inner_ec_request,host=httpbin.org,content_type=application/x-its-request)/TCP(server=127.0.0.1,port=8000,use_ssl=0)"
# GeoNetworking UpperTester port based on UDP # GeoNetworking UpperTester port based on UDP
...@@ -140,7 +143,6 @@ ItsPki_TestCases.TC_SEC_PKI_SND_EA_BV_02 ...@@ -140,7 +143,6 @@ ItsPki_TestCases.TC_SEC_PKI_SND_EA_BV_02
[MAIN_CONTROLLER] [MAIN_CONTROLLER]
# The options herein control the behavior of MC. # The options herein control the behavior of MC.
KillTimer := 10.0 KillTimer := 10.0
TCPPort := 0
LocalAddress := 127.0.0.1 LocalAddress := 127.0.0.1
TCPPort := 12000 TCPPort := 12000
NumHCs := 1 NumHCs := 1
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
# The GeoNetworking address of the IUT. # The GeoNetworking address of the IUT.
LibItsGeoNetworking_Pics.PICS_GN_LOCAL_GN_ADDR := { LibItsGeoNetworking_Pics.PICS_GN_LOCAL_GN_ADDR := {
typeOfAddress := e_initial, typeOfAddress := e_initial,
stationType := e_unknown, #e_roadSideUnit, stationType := e_passengerCar, #e_roadSideUnit,
stationCountryCode := 0, #33, stationCountryCode := 0, #33,
mid := '4C5E0C14D2EC'O mid := 'BA749705A41D'O
} }
LibItsGeoNetworking_Pixits.PX_GN_UPPER_LAYER := e_btpB LibItsGeoNetworking_Pixits.PX_GN_UPPER_LAYER := e_btpB
...@@ -15,10 +15,9 @@ LibItsGeoNetworking_Pixits.PX_GN_UPPER_LAYER := e_btpB ...@@ -15,10 +15,9 @@ LibItsGeoNetworking_Pixits.PX_GN_UPPER_LAYER := e_btpB
# Enable Security support # Enable Security support
LibItsGeoNetworking_Pics.PICS_GN_SECURITY := true LibItsGeoNetworking_Pics.PICS_GN_SECURITY := true
# Root path to access certificate stored in files, identified by certficate ID # Root path to access certificate stored in files, identified by certficate ID
LibItsSecurity_Pixits.PX_CERTIFICATE_POOL_PATH := "../data/v3/certificates"; LibItsSecurity_Pixits.PX_CERTIFICATE_POOL_PATH := "/home/vagrant/tmp"
# Configuration sub-directory to access certificate stored in files # Configuration sub-directory to access certificate stored in files
LibItsSecurity_Pixits.PX_IUT_SEC_CONFIG_NAME := ""; LibItsSecurity_Pixits.PX_IUT_SEC_CONFIG_NAME := "asn1c_cert"
[LOGGING] [LOGGING]
# In this section you can specify the name of the log file and the classes of events # In this section you can specify the name of the log file and the classes of events
...@@ -101,25 +100,24 @@ LogEventTypes:= Yes ...@@ -101,25 +100,24 @@ LogEventTypes:= Yes
# save_mode : 1 to save sent packet, 0 otherwise # save_mode : 1 to save sent packet, 0 otherwise
# Single GeoNetworking component port # Single GeoNetworking component port
#system.geoNetworkingPort.params := " system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=0,secured_mode=1,its_aid=141,secured_mode=1,certificate=CERT_TS_A_AT,sec_db_path=/home/vagrant/tmp/asn1c_cert)/ETH(mac_src=e2b7b30429eb)/PCAP(mac_src=e2b7b30429eb,nic=tap0,filter=and ether proto 0x8947)" # Nordsys
# GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730)/
# ETH(mac_src=803f5d092bdc,eth_type=8947)/
# PCAP(nic=34D76261-24AC-42B1-8340-9C5EAEE17E27,filter=and ether proto 0x8947)"
system.geoNetworkingPort.params := " #system.geoNetworkingPort.params := "
GN(ll_address=4C5E0C14D2EC,latitude=43551050,longitude=10298730,beaconing=0,expiry=1000)/ # GN(ll_address=4C5E0C14D2EC,latitude=43551050,longitude=10298730,beaconing=0,expiry=1000)/
ETH(mac_src=803f5d092bdc,mac_bc=FFFFFFFFFFFF,eth_type=8947)/ # ETH(mac_src=803f5d092bdc,mac_bc=FFFFFFFFFFFF,eth_type=8947)/
PCAP_FILE(file=../testdata/TC_SEC_ITSS_SND_CAM_01_BV.pcap,realtime=yes, delay=5000)" # PCAP_FILE(file=../testdata/TC_SEC_ITSS_SND_CAM_01_BV.pcap,realtime=yes, delay=5000)"
# GeoNetworking UpperTester port based on UDP # GeoNetworking UpperTester port based on UDP
system.utPort.params := "UT_GN(loopback=1)" #system.utPort.params := "UT_GN(loopback=1)"
# CAM UpperTester port based on UDP # CAM UpperTester port based on UDP
system.camUtPort.params := "UT_CAM(loopback=1)" #system.camUtPort.params := "UT_CAM(loopback=1)"
system.utPort.params := "UT_CAM/UDP(dst_ip=172.23.0.1,dst_port=8000)" # Nordsys
system.camUtPort.params := "UT_CAM/UDP(dst_ip=172.23.0.1,dst_port=8000)" # Nordsys
[EXECUTE] [EXECUTE]
#Check that ITS-S sends a Ieee1609Dot2Data containing protocol version set to 3 #Check that ITS-S sends a Ieee1609Dot2Data containing protocol version set to 3
ItsSecurity_TestCases.TC_SEC_ITSS_SND_MSG_01_BV #ItsSecurity_TestCases.TC_SEC_ITSS_SND_MSG_01_BV
# ------------------------- CAM --------------------------- # ------------------------- CAM ---------------------------
# Check that IUT sends the secured CAM using SignedData container. # Check that IUT sends the secured CAM using SignedData container.
...@@ -138,7 +136,7 @@ ItsSecurity_TestCases.TC_SEC_ITSS_SND_MSG_01_BV ...@@ -138,7 +136,7 @@ ItsSecurity_TestCases.TC_SEC_ITSS_SND_MSG_01_BV
# Check that IUT calculate the digest of certificate using proper hash algorithm; # Check that IUT calculate the digest of certificate using proper hash algorithm;
# Check that IUT canonicalize certificates before hash calculation. # Check that IUT canonicalize certificates before hash calculation.
#ItsSecurity_TestCases.TC_SEC_ITSS_SND_CAM_05_BV ItsSecurity_TestCases.TC_SEC_ITSS_SND_CAM_05_BV
# Check that IUT sends the secured CAM containing the signing certificate when over the time of one # Check that IUT sends the secured CAM containing the signing certificate when over the time of one
# second no other secured CAM contained the certificate was sent. # second no other secured CAM contained the certificate was sent.
......
...@@ -285,7 +285,7 @@ system.pkiPort.params := "PKI/HTTP(device_mode=1,uri=/its/inner_ec_request,host= ...@@ -285,7 +285,7 @@ system.pkiPort.params := "PKI/HTTP(device_mode=1,uri=/its/inner_ec_request,host=
#TestCodec_SecuredFuntions.tc_sha384_1 #TestCodec_SecuredFuntions.tc_sha384_1
#TestCodec_SecuredFuntions.tc_f_generate_key_pair_1 #TestCodec_SecuredFuntions.tc_f_generate_key_pair_1
#TestCodec_SecuredFuntions.tc_f_generate_key_pair_2 #TestCodec_SecuredFuntions.tc_f_generate_key_pair_2
#TestCodec_SecuredFuntions.tc_f_generate_key_pair_3 TestCodec_SecuredFuntions.tc_f_generate_key_pair_3
#TestCodec_SecuredFuntions.tc_f_signWithEcdsaNistp256WithSha256_1 #TestCodec_SecuredFuntions.tc_f_signWithEcdsaNistp256WithSha256_1
#TestCodec_SecuredFuntions.tc_f_verifyWithEcdsaNistp256WithSha256_1 #TestCodec_SecuredFuntions.tc_f_verifyWithEcdsaNistp256WithSha256_1
#TestCodec_SecuredFuntions.tc_f_verifyWithEcdsaNistp256WithSha256_2 #TestCodec_SecuredFuntions.tc_f_verifyWithEcdsaNistp256WithSha256_2
...@@ -308,6 +308,7 @@ system.pkiPort.params := "PKI/HTTP(device_mode=1,uri=/its/inner_ec_request,host= ...@@ -308,6 +308,7 @@ system.pkiPort.params := "PKI/HTTP(device_mode=1,uri=/its/inner_ec_request,host=
#TestCodec_Certificates.tc_at_certificate_sha256_3 #TestCodec_Certificates.tc_at_certificate_sha256_3
#TestCodec_Certificates.tc_certificate_asn1c_1 #TestCodec_Certificates.tc_certificate_asn1c_1
#TestCodec_Certificates.tc_certificate_asn1c_2 #TestCodec_Certificates.tc_certificate_asn1c_2
#TestCodec_Certificates.tc_certificate_gemalto_1
# Secured messages # Secured messages
#TestCodec_SecuredMessages.tc_ssp_cam_1 #TestCodec_SecuredMessages.tc_ssp_cam_1
#TestCodec_SecuredMessages.tc_ssp_cam_2 #TestCodec_SecuredMessages.tc_ssp_cam_2
...@@ -344,7 +345,7 @@ system.pkiPort.params := "PKI/HTTP(device_mode=1,uri=/its/inner_ec_request,host= ...@@ -344,7 +345,7 @@ system.pkiPort.params := "PKI/HTTP(device_mode=1,uri=/its/inner_ec_request,host=
#TestCodec_Pki.tc_inner_ec_request_3 #TestCodec_Pki.tc_inner_ec_request_3
#TestCodec_Pki.tc_inner_ec_response_1 #TestCodec_Pki.tc_inner_ec_response_1
#TestCodec_Pki.tc_inner_ec_response_2 #TestCodec_Pki.tc_inner_ec_response_2
TestCodec_Pki.tc_inner_ec_response_3 #TestCodec_Pki.tc_inner_ec_response_3
#TestCodec_Pki.tc_inner_ec_functions_1 #TestCodec_Pki.tc_inner_ec_functions_1
#TestCodec_Pki.tc_inner_ec_functions_2 #TestCodec_Pki.tc_inner_ec_functions_2
#TestCodec_Pki.tc_inner_ec_functions_3 #TestCodec_Pki.tc_inner_ec_functions_3
......
...@@ -462,7 +462,7 @@ module ItsDenm_TestCases { ...@@ -462,7 +462,7 @@ module ItsDenm_TestCases {
* the IUT is requested to update an event associated to ACTION_ID1 * the IUT is requested to update an event associated to ACTION_ID1
* } * }
* then { * then {
* the IUT does not send send any DENM for this event * the IUT does not send any DENM for this event
* } * }
* } * }
* </pre> * </pre>
......
...@@ -736,7 +736,7 @@ module ItsPki_TestCases { ...@@ -736,7 +736,7 @@ module ItsPki_TestCases {
} }
// Test component configuration // Test component configuration
f_cfHttpUp(); // Default value: CERT_TS_A_EA f_cfHttpUp(); // Default value: CERT_TS_A_EA, CERT_TS_A_EC, CERT_IUT_A_EA
// Test adapter configuration // Test adapter configuration
...@@ -748,7 +748,7 @@ module ItsPki_TestCases { ...@@ -748,7 +748,7 @@ module ItsPki_TestCases {
// Test Body // Test Body
httpPort.send( httpPort.send(
m_http_request( m_http_request(
m_http_request_get( m_http_request_post(
PICS_HTTP_GET_URI, PICS_HTTP_GET_URI,
v_headers, v_headers,
m_http_message_body_binary( m_http_message_body_binary(
...@@ -784,6 +784,15 @@ module ItsPki_TestCases { ...@@ -784,6 +784,15 @@ module ItsPki_TestCases {
} }
} }
} }
[] httpPort.receive(
mw_http_response(
mw_http_response_ko
)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Unexpected message received ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
}
[] tc_ac.timeout { [] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***"); log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout);
...@@ -851,7 +860,7 @@ module ItsPki_TestCases { ...@@ -851,7 +860,7 @@ module ItsPki_TestCases {
f_init_default_headers_list(v_headers); f_init_default_headers_list(v_headers);
httpPort.send( httpPort.send(
m_http_request( m_http_request(
m_http_request_get( m_http_request_post(
PICS_HTTP_GET_URI, PICS_HTTP_GET_URI,
v_headers, v_headers,
m_http_message_body_binary( m_http_message_body_binary(
...@@ -962,7 +971,7 @@ module ItsPki_TestCases { ...@@ -962,7 +971,7 @@ module ItsPki_TestCases {
f_init_default_headers_list(v_headers); f_init_default_headers_list(v_headers);
httpPort.send( httpPort.send(
m_http_request( m_http_request(
m_http_request_get( m_http_request_post(
PICS_HTTP_GET_URI, PICS_HTTP_GET_URI,
v_headers, v_headers,
m_http_message_body_binary( m_http_message_body_binary(
...@@ -1070,7 +1079,7 @@ module ItsPki_TestCases { ...@@ -1070,7 +1079,7 @@ module ItsPki_TestCases {
f_init_default_headers_list(v_headers); f_init_default_headers_list(v_headers);
httpPort.send( httpPort.send(
m_http_request( m_http_request(
m_http_request_get( m_http_request_post(
PICS_HTTP_GET_URI, PICS_HTTP_GET_URI,
v_headers, v_headers,
m_http_message_body_binary( m_http_message_body_binary(
...@@ -1177,7 +1186,7 @@ module ItsPki_TestCases { ...@@ -1177,7 +1186,7 @@ module ItsPki_TestCases {
f_init_default_headers_list(v_headers); f_init_default_headers_list(v_headers);
httpPort.send( httpPort.send(
m_http_request( m_http_request(
m_http_request_get( m_http_request_post(
PICS_HTTP_GET_URI, PICS_HTTP_GET_URI,
v_headers, v_headers,
m_http_message_body_binary( m_http_message_body_binary(
...@@ -1284,7 +1293,7 @@ module ItsPki_TestCases { ...@@ -1284,7 +1293,7 @@ module ItsPki_TestCases {
f_init_default_headers_list(v_headers); f_init_default_headers_list(v_headers);
httpPort.send( httpPort.send(
m_http_request( m_http_request(
m_http_request_get( m_http_request_post(
PICS_HTTP_GET_URI, PICS_HTTP_GET_URI,
v_headers, v_headers,
m_http_message_body_binary( m_http_message_body_binary(
...@@ -1387,7 +1396,7 @@ module ItsPki_TestCases { ...@@ -1387,7 +1396,7 @@ module ItsPki_TestCases {
f_init_default_headers_list(v_headers); f_init_default_headers_list(v_headers);
httpPort.send( httpPort.send(
m_http_request( m_http_request(
m_http_request_get( m_http_request_post(
PICS_HTTP_GET_URI, PICS_HTTP_GET_URI,
v_headers, v_headers,
m_http_message_body_binary( m_http_message_body_binary(
...@@ -1488,7 +1497,7 @@ module ItsPki_TestCases { ...@@ -1488,7 +1497,7 @@ module ItsPki_TestCases {
f_init_default_headers_list(v_headers); f_init_default_headers_list(v_headers);
httpPort.send( httpPort.send(
m_http_request( m_http_request(
m_http_request_get( m_http_request_post(
PICS_HTTP_GET_URI, PICS_HTTP_GET_URI,
v_headers, v_headers,
m_http_message_body_binary( m_http_message_body_binary(
...@@ -1589,7 +1598,7 @@ module ItsPki_TestCases { ...@@ -1589,7 +1598,7 @@ module ItsPki_TestCases {
f_init_default_headers_list(v_headers); f_init_default_headers_list(v_headers);
httpPort.send( httpPort.send(
m_http_request( m_http_request(
m_http_request_get( m_http_request_post(
PICS_HTTP_GET_URI, PICS_HTTP_GET_URI,
v_headers, v_headers,
m_http_message_body_binary( m_http_message_body_binary(
...@@ -1768,7 +1777,7 @@ module ItsPki_TestCases { ...@@ -1768,7 +1777,7 @@ module ItsPki_TestCases {
f_init_default_headers_list(v_headers); f_init_default_headers_list(v_headers);
httpPort.send( httpPort.send(
m_http_request( m_http_request(
m_http_request_get( m_http_request_post(
PICS_HTTP_GET_URI, PICS_HTTP_GET_URI,
v_headers, v_headers,
m_http_message_body_binary(