Commit 5d47bb18 authored by YannGarcia's avatar YannGarcia
Browse files

CV2X#3 Validation against PKIs (Remote)

parent 50ccd846
Loading
Loading
Loading
Loading
+9 −2
Original line number Original line Diff line number Diff line
@@ -417,8 +417,15 @@ int http_codec::encode_body(const LibItsHttp__MessageBodyTypes::HttpMessageBody
        it = _codecs.find("http_its"); // TODO Use params
        it = _codecs.find("http_its"); // TODO Use params
        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());
          if (binary_body.ischosen(LibItsHttp__BinaryMessageBodyTypes::BinaryBody::ALT_ieee1609dot2__data)) {
            _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
            processed = true;
            processed = true;
          } else if (binary_body.ischosen(LibItsHttp__BinaryMessageBodyTypes::BinaryBody::ALT_ieee1609dot2__certificate)) {
            _codecs["http_its"]->encode((Record_Type &)binary_body.ieee1609dot2__certificate(), p_encoding_buffer); // TODO Use params
            processed = true;
          } else {
            loggers::get_instance().warning("http_codec::encode_body: Unsupported variant");
          }
        }
        }
      } // TODO Add new HTTP message codec here
      } // TODO Add new HTTP message codec here
      if (!processed) {
      if (!processed) {
+8 −6
Original line number Original line Diff line number Diff line
@@ -87,22 +87,24 @@ LogEventTypes:= Yes
#Cygwin
#Cygwin
#system.mapemSpatemPort.params := "MAPEM(next_header=btpB,header_type=uni)/BTP(dst_port=2006)/GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=1,secured_mode=0,sec_db_path=/home/yanng/tmp/certificates)/ETH(mac_src=e2b7b30429eb)/PCAP(mac_src=e2b7b30429eb,nic=CEBB111F-D749-4B40-8B4D-DBB060E90987,filter=and ether proto 0x8947)"
#system.mapemSpatemPort.params := "MAPEM(next_header=btpB,header_type=uni)/BTP(dst_port=2006)/GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=1,secured_mode=0,sec_db_path=/home/yanng/tmp/certificates)/ETH(mac_src=e2b7b30429eb)/PCAP(mac_src=e2b7b30429eb,nic=CEBB111F-D749-4B40-8B4D-DBB060E90987,filter=and ether proto 0x8947)"
# Linux
# Linux
#system.mapemSpatemPort.params := "MAPEM(next_header=btpB,header_type=gbc)/BTP(dst_port=2006)/GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=1,secured_mode=0,sec_db_path=../data/certificates/certificates)/ETH(mac_src=dc536045af7f)/PCAP(mac_src=dc536045af7f,nic=wlp2s0,filter=and ether proto 0x8947)"
#    ETH
system.mapemSpatemPort.params := "MapemSpatem(next_header=btpB,header_type=gbc)/BTP(dst_port=2006)/GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=1,secured_mode=1,sec_db_path=../data/certificates/certificates)/ETH(mac_src=dc536045af7e)/PCAP(mac_src=dc536045af7e,nic=wlp0s20f3,filter=and ether proto 0x8947)"
#system.mapemSpatemPort.params := "MapemSpatem(next_header=btpB,header_type=gbc)/BTP(dst_port=2006)/GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=1,secured_mode=0,sec_db_path=../data/certificates/certificates)/ETH(mac_src=dc536045af7f)/PCAP(mac_src=dc536045af7f,nic=enx00e07cc91967,filter=and ether proto 0x8947)"
#    WiFi
#system.mapemSpatemPort.params := "MapemSpatem(next_header=btpB,header_type=gbc)/BTP(dst_port=2006)/GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=1,secured_mode=1,sec_db_path=../data/certificates/certificates)/ETH(mac_src=dc536045af7e)/PCAP(mac_src=dc536045af7e,nic=wlp0s20f3,filter=and ether proto 0x8947)"
# Linux over UDP
# Linux over UDP
#system.mapemSpatemPort.params := "MAPEM(next_header=btpB,header_type=gbc)/BTP(dst_port=2006)/GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=1,secured_mode=0,sec_db_path=../data/certificates/certificates)/ETH(mac_src=dc536045af7f)/UDP(dst_ip=192.168.146.26,src_port=4041,dst_port=50544)"
system.mapemSpatemPort.params := "MapemSpatem(next_header=btpB,header_type=gbc)/BTP(dst_port=2006)/GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=0,secured_mode=0,sec_db_path=../data/certificates/certificates)/ETH(mac_src=dc536045af7f)/UDP(dst_ip=81.47.99.165,src_port=4041,dst_port=50544)"


# MAPEM UpperTester port based on UDP
# MAPEM UpperTester port based on UDP
system.utPort.params := "UT_MAPEMSPATEM/UDP(dst_ip=127.0.0.1,dst_port=12345,src_port=12346)"
system.utPort.params := "UT_MAPEMSPATEM/UDP(dst_ip=81.47.99.165)" #,dst_port=12346,src_port=12346)"


[EXECUTE]
[EXECUTE]


#ItsMapem_TestCases.TC_IS_RLT_xxx_BV_01
#ItsMapem_TestCases.TC_IS_RLT_xxx_BV_01


# Check that protocolVersion is set to 1 and messageID is set to 4
# Check that protocolVersion is set to 1 and messageID is set to 4
ItsMapem_TestCases.TC_IS_RLT_GEN_MSGF_BV_01
#ItsMapem_TestCases.TC_IS_RLT_GEN_MSGF_BV_01
# Check that the intersection information revision number is changed when the intersection  configuration is changed.
# Check that the intersection information revision number is changed when the intersection  configuration is changed.
#ItsMapem_TestCases.TC_IS_RLT_GEN_MSGF_BV_02
ItsMapem_TestCases.TC_IS_RLT_GEN_MSGF_BV_02
# Check that the intersection information revision number is not changed when the intersection configuration is still the same.
# Check that the intersection information revision number is not changed when the intersection configuration is still the same.
#ItsMapem_TestCases.TC_IS_RLT_GEN_MSGF_BV_03
#ItsMapem_TestCases.TC_IS_RLT_GEN_MSGF_BV_03
# Check that RLT Service transmits MAPEM with the valid connection trajectories.
# Check that RLT Service transmits MAPEM with the valid connection trajectories.
+1 −1
Original line number Original line Diff line number Diff line
AtsPki_Etas.cfg_
AtsPki_Atos.cfg_
 No newline at end of file
 No newline at end of file
+27 −16
Original line number Original line Diff line number Diff line
@@ -37,7 +37,7 @@ LibItsPki_Pics.PICS_HTTP_GET_URI_CRL := "/getcrl/347A3B143C94C298"
LibItsPki_Pics.PICS_HTTP_GET_URI_ECTL  := "/getectl/0DA3EE9ACF7F9F14"
LibItsPki_Pics.PICS_HTTP_GET_URI_ECTL  := "/getectl/0DA3EE9ACF7F9F14"


LibItsPki_Pics.PICS_SIMULATE_EA_ENTITY    := true # CERT_TS_A_EA shall be trusted by the PKI
LibItsPki_Pics.PICS_SIMULATE_EA_ENTITY    := true # CERT_TS_A_EA shall be trusted by the PKI
LibItsPki_Pics.PICS_TS_EA_CERTIFICATE_ID  := "ATOS_EA_D41845A1F71C356A" # "ATOS_EA_D41845A1F71C356A" # Use CERT_TS_A_EA when the TS simulate the EA (TC_SECPKI_AA_AUTHVAL_01_BV) with PICS_SIMULATE_EA_ENTITY set
LibItsPki_Pics.PICS_TS_EA_CERTIFICATE_ID  := "CERT_TS_A_EA" # "ATOS_EA_D41845A1F71C356A" # Use CERT_TS_A_EA when the TS simulate the EA (TC_SECPKI_AA_AUTHVAL_01_BV) with PICS_SIMULATE_EA_ENTITY set
LibItsPki_Pics.PICS_TS_AA_CERTIFICATE_ID  := "CERT_TS_A_AA" # CERT_TS_A_AA & CERT_IUT_A_RCA shall be trusted by the PKI
LibItsPki_Pics.PICS_TS_AA_CERTIFICATE_ID  := "CERT_TS_A_AA" # CERT_TS_A_AA & CERT_IUT_A_RCA shall be trusted by the PKI
LibItsPki_Pics.PICS_IUT_AA_CERTIFICATE_ID := "ATOS_AA_A8AA9CAB63B783EE"
LibItsPki_Pics.PICS_IUT_AA_CERTIFICATE_ID := "ATOS_AA_A8AA9CAB63B783EE"
LibItsPki_Pics.PICS_TS_CA_CERTIFICATE_ID  := "ATOS_RCA_347A3B143C94C298"
LibItsPki_Pics.PICS_TS_CA_CERTIFICATE_ID  := "ATOS_RCA_347A3B143C94C298"
@@ -64,7 +64,14 @@ LibItsPki_Pics.PICS_ITS_S_SIGN_NISTP256_PUBLIC_KEY := '038038f5490cd5a58ff5465d3
#LibItsPki_Pics.PICS_SECPKI_REENROLMENT := false # Check in logs the pattern '==> EC ' to find the required information for re-enrolment
#LibItsPki_Pics.PICS_SECPKI_REENROLMENT := false # Check in logs the pattern '==> EC ' to find the required information for re-enrolment


# URI to request CTL
# URI to request CTL
LibItsPki_Pics.PICS_HTTP_POST_URI_DC := "/ctl"
LibItsPki_Pics.PICS_HTTP_POST_URI_DC := "/dc"
LibItsPki_Pics.PICS_HTTP_POST_URI_CTL := "/ctl"
LibItsPki_Pics.PICS_HTTP_POST_URI_CRL := "/crl"
LibItsPki_Pics.PICS_DC_ENDPOINT := "http://yanngarcia.ddns.net/dc"
LibItsPki_Pics.PICS_AA_ENDPOINT := "http://yanngarcia.ddns.net/aa"
LibItsPki_Pics.PICS_EA_ENDPOINT := "http://yanngarcia.ddns.net/ea"




#LibItsPki_Pixits.PX_INCLUDE_ENCRYPTION_KEYS := false # No encryption key in Authorization request
#LibItsPki_Pixits.PX_INCLUDE_ENCRYPTION_KEYS := false # No encryption key in Authorization request


@@ -94,11 +101,12 @@ LogEventTypes:= Yes
[TESTPORT_PARAMETERS]
[TESTPORT_PARAMETERS]
# Multiple HTTP component ports
# Multiple HTTP component ports
system.httpEcPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(debug=1,server=0.atos-ea.l0.c-its-pki.eu)"
system.httpEcPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(debug=1,server=0.atos-ea.l0.c-its-pki.eu)"
system.httpAtVPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(debug=1,server=0.atos-ea.l0.c-its-pki.eu)" # To be used when IUT is the EA
#system.httpAtVPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(debug=1,server=0.atos-ea.l0.c-its-pki.eu)" # To be used when IUT is the EA
#system.httpAtVPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(debug=1,server_mode=1,server=192.168.1.43,local_port=80)" # Multiple HTTP component ports specific to TC_SECPKI_AA_AUTHVAL_xx
system.httpAtVPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(debug=1,server_mode=1,server=192.168.1.43,local_port=80)" # To be used when IUT is the AA - Multiple HTTP component ports specific to TC_SECPKI_AA_AUTHVAL_xx
system.httpAtPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(debug=1,server=0.atos-aa.l0.c-its-pki.eu)"
system.httpAtPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(debug=1,server=0.atos-aa.l0.c-its-pki.eu)"


system.httpCaPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(debug=1,server=0.atos-dc.l0.c-its-pki.eu)"
#system.httpCaPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(debug=1,server=0.atos-dc.l0.c-its-pki.eu)"
system.httpCaPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(debug=1,server_mode=1,server=192.168.1.43)"
system.httpTlmPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(debug=1,server=0.atos-dc.l0.c-its-pki.eu)"
system.httpTlmPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(debug=1,server=0.atos-dc.l0.c-its-pki.eu)"


[EXECUTE]
[EXECUTE]
@@ -165,7 +173,7 @@ system.httpTlmPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)
#ItsPki_TestCases.TC_SECPKI_EA_ENR_12_BV
#ItsPki_TestCases.TC_SECPKI_EA_ENR_12_BV


# The AuthorizationValidationResponse message shall be sent by the EA to the AA across the interface at reference point S4 in response to a received AuthorizationValidationRequest message
# The AuthorizationValidationResponse message shall be sent by the EA to the AA across the interface at reference point S4 in response to a received AuthorizationValidationRequest message
ItsPki_TestCases.TC_SECPKI_EA_AUTHVAL_RCV_01_BV
#ItsPki_TestCases.TC_SECPKI_EA_AUTHVAL_RCV_01_BV
# Check that EA doesn't accept Authorization Validation Request when SharedAtRequest is signed with certificate without appropriate permissions
# Check that EA doesn't accept Authorization Validation Request when SharedAtRequest is signed with certificate without appropriate permissions
#ItsPki_TestCases.TC_SECPKI_EA_AUTHVAL_RCV_02_BI
#ItsPki_TestCases.TC_SECPKI_EA_AUTHVAL_RCV_02_BI


@@ -190,6 +198,11 @@ ItsPki_TestCases.TC_SECPKI_EA_AUTHVAL_RCV_01_BV
#   LibItsPki_Pics.PICS_TS_CA_CERTIFICATE_ID  := PKI RCA cert
#   LibItsPki_Pics.PICS_TS_CA_CERTIFICATE_ID  := PKI RCA cert
#   system.httpAtVPort.params := TCP(server=server=192.168.1.43)
#   system.httpAtVPort.params := TCP(server=server=192.168.1.43)


# Check that the AA sends AuthorizationValidationRequest after receiving of the AuthorizationRequest
#ItsPki_TestCases.TC_SECPKI_AA_AUTHVAL_01_BV
# Check that the AuthorizationValidationRequest message is encrypted using approved algorithm and sent to only one Enrolment Authority
ItsPki_TestCases.TC_SECPKI_AA_AUTHVAL_02_BV

# Check that the EA/AA is able to decrypt the AuthorizationRequest message using the encryption private key corresponding to the recipient certificate...
# Check that the EA/AA is able to decrypt the AuthorizationRequest message using the encryption private key corresponding to the recipient certificate...
#ItsPki_TestCases.TC_SECPKI_AA_AUTH_RCV_01_BV
#ItsPki_TestCases.TC_SECPKI_AA_AUTH_RCV_01_BV
# Check that the AA is able to decrypt the AuthorizationRequest message using the encryption private key corresponding to the recipient certificate...
# Check that the AA is able to decrypt the AuthorizationRequest message using the encryption private key corresponding to the recipient certificate...
@@ -223,9 +236,9 @@ ItsPki_TestCases.TC_SECPKI_EA_AUTHVAL_RCV_01_BV
# Send an AT request, but the expiry date of the CSR is after now + maximum pre-loading period (considering values in C-ITS CP)
# Send an AT request, but the expiry date of the CSR is after now + maximum pre-loading period (considering values in C-ITS CP)
#ItsPki_TestCases.TC_SECPKI_AA_AUTH_RCV_16_BI
#ItsPki_TestCases.TC_SECPKI_AA_AUTH_RCV_16_BI


# Check that the AA sends AuthorizationValidationRequest after receiving of the AuthorizationRequest
# Config:
#ItsPki_TestCases.TC_SECPKI_AA_AUTHVAL_01_BV <====
#   system.httpCaPort.params := TCP(debug=1,server=0.atos-dc.l0.c-its-pki.eu)

# Await CTL request and provides "CERT_IUT_A_RCA", "CERT_TS_A_AA", "CERT_TS_A_EA" certificates
# Check that the RootCA generates the Full CTL when new EA is about to be added to the Root CTL
# Check that the RootCA generates the Full CTL when new EA is about to be added to the Root CTL
#ItsPki_TestCases.TC_RCA_CTLGEN_01_BV
#ItsPki_TestCases.TC_RCA_CTLGEN_01_BV
# Check that the RootCA generates the CRL signed with appropriate certificate.
# Check that the RootCA generates the CRL signed with appropriate certificate.
@@ -233,13 +246,6 @@ ItsPki_TestCases.TC_SECPKI_EA_AUTHVAL_RCV_01_BV
# Check that the TLM generates the ECTL when new RootCA is about to be added
# Check that the TLM generates the ECTL when new RootCA is about to be added
#ItsPki_TestCases.TC_TLM_ECTLGEN_01_BV
#ItsPki_TestCases.TC_TLM_ECTLGEN_01_BV



# Config:
#   system.httpCaPort.params := TCP(debug=1,server_mode=1,server=10.200.60.6)
# Await CTL request and provides "CERT_IUT_A_RCA", "CERT_TS_A_AA", "CERT_TS_A_EA" certificates
#ItsPki_TestCases.TC_RCA_CTLGEN_xx_BV # 


# Check that the issuing certificate has version 3
# Check that the issuing certificate has version 3
#ItsPki_TestCases.TC_SECPKI_CA_CERTGEN_01_BV
#ItsPki_TestCases.TC_SECPKI_CA_CERTGEN_01_BV
# Check that the issuing certificate has type explicit
# Check that the issuing certificate has type explicit
@@ -285,6 +291,11 @@ ItsPki_TestCases.TC_SECPKI_EA_AUTHVAL_RCV_01_BV
# Check that the validityPeriod of the subordinate certificate is inside the validityPeriod of the issuing certificate
# Check that the validityPeriod of the subordinate certificate is inside the validityPeriod of the issuing certificate
#ItsPki_TestCases.TC_SECPKI_CA_CERTGEN_18_BV
#ItsPki_TestCases.TC_SECPKI_CA_CERTGEN_18_BV


# Config:
#   system.httpCaPort.params := TCP(debug=1,server_mode=1,server=192.168.1.43)
# Await CTL request and provides "CERT_IUT_A_RCA", "CERT_TS_A_AA", "CERT_TS_A_EA" certificates
#ItsPki_TestCases.TC_RCA_CTLGEN_xx_BV

[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
+2 −2
Original line number Original line Diff line number Diff line
@@ -101,7 +101,7 @@ system.httpTlmPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)
#   system.httpAtVPort.params := TCP(server=ea.etsi.autocrypt.io:9100)
#   system.httpAtVPort.params := TCP(server=ea.etsi.autocrypt.io:9100)


# 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
# 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 (not containing an item of type PsidSsp)
# Check that EA doesn't accept Enrolment rekeying request when enrolment is not permitted by signing certificate (not containing an item of type PsidSsp)
#ItsPki_TestCases.TC_SECPKI_EA_ENR_RCV_02_BI_01
#ItsPki_TestCases.TC_SECPKI_EA_ENR_RCV_02_BI_01
@@ -155,7 +155,7 @@ ItsPki_TestCases.TC_SECPKI_EA_ENR_RCV_01_BV
#ItsPki_TestCases.TC_SECPKI_EA_ENR_12_BV
#ItsPki_TestCases.TC_SECPKI_EA_ENR_12_BV


# The AuthorizationValidationResponse message shall be sent by the EA to the AA across the interface at reference point S4 in response to a received AuthorizationValidationRequest message
# The AuthorizationValidationResponse message shall be sent by the EA to the AA across the interface at reference point S4 in response to a received AuthorizationValidationRequest message
#ItsPki_TestCases.TC_SECPKI_EA_AUTHVAL_RCV_01_BV
ItsPki_TestCases.TC_SECPKI_EA_AUTHVAL_RCV_01_BV
# Check that EA doesn't accept Authorization Validation Request when SharedAtRequest is signed with certificate without appropriate permissions
# Check that EA doesn't accept Authorization Validation Request when SharedAtRequest is signed with certificate without appropriate permissions
#ItsPki_TestCases.TC_SECPKI_EA_AUTHVAL_RCV_02_BI
#ItsPki_TestCases.TC_SECPKI_EA_AUTHVAL_RCV_02_BI


Loading