Commit da2e30bd authored by garciay's avatar garciay
Browse files

STF507 week#11: Enforce f_waitForCertificate

                Build with TCT3
parent c91f8b7d
...@@ -190,7 +190,10 @@ module ItsSecurity_TestCases { ...@@ -190,7 +190,10 @@ module ItsSecurity_TestCases {
// execution will be stopped if cert is not received during tc_ac // execution will be stopped if cert is not received during tc_ac
log("*** " & testcasename() & ": INFO: Waiting for the message containing certificate ***"); log("*** " & testcasename() & ": INFO: Waiting for the message containing certificate ***");
tc_ac.start; tc_ac.start;
f_waitForCertificate(v_cert); if (not f_waitForCertificate(v_cert)) {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_timeout);
}
tc_ac.stop; tc_ac.stop;
if (v_cert.subject_info.subject_type != e_authorization_ticket) { if (v_cert.subject_info.subject_type != e_authorization_ticket) {
log("*** " & testcasename() & ": FAIL: received certificate is not an AT certificate ***"); log("*** " & testcasename() & ": FAIL: received certificate is not an AT certificate ***");
...@@ -1619,7 +1622,7 @@ module ItsSecurity_TestCases { ...@@ -1619,7 +1622,7 @@ module ItsSecurity_TestCases {
log("*** " & testcasename() & ": PASS: Generation time matches current time ***"); log("*** " & testcasename() & ": PASS: Generation time matches current time ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
} else { } else {
log("*** " & testcasename() & ": FAIL: Generation time does not match current time " & int2str(v_currentTime) & " . ***"); log("*** " & testcasename() & ": FAIL: Generation time does not match current time " & int2str(v_currentTime-v_lowerBound) & " / " & int2str(v_upperBound - v_currentTime) & " . ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
} }
...@@ -4669,7 +4672,10 @@ module ItsSecurity_TestCases { ...@@ -4669,7 +4672,10 @@ module ItsSecurity_TestCases {
// Test body // Test body
tc_ac.start; tc_ac.start;
f_waitForCertificate(v_cert); if (not f_waitForCertificate(v_cert)) {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_timeout);
}
tc_ac.stop; tc_ac.stop;
if (f_getCertificateValidityRestriction(v_cert, e_region, v_vr)) { if (f_getCertificateValidityRestriction(v_cert, e_region, v_vr)) {
if (v_vr.validity.region.region_type == e_rectangle) { if (v_vr.validity.region.region_type == e_rectangle) {
...@@ -4901,7 +4907,10 @@ module ItsSecurity_TestCases { ...@@ -4901,7 +4907,10 @@ module ItsSecurity_TestCases {
// Test body // Test body
tc_ac.start; tc_ac.start;
f_waitForCertificate(v_cert); if (not f_waitForCertificate(v_cert)) {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_timeout);
}
tc_ac.stop; tc_ac.stop;
if (f_getCertificateValidityRestriction(v_cert, e_region, v_vr)) { if (f_getCertificateValidityRestriction(v_cert, e_region, v_vr)) {
if (v_vr.validity.region.region_type == e_polygon) { if (v_vr.validity.region.region_type == e_polygon) {
...@@ -5123,7 +5132,10 @@ module ItsSecurity_TestCases { ...@@ -5123,7 +5132,10 @@ module ItsSecurity_TestCases {
// Test body // Test body
tc_ac.start; tc_ac.start;
f_waitForCertificate(v_cert); if (not f_waitForCertificate(v_cert)) {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_timeout);
}
tc_ac.stop; tc_ac.stop;
if (f_getCertificateValidityRestriction(v_cert, e_region, v_vr)) { if (f_getCertificateValidityRestriction(v_cert, e_region, v_vr)) {
if (v_vr.validity.region.region_type == e_id) { if (v_vr.validity.region.region_type == e_id) {
...@@ -6229,7 +6241,10 @@ module ItsSecurity_TestCases { ...@@ -6229,7 +6241,10 @@ module ItsSecurity_TestCases {
// Check that the AT cert in the first message is signed with the AA cert // Check that the AT cert in the first message is signed with the AA cert
log("*** " & testcasename() & ": INFO: Waiting for the message containing certificate ***"); log("*** " & testcasename() & ": INFO: Waiting for the message containing certificate ***");
tc_ac.start; tc_ac.start;
f_waitForCertificate(v_at_cert); if (not f_waitForCertificate(v_at_cert)) {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_timeout);
}
tc_ac.stop; tc_ac.stop;
if (true != f_getCertificateSignerInfo(v_at_cert, v_si)) { if (true != f_getCertificateSignerInfo(v_at_cert, v_si)) {
Supports Markdown
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