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

Continue PKI ATS development

parent e866dc65
......@@ -21,6 +21,10 @@ tcp_layer::tcp_layer(const std::string & p_type, const std::string & param) : la
} else if (it->second.compare("1") == 0) {
set_socket_debugging(true);
}
it = _params.find(std::string("tcp_fragmented"));
if (it == _params.cend()) {
_params.insert(std::pair<std::string, std::string>(std::string("tcp_fragmented"), "0"));
}
bool server_mode = false;
it = _params.find(params::server_mode);
if (it != _params.cend()) {
......@@ -187,6 +191,9 @@ int tcp_layer::receive_message_on_fd(int p_client_id)
}
loggers::get_instance().log("tcp_layer::receive_message_on_fd: Non secured mode");
if (_params[std::string("tcp_fragmented")].compare("1") == 0) {
usleep(50000); // FIXME When HTTP paquet is fragmented into several TCP packets, a timer is required. This is a Q&D solution
}
return Abstract_Socket::receive_message_on_fd(p_client_id);
}
......
......@@ -93,11 +93,13 @@ LogEventTypes:= Yes
#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=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
#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
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=0,sec_db_path=/home/vagrant/tmp/asn1c_cert)/UDP(dst_ip=172.28.7.123,src_port=54915,dst_port=54915)" # Savary
# 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=172.23.0.1,dst_port=8000)" # Nordsys
#system.utPort.params := "UT_CAM/UDP(dst_ip=172.23.0.1,dst_port=8000)" # Nordsys
system.utPort.params := "UT_CAM/UDP(dst_ip=172.28.7.123,dst_port=1999)" # Savary
[EXECUTE]
ItsCam_TestCases.TC_CAM_MSD_FMT_BV_01
......
......@@ -143,7 +143,7 @@ LogEventTypes:= Yes
system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=0,secured_mode=1,its_aid=36,certificate=CERT_TS_A_AT,sec_db_path=/home/vagrant/tmp/asn1c_cert)/COMMSIGNIA(mac_src=000000000011,use_vpn=1,target_host=10.8.0.1)/UDP(dst_ip=10.8.0.1,src_port=7943,dst_port=7943)"
# Single HTTP component port
system.httpPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(debug=1,server_mode=1,server=192.168.0.252,port=80,local_port=80,use_ssl=0)"
system.httpPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(debug=1,server_mode=1,server=10.8.0.2,port=80,local_port=80,use_ssl=0)"
# GeoNetworking UpperTester port based on UDP
system.utPort.params := "UT_PKI/UDP(dst_ip=10.8.0.1,dst_port=56000)"
......
......@@ -14,9 +14,8 @@ LibItsHttp_Pics.PICS_HEADER_HOST := "test.bsi.v2x-pilot.escrypt.com"
LibItsPki_Pics.PICS_HTTP_POST_URI_EC := "/ea/enrolment"
LibItsPki_Pics.PICS_HTTP_POST_URI_AT := "/aa/authorize"
LibItsPki_Pics.PICS_HTTP_POST_URI_ATV := "/aa/authorize"
LibItsPki_Pics.PICS_ITS_S_SIGN_NITSP256_PRIVATE_KEY := '5C25F97607DFC62972A147FAD8B7A7C939569F0F95ECD4C641724A68B51836E5'O
LibItsPki_Pics.PICS_ITS_S_SIGN_NISTP256_PUBLIC_KEY := '020144E5174B0AFDA86BDB8B643B68D40030F5BDB9A9F090C64852CC3C20C9D5AD'O
LibItsPki_Pics.PICS_ITS_S_CANONICAL_ID := '45545349504C55470000000000000000'O
LibItsPki_Pics.PICS_ITS_S_SIGN_NITSP256_PRIVATE_KEY := 'd526563de53303427595ad144042be0f9caa2501ff64c837a7832f969220cd25'O
LibItsPki_Pics.PICS_ITS_S_CANONICAL_ID := '4553435259505400000000000000000F'O
LibItsPki_Pics.PICS_TS_EA_CERTIFICATE_ID := "CERT_ESCRYPT_EA"
LibItsPki_Pics.PICS_TS_AA_CERTIFICATE_ID := "CERT_ESCRYPT_AA"
......
......@@ -25,12 +25,13 @@ LibItsPki_Pics.PICS_ITS_S_CANONICAL_ID := '1B4CA1210123AE900
LibItsPki_Pics.PICS_TS_EA_CERTIFICATE_ID := "CERT_GEMALTO_EA"
LibItsPki_Pics.PICS_TS_AA_CERTIFICATE_ID := "CERT_GEMALTO_AA"
LibItsPki_Pixits.PX_AUTHORIZATION_REQUEST_WITH_POP := false # Not private key available
LibItsPki_Pixits.PX_INCLUDE_ENCRYPTION_KEYS := false # No encryption key in AT request
LibItsPki_Pixits.PICS_PKI_AUTH_POP := false # Not private key available
LibItsPki_Pics.PICS_SECPKI_REENROLMENT := true
LibItsPki_Pixits.PX_EC_PRIVATE_KEY := '73AD688448117EFF50BCB044AA9CFD7932023B7A2C62887A1D3B99FED2B5237C'O
LibItsPki_Pixits.PX_EC_HASH := 'C4FD3EF2B51CFD605D7D40FA9C1C279B8B8C4D7CB9D40D6044C55F615D750502'O
LibItsPki_Pixits.PX_EC_HASHED_ID8 := '44C55F615D750502'O
LibItsPki_Pics.PICS_SECPKI_REENROLMENT := false # Check in logs the pattern '==> EC ' to find the required information for re-enrolment
LibItsPki_Pixits.PX_EC_PRIVATE_KEY := '170D1EA638C300BD16F0025768C0F1FAA6BE23963E46AD10F79103914265D294'O
LibItsPki_Pixits.PX_EC_HASH := 'DFEFC2A74C8ADD0C8B74B958EE072229D25DEAAAE30D134193D091890E8F3C2C'O
LibItsPki_Pixits.PX_EC_HASHED_ID8 := '93D091890E8F3C2C'O
[LOGGING]
# In this section you can specify the name of the log file and the classes of events
......
......@@ -9,7 +9,6 @@ LibItsSecurity_Pixits.PX_CERTIFICATE_POOL_PATH := "/home/vagrant/tmp"
LibItsSecurity_Pixits.PX_IUT_SEC_CONFIG_NAME := "asn1c_cert"
LibItsHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/x-its-request"
LibItsHttp_Pics.PICS_HEADER_HOST := "test.bsi.v2x-pilot.escrypt.com"
LibItsPki_Pics.PICS_MULTIPLE_END_POINT := true
LibItsPki_Pics.PICS_HEADER_HOST_EC := "ea.utopia.plugtests2019.innovation.keynectis.net"
......@@ -47,7 +46,7 @@ system.httpAtPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/
[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
ItsPki_TestCases.TC_SECPKI_EA_ENR_RCV_01_BV
#ItsPki_TestCases.TC_SECPKI_EA_ENR_RCV_01_BV
# Check that EA doesn't accept Enrolment rekeying request when enrolment is not permitted by signing certificate
#ItsPki_TestCases.TC_SECPKI_EA_ENR_RCV_02_BI
......@@ -64,8 +63,12 @@ ItsPki_TestCases.TC_SECPKI_EA_ENR_RCV_01_BV
#ItsPki_TestCases.TC_SECPKI_EA_ENR_09_BV
#ItsPki_TestCases.TC_SECPKI_EA_ENR_10_BV
#ItsPki_TestCases.TC_SECPKI_EA_ENR_11_BV
#ItsPki_TestCases.TC_SEC_PKI_SND_EA_AA_BV_01
#ItsPki_TestCases.TC_SEC_PKI_SND_AA_BV_01
#
ItsPki_TestCases.TC_SECPKI_EA_AUTHVAL_RCV_01_BV
#
#ItsPki_TestCases.TC_SECPKI_AA_AUTH_RCV_01_BV
[MAIN_CONTROLLER]
# The options herein control the behavior of MC.
......
......@@ -141,10 +141,10 @@ LogEventTypes:= Yes
system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=0,secured_mode=1,its_aid=36,certificate=CERT_TS_A_AT,sec_db_path=/home/vagrant/tmp/asn1c_cert)/ETH(mac_src=e2b7b30429eb)/PCAP(mac_src=e2b7b30429eb,nic=eth1,filter=and ether proto 0x8947)"
# Single HTTP component port
system.httpPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(debug=1,server_mode=1,server=192.168.0.252,port=80,local_port=80,use_ssl=0)"
system.httpPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(debug=1,server_mode=1,server=192.168.42.252,port=80,local_port=80,use_ssl=0)"
# GeoNetworking UpperTester port based on UDP
system.utPort.params := "UT_PKI/UDP(dst_ip=192.168.0.250,src_port=12345)"
system.utPort.params := "UT_PKI/UDP(dst_ip=192.168.42.250,src_port=12345)"
[EXECUTE]
......
......@@ -3,7 +3,6 @@
# This section shall contain the values of all parameters that are defined in your TTCN-3 modules.
# The GeoNetworking address of the IUT.
# Siemens
#LibItsGeoNetworking_Pics.PICS_GN_LOCAL_GN_ADDR := {
# typeOfAddress := e_initial, # e_manual(1)
# stationType := e_roadSideUnit,
......@@ -16,18 +15,18 @@
# stationCountryCode := 0, #33,
# mid := 'BA749705A41D'O
#} # Nordsys
LibItsGeoNetworking_Pics.PICS_GN_LOCAL_GN_ADDR := {
typeOfAddress := e_initial,
stationType := e_passengerCar, #e_roadSideUnit,
stationCountryCode := 0, #33,
mid := '000000000011'O
} # Commsignia
#LibItsGeoNetworking_Pics.PICS_GN_LOCAL_GN_ADDR := {
# typeOfAddress := e_initial,
# stationType := e_unknown, #e_roadSideUnit,
# stationType := e_passengerCar, #e_roadSideUnit,
# stationCountryCode := 0, #33,
# mid := '4c5e0c14d2ea'O
#} # Simu
# mid := '000000000011'O
#} # Commsignia
LibItsGeoNetworking_Pics.PICS_GN_LOCAL_GN_ADDR := {
typeOfAddress := e_initial,
stationType := e_unknown, #e_roadSideUnit,
stationCountryCode := 0, #33,
mid := '4c5e0c14d2ea'O
} # Simu
LibItsGeoNetworking_Pixits.PX_GN_UPPER_LAYER := e_btpB
LibItsBtp_Pixits.PX_DESTINATION_PORT := 2001
......@@ -125,7 +124,8 @@ LogEventTypes:= Yes
# its_aid = 37 DENM
# its_aid = 141 GeonNet mgnt
#system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=0,secu#red_mode=1,its_aid=36,certificate=CERT_TS_A_AT,sec_db_path=/home/vagrant/tmp/asn1c_cert)/ETH(mac_src=e2b7b30429eb)/PCAP(mac_src=e2b7b30429eb,nic=eth1,filter=and ether proto 0x8947)"
system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=0,secured_mode=1,its_aid=36,certificate=CERT_TS_A_AT,sec_db_path=/home/vagrant/tmp/asn1c_cert)/COMMSIGNIA(mac_src=000000000011,use_vpn=1,target_host=10.8.0.1)/UDP(dst_ip=10.8.0.1,src_port=7943,dst_port=7946)"
system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=0,secured_mode=1,its_aid=36,certificate=CERT_TS_A_AT,sec_db_path=/home/vagrant/tmp/asn1c_cert)/COMMSIGNIA(mac_src=000000000011,use_vpn=0,target_host=192.168.42.2)/UDP(dst_ip=192.168.42.2,src_port=7943,dst_port=6666)"
#system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=0,secured_mode=1,its_aid=36,certificate=CERT_TS_A_AT,sec_db_path=/home/vagrant/tmp/asn1c_cert)/COMMSIGNIA(mac_src=000000000011,use_vpn=1,target_host=10.8.0.1)/UDP(dst_ip=10.8.0.1,src_port=7943,dst_port=7946)"
#system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=0,secured_mode=1,its_aid=36,certificate=CERT_TS_A_AT,sec_db_path=/home/vagrant/tmp/asn1c_cert)/COMMSIGNIA(mac_src=000000000011,target_host=10.8.0.1)/UDP_PCAP(dst_ip=10.8.0.1,dst_port=7943,src_ip=192.168.0.154,src_port=39474)/ETH(mac_src=0800275c4959,eth_type=0800)/PCAP(mac_src=0800275c4959,nic=tap0,filter=and (udp port 39474 or udp port 7943))"
#system.geoNetworkingPort.params := "
......@@ -139,17 +139,17 @@ system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=43551050
# CAM UpperTester port based on UDP
#system.camUtPort.params := "UT_CAM(loopback=1)"
#system.denmUtPort.params := "UT_DENM/UDP(dst_ip=192.168.0.250)" # Simulator
#system.camUtPort.params := "UT_CAM/UDP(dst_ip=192.168.0.250)"
#system.utPort.params := "UT_GN/UDP(dst_ip=192.168.0.250,src_port=12345)"
system.denmUtPort.params := "UT_DENM/UDP(dst_ip=192.168.1.250)" # Simulator
system.camUtPort.params := "UT_CAM/UDP(dst_ip=192.168.1.250)"
system.utPort.params := "UT_GN/UDP(dst_ip=192.168.1.250)"
#system.denmUtPort.params := "UT_DENM/UDP(dst_ip=172.23.0.1,dst_port=8000)" # Nordsys
#system.utPort.params := "UT_CAM/UDP(dst_ip=172.28.128.4)" # Simulator Siemens
#system.camUtPort.params := "UT_CAM/UDP(dst_ip=172.28.128.4)" # Simulator Siemens
system.utPort.params := "UT_CAM/UDP(dst_ip=10.8.0.1,dst_port=56000)" # Commsignia
system.camUtPort.params := "UT_CAM/UDP(dst_ip=10.8.0.1,dst_port=56000)"
system.denmUtPort.params := "UT_DENM/UDP(dst_ip=10.8.0.1,dst_port=56000)"
#system.utPort.params := "UT_CAM/UDP(dst_ip=10.8.0.1,dst_port=56000)" # Commsignia
#system.camUtPort.params := "UT_CAM/UDP(dst_ip=10.8.0.1,dst_port=56000)"
#system.denmUtPort.params := "UT_DENM/UDP(dst_ip=10.8.0.1,dst_port=56000)"
[EXECUTE]
......@@ -161,7 +161,7 @@ system.denmUtPort.params := "UT_DENM/UDP(dst_ip=10.8.0.1,dst_port=56000)"
# ------------------------- CAM ---------------------------
# Check that IUT sends the secured CAM using SignedData container.
#ItsSecurity_TestCases.TC_SEC_ITSS_SND_CAM_01_BV
ItsSecurity_TestCases.TC_SEC_ITSS_SND_CAM_01_BV
# Check that IUT sends the secured CAM containing the HeaderInfo field psid set to 'AID_CAM'.
#ItsSecurity_TestCases.TC_SEC_ITSS_SND_CAM_02_BV
......@@ -217,7 +217,7 @@ system.denmUtPort.params := "UT_DENM/UDP(dst_ip=10.8.0.1,dst_port=56000)"
# headerInfo field when it received a CAM containing a request for unrecognized certificate that
# matches with the currently used AA certificate ID of the IUT.
# (PICS_SEC_P2P_AT_DISTRIBUTION)
ItsSecurity_TestCases.TC_SEC_ITSS_SND_CAM_13_BV
#ItsSecurity_TestCases.TC_SEC_ITSS_SND_CAM_13_BV
# Check that IUT sends the secured CAM containing the AA certificate in the requestedCertificate headerInfo
# field when it received a CAM containing a request for unrecognized certificate that matches with the known
......
......@@ -319,7 +319,7 @@ system.pkiPort.params := "PKI/HTTP(device_mode=1,uri=/its/inner_ec_request,host=
#TestCodec_Certificates.tc_certificate_asn1c_2
#TestCodec_Certificates.tc_certificate_gemalto_1
#TestCodec_Certificates.tc_certificate_atos_1
TestCodec_Certificates.tc_certificate_atos_2
#TestCodec_Certificates.tc_certificate_atos_2
# Secured messages
#TestCodec_SecuredMessages.tc_ssp_cam_1
#TestCodec_SecuredMessages.tc_ssp_cam_2
......@@ -343,6 +343,7 @@ TestCodec_Certificates.tc_certificate_atos_2
#TestCodec_SignedAndEncryptedMessages.tc_test_hmac_sha256_test2
#TestCodec_SignedAndEncryptedMessages.tc_test_hmac_sha256_test3
#TestCodec_SignedAndEncryptedMessages.tc_test_hmac_sha256_test4
TestCodec_SignedAndEncryptedMessages.tc_test_hmac_sha256_test5
#TestCodec_SignedAndEncryptedMessages.tc_test_encrypt_aes_128_ccm_test_1
#TestCodec_SignedAndEncryptedMessages.tc_test_encrypt_aes_128_ccm_test_2
#TestCodec_SignedAndEncryptedMessages.tc_test_encrypt_aes_128_ccm_test_3
......
This diff is collapsed.
......@@ -66,7 +66,8 @@ module ItsSecurity_Functions {
function f_prepareSecuredCam(
in charstring p_configId,
in HeaderInfo p_headerInfo,
in SignerIdentifier p_signerIdentifier/*,
in SignerIdentifier p_signerIdentifier,
in template (value) StationID p_station_id := f_getTsStationId()/*,
in boolean p_addMissingHeaders := true*/
) runs on ItsGeoNetworking return GeoNetworkingPdu {
// Local variables
......@@ -87,7 +88,7 @@ module ItsSecurity_Functions {
encvalue(
m_camReq(
m_camMsg_vehicle_HF_BV(
f_getTsStationId(),
valueof(p_station_id),
f_getCurrentTime() mod 65536, // See ETSI EN 302 637-2 V1.3.0 - Clause B.3 generationDelatTime
LibItsCam_Templates.m_tsPosition
)))));
......@@ -229,11 +230,12 @@ module ItsSecurity_Functions {
function f_sendSecuredCam(
in charstring p_configId,
in HeaderInfo p_headerInfo,
in SignerIdentifier p_issuerIdentifier
in SignerIdentifier p_issuerIdentifier,
in template (value) StationID p_station_id := f_getTsStationId()
) runs on ItsGeoNetworking return GeoNetworkingPdu {
// Local variables
var GeoNetworkingPdu v_securedGnPdu := f_prepareSecuredCam(p_configId, p_headerInfo, p_issuerIdentifier);
var GeoNetworkingPdu v_securedGnPdu := f_prepareSecuredCam(p_configId, p_headerInfo, p_issuerIdentifier, p_station_id);
log("f_sendSecuredCam: v_securedGnPdu= ", v_securedGnPdu);
f_sendGeoNetMessage(valueof(m_geoNwReq_linkLayerBroadcast(v_securedGnPdu)));
......
......@@ -72,7 +72,7 @@ module ItsSecurity_TestCases {
// Test adapter configuration
// Preamble
f_sendSecuredCam(cc_taCert_B, valueof(m_headerInfo_cam(-, f_computeGnTimestamp())), valueof(m_signerIdentifier_digest));
f_sendSecuredCam(cc_taCert_B, valueof(m_headerInfo_cam(-, (f_getCurrentTime() * 1000)/*us*/)), valueof(m_signerIdentifier_digest));
// Postamble
f_cf01Down();
......@@ -96,7 +96,7 @@ module ItsSecurity_TestCases {
valueof(
m_headerInfo_denm(
-,
f_computeGnTimestamp(),
(f_getCurrentTime() * 1000)/*us*/,
m_threeDLocation(v_longPosVectorIut.latitude, v_longPosVectorIut.longitude, 0))
),
valueof(m_signerIdentifier_digest)
......@@ -894,7 +894,7 @@ module ItsSecurity_TestCases {
// Local variables
const integer c_cntTimeLimit := 10;
const float c_certificateGenerationTime := 1.0;
const float c_certificateGenerationTime := 1.0;
timer t_maxTransInterval := c_certificateGenerationTime * 1.3;//1.15;
var integer v_cntTime := 0;
var GeoNetworkingInd v_geoNwInd;
......@@ -1090,7 +1090,7 @@ module ItsSecurity_TestCases {
// Send secured message from unknown ITS-S
geoNetworkingPort.clear;
f_sendSecuredCam(cc_taCert_B, valueof(m_headerInfo_cam(-, f_computeGnTimestamp())), valueof(m_signerIdentifier_digest));
f_sendSecuredCam(cc_taCert_B, valueof(m_headerInfo_cam(-, (f_getCurrentTime() * 1000)/*us*/)), valueof(m_signerIdentifier_digest), f_getTsStationId() + 10/*Unknown ITS-S*/);
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
}
......@@ -1241,7 +1241,7 @@ module ItsSecurity_TestCases {
f_getMsgSignerIdentifier(f_getSecuredMessage(v_geoNwInd.msgIn), v_signerIdentifier);
f_sendSecuredCam(
cc_taCert_F,
valueof(m_headerInfo_cam(-, f_computeGnTimestamp())),
valueof(m_headerInfo_cam(-, (f_getCurrentTime() * 1000)/*us*/)),
valueof(
m_signerIdentifier_digest(
f_calculateDigestFromCertificate(
......@@ -1423,7 +1423,7 @@ module ItsSecurity_TestCases {
geoNetworkingPort.clear;
f_sendSecuredCam(
cc_taCert_B, // SHA-256/NIST P-256
valueof(m_headerInfo_cam(-, f_computeGnTimestamp())),
valueof(m_headerInfo_cam(-, (f_getCurrentTime() * 1000)/*us*/)),
valueof(
m_signerIdentifier_digest(
v_hashedId8
......@@ -1581,7 +1581,7 @@ module ItsSecurity_TestCases {
geoNetworkingPort.clear;
f_sendSecuredCam(
cc_taCert_B,
valueof(m_headerInfo_cam(-, f_computeGnTimestamp())),
valueof(m_headerInfo_cam(-, (f_getCurrentTime() * 1000)/*us*/)),
valueof(
m_signerIdentifier_digest(
v_hashedId8
......@@ -1737,7 +1737,7 @@ module ItsSecurity_TestCases {
geoNetworkingPort.clear;
f_sendSecuredCam(
cc_taCert_B,
valueof(m_headerInfo_cam(-, f_computeGnTimestamp())),
valueof(m_headerInfo_cam(-, (f_getCurrentTime() * 1000)/*us*/)),
valueof(
m_signerIdentifier_digest(
v_hashedId8
......@@ -1869,7 +1869,7 @@ module ItsSecurity_TestCases {
// Preamble
f_prNeighbour();
f_getCertificateDigest(
cc_taCert_A,
cc_taCert_B, // Unknown certificate
v_hashedId8
);
geoNetworkingPort.clear;
......@@ -1902,7 +1902,7 @@ module ItsSecurity_TestCases {
valueof(
m_headerInfo_cam(
-,
f_computeGnTimestamp(),
(f_getCurrentTime() * 1000)/*us*/,
-,
{ f_HashedId3FromHashedId8(v_hashedId8) }
)),
......@@ -2061,9 +2061,9 @@ module ItsSecurity_TestCases {
// Preamble
f_prNeighbour();
f_readCertificate(cc_taCert_AA, v_aa_certificate);
f_readCertificate(cc_iutCert_A_AA, v_aa_certificate);
f_getCertificateDigest(
cc_taCert_AA,
cc_iutCert_A_AA,
v_hashedId8
);
geoNetworkingPort.clear;
......@@ -2096,7 +2096,7 @@ module ItsSecurity_TestCases {
valueof(
m_headerInfo_cam(
-,
f_computeGnTimestamp(),
(f_getCurrentTime() * 1000)/*us*/,
-,
{ f_HashedId3FromHashedId8(v_hashedId8) }
)),
......@@ -2274,7 +2274,7 @@ module ItsSecurity_TestCases {
valueof(
m_headerInfo_cam(
-,
f_computeGnTimestamp(),
(f_getCurrentTime() * 1000)/*us*/,
-,
{ f_HashedId3FromHashedId8(v_hashedId8) }
)),
......@@ -2396,9 +2396,9 @@ module ItsSecurity_TestCases {
// Preamble
f_prNeighbour();
f_readCertificate(cc_taCert_AA, v_aa_certificate);
f_readCertificate(cc_iutCert_A_AA, v_aa_certificate);
f_getCertificateDigest(
cc_taCert_AA,
cc_iutCert_A_AA,
v_hashedId8
);
geoNetworkingPort.clear;
......@@ -2431,7 +2431,7 @@ module ItsSecurity_TestCases {
valueof(
m_headerInfo_cam(
-,
f_computeGnTimestamp(),
(f_getCurrentTime() * 1000)/*us*/,
-,
{ f_HashedId3FromHashedId8(v_hashedId8) }
)),
......@@ -2460,7 +2460,7 @@ module ItsSecurity_TestCases {
-,
mw_toBeSignedData(
mw_signedDataPayload,
mw_headerInfo_cam
mw_headerInfo_cam // does not containing requested certificate
)
)
),
......@@ -2566,7 +2566,7 @@ module ItsSecurity_TestCases {
mw_geoNwSecPdu(
mw_etsiTs103097Data_signed(
mw_signedData(
-,
-,
mw_toBeSignedData(
mw_signedDataPayload,
mw_headerInfo_cam
......@@ -2587,7 +2587,7 @@ module ItsSecurity_TestCases {
valueof(
m_headerInfo_cam(
-,
f_computeGnTimestamp(),
(f_getCurrentTime() * 1000)/*us*/,
-,
{ f_HashedId3FromHashedId8(v_hashedId8) }
)),
......@@ -2616,7 +2616,7 @@ module ItsSecurity_TestCases {
-,
mw_toBeSignedData(
mw_signedDataPayload,
mw_headerInfo_cam
mw_headerInfo_cam // Not containing requestedCertificate
),
mw_signerIdentifier_certificate // containing certificate
)
......@@ -2636,7 +2636,7 @@ module ItsSecurity_TestCases {
-,
mw_toBeSignedData(
mw_signedDataPayload,
mw_headerInfo_cam
mw_headerInfo_cam // Not containing requestedCertificate
),
mw_signerIdentifier_digest // containing digest
)
......@@ -2725,9 +2725,9 @@ module ItsSecurity_TestCases {
// Preamble
f_prNeighbour();
f_readCertificate(cc_taCert_AA, v_aa_certificate);
f_readCertificate(cc_iutCert_A_AA, v_aa_certificate);
f_getCertificateDigest(
cc_taCert_AA,
cc_iutCert_A_AA,
v_hashedId8
);
geoNetworkingPort.clear;
......@@ -2758,7 +2758,7 @@ module ItsSecurity_TestCases {
valueof(
m_headerInfo_cam(
-,
f_computeGnTimestamp(),
(f_getCurrentTime() * 1000)/*us*/,
-,
{ f_HashedId3FromHashedId8(v_hashedId8) }
)),
Subproject commit c59baf961ec499e041a3224fd2308f9381791810
Subproject commit ec376d2696b590bef28271376d9be45b23f52277
......@@ -105,6 +105,20 @@ module TestCodec_SignedAndEncryptedMessages {
}
}
testcase tc_test_hmac_sha256_test5() runs on TCType system TCType {
var octetstring v_k := '9f997cf14bc68d4007c5cfd35ea64d9cec802dde70e6128b074d4f465d1d322b'O;
var octetstring v_m := 'f9294b8dc221aab77685399656db2f82711bc1b5703aeb5797578863b5177f6b'O;
var octetstring v_t := 'FEACBAB2F71A8FA882BF2832A19581ED'O;
var octetstring v_result := fx_hmac_sha256(v_k, v_m);
log("v_result= ", v_result);
if (match(v_t, v_result)) {
setverdict(pass);
} else {
setverdict(fail);
}
}
/**
* @desc Test AES 128 CCM using test vectors provided by IEEE Std 1609.2-2017 Annex D.1
* @return The encrypted message
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment