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

AtsPki validation with Gemalto

parent f68d322f
......@@ -620,7 +620,7 @@ namespace LibItsSecurity__Functions
p__publicEphemeralKeyCompressed = ec.public_key_compressed();
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;
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
p__nonce = ec.nonce();
loggers::get_instance().log_msg("fx__encryptWithEciesNistp256WithSha256: p__nonce: ", p__nonce);
......
......@@ -9,7 +9,7 @@
#include "IVIM_ports/AdapterControlPort_IVIM.partC"
#include "MapemSpatem_ports/AdapterControlPort_MapemSpatem.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"
#else //_NO_SOFTLINKS_
......@@ -20,7 +20,7 @@
#include "AdapterControlPort_MapemSpatem.partC"
#include "AdapterControlPort_SremSsem.partC"
#include "AdapterControlPort_GN.partC"
#include "AdapterControlPort_Pki.partC"
//#include "AdapterControlPort_Pki.partC"
/*
#include "AdapterControlPort_IVIM.partC"
#include "AdapterControlPort_MapemSpatem.partC"
......
......@@ -12,7 +12,7 @@
#include "IVIM_ports/AdapterControlPort_IVIM.partH"
#include "MapemSpatem_ports/AdapterControlPort_MapemSpatem.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"
#else //_NO_SOFTLINKS_
......@@ -23,7 +23,7 @@
#include "AdapterControlPort_MapemSpatem.partH"
#include "AdapterControlPort_SremSsem.partH"
#include "AdapterControlPort_GN.partH"
#include "AdapterControlPort_Pki.partH"
//#include "AdapterControlPort_Pki.partH"
/*
#include "AdapterControlPort_IVIM.partH"
#include "AdapterControlPort_MapemSpatem.partH"
......
......@@ -9,7 +9,7 @@
#include "IVIM_ports/UpperTesterPort_IVIM.partC"
#include "MapemSpatem_ports/UpperTesterPort_MapemSpatem.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"
#else //_NO_SOFTLINKS_
......@@ -21,7 +21,7 @@
#include "UpperTesterPort_MapemSpatem.partC"
#include "UpperTesterPort_SremSsem.partC"
#include "UpperTesterPort_GN.partC"
#include "UpperTesterPort_Pki.partC"
//#include "UpperTesterPort_Pki.partC"
/*
#include "UpperTesterPort_IVIM.partC"
//#include "UpperTesterPort_MapSpat.partC"
......
......@@ -13,7 +13,7 @@
#include "IVIM_ports/UpperTesterPort_IVIM.partH"
#include "MapemSpatem_ports/UpperTesterPort_MapemSpatem.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"
#else //_NO_SOFTLINKS_
......@@ -25,7 +25,7 @@
#include "UpperTesterPort_MapemSpatem.partH"
#include "UpperTesterPort_SremSsem.partH"
#include "UpperTesterPort_GN.partH"
#include "UpperTesterPort_Pki.partH"
//#include "UpperTesterPort_Pki.partH"
/*
#include "UpperTesterPort_IVIM.partH"
//#include "UpperTesterPort_MapSpat.partH"
......
......@@ -398,6 +398,12 @@ int http_codec::encode_body(const LibItsHttp__MessageBodyTypes::HttpMessageBody&
if (it != _codecs.cend()) {
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
// 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;
}
} // TODO Add new HTTP message codec here
......
......@@ -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) {
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) {
......@@ -109,18 +113,24 @@ void pki_layer::sendMsg(const EtsiTs102941TypesAuthorizationValidation::Authoriz
etsi_ts_102941_data.content().authorizationValidationRequest() = p_authorization_validation_request;
loggers::get_instance().log_msg("pki_layer::sendMsg: AuthorizationValidationRequest: ", etsi_ts_102941_data);
OCTETSTRING authorization_validation_request;
_etsi_ts102941_types_authorization_validation_request.encode(p_authorization_validation_request, authorization_validation_request);
// Encode it
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
OCTETSTRING etsi_ts_102941_data;
if (sign_and_encrypt_payload(authorization_validation_request, etsi_ts_102941_data, _params) == -1) {
OCTETSTRING secured_authorization_validation_request;
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");
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) {
......
......@@ -7,7 +7,7 @@ LibItsCommon_Pixits.PX_IUT_STATION_ID := 2533729309
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
[LOGGING]
......@@ -90,8 +90,10 @@ LogEventTypes:= Yes
# time_offset : Time offset, used to skip packets with time offset < time_offset
# 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)/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,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
# CAM UpperTester port based on UDP
#system.utPort.params := "UT_CAM/UDP(dst_ip=192.168.2.3,dst_port=8000)"
......
......@@ -87,7 +87,7 @@ LogEventTypes:= Yes
# time_offset : Time offset, used to skip packets with time offset < time_offset
# 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)
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 := {
LibItsGeoNetworking_Pixits.PX_GN_UPPER_LAYER := e_btpB
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"
LibItsPki_Pics.PICS_HTTP_GET_URI := "/"
# Enable Security support
LibItsGeoNetworking_Pics.PICS_GN_SECURITY := true
......@@ -27,7 +29,7 @@ LibItsSecurity_Pixits.PX_CERTIFICATE_POOL_PATH := "/home/vagrant/tmp"
LibItsSecurity_Pixits.PX_IUT_SEC_CONFIG_NAME := "asn1c_cert"
# Seed
LibItsSecurity_Pics.PICS_SEC_FIXED_KEYS := true
LibItsSecurity_Pics.PICS_SEC_FIXED_KEYS := false
[LOGGING]
# In this section you can specify the name of the log file and the classes of events
......@@ -115,7 +117,8 @@ LogEventTypes:= Yes
# 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.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)"
# GeoNetworking UpperTester port based on UDP
......@@ -140,7 +143,6 @@ ItsPki_TestCases.TC_SEC_PKI_SND_EA_BV_02
[MAIN_CONTROLLER]
# The options herein control the behavior of MC.
KillTimer := 10.0
TCPPort := 0
LocalAddress := 127.0.0.1
TCPPort := 12000
NumHCs := 1
......
......@@ -5,9 +5,9 @@
# The GeoNetworking address of the IUT.
LibItsGeoNetworking_Pics.PICS_GN_LOCAL_GN_ADDR := {
typeOfAddress := e_initial,
stationType := e_unknown, #e_roadSideUnit,
stationType := e_passengerCar, #e_roadSideUnit,
stationCountryCode := 0, #33,
mid := '4C5E0C14D2EC'O
mid := 'BA749705A41D'O
}
LibItsGeoNetworking_Pixits.PX_GN_UPPER_LAYER := e_btpB
......@@ -15,10 +15,9 @@ LibItsGeoNetworking_Pixits.PX_GN_UPPER_LAYER := e_btpB
# Enable Security support
LibItsGeoNetworking_Pics.PICS_GN_SECURITY := true
# 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
LibItsSecurity_Pixits.PX_IUT_SEC_CONFIG_NAME := "";
LibItsSecurity_Pixits.PX_IUT_SEC_CONFIG_NAME := "asn1c_cert"
[LOGGING]
# In this section you can specify the name of the log file and the classes of events
......@@ -101,25 +100,24 @@ LogEventTypes:= Yes
# save_mode : 1 to save sent packet, 0 otherwise
# Single GeoNetworking component port
#system.geoNetworkingPort.params := "
# 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 := "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
system.geoNetworkingPort.params := "
GN(ll_address=4C5E0C14D2EC,latitude=43551050,longitude=10298730,beaconing=0,expiry=1000)/
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)"
#system.geoNetworkingPort.params := "
# GN(ll_address=4C5E0C14D2EC,latitude=43551050,longitude=10298730,beaconing=0,expiry=1000)/
# 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)"
# 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
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]
#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 ---------------------------
# Check that IUT sends the secured CAM using SignedData container.
......@@ -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 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
# 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=
#TestCodec_SecuredFuntions.tc_sha384_1
#TestCodec_SecuredFuntions.tc_f_generate_key_pair_1
#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_verifyWithEcdsaNistp256WithSha256_1
#TestCodec_SecuredFuntions.tc_f_verifyWithEcdsaNistp256WithSha256_2
......@@ -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_certificate_asn1c_1
#TestCodec_Certificates.tc_certificate_asn1c_2
#TestCodec_Certificates.tc_certificate_gemalto_1
# Secured messages
#TestCodec_SecuredMessages.tc_ssp_cam_1
#TestCodec_SecuredMessages.tc_ssp_cam_2
......@@ -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_response_1
#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_2
#TestCodec_Pki.tc_inner_ec_functions_3
......
......@@ -462,7 +462,7 @@ module ItsDenm_TestCases {
* the IUT is requested to update an event associated to ACTION_ID1
* }
* then {
* the IUT does not send send any DENM for this event
* the IUT does not send any DENM for this event
* }
* }
* </pre>
......
......@@ -133,11 +133,11 @@ module ItsPki_TestCases {
group f_TC_SEC_PKI_ITSS_ENR_BV_01 {
function f_TC_SEC_PKI_ITSS_ENR_BV_01_itss(
in charstring p_certificate_id,
in octetstring p_private_key,
in octetstring p_publicKeyCompressed,
in integer p_compressedMode
) runs on ItsPkiItss /*system ItsPkiItssSystem*/ {
in charstring p_certificate_id,
in octetstring p_private_key,
in octetstring p_publicKeyCompressed,
in integer p_compressedMode
) runs on ItsPkiItss /*system ItsPkiItssSystem*/ {
// Local variables
// Test component configuration
......@@ -736,7 +736,7 @@ module ItsPki_TestCases {
}
// 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
......@@ -748,13 +748,13 @@ module ItsPki_TestCases {
// Test Body
httpPort.send(
m_http_request(
m_http_request_get(
PICS_HTTP_GET_URI,
v_headers,
m_http_message_body_binary(
m_binary_body_ieee1609dot2_data(
v_ieee1609dot2_signed_and_encrypted_data
)))));
m_http_request_post(
PICS_HTTP_GET_URI,
v_headers,
m_http_message_body_binary(
m_binary_body_ieee1609dot2_data(
v_ieee1609dot2_signed_and_encrypted_data
)))));
tc_ac.start;
alt {
[] httpPort.receive(
......@@ -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 {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout);
......@@ -851,15 +860,15 @@ module ItsPki_TestCases {
f_init_default_headers_list(v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_HTTP_GET_URI,
v_headers,
m_http_message_body_binary(
m_binary_body_ieee1609dot2_data(
v_ieee1609dot2_signed_and_encrypted_data
)))));
m_http_request_post(
PICS_HTTP_GET_URI,
v_headers,
m_http_message_body_binary(
m_binary_body_ieee1609dot2_data(
v_ieee1609dot2_signed_and_encrypted_data
)))));
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
......@@ -962,13 +971,13 @@ module ItsPki_TestCases {
f_init_default_headers_list(v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_HTTP_GET_URI,
v_headers,
m_http_message_body_binary(
m_binary_body_ieee1609dot2_data(
v_ieee1609dot2_signed_and_encrypted_data
)))));
m_http_request_post(
PICS_HTTP_GET_URI,
v_headers,
m_http_message_body_binary(
m_binary_body_ieee1609dot2_data(
v_ieee1609dot2_signed_and_encrypted_data
)))));
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
......@@ -1070,7 +1079,7 @@ module ItsPki_TestCases {
f_init_default_headers_list(v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
m_http_request_post(
PICS_HTTP_GET_URI,
v_headers,
m_http_message_body_binary(
......@@ -1177,7 +1186,7 @@ module ItsPki_TestCases {
f_init_default_headers_list(v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
m_http_request_post(
PICS_HTTP_GET_URI,
v_headers,
m_http_message_body_binary(
......@@ -1284,7 +1293,7 @@ module ItsPki_TestCases {
f_init_default_headers_list(v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
m_http_request_post(
PICS_HTTP_GET_URI,
v_headers,
m_http_message_body_binary(
......@@ -1387,7 +1396,7 @@ module ItsPki_TestCases {
f_init_default_headers_list(v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
m_http_request_post(
PICS_HTTP_GET_URI,
v_headers,
m_http_message_body_binary(
......@@ -1488,7 +1497,7 @@ module ItsPki_TestCases {
f_init_default_headers_list(v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
m_http_request_post(
PICS_HTTP_GET_URI,
v_headers,
m_http_message_body_binary(
......@@ -1589,7 +1598,7 @@ module ItsPki_TestCases {
f_init_default_headers_list(v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
m_http_request_post(
PICS_HTTP_GET_URI,
v_headers,
m_http_message_body_binary(
......@@ -1768,7 +1777,7 @@ module ItsPki_TestCases {
f_init_default_headers_list(v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
m_http_request_post(
PICS_HTTP_GET_URI,
v_headers,
m_http_message_body_binary(
......@@ -1906,7 +1915,7 @@ module ItsPki_TestCases {
f_init_default_headers_list(v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
m_http_request_post(
PICS_HTTP_GET_URI,
v_headers,
m_http_message_body_binary(
......@@ -2036,13 +2045,13 @@ module ItsPki_TestCases {
f_init_default_headers_list(v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_HTTP_GET_URI,
v_headers,
m_http_message_body_binary(
m_binary_body_ieee1609dot2_data(
v_ieee1609dot2_signed_and_encrypted_data
)))));
m_http_request_post(
PICS_HTTP_GET_URI,
v_headers,
m_http_message_body_binary(
m_binary_body_ieee1609dot2_data(
v_ieee1609dot2_signed_and_encrypted_data
)))));
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
......
Subproject commit ee0529068f3ecf75f6845029f10935668a70340d
Subproject commit 119269254ac0b6bb4a5cdef3bd64ced8502353ce
......@@ -1114,6 +1114,19 @@ module TestCodec_Certificates {
}
} // End of testcase tc_certificate_asn1c_2
testcase tc_certificate_gemalto_1() runs on TCType system TCType {
const octetstring c_cert := '80030080e3c6bb16548f178d298300000000001874e3808466a88001012080010780012482080301ffff0301ffff800125820a0401ffffff0401ffffff800189820a0401ffffff0401ffffff80018a820a0401ffffff0401ffffff80018b820a0401ffffff0401ffffff80018c820a0401ffffff0401ffffff00018d800080830698dbc4ee30ec06bec42913daf024c5ecd415f49c8a72d87aee01c4b6b61ad58080831c965d29f2d3837052f2bdb45f6b4d9961e370cab50284372c5bd6285c16702280807c368781a209f2e7428f550f0032041c0c1c9d00fcd9aa4e58dede56998543b7fc84cbade97904bff78ff95ce22829386a97b6b2c4e8c564c5d159b8da28cf8d'O;
var bitstring v_enc_msg := oct2bit(c_cert);
var EtsiTs103097Certificate v_cert_dec;
var integer v_res := decvalue(v_enc_msg, v_cert_dec);
if (v_res == 0) {
log("Decoded message: ", v_cert_dec);
setverdict(pass, "Decoded succeed");
} else {
setverdict(fail, "Decoding failed");
}
} // End of testcase tc_certificate_gemalto_1
group encdec_functions {
function TestEtsiTs103097Certificate(
......
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