Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
module ItsGencert_TestCases {
// LibCommon
import from LibCommon_BasicTypesAndValues all;
import from LibCommon_DataStrings all;
// LibIts
import from IEEE1609dot2BaseTypes language "ASN.1:1997" all;
import from IEEE1609dot2 language "ASN.1:1997" all;
import from EtsiTs103097Module language "ASN.1:1997" all;
// LibItsGeoNetworking
import from LibItsGeoNetworking_EncdecDeclarations all;
import from LibItsGeoNetworking_TypesAndValues all;
import from LibItsGeoNetworking_Templates all;
// LibItsSecurity
import from LibItsSecurity_EncdecDeclarations all;
import from LibItsSecurity_TypesAndValues all;
import from LibItsSecurity_Templates all;
import from LibItsSecurity_Functions all;
import from LibItsSecurity_Pixits all;
// AtsGenCert
import from ItsGenCert_TypeAndValues all;
import from ItsGenCert_Functions all;
import from ItsGenCert_TestSystem all;
import from ItsGenCert_Pics all;
testcase TC_GEN_CERT_BV() runs on TCType system TCType {
for (var integer v_counter := 0; v_counter < lengthof(PICS_CERTFICATES); v_counter := v_counter + 1) {
var certificate_details v_details;
var template (value) EtsiTs103097Certificate v_certificate;
var certificate_params v_certificate_params := PICS_CERTFICATES[v_counter];
// Generate Private/Public keys for the certificate
if (v_certificate_params.curve == e_nist_p256) {
f_generate_key_pair_nistp256(v_details.private_key, v_details.public_key_x, v_details.public_key_y);
} else if (v_certificate_params.curve == e_brainpool_p256) {
f_generate_key_pair_brainpoolp256(v_details.private_key, v_details.public_key_x, v_details.public_key_y);
} else if (v_certificate_params.curve == e_brainpool_p256) {
f_generate_key_pair_brainpoolp384(v_details.private_key, v_details.public_key_x, v_details.public_key_y);
} else {
setverdict(fail, "Unsupported curve");
stop;
}
// Build the certificate templates
f_fill_certificate(v_certificate_params, v_details);
f_finalyse_certificate(v_certificate_params, v_details);
} // End of 'for' statement
setverdict(pass);
} // End of testcase TC_SEC_ITSS_SND_MSG_01_BV
control {
execute(TC_GEN_CERT_BV());
} // End of 'control' statement
} // End of module ItsGencert_TestCases