Commit 4e96efa4 authored by Yann Garcia's avatar Yann Garcia

Implement Enrolment/Authorization simulator

parent 6bb1d73d
...@@ -622,6 +622,14 @@ int ConfigRsuSimulatorLayer::process_ut_pki_trigger(const OCTETSTRING& data, par ...@@ -622,6 +622,14 @@ int ConfigRsuSimulatorLayer::process_ut_pki_trigger(const OCTETSTRING& data, par
p.triggerEnrolmentRequest().encAlgorithm() = OCTETSTRING(0, nullptr); // No parameter used p.triggerEnrolmentRequest().encAlgorithm() = OCTETSTRING(0, nullptr); // No parameter used
p.triggerEnrolmentRequest().privateKey() = OCTETSTRING(0, nullptr); // No parameter used p.triggerEnrolmentRequest().privateKey() = OCTETSTRING(0, nullptr); // No parameter used
p.triggerEnrolmentRequest().compressedPublickey() = OCTETSTRING(0, nullptr); // No parameter used p.triggerEnrolmentRequest().compressedPublickey() = OCTETSTRING(0, nullptr); // No parameter used
} else if (msg_id == 0xbc/*uppertester_pki_codec*/) {
// LibItsPki__TypesAndValues::TriggerAuthorizationRequest e;
// e.decode(*e.get_descriptor(), decoding_buffer, TTCN_EncDec::CT_RAW);
//p.triggerAuthorizationRequest() = e;
p.triggerAuthorizationRequest().cannonicalId() = OCTETSTRING(0, nullptr); // No parameter used
p.triggerAuthorizationRequest().encAlgorithm() = OCTETSTRING(0, nullptr); // No parameter used
p.triggerAuthorizationRequest().privateKey() = OCTETSTRING(0, nullptr); // No parameter used
p.triggerAuthorizationRequest().compressedPublickey() = OCTETSTRING(0, nullptr); // No parameter used
} }
// Pass it to the ports if any // Pass it to the ports if any
......
...@@ -43,7 +43,7 @@ ItsRSUsSimulator_Pics.PICS_GENERATE_MAPEM := false ...@@ -43,7 +43,7 @@ ItsRSUsSimulator_Pics.PICS_GENERATE_MAPEM := false
ItsRSUsSimulator_Pics.PICS_GENERATE_SPATEM := false ItsRSUsSimulator_Pics.PICS_GENERATE_SPATEM := false
ItsRSUsSimulator_Pics.PICS_GENERATE_SSEM := false ItsRSUsSimulator_Pics.PICS_GENERATE_SSEM := false
ItsRSUsSimulator_Pics.PICS_ITS_S_ROLE := true; ItsRSUsSimulator_Pics.PICS_ITS_S_ROLE := false;
ItsRSUsSimulator_Pics.PICS_PKI_SUPPORT := true ItsRSUsSimulator_Pics.PICS_PKI_SUPPORT := true
ItsRSUsSimulator_Pics.PICS_BEACON_FREQUENCY := 1.0 ItsRSUsSimulator_Pics.PICS_BEACON_FREQUENCY := 1.0
...@@ -57,12 +57,12 @@ ItsRSUsSimulator_Pics.PICS_SEND_DENM_INDICATION := true ...@@ -57,12 +57,12 @@ ItsRSUsSimulator_Pics.PICS_SEND_DENM_INDICATION := true
# 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 := "/home/vagrant/tmp" LibItsSecurity_Pixits.PX_CERTIFICATE_POOL_PATH := "/home/yann/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 := "asn1c_cert" LibItsSecurity_Pixits.PX_IUT_SEC_CONFIG_NAME := "asn1c_cert"
LibItsHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/x-its-request" LibItsHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/x-its-request"
LibItsHttp_Pics.PICS_HEADER_HOST := "192.168.42.252" LibItsHttp_Pics.PICS_HEADER_HOST := "192.168.42.25"
LibItsPki_Pics.PICS_HTTP_POST_URI := "/ea/enrolment" LibItsPki_Pics.PICS_HTTP_POST_URI := "/ea/enrolment"
LibItsPki_Pics.PICS_MULTIPLE_END_POINT := false LibItsPki_Pics.PICS_MULTIPLE_END_POINT := false
...@@ -75,6 +75,9 @@ LibItsPki_Pics.PICS_ITS_S_CANONICAL_ID := '455453492D4954532D30303 ...@@ -75,6 +75,9 @@ LibItsPki_Pics.PICS_ITS_S_CANONICAL_ID := '455453492D4954532D30303
LibItsPki_Pics.PICS_TS_EA_CERTIFICATE_ID := "CERT_TS_A_EA" LibItsPki_Pics.PICS_TS_EA_CERTIFICATE_ID := "CERT_TS_A_EA"
LibItsPki_Pics.PICS_TS_AA_CERTIFICATE_ID := "CERT_TS_A_AA" LibItsPki_Pics.PICS_TS_AA_CERTIFICATE_ID := "CERT_TS_A_AA"
LibItsPki_Pics.PICS_IUT_EA_CERTIFICATE_ID := "CERT_TS_A_EA"
LibItsPki_Pics.PICS_IUT_AA_CERTIFICATE_ID := "CERT_TS_A_AA"
[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
# you want to log into the file or display on console (standard error). # you want to log into the file or display on console (standard error).
...@@ -160,23 +163,23 @@ LogEventTypes:= Yes ...@@ -160,23 +163,23 @@ LogEventTypes:= Yes
# its_aid=36: CAM # its_aid=36: CAM
# its_aid=37: DENM # its_aid=37: DENM
# its_aid=141: GeoMet # its_aid=141: GeoMet
system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=43551050,longitude=10298730,its_aid=37,secured_mode=1,certificate=CERT_IUT_A_AT,sec_db_path=/home/vagrant/tmp/asn1c_cert)/ETH(mac_src=080027128a53)/PCAP(mac_src=080027128a53,nic=eth1,filter=and ether proto 0x8947)" system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=43551050,longitude=10298730,its_aid=36,secured_mode=1,certificate=CERT_IUT_A_AT,sec_db_path=/home/yann/tmp/asn1c_cert)/ETH(mac_src=080027128a53)/PCAP(mac_src=080027128a53,nic=wlan0,filter=and ether proto 0x8947)"
# Commsignia # Commsignia
#system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=43551050,longitude=10298730,its_aid=37,secured_mode=0,encrypted_mode=0,certificate=CERT_IUT_A_AT,peer_certificate=CERT_TS_A_AT,sec_db_path=/home/vagrant/tmp/asn1c_cert)/COMMSIGNIA(xport_mode=LTE-V2X,mac_src=080027F44E7D,interface_id=2,target_host=192.168.0.54)/UDP(dst_ip=192.168.0.54,src_port=9091,dst_port=7946)" #system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=43551050,longitude=10298730,its_aid=37,secured_mode=0,encrypted_mode=0,certificate=CERT_IUT_A_AT,peer_certificate=CERT_TS_A_AT,sec_db_path=/home/yann/tmp/asn1c_cert)/COMMSIGNIA(xport_mode=LTE-V2X,mac_src=080027F44E7D,interface_id=2,target_host=192.168.0.54)/UDP(dst_ip=192.168.0.54,src_port=9091,dst_port=7946)"
# Qualcom # Qualcom
#system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=36747486,longitude=-4556772,distanceA=25,distanceB=25,its_aid=37,secured_mode=1,encrypted_mode=0,certificate=CERT_MICROSEC_AT_01,peer_certificate=CERT_TS_A_AT,sec_db_path=/home/vagrant/tmp/asn1c_cert)/QUALCOMM/UDP(dst_ip=10.200.1.113,src_port=9091,dst_port=4041)" #system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=36747486,longitude=-4556772,distanceA=25,distanceB=25,its_aid=37,secured_mode=1,encrypted_mode=0,certificate=CERT_MICROSEC_AT_01,peer_certificate=CERT_TS_A_AT,sec_db_path=/home/yann/tmp/asn1c_cert)/QUALCOMM/UDP(dst_ip=10.200.1.113,src_port=9091,dst_port=4041)"
#system.httpPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(debug=1,server=192.168.42.252,port=80)" #system.httpPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(debug=1,server=192.168.42.25,port=80)"
#system.httpPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(debug=1,server=192.168.1.252,port=80)" #system.httpPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(debug=1,server=192.168.1.25,port=80)"
system.httpPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(debug=1,server=192.168.1.39,port=8080)" system.httpPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(debug=1,server=192.168.1.39,port=8080)"
# Config port based on UDP # Config port based on UDP
#system.cfPort.params := "CF(ut=pki)/UDP(dst_ip=192.168.42.252,src_port=12345)" #system.cfPort.params := "CF(ut=pki)/UDP(dst_ip=192.168.42.25,src_port=12345)"
#system.cfPort.params := "CF(ut=cam)/UDP(dst_ip=192.168.1.39,src_port=12345)" #system.cfPort.params := "CF(ut=cam)/UDP(dst_ip=192.168.1.39,src_port=12345)"
#system.cfPort.params := "CF(ut=cam)/UDP(dst_ip=172.28.4.87,src_port=12345,reuse_incoming_source_adddress=1)" #system.cfPort.params := "CF(ut=cam)/UDP(dst_ip=172.28.4.87,src_port=12345,reuse_incoming_source_adddress=1)"
#system.cfPort.params := "CF(ut=denm)/UDP(dst_ip=172.28.4.87,src_port=12345,reuse_incoming_source_adddress=1)" #system.cfPort.params := "CF(ut=denm)/UDP(dst_ip=172.28.4.87,src_port=12345,reuse_incoming_source_adddress=1)"
#system.cfPort.params := "CF(ut=gn)/UDP(dst_ip=172.28.4.87,src_port=12345,reuse_incoming_source_adddress=1)" #system.cfPort.params := "CF(ut=gn)/UDP(dst_ip=192.168.1.39,src_port=12345,reuse_incoming_source_adddress=1)"
system.cfPort.params := "CF(ut=pki)/UDP(dst_ip=172.28.4.87,src_port=12345,reuse_incoming_source_adddress=1)" system.cfPort.params := "CF(ut=pki)/UDP(src_port=12345,reuse_incoming_source_adddress=1)"
[EXECUTE] [EXECUTE]
ItsRSUsSimulator_TestCases.TC_RSUSIMU_BV_01 ItsRSUsSimulator_TestCases.TC_RSUSIMU_BV_01
......
This diff is collapsed.
...@@ -30,7 +30,17 @@ module ItsRSUsSimulator_TestSystem { ...@@ -30,7 +30,17 @@ module ItsRSUsSimulator_TestSystem {
import from ItsRSUsSimulator_TypesAndValues all; import from ItsRSUsSimulator_TypesAndValues all;
import from ItsRSUsSimulator_Pics all; import from ItsRSUsSimulator_Pics all;
import from ItsRSUsSimulator_Pixits all; import from ItsRSUsSimulator_Pixits all;
type component ItsPkiHttpRsuSimulator extends ItsPkiHttp {
port ResultPort resultPort
}
type port ResultPort message {
inout EcData, AtData
} with {
extension "internal"
}
/** /**
* @desc Test component for ITS Network and Transport layer * @desc Test component for ITS Network and Transport layer
*/ */
...@@ -38,7 +48,11 @@ module ItsRSUsSimulator_TestSystem { ...@@ -38,7 +48,11 @@ module ItsRSUsSimulator_TestSystem {
/** /**
* @desc RSUsimulator configuration port * @desc RSUsimulator configuration port
*/ */
port ConfigRsuSimulatorPort cfPort; port ConfigRsuSimulatorPort cfPort;
/**
* @desc Internal communication port
*/
port ResultPort resultPort;
/** Use httPort when EC and AT are served by the same end point */ /** Use httPort when EC and AT are served by the same end point */
port HttpPort httpEcPort; /** Enrolment end point */ port HttpPort httpEcPort; /** Enrolment end point */
port HttpPort httpAtVPort; /** Authorization Validation end point */ port HttpPort httpAtVPort; /** Authorization Validation end point */
...@@ -132,6 +146,7 @@ module ItsRSUsSimulator_TestSystem { ...@@ -132,6 +146,7 @@ module ItsRSUsSimulator_TestSystem {
timer tc_ivim := PICS_IVIM_FREQUENCY; timer tc_ivim := PICS_IVIM_FREQUENCY;
//timer tc_evcsn := PICS_EVCSN_FREQUENCY; //timer tc_evcsn := PICS_EVCSN_FREQUENCY;
var integer vc_security_state := 0; // 0: initial, 1: enrolled, 2:authorization
var boolean vc_reenrolment := false; var boolean vc_reenrolment := false;
var integer vc_ec_counter := 0; var integer vc_ec_counter := 0;
var SequenceOfEcData vc_ec_certificates := {}; var SequenceOfEcData vc_ec_certificates := {};
......
Subproject commit 63ccaf6630a5e2f37f949f23cdeee2cfdbbe0f48 Subproject commit 9c7f6e8cc5a2c56359f7732412d9c0c4977d93fa
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