Commit 44d1384d authored by Yann Garcia's avatar Yann Garcia

Unify STF525 TTCN-3 code

parent 8b379cad
......@@ -134,14 +134,14 @@
</FolderProperties>
</FolderResource>
<FolderResource>
<FolderPath>ttcn/AtsIICP</FolderPath>
<FolderPath>ttcn/AtsGenCert</FolderPath>
<FolderProperties>
<CentralStorage>false</CentralStorage>
<ExcludeFromBuild>true</ExcludeFromBuild>
</FolderProperties>
</FolderResource>
<FolderResource>
<FolderPath>ttcn/AtsIPv6OverGeoNetworking</FolderPath>
<FolderPath>ttcn/AtsIICP</FolderPath>
<FolderProperties>
<CentralStorage>false</CentralStorage>
<ExcludeFromBuild>true</ExcludeFromBuild>
......@@ -273,6 +273,13 @@
<ExcludeFromBuild>true</ExcludeFromBuild>
</FolderProperties>
</FolderResource>
<FolderResource>
<FolderPath>ttcn/TestCodec</FolderPath>
<FolderProperties>
<CentralStorage>false</CentralStorage>
<ExcludeFromBuild>true</ExcludeFromBuild>
</FolderProperties>
</FolderResource>
</FolderProperties>
<FileProperties>
<FileResource>
......
......@@ -24,9 +24,9 @@ module ItsGenCert_Functions {
if (p_certificate_params.curve == e_nist_p256) {
f_generate_key_pair_nistp256(p_certificate_details.private_key, p_certificate_details.public_key_x, p_certificate_details.public_key_y, p_certificate_details.public_key_compressed, p_certificate_details.public_key_compressed_mode);
} else if (p_certificate_params.curve == e_brainpool_p256) {
f_generate_key_pair_brainpoolp256(p_certificate_details.private_key, p_certificate_details.public_key_x, p_certificate_details.public_key_y, p_certificate_details.public_key_compressed, p_certificate_details.public_key_compressed_mode);
f_generate_key_pair_brainpoolp256r1(p_certificate_details.private_key, p_certificate_details.public_key_x, p_certificate_details.public_key_y, p_certificate_details.public_key_compressed, p_certificate_details.public_key_compressed_mode);
} else if (p_certificate_params.curve == e_brainpool_p384) {
f_generate_key_pair_brainpoolp384(p_certificate_details.private_key, p_certificate_details.public_key_x, p_certificate_details.public_key_y, p_certificate_details.public_key_compressed, p_certificate_details.public_key_compressed_mode);
f_generate_key_pair_brainpoolp384r1(p_certificate_details.private_key, p_certificate_details.public_key_x, p_certificate_details.public_key_y, p_certificate_details.public_key_compressed, p_certificate_details.public_key_compressed_mode);
} else {
log("f_generate_signing_keys: Unsupported curve");
return -1;
......@@ -36,7 +36,7 @@ module ItsGenCert_Functions {
if (p_certificate_params.encryption_curve == e_nist_p256) {
f_generate_key_pair_nistp256(p_certificate_details.private_enc_key, p_certificate_details.public_enc_key_x, p_certificate_details.public_enc_key_y, p_certificate_details.public_enc_key_compressed, p_certificate_details.public_enc_key_compressed_mode);
} else if (p_certificate_params.encryption_curve == e_brainpool_p256) {
f_generate_key_pair_brainpoolp256(p_certificate_details.private_enc_key, p_certificate_details.public_enc_key_x, p_certificate_details.public_enc_key_y, p_certificate_details.public_enc_key_compressed, p_certificate_details.public_enc_key_compressed_mode);
f_generate_key_pair_brainpoolp256r1(p_certificate_details.private_enc_key, p_certificate_details.public_enc_key_x, p_certificate_details.public_enc_key_y, p_certificate_details.public_enc_key_compressed, p_certificate_details.public_enc_key_compressed_mode);
} else {
log("f_generate_signing_keys: Unsupported encryption curve");
return -1;
......@@ -273,10 +273,10 @@ module ItsGenCert_Functions {
// Calculate the whole HashedId8 as defined in IEEE Std 1609.2-20XX Clause 6.4.3 CertificateBase
if (p_certificate_params.hash_algorithm == sha256) {
p_certificate_details.hash := f_hashWithSha256(p_certificate_details.enc_cert); // Hash of the whole certificate
p_certificate_details.hashid8 := f_HashedId8FromSha256(p_certificate_details.hash);
p_certificate_details.hashid8 := f_hashedId8FromSha256(p_certificate_details.hash);
} else {
p_certificate_details.hash := f_hashWithSha384(p_certificate_details.enc_cert); // Hash of the whole certificate
p_certificate_details.hashid8 := f_HashedId8FromSha384(p_certificate_details.hash);
p_certificate_details.hashid8 := f_hashedId8FromSha384(p_certificate_details.hash);
}
if (p_certificate_params.certificate_id == p_certificate_params.signed_by) { // Root certificate
log("f_finalyse_certificate: Root certificate");
......
......@@ -127,6 +127,7 @@ module ItsGencert_TestCases {
}
} else {
var EtsiTs103097Certificate v_issuing_certificate;
var charstring v_certificate_id;
var HashedId8 v_issuer;
if (ischosen(v_certificate.issuer.sha256AndDigest)) {
......@@ -137,7 +138,7 @@ module ItsGencert_TestCases {
setverdict(fail, "Unsupported issuer");
stop;
}
if (f_getCertificateFromDigest(v_issuer, v_issuing_certificate) == false) {
if (f_getCertificateFromDigest(v_issuer, v_issuing_certificate, v_certificate_id) == false) {
setverdict(fail, "Failed to get certificate from digest ", v_issuer);
stop;
}
......
/**
* @author ETSI / STF405 /STF449
* @version $URL$
* $Id$
* @version $Url: https://oldforge.etsi.org/svn/ITS/tags/20170222_STF527_Final/ttcn/AtsIPv6OverGeoNetworking/ItsIpv6OverGeoNetworking_TestControl.ttcn $
* $Id: ItsIpv6OverGeoNetworking_TestControl.ttcn 1423 2014-05-22 13:59:50Z filatov $
* @desc Test Control file for IPv6 over GeoNetworking Protocol
*
*/
......
/**
* @author ETSI / STF517
* @version $URL$
* $Id$
* @version $Url: https://oldforge.etsi.org/svn/ITS/tags/20170222_STF527_Final/ttcn/AtsIVIM/ItsIvim_TestCases.ttcn $
* $Id: ItsIvim_TestCases.ttcn 2648 2017-01-03 09:02:30Z garciay $
* @desc Testcases for IVI Service
* @reference ETSI TS 103 301 v1.1.1
* @copyright ETSI Copyright Notification
......
/**
* @author ETSI / STF517
* @version $URL$
* $Id$
* @version $Url: https://oldforge.etsi.org/svn/ITS/tags/20170222_STF527_Final/ttcn/AtsIVIM/ItsIvim_TestControl.ttcn $
* $Id: ItsIvim_TestControl.ttcn 2648 2017-01-03 09:02:30Z garciay $
* @desc Test Control file for IVIM
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
......
/**
* @author ETSI STF517 / STF525
* @version $URL$
* $Id$
* @version $Url: https://oldforge.etsi.org/svn/ITS/tags/20170222_STF527_Final/ttcn/AtsIVIM/ItsIvim_TpFunctions.ttcn $
* $Id: ItsIvim_TpFunctions.ttcn,v 1.7 2019/01/07 08:56:01 dte Exp $
* @desc IVIM TP functions
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
......@@ -47,6 +47,7 @@ module ItsIvim_TpFunctions {
function f_IS_IVI_MSGF_BV_01() runs on ItsIvim {
// Local variables
var IviIdentificationNumber v_iviIdentificationNumber;
// Test control
if (not PICS_IVIM_GENERATION) {
......@@ -65,6 +66,7 @@ module ItsIvim_TpFunctions {
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_iviIdentificationNumber := f_utTriggerEvent(valueof(m_utTriggerEvent()));
tc_ac.start;
alt {
[] ivimPort.receive(
......@@ -83,7 +85,7 @@ module ItsIvim_TpFunctions {
}
// Postamble
f_poDefault();
f_poCancelEvent(e_iut, v_iviIdentificationNumber);
f_cfDown();
} // End of function f_IVIM_MSD_FMT_BV_01
......@@ -547,7 +549,7 @@ module ItsIvim_TpFunctions {
// Test Body
v_validTo := f_getCurrentTime() + 1000 * 3600; // Current ITS time + one hour
f_utUpdateEvent(m_utIvimUpdateEvent(v_iviIdentificationNumber, -, v_validTo));
f_utUpdateEvent(m_utIvimUpdateEvent(v_iviIdentificationNumber, -, -, v_validTo));
tc_ac.start;
alt {
......@@ -843,8 +845,9 @@ module ItsIvim_TpFunctions {
const TimestampIts c_repetitionInterval := c_duration_4sec;
var integer v_counter := 0;
var boolean v_ivimReceived := false;
timer t_minTransInterval := int2float(c_repetitionInterval) * 0.90;
timer t_maxTransInterval := int2float(c_repetitionInterval) * 1.10;
const float c_minTransInterval := int2float(c_repetitionInterval) * 0.90;
const float c_maxTransInterval := int2float(c_repetitionInterval) * 1.10;
var Times v_times := {};
var IviIdentificationNumber v_iviIdentificationNumber;
var IvimInd v_rcvdMsg;
......@@ -880,7 +883,7 @@ module ItsIvim_TpFunctions {
// Test Body
f_utUpdateEvent(m_utIvimUpdateEvent(v_iviIdentificationNumber, c_duration_4sec));
tc_ac.start;
tc_ac.start(60.0);
ivimPort.clear;
alt {
[] ivimPort.receive(
......@@ -893,38 +896,30 @@ module ItsIvim_TpFunctions {
v_iviIdentificationNumber,
IviStatus_update_
))))) {
tc_ac.stop;
v_ivimReceived := true;
tc_ac.start;
}
[] t_minTransInterval.timeout {
if (v_ivimReceived == true) {
log("*** " & testcasename() & ": FAIL: IVIM received BEFORE expiry of the minimum generation timer interval. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
} else {
repeat;
}
}
[] t_maxTransInterval.timeout {
if (v_ivimReceived == false) {
log("*** " & testcasename() & ": FAIL: IVIM received AFTER expiry of the maximum generation timer interval. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
} else {
v_times[v_counter] := tc_ac.read;
v_counter := v_counter + 1;
if (v_counter < c_maxLoopValue) {
v_ivimReceived := false;
t_minTransInterval.start;
t_maxTransInterval.start;
repeat;
} else {
log("*** " & testcasename() & ": PASS: Generation of IVIMs was successful ***");
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": FAIL: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
if (v_counter==c_maxLoopValue) {
for (v_counter:=1; v_counter<c_maxLoopValue; v_counter:=v_counter + 1) {
var float v_timeDiff := v_times[v_counter]-v_times[v_counter-1];
if (not match(v_timeDiff, (c_minTransInterval..c_maxTransInterval))) {
log("*** " & testcasename() & ": FAIL: IUT did NOT send IVIM with respect to the 'repetition interval' RI_1. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
break;
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
if (v_counter==c_maxLoopValue) {
log("*** " & testcasename() & ": FAIL: IUT sends IVIM with respect to the 'repetition interval' RI_1. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
......@@ -1010,6 +1005,7 @@ module ItsIvim_TpFunctions {
// Local variables
var IviIdentificationNumber v_iviIdentificationNumber;
var IvimInd v_rcvdMsg;
var integer v_timeOffset := 4 * c_duration_4sec; //at most 4 repetitions
// Test control
if (not PICS_IVIM_GENERATION) {
......@@ -1025,7 +1021,7 @@ module ItsIvim_TpFunctions {
// Preamble
f_prInitialState();
v_iviIdentificationNumber := f_utTriggerEvent(m_utTriggerEvent(c_repetition_interval_deactivated, -, f_getCurrentTime() + 1000 * c_duration_4sec));
v_iviIdentificationNumber := f_utTriggerEvent(m_utTriggerEvent(c_duration_4sec, -, f_getCurrentTime() + 1000 /* to milliseconds */ * v_timeOffset));
f_awaitIviMessage(
mw_ivimInd(
mw_anyIvimPdu(
......@@ -1041,7 +1037,8 @@ module ItsIvim_TpFunctions {
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_sleep(int2float(f_getCurrentTime() + 1000 * c_duration_4sec));
f_sleep(int2float(v_timeOffset));
ivimPort.clear; //remove repeated events
tc_noac.start;
alt {
......@@ -1055,7 +1052,7 @@ module ItsIvim_TpFunctions {
v_iviIdentificationNumber,
IviStatus_new_
))))) {
log("*** " & testcasename() & ": INFO: No more IVIM shall be set. ***");
log("*** " & testcasename() & ": INFO: No more IVIM shall be sent. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_noac.timeout {
......@@ -1107,7 +1104,7 @@ module ItsIvim_TpFunctions {
// Test Body
f_utTerminateEvent(m_utEventCancellation(v_iviIdentificationNumber));
tc_ac.start;
tc_noac.start;
alt {
[] ivimPort.receive(
mw_ivimInd(
......@@ -1119,7 +1116,7 @@ module ItsIvim_TpFunctions {
v_iviIdentificationNumber,
IviStatus_new_
))))) {
log("*** " & testcasename() & ": INFO: No more IVIM shall be set. ***");
log("*** " & testcasename() & ": INFO: No more IVIM shall be sent. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_noac.timeout {
......@@ -1469,7 +1466,7 @@ module ItsIvim_TpFunctions {
var IviIdentificationNumber v_iviIdentificationNumber;
// Test control
if (PICS_IVIM_GENERATION) {
if (not PICS_IVIM_GENERATION) {
log("*** " & testcasename() & ": PICS_IVIM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
......
/**
* @author ETSI / STF484
* @version $URL$
* $Id$
* @version $Url: https://oldforge.etsi.org/svn/ITS/tags/20170222_STF527_Final/ttcn/AtsMapemSpatem/ItsMapemSpatem_TestControl.ttcn $
* $Id: ItsMapemSpatem_TestControl.ttcn 2639 2016-12-14 09:22:07Z garciay $
* @desc Test Control file for MAPEM SPATEM
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
......
/**
* @author ETSI / STF517
* @version $URL$
* $Id$
* @version $Url: https://oldforge.etsi.org/svn/ITS/tags/20170222_STF527_Final/ttcn/AtsMapemSpatem/ItsMapem_TestCases.ttcn $
* $Id: ItsMapem_TestCases.ttcn 2646 2016-12-16 07:35:58Z garciay $
* @desc Testcases for RLT Service
* @reference ETSI TS 103 301 v1.1.1
* @copyright ETSI Copyright Notification
......
/**
* @author ETSI STF517
* @version $URL$
* $Id$
* @version $Url: https://oldforge.etsi.org/svn/ITS/tags/20170222_STF527_Final/ttcn/AtsMapemSpatem/ItsMapem_TpFunctions.ttcn $
* $Id: ItsMapem_TpFunctions.ttcn,v 1.2 2018/05/31 15:57:07 dte Exp $
* @desc MAPEM TP functions
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
......@@ -216,6 +216,7 @@ module ItsMapem_TpFunctions {
// Local variables
var MapemInd v_mapem;
var boolean v_firstFragmentReceived := false;
// Test control
if (not PICS_MAPEM_GENERATION) {
......@@ -242,15 +243,16 @@ module ItsMapem_TpFunctions {
f_utTriggerEvent(m_utTriggerEvent(mapemNewContentWithFragmentation));
tc_ac.start;
alt {
[] mapemSpatemPort.receive(
[not v_firstFragmentReceived] mapemSpatemPort.receive(
mw_mapemInd(
mw_mapemPdu(
mw_mapemLayerType
))) -> value v_mapem {
log("*** " & testcasename() & ": INFO: Successfully received the first fragment of MAPEM. ***");
v_firstFragmentReceived := true;
repeat;
}
[] mapemSpatemPort.receive(
[v_firstFragmentReceived] mapemSpatemPort.receive(
mw_mapemInd(
mw_mapemPdu(
mw_mapemLayerType(
......
/**
* @author ETSI / STF484
* @version $URL$
* $Id$
* @version $Url: https://oldforge.etsi.org/svn/ITS/tags/20170222_STF527_Final/ttcn/AtsMapemSpatem/ItsSpatem_TestCases.ttcn $
* $Id: ItsSpatem_TestCases.ttcn 2646 2016-12-16 07:35:58Z garciay $
* @desc Testcases for TLM Service
* @reference ETSI TS 103 301 v1.1.1
* @copyright ETSI Copyright Notification
......
/**
* @author ETSI STF517
* @version $URL$
* $Id$
* @version $Url: https://oldforge.etsi.org/svn/ITS/tags/20170222_STF527_Final/ttcn/AtsMapemSpatem/ItsSpatem_TpFunctions.ttcn $
* $Id: ItsSpatem_TpFunctions.ttcn,v 1.4 2018/12/06 17:59:36 dte Exp $
* @desc SPATEM TP functions
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
......@@ -132,7 +132,7 @@ module ItsSpatem_TpFunctions {
))) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received a SPATEM with incorrect information. ***");
f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_success);
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
......@@ -193,7 +193,7 @@ module ItsSpatem_TpFunctions {
))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received a new well-formed SPATE message. ***");
f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_success);
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] mapemSpatemPort.receive(
mw_spatemInd(
......@@ -202,7 +202,7 @@ module ItsSpatem_TpFunctions {
))) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received a SPATEM with incorrect information. ***");
f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_success);
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
......@@ -311,7 +311,7 @@ module ItsSpatem_TpFunctions {
))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received a new well-formed SPATE message. ***");
f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_success);
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] mapemSpatemPort.receive(
mw_spatemInd(
......@@ -320,7 +320,7 @@ module ItsSpatem_TpFunctions {
))) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received a SPATEM with incorrect information. ***");
f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_success);
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
......
This diff is collapsed.
......@@ -1460,7 +1460,7 @@ module ItsRSUsSimulator_Functions {
var Oct12 v_nonce;
var octetstring v_salt;
var Ieee1609Dot2Data v_ieee1609dot2_signed_and_encrypted_data;
var HeaderLines v_headers;
var Headers v_headers;
var HttpMessage v_response;
var EtsiTs102941Data v_etsi_ts_102941_data;
timer v_t := 5.0;
......@@ -1552,7 +1552,7 @@ module ItsRSUsSimulator_Functions {
var Oct32 v_request_hash;
var bitstring v_encoded_value;
var Ieee1609Dot2Data v_authorization_response;
var HeaderLines v_headers;
var Headers v_headers;
var HttpMessage v_response;
var EtsiTs102941Data v_etsi_ts_102941_data;
var FncRetCode v_result;
......
/**
* @author ETSI / STF517
* @version $URL$
* $Id$
* @version $Url: https://oldforge.etsi.org/svn/ITS/tags/20170222_STF527_Final/ttcn/AtsSremSsem/ItsSrem_TestCases.ttcn $
* $Id: ItsSrem_TestCases.ttcn 2646 2016-12-16 07:35:58Z garciay $
* @desc Testcases for TLC Service
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
......
/**
* @author ETSI / STF517
* @version $URL$
* $Id$
* @version $Url: https://oldforge.etsi.org/svn/ITS/tags/20170222_STF527_Final/ttcn/AtsSremSsem/ItsSrem_TestControl.ttcn $
* $Id: ItsSrem_TestControl.ttcn 2639 2016-12-14 09:22:07Z garciay $
* @desc Test Control file for TLC
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
......
/**
* @author ETSI STF517 / STF525
* @version $URL$
* $Id$
* @version $Url: https://oldforge.etsi.org/svn/ITS/tags/20170222_STF527_Final/ttcn/AtsSremSsem/ItsSrem_TpFunctions.ttcn $
* $Id: ItsSrem_TpFunctions.ttcn,v 1.2 2018/05/31 15:57:11 dte Exp $
* @desc SREM TP functions
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
......@@ -640,11 +640,11 @@ module ItsSrem_TpFunctions {
for (i := 0; i < lengthof(vc_utSremEvents) and not match (v_sremReq.msgOut , vc_utSremEvents[i].sreMsg); i := i + 1) {
// empty on purpose
}
if (i < lengthof(vc_utSsemEvents) ) {
log("*** " & testcasename() & ": PASS: SSEM was transmitted to upper layer***");
if (i < lengthof(vc_utSremEvents) ) {
log("*** " & testcasename() & ": PASS: SREM was transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
} else {
log("*** " & testcasename() & ": FAIL: SSEM was not transmitted to upper layer***");
log("*** " & testcasename() & ": FAIL: SREM was not transmitted to upper layer ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
......
Subproject commit 4441b8674ddf47a379b095252c0e0d55c18bbf75
Subproject commit 87d844cc4272334377ad31bb5befa9d0ed23792f
......@@ -161,7 +161,7 @@ module TestCodec_Certificates {
var EccP256CurvePoint v_eccPoint;
// Generate Private/Public keys
f_generate_key_pair_brainpoolp256(v_private_key, v_publicKeyX, v_publicKeyY, v_publicKeyCompressed, v_compressedMode);
f_generate_key_pair_brainpoolp256r1(v_private_key, v_publicKeyX, v_publicKeyY, v_publicKeyCompressed, v_compressedMode);
// Fill Certificate template with the public key using canonical form
if (v_compressedMode == 0) {
v_eccPoint := valueof(m_eccP256CurvePoint_compressed_y_0(v_publicKeyCompressed));
......@@ -268,14 +268,14 @@ module TestCodec_Certificates {
var EccP256CurvePoint v_eccPoint;
// Generate Private/Public keys for signature
f_generate_key_pair_brainpoolp256(v_private_key, v_publicKeyX, v_publicKeyY, v_publicKeyCompressed, v_compressedMode);
f_generate_key_pair_brainpoolp256r1(v_private_key, v_publicKeyX, v_publicKeyY, v_publicKeyCompressed, v_compressedMode);
if (v_compressedMode == 0) {
v_eccPoint := valueof(m_eccP256CurvePoint_compressed_y_0(v_publicKeyCompressed));
} else {
v_eccPoint := valueof(m_eccP256CurvePoint_compressed_y_1(v_publicKeyCompressed));
}
// Generate Private/Public keys for encryption
f_generate_key_pair_brainpoolp256(v_enc_private_key, v_enc_publicKeyX, v_enc_publicKeyY, v_enc_publicKeyCompressed, v_enc_compressedMode);
f_generate_key_pair_brainpoolp256r1(v_enc_private_key, v_enc_publicKeyX, v_enc_publicKeyY, v_enc_publicKeyCompressed, v_enc_compressedMode);
// Fill Certificate template with the public key
v_cert := m_etsiTs103097Certificate(
m_issuerIdentifier_self(v_self),
......@@ -381,7 +381,7 @@ module TestCodec_Certificates {
var EccP384CurvePoint v_eccPoint;
// Generate Private/Public keys
f_generate_key_pair_brainpoolp384(v_private_key, v_publicKeyX, v_publicKeyY, v_publicKeyCompressed, v_compressedMode);
f_generate_key_pair_brainpoolp384r1(v_private_key, v_publicKeyX, v_publicKeyY, v_publicKeyCompressed, v_compressedMode);
if (v_compressedMode == 0) {
v_eccPoint := valueof(m_eccP384CurvePoint_compressed_y_0(v_publicKeyCompressed));
} else {
......@@ -675,7 +675,7 @@ module TestCodec_Certificates {
var bitstring v_encMsg := ''B;
var EccP256CurvePoint v_eccPoint;
if (f_generate_key_pair_brainpoolp256(v_private_key, v_publicKeyX, v_publicKeyY, v_publicKeyCompressed, v_compressedMode) == false) {
if (f_generate_key_pair_brainpoolp256r1(v_private_key, v_publicKeyX, v_publicKeyY, v_publicKeyCompressed, v_compressedMode) == false) {
setverdict(fail);
stop;
}
......
......@@ -446,7 +446,7 @@ module TestCodec_ChainOfCertificates {
var EccP256CurvePoint v_eccPoint;
// Generate Private/Public keys
f_generate_key_pair_brainpoolp256(p_ca_sec_info.private_key, p_ca_sec_info.public_key_x, p_ca_sec_info.public_key_y, p_ca_sec_info.public_key_compressed, p_ca_sec_info.compressed_mode);
f_generate_key_pair_brainpoolp256r1(p_ca_sec_info.private_key, p_ca_sec_info.public_key_x, p_ca_sec_info.public_key_y, p_ca_sec_info.public_key_compressed, p_ca_sec_info.compressed_mode);
if (p_ca_sec_info.compressed_mode == 0) {
v_eccPoint := valueof(m_eccP256CurvePoint_compressed_y_0(p_ca_sec_info.public_key_compressed));
} else {
......@@ -578,7 +578,7 @@ module TestCodec_ChainOfCertificates {
var EccP256CurvePoint v_eccPoint;
// Generate Private/Public keys
f_generate_key_pair_brainpoolp256(p_aa_sec_info.private_key, p_aa_sec_info.public_key_x, p_aa_sec_info.public_key_y, p_aa_sec_info.public_key_compressed, p_aa_sec_info.compressed_mode);
f_generate_key_pair_brainpoolp256r1(p_aa_sec_info.private_key, p_aa_sec_info.public_key_x, p_aa_sec_info.public_key_y, p_aa_sec_info.public_key_compressed, p_aa_sec_info.compressed_mode);
if (p_aa_sec_info.compressed_mode == 0) {
v_eccPoint := valueof(m_eccP256CurvePoint_compressed_y_0(p_aa_sec_info.public_key_compressed));
} else {
......@@ -711,7 +711,7 @@ module TestCodec_ChainOfCertificates {
var EccP256CurvePoint v_eccPoint;
// Generate Private/Public keys
f_generate_key_pair_brainpoolp256(p_at_sec_info.private_key, p_at_sec_info.public_key_x, p_at_sec_info.public_key_y, p_at_sec_info.public_key_compressed, p_at_sec_info.compressed_mode);
f_generate_key_pair_brainpoolp256r1(p_at_sec_info.private_key, p_at_sec_info.public_key_x, p_at_sec_info.public_key_y, p_at_sec_info.public_key_compressed, p_at_sec_info.compressed_mode);
if (p_at_sec_info.compressed_mode == 0) {
v_eccPoint := valueof(m_eccP256CurvePoint_compressed_y_0(p_at_sec_info.public_key_compressed));
} else {
......
......@@ -268,7 +268,7 @@ module TestCodec_SecuredFuntions {
var Oct32 v_publicKeyCompressed;
var integer v_compressedMode;
if (f_generate_key_pair_brainpoolp256(v_private_key, v_publicKeyX, v_publicKeyY, v_publicKeyCompressed, v_compressedMode) == false) {
if (f_generate_key_pair_brainpoolp256r1(v_private_key, v_publicKeyX, v_publicKeyY, v_publicKeyCompressed, v_compressedMode) == false) {
setverdict(fail);
stop;
}
......@@ -287,7 +287,7 @@ module TestCodec_SecuredFuntions {
var Oct48 v_publicKeyCompressed;
var integer v_compressedMode;
if (f_generate_key_pair_brainpoolp384(v_private_key, v_publicKeyX, v_publicKeyY, v_publicKeyCompressed, v_compressedMode) == false) {
if (f_generate_key_pair_brainpoolp384r1(v_private_key, v_publicKeyX, v_publicKeyY, v_publicKeyCompressed, v_compressedMode) == false) {
setverdict(fail);
stop;
}
......@@ -520,7 +520,7 @@ module TestCodec_SecuredFuntions {
var octetstring v_encMsg := '0A0A0102030405060708090A0B0C0D0E0F0A0A'O;
var octetstring v_sig := ''O;
if (f_generate_key_pair_brainpoolp256(v_private_key, v_publicKeyX, v_publicKeyY, v_publicKeyCompressed, v_compressedMode) == false) {
if (f_generate_key_pair_brainpoolp256r1(v_private_key, v_publicKeyX, v_publicKeyY, v_publicKeyCompressed, v_compressedMode) == false) {
setverdict(fail);
stop;
}
......@@ -547,7 +547,7 @@ module TestCodec_SecuredFuntions {
var octetstring v_encMsg := '0A0A0102030405060708090A0B0C0D0E0F0A0A'O;
var octetstring v_sig := ''O;
if (f_generate_key_pair_brainpoolp384(v_private_key, v_publicKeyX, v_publicKeyY, v_publicKeyCompressed, v_compressedMode) == false) {
if (f_generate_key_pair_brainpoolp384r1(v_private_key, v_publicKeyX, v_publicKeyY, v_publicKeyCompressed, v_compressedMode) == false) {
setverdict(fail);
stop;
}
......@@ -574,7 +574,7 @@ module TestCodec_SecuredFuntions {
var octetstring v_encMsg := '0A0A0102030405060708090A0B0C0D0E0F0A0A'O;
var octetstring v_sig := ''O;
if (f_generate_key_pair_brainpoolp256(v_private_key, v_publicKeyX, v_publicKeyY, v_publicKeyCompressed, v_compressedMode) == false) {
if (f_generate_key_pair_brainpoolp256r1(v_private_key, v_publicKeyX, v_publicKeyY, v_publicKeyCompressed, v_compressedMode) == false) {
setverdict(fail);
stop;
}
......@@ -611,7 +611,7 @@ module TestCodec_SecuredFuntions {
var octetstring v_encMsg := '0A0A0102030405060708090A0B0C0D0E0F0A0A'O;
var octetstring v_sig := ''O;
if (f_generate_key_pair_brainpoolp256(v_private_key, v_publicKeyX, v_publicKeyY, v_publicKeyCompressed, v_compressedMode) == false) {
if (f_generate_key_pair_brainpoolp256r1(v_private_key, v_publicKeyX, v_publicKeyY, v_publicKeyCompressed, v_compressedMode) == false) {
setverdict(fail);
stop;
}
......@@ -665,7 +665,7 @@ module TestCodec_SecuredFuntions {
var Oct32 v_publicKeyX_wrong;
var Oct32 v_publicKeyY_wrong;
if (f_generate_key_pair_brainpoolp256(v_private_key, v_publicKeyX, v_publicKeyY, v_publicKeyCompressed, v_compressedMode) == false) {
if (f_generate_key_pair_brainpoolp256r1(v_private_key, v_publicKeyX, v_publicKeyY, v_publicKeyCompressed, v_compressedMode) == false) {
setverdict(fail);
stop;
}
......@@ -719,7 +719,7 @@ module TestCodec_SecuredFuntions {
var octetstring v_encMsg := '0A0A0102030405060708090A0B0C0D0E0F0A0A'O;
var octetstring v_sig := ''O;
if (f_generate_key_pair_brainpoolp384(v_private_key, v_publicKeyX, v_publicKeyY, v_publicKeyCompressed, v_compressedMode) == false) {
if (f_generate_key_pair_brainpoolp384r1(v_private_key, v_publicKeyX, v_publicKeyY, v_publicKeyCompressed, v_compressedMode) == false) {
setverdict(fail);
stop;
}
......@@ -756,7 +756,7 @@ module TestCodec_SecuredFuntions {
var octetstring v_encMsg := '0A0A0102030405060708090A0B0C0D0E0F0A0A'O;
var octetstring v_sig := ''O;
if (f_generate_key_pair_brainpoolp384(v_private_key, v_publicKeyX, v_publicKeyY, v_publicKeyCompressed, v_compressedMode) == false) {
if (f_generate_key_pair_brainpoolp384r1(v_private_key, v_publicKeyX, v_publicKeyY, v_publicKeyCompressed, v_compressedMode) == false) {
setverdict(fail);
stop;
}
......@@ -811,7 +811,7 @@ module TestCodec_SecuredFuntions {
var Oct48 v_publicKeyX_wrong;
var Oct48 v_publicKeyY_wrong;
if (f_generate_key_pair_brainpoolp384(v_private_key, v_publicKeyX, v_publicKeyY, v_publicKeyCompressed, v_compressedMode) == false) {
if (f_generate_key_pair_brainpoolp384r1(v_private_key, v_publicKeyX, v_publicKeyY, v_publicKeyCompressed, v_compressedMode) == false) {
setverdict(fail);
stop;
}
......
......@@ -769,8 +769,8 @@ module TestCodec_SignedAndEncryptedMessages {
var HashedId8 v_recipientId;
// Simulate OCU & Test System certificate, OBU and Test system exchange their public key
f_generate_key_pair_brainpoolp256(v_obuPrivateKey, v_obuPublicKeyX, v_obuPublicKeyY, v_obuPublicKeyCompressed, v_obuCompressedMode);
f_generate_key_pair_brainpoolp256(v_tsPrivateKey, v_tsPublicKeyX, v_tsPublicKeyY, v_tsPublicKeyCompressed, v_tsCompressedMode);
f_generate_key_pair_brainpoolp256r1(v_obuPrivateKey, v_obuPublicKeyX, v_obuPublicKeyY, v_obuPublicKeyCompressed, v_obuCompressedMode);
f_generate_key_pair_brainpoolp256r1(v_tsPrivateKey, v_tsPublicKeyX, v_tsPublicKeyY, v_tsPublicKeyCompressed, v_tsCompressedMode);
// The OBU is the sender, the Test System is te receiver
v_signed_data := m_etsiTs103097Data_signed(
......@@ -875,8 +875,8 @@ module TestCodec_SignedAndEncryptedMessages {
var HashedId8 v_recipientId;
// Simulate OCU & Test System certificate, OBU and Test system exchange their public key
f_generate_key_pair_brainpoolp256(v_obuPrivateKey, v_obuPublicKeyX, v_obuPublicKeyY, v_obuPublicKeyCompressed, v_obuCompressedMode);
f_generate_key_pair_brainpoolp256(v_tsPrivateKey, v_tsPublicKeyX, v_tsPublicKeyY, v_tsPublicKeyCompressed, v_tsCompressedMode);
f_generate_key_pair_brainpoolp256r1(v_obuPrivateKey, v_obuPublicKeyX, v_obuPublicKeyY, v_obuPublicKeyCompressed, v_obuCompressedMode);
f_generate_key_pair_brainpoolp256r1(v_tsPrivateKey, v_tsPublicKeyX, v_tsPublicKeyY, v_tsPublicKeyCompressed, v_tsCompressedMode);
// The OBU is the sender, the Test System is te receiver
v_signed_data := m_etsiTs103097Data_signed(
......
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