Compare Revisions

The credentials to download the source code are:
 Username: svnusers
 Password: svnusers

Ignore whitespace Rev 1915 → Rev 1916

/branches/Security/unittests/codec/ttcn/test_LibItsCam_TypesAndValues.ttcn
105,15 → 105,14
}
testcase tc_changePosition() runs on TCType system TCType {
test_PDU<UtCamTrigger>(
m_changePosition(
UtChangePosition: {
latitude := 49845,
longitude := 631,
elevation := 512
}
),
false);
test_PDU<UtChangePosition>(
UtChangePosition: {
latitude := 49845,
longitude := 631,
elevation := 512
},
false
);
}
testcase tc_changeSpeed() runs on TCType system TCType {
392,7 → 391,8
// steeringWheelAngle := omit,
// lateralAcceleration := omit,
// verticalAcceleration := omit,
// performanceClass := omit
// performanceClass := omit,
// cenDsrcTollingZone := omit
// }
// },
// lowFrequencyContainer := {
473,7 → 473,7
)
),
true,
oct2bit('01020001B20788B80059F48D95CDEFC8C5E0020020002461A83C000004805A100C4528399D4C387FFF80'O)
oct2bit('01020001B20788B80059F48D95CDEFC8C6000200200030D41E0000012016840310A50733A9870FFFD0'O)
);
}
/branches/Security/unittests/codec/ttcn/test_LibItsDenm_TypesAndValues.ttcn
55,9 → 55,7
m_denmLocation_zeroDelta
)
)
),
true,
oct2bit('01010001B207C0000D903800000000006072000000188593E91B2B9BDF918C000400400061A80000B6000037FFFDFFFF63390100'O)
)
);
}
/branches/Security/unittests/codec/ttcn/test_LibItsGeoNetworking_TypesAndValues.ttcn
134,7 → 134,7
geoAreaPosLatitude := 298376,
geoAreaPosLongitude := 32745,
distanceA := 1234,
distanceB := 5678,
distanceB := 6078,
angle := 9123
}
1221,7 → 1221,7
testcase tc_GeoNetReq_NwShbPacketWithBtpPayloadDenm() runs on TCType system TCType {
var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
var GeoNetworkingReq v_gnReq;
var octetstring v_buffer := '01002B0A2050800000380A00BC21A4FEDECABEEF0001E240000012F8000002A380372694000000000000000001010001B207C0000D903800000000006072000000188593E91B2B9BDF918C000400400061A80000B6000037FFFDFFFF63390100FFFFFFFFFFFF'O;
var octetstring v_buffer := '01002B0A20508000003C0A00BC21A4FEDECABEEF0001E240000012F8000002A3803726940000000007D2000001010001B207C70000D90380000A0843ABBBE28210EAF534FA46CAE6F7E4630001001000186A000009600C05B00000DFFFF7FFFD8CE40400FFFFFFFFFFFF'O;
if (PX_GN_UPPER_LAYER != e_btpB) {
log("PX_GN_UPPER_LAYER shall be set to e_btpB");
1256,7 → 1256,7
v_gnReq,
false
);
v_gnReq.msgOut.gnPacket.packet.commonHeader.plLength := 56;
v_gnReq.msgOut.gnPacket.packet.commonHeader.plLength := 60;
test_decodePDU<GeoNetworkingReq>(
v_gnReq,
v_buffer
1418,7 → 1418,7
}
setverdict(pass, "Encoding passed.");
// Decode it
v_gnReq.msgOut.gnPacket.packet.commonHeader.plLength := 46;
v_gnReq.msgOut.gnPacket.packet.commonHeader.plLength := 45;
test_decodePDU<GeoNetworkingReq>(
v_gnReq,
v_encMsg
1829,7 → 1829,7
}
setverdict(pass, "Encoding passed.");
// Decode it
v_gnReq.msgOut.gnPacket.packet.commonHeader.plLength := 46;
v_gnReq.msgOut.gnPacket.packet.commonHeader.plLength := 45;
test_decodePDU<GeoNetworkingReq>(
v_gnReq,
v_encMsg
1924,7 → 1924,7
}
setverdict(pass, "Encoding passed.");
// Decode it
v_gnReq.msgOut.gnPacket.packet.commonHeader.plLength := 46;
v_gnReq.msgOut.gnPacket.packet.commonHeader.plLength := 45;
test_decodePDU<GeoNetworkingReq>(
v_gnReq,
v_encMsg
2031,7 → 2031,7
}
setverdict(pass, "Encoding passed.");
// Decode it
v_gnReq.msgOut.gnPacket.packet.commonHeader.plLength := 56;
v_gnReq.msgOut.gnPacket.packet.commonHeader.plLength := 60;
test_decodePDU<GeoNetworkingReq>(
v_gnReq,
v_encMsg
2194,7 → 2194,7
*/
testcase tc_GeoNetReq_AnycastPacket() runs on TCType system TCType {
var GeoNetworkingReq v_gnReq;
var octetstring v_buffer := '01002B0A00308000000F0A001DE60000A832A40102030405000011E90000007E0000007B002D007D00048D8800007FE904D2162E23A3000044454641554C545F5041594C4F4144FFFFFFFFFFFF'O;
var octetstring v_buffer := '01002B0A00308000000F0A001DE60000A832A40102030405000011E90000007E0000007B002D007D00048D8800007FE904D217BE23A3000044454641554C545F5041594C4F4144FFFFFFFFFFFF'O;
if (PX_GN_UPPER_LAYER != e_any) {
log("PX_GN_UPPER_LAYER shall be set to e_any");
2309,7 → 2309,7
testcase tc_GeoNetReq_AnycastPacketWithHopLimit() runs on TCType system TCType {
var GeoNetworkingReq v_gnReq;
var ExtendedHeader v_header := null;
var octetstring v_buffer := '01002B0A00308000000F05001DE60000A832A40102030405000011E90000007E0000007B002D007D00048D8800007FE904D2162E23A3000044454641554C545F5041594C4F4144FFFFFFFFFFFF'O;
var octetstring v_buffer := '01002B0A00308000000F05001DE60000A832A40102030405000011E90000007E0000007B002D007D00048D8800007FE904D217BE23A3000044454641554C545F5041594C4F4144FFFFFFFFFFFF'O;
if (PX_GN_UPPER_LAYER != e_any) {
log("PX_GN_UPPER_LAYER shall be set to e_any");
2661,7 → 2661,7
testcase tc_GeoNetReq_BroadcastPacket() runs on TCType system TCType {
var GeoNetworkingReq v_gnReq;
var ExtendedHeader v_header := null;
var octetstring v_buffer := '01002B0A00418000000F0A000D800000A832A40102030405000011E90000007E0000007B002D007D00048D8800007FE904D2162E23A3000044454641554C545F5041594C4F4144FFFFFFFFFFFF'O;
var octetstring v_buffer := '01002B0A00418000000F0A000D800000A832A40102030405000011E90000007E0000007B002D007D00048D8800007FE904D217BE23A3000044454641554C545F5041594C4F4144FFFFFFFFFFFF'O;
if (PX_GN_UPPER_LAYER != e_any) {
log("PX_GN_UPPER_LAYER shall be set to e_any");
2821,7 → 2821,7
var GnNonSecuredPacket v_gnNonSecuredPacket;
var GeoNetworkingPacket v_geoNetworkingPacket;
var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable);
var octetstring v_buffer := '01002B0A2041800000380A000D800000A832A40102030405000011E90000007E0000007B002D007D00048D8800007FE904D2162E23A300000000000001010001B207C0000D903800000000006072000000188593E91B2B9BDF918C000400400061A80000B6000037FFFDFFFF63390100FFFFFFFFFFFF'O;
var octetstring v_buffer := '01002B0A20418000003C0A000D800000A832A40102030405000011E90000007E0000007B002D007D00048D8800007FE904D217BE23A3000007D2000001010001B207C70000D90380000A0843F2F2828210FCBCACFA46CAE6F7E4630001001000186A000009600C05B00000DFFFF7FFFD8CE40400FFFFFFFFFFFF'O;
if (PX_GN_UPPER_LAYER != e_btpB) {
log("PX_GN_UPPER_LAYER shall be set to e_btpB");
2857,7 → 2857,7
v_gnReq,
false,
oct2bit(v_buffer));
v_gnReq.msgOut.gnPacket.packet.commonHeader.plLength := 56;
v_gnReq.msgOut.gnPacket.packet.commonHeader.plLength := 60;
test_decodePDU<GeoNetworkingReq>(
v_gnReq,
v_buffer
3049,7 → 3049,7
}
setverdict(pass, "Encoding passed.");
// Decode it
v_gnReq.msgOut.gnPacket.packet.commonHeader.plLength := 56;
v_gnReq.msgOut.gnPacket.packet.commonHeader.plLength := 60;
test_decodePDU<GeoNetworkingReq>(
v_gnReq,
v_encMsg
3157,7 → 3157,7
}
setverdict(pass, "Encoding passed.");
// Decode it
v_gnReq.msgOut.gnPacket.packet.commonHeader.plLength := 56;
v_gnReq.msgOut.gnPacket.packet.commonHeader.plLength := 60;
test_decodePDU<GeoNetworkingReq>(
v_gnReq,
v_encMsg
3205,7 → 3205,7
*/
testcase tc_GeoNetInd_SecuredBeacon() runs on TCType system TCType {
var GeoNetworkingInd v_gnInd;
var octetstring v_decMsg := '02002B0A021E8001963A7C716A20569D00000134D2197F537003000004D20000162E002F01200010800000000100BC21A4FEDECABEEF0001E240000012F8000002A38037269443010002E0EF081A49ABA0570F5EDCAACD65C8509EBFD4132CEB8E80904E1EAC489C12D17672C967428FFF851304CC83D914EE73AD12892F2BC55B092CBFF59147643DBBFFFFFFFFFFFF'O;
var octetstring v_decMsg := '02002B0A021E80015024A224729A4C800000013981FD42941003000004D20000162E002F01200010800000000100BC21A4FEDECABEEF0001E240000012F8000002A380372694430100027714B9A92AC942E36C0B8A87C516770251A24AB00394FBD2C01A9105CA677A95968A816454027D23D26F0CD335C12D111D8FD7D02A85DA45FB2F3E6C99BFE0EAFFFFFFFFFFFF'O;
if (PX_GN_UPPER_LAYER != e_any) {
log("PX_GN_UPPER_LAYER shall be set to e_any");
3236,7 → 3236,7
// Check signature
if (decvalue(oct2bit(v_decMsg), v_gnInd) == 0) {
if (f_verifyGnSecuredMessageSignatureWithCertificate(v_gnInd.msgIn.gnPacket.securedMsg,vc_atCertificate) == true) {
if (f_verifyGnSecuredMessageSignatureWithCertificate(v_gnInd.msgIn.gnPacket.securedMsg, vc_atCertificate) == true) {
setverdict(pass, "Signature check succeed.");
} else {
setverdict(fail, "Signature check failed.");
3277,7 → 3277,7
*/
testcase tc_GeoNetInd_SecuredLsRequestPacket() runs on TCType system TCType {
var GeoNetworkingInd v_gnInd;
var octetstring v_decMsg := '02002B0A021E8001963A7C716A20569D00000134D261A4425003000004D20000162E002F012C0060800000000A0030390000BC21A4FEDECABEEF0001E240000012F8000002A380372694BC21A4FEDECABEEF43010002B48FF2B34AEDAFC616F54EB204C556E5E7877A8F4A3AD14B38E06272D593FFF8C2C1E6A0F5F22A72AE235E8898920D9B4ADAE83178F30E282F796823EE139CA0FFFFFFFFFFFF'O;
var octetstring v_decMsg := '02002B0A021E80015024A224729A4C800000013981FF5C67A803000004D20000162E002F012C0060800000000A0030390000BC21A4FEDECABEEF0001E240000012F8000002A380372694BC21A4FEDECABEEF430100027C8D3FE7CCA30FFBE6CC7D3C7C31F06EDB8976268F584052C4112C9D9FA1180DF3F389DB64926D40C9A4EB72BCB81A41641018A980703C3CB1BD1BF7482B58E6FFFFFFFFFFFF'O;
if (PX_GN_UPPER_LAYER != e_any) {
log("PX_GN_UPPER_LAYER shall be set to e_any");
3396,7 → 3396,7
mw_geoNwAnyPacket_withPayload(
?
))),
'02002b0a020181198002020901b893358ab25faf64010080950000045fe633945b4c1a08d904dfb35fb19ef2967e2c739725d5c0e868d8682743f9390369985c3af3aa54e489c4a7d0381cfd9dfb6d71bb6e6059061f16dafd05da46010100042c560cb703294825e40d5d850ab4fef24e5b0dee3e12a4ce0747c4f31db1b147a1cbc5690f3929a5e7263e92c07db2e606d4da72ebe2732e4bd61c58aae807630220210ac040800100c04081010024015411aa6d5a391aed0303181db9cf7c052616001db9566e0526872a1d53f0d0052783500000570941dabbc94fd3607250d96fd1bef305f92113b8eef39772232c0fcdb951e4dcc6d99b8c8ca94a0ac14a7a46707b83a80820adca58b6f1e3fea7fe6e0752ba0220210ac040800100c0408101002401540086ed5a391aed0303181db9cf7c052616001db9566e0526872a1d53f0d00527835000009ba18503dfc211994cfd1a1ecf71f306da9e6980ac2fb091d0797d9b155a20864930abcb59b4feda7a59c3c78cdafce8e804f6fe8cab94afcc84bf568d46497d0000000148c5afcc2d05000254005210508000002e0a00bc21a4fedecabeeff6f50875000012f8000002a380372694000000000000000001020001b20788b80059f48d95cdefc8c5e0020020002461a83c000004805a100c4528399d4c387fff804301000200005cb251c659b90920b87fa55ca4e831a986b77c0f145a45b8e49674ee0dcf68b505c5c5bd546da38f379edc6bc8b96acf4736e47412065005665af7aed2a39012'O
'02002B0A028124800202015024A224729A4C80010080950000044D8F459AD7485EF21803B7CB9B6D857CCD721542BFE99FACFFB3DF44C34140593126362569F78A5169EBB0FC878B9AD07DDC2B36D01E83C02EABE71210C879DF010100046AE865F5E00290B2BE93D1F26D9857F7B19E53D213846B2C276247DCCED022AC244258C9D1ACF2E3F8BF750F952B02C81ACA013AC018C56F85C4A7E68E9587780220210AC040800100C0408101002401146B4B831A5617030303181DB9CF7C052616001DB9566E0526872A1D53F0D00527835000002E7F2FCB38E1418219A51808983988739DFDC649DA209EA6C59319117374E0ED4DBED15F51C6D3106883DCE308A9E6A8E314EA24E8322DDFB02971FDB8C22B26000001398255A96C2803000004D20000162E002F05C04081017020418000003C0A000D800000A832A40102030405000011E90000007E0000007B002D007D00048D8800007FE904D217BE23A3000007D2000001010001B207C70000D90380000A084446EB02821111BACCFA46CAE6F7E4630001001000186A000009600C05B00000DFFFF7FFFD8CE40400430100024AD9813B0BE1B67A8C1AB211D28C6BFC5FE3EA1A3AC5349DB6FF06FBAFF708C54466E608FEAE8AA565F4EA793CCC5D1726679CD59FFA6FD00FB5A61569D343E4FFFFFFFFFFFF'O
);
}
3425,10 → 3425,52
mw_geoNwAnyPacket_withPayload(
?
))),
'02002B0A020181198002020901B893358AB25FAF64010080950000045FE633945B4C1A08D904DFB35FB19EF2967E2C739725D5C0E868D8682743F9390369985C3AF3AA54E489C4A7D0381CFD9DFB6D71BB6E6059061F16DAFD05DA46010100042C560CB703294825E40D5D850AB4FEF24E5B0DEE3E12A4CE0747C4F31DB1B147A1CBC5690F3929A5E7263E92C07DB2E606D4DA72EBE2732E4BD61C58AAE807630220210AC040800100C04081010024015411AA6D5A391AED0303181DB9CF7C052616001DB9566E0526872A1D53F0D0052783500000570941DABBC94FD3607250D96FD1BEF305F92113B8EEF39772232C0FCDB951E4DCC6D99B8C8CA94A0AC14A7A46707B83A80820ADCA58B6F1E3FEA7FE6E0752BA000001358CEAA7398005000254005210508000002E0A00BC21A4FEDECABEEF535AEF38000012F8000002A3803726940000000007D1000001020001B20788B80059F48D95CDEFC8C5E0020020002461A83C000004805A100C4528399D4C387FFF804301000247C9F3161E20F8B61857117967DA83EA4A1667A27B0462F2B07197C3F82FC816F336F1C803BD1B3E62B1B7D3141921485049DEA8ECD22E7F2D27077E98AA74EC010002B4A06C592A8B49CBBCC35D864A427C7A020CB2E535B043DD06828ED9310859A9B90847545A7845CAF565D430C8187A784E9DB4495A16D694E5FAA67C30785550'O
'02002B0A028119800202015024A224729A4C80010080950000044D8F459AD7485EF21803B7CB9B6D857CCD721542BFE99FACFFB3DF44C34140593126362569F78A5169EBB0FC878B9AD07DDC2B36D01E83C02EABE71210C879DF010100046AE865F5E00290B2BE93D1F26D9857F7B19E53D213846B2C276247DCCED022AC244258C9D1ACF2E3F8BF750F952B02C81ACA013AC018C56F85C4A7E68E9587780220210AC040800100C0408101002401146B4B831A5617030303181DB9CF7C052616001DB9566E0526872A1D53F0D00527835000002E7F2FCB38E1418219A51808983988739DFDC649DA209EA6C59319117374E0ED4DBED15F51C6D3106883DCE308A9E6A8E314EA24E8322DDFB02971FDB8C22B260000013981EF9678B805C04080015110508000002D0A00BC21A4FEDECABEEF0001E240000012F8000002A3803726940000000007D2000001020001B20788B80059F48D95CDEFC8C6000200200030D41E0000012016840310A50733A9870FFFD0430100022457F8BB0467B2C62318395A56BBF0004BE8E486D1186586CB385D332DDE83EA511F53431CE38F6F13835DEA3AF3F20D3FC84341EE87090992FC1E05AD6ECA2BFFFFFFFFFFFF'O
);
}
/**
* @desc validate secured GeoNetworkingInd/SHB with certificates chain
* @verdict Pass on success, Fail otherwise
*/
testcase tc_GeoNetInd_SecuredShbCAMWithCertificatesChain() runs on TCType system TCType {
var GeoNetworkingInd v_gnInd;
var octetstring v_decMsg := '02002B0A028231800382200201FABD6A8FA6CAB3740210455453495F506C7567746573745F41418091000004F4A81DE17B3BBFD8ABB276D9F1FF8290FCC5FF8863E8B251398E9DDB81A9FDC1268AED92B4B15099AB0BCE24378BE907D5EF0E7F3FB69C1A84C9FC5452A20A2C010100043288A11BE5A5781D7C206DAF3080FBEB52AE945F809CF266D029EA1CD57042303288A11BE5A5781D7C206DAF3080FBEB52AE945F809CF266D029EA1CD570423002202006C04080C040812401146B4B831A5617030303181DB9CF7C052616001DB9566E0526872A1D53F0D00527835000009C26B3AA8A670471D89ECD7DB76E907B5D7F5C519E6C2FCB362A7DC225172BD176E7AF6E54754D30B4F18F80B9130B80C99EAAAF65C2A9D8A587C9B7ED629F6202015024A224729A4C80010080950000044D8F459AD7485EF21803B7CB9B6D857CCD721542BFE99FACFFB3DF44C34140593126362569F78A5169EBB0FC878B9AD07DDC2B36D01E83C02EABE71210C879DF010100046AE865F5E00290B2BE93D1F26D9857F7B19E53D213846B2C276247DCCED022AC244258C9D1ACF2E3F8BF750F952B02C81ACA013AC018C56F85C4A7E68E9587780220210AC040800100C0408101002401146B4B831A5617030303181DB9CF7C052616001DB9566E0526872A1D53F0D00527835000002E7F2FCB38E1418219A51808983988739DFDC649DA209EA6C59319117374E0ED4DBED15F51C6D3106883DCE308A9E6A8E314EA24E8322DDFB02971FDB8C22B260000013981F04477B005C04080015110508000002D0A00BC21A4FEDECABEEF0001E240000012F8000002A3803726940000000007D2000001020001B20788B80059F48D95CDEFC8C6000200200030D41E0000012016840310A50733A9870FFFD043010002388DEF19AE517360CA2D84BF2CE360B6B65B553A2D21B8329DC9897DFD45117452EAD22250846919E58E0C7E28A25F69423A120491D17BEB08FD38C3A454E63CFFFFFFFFFFFF'O;
var bitstring v_decode;
if ((PX_GN_UPPER_LAYER != e_btpA) and (PX_GN_UPPER_LAYER != e_btpB)) {
log("PX_GN_UPPER_LAYER shall be set to e_btpA or e_btpB");
setverdict(inconc);
stop;
}
// Load certificates & keys
if (f_loadCertificates("cfg01") == false) {
setverdict(fail);
stop;
}
f_setGenerationLocation(
f_getTsLatitude(),
f_getTsLongitude()
);
test_decodePDU<GeoNetworkingInd>(
mw_geoNwInd(
mw_geoNwSecPdu(
mdw_securedMessage(
superset(
mw_header_field_signer_info_certificate_chain(
?
)
)
)
)
),
v_decMsg
);
}
} // End of testGeoNetPrimitiveMessages
group testUtEvent {
3437,6 → 3479,20
test_PDU<UtInitialize>(m_gnInitialize, false);
}
testcase tc_UtSecGnInitialize() runs on TCType system TCType {
// Load certificates & keys
if (f_loadCertificates("cfg01") == false) {
setverdict(fail);
stop;
}
f_setGenerationLocation(
f_getTsLatitude(),
f_getTsLongitude()
);
test_PDU<UtInitialize>(m_secGnInitialize(f_calculateDigestFromCertificate(vc_atCertificate)), false);
}
testcase tc_UtInitializeResult() runs on TCType system TCType {
test_decodePDU<UtInitializeResult>(UtInitializeResult:true, '0101'O);
}
/branches/Security/unittests/codec/ttcn/test_LibItsSecurity_TypesAndValues.ttcn3
11,7 → 11,7
import from LibItsSecurity_Pixits all;
// TestUnits
import from test_CommonCodec all;
import from test_CommonCodec all;
group LibItsSecurity_testCases {
38,8 → 38,7
m_enableSecurity(
"TA_CERT_A"
),
true,
oct2bit('54415F434552545F41'O)
false
);
}
847,6 → 846,44
);
} // End of testcase tc_SubjectAttribute_08
testcase tc_SubjectAttribute_09() runs on TCType system TCType {
test_PDU<SubjectAttribute>(
m_subject_attribute_its_aid_list(
{
1631,
1632
}
),
true,
oct2bit('2004865F8660'O)
);
} // End of testcase tc_SubjectAttribute_09
testcase tc_SubjectAttribute_10() runs on TCType system TCType {
test_PDU<SubjectAttribute>(
m_subject_attribute_its_aid_ssp_list(
{
{
1631,
{
'00'O,
omit
}
},
{
1632,
{
'00'O,
omit
}
}
}
),
true,
oct2bit('2108865F010086600100'O)
);
} // End of testcase tc_SubjectAttribute_10
testcase tc_SubjectAssurance_01() runs on TCType system TCType {
test_PDU<SubjectAssurance>(
m_subjectAssurance(
894,6 → 931,21
);
} // End of testcase tc_ValidityRestriction_04
testcase tc_ValidityRestriction_05() runs on TCType system TCType {
test_PDU<ValidityRestriction>(
m_validity_restriction_region(
m_geographicRegion_circle(
{
43616908,
7052847
},
10000
)
)
);
} // End of testcase tc_ValidityRestriction_05
/**
* @desc Root certificate self signed
* @verdict
1052,6 → 1104,7
var integer v_res;
var HashedId8 v_hashedId8;
var HashedId3 v_hashedId3;
var boolean isSignatureOk;
// AT certificate
v_res := decvalue(oct2bit(c_atCertificate), v_at);
1086,6 → 1139,11
} else {
setverdict(pass, "HashedId3 digest match.");
}
isSignatureOk := f_verifyCertificateSignatureWithIssuingCertificate(
v_at,
v_aa
);
log("Signature AA/AT: ", isSignatureOk);
// AA-CA certificate
v_hashedId8 := f_calculateDigestFromCertificate(v_ca);
1120,10 → 1178,15
setverdict(pass, "All Digests match.");
} // End of testcase tc_Certificate_06
/**
* Test certificate from Denis tool
* @desc
* @verdict
*/
testcase tc_Certificate_07() runs on TCType system TCType {
const octetstring c_rootCertificate := '02000412455453495F506C7567746573745F526F6F748091000004B0280BAABCD2C785974EB25239B6933AA1AF70C2D75190B7B7B53D1E573788F4B41F81BCFF61C8C73D0FCCD602A894C63BF21221E83F015FF1BBD86C92FFE384010100040DC17DEF569DB90C3E4E26B103343E341B328FCFC62B7D169FE9DDD8B7C11448E228BA6A15BB433C03DCAD1F26CAF0FD5773CE25B6C02B82D4AB83CAF70547B902202006C04080C040812401146B4B831A5617030303181DB9CF7C052616001DB9566E0526872A1D53F0D00527835000005D052E72F7B299EEB17D20EA1017B490EBA59641ADCE278D8D096D2FA2F91D87A215199038D7717A3F398669ACEAB375B0374585A06D72E4161AD5BB3ADEE400'O;
const octetstring c_aaCertificate := '0201071464374303551A0210455453495F506C7567746573745F41418091000004445C581921F79D72A55107984375641C446DFD2A74EB524DB4E00D6C3ADCE038217319C66433EE802632B2EA3B40552541711A092DE2CA59CB7AA8FD8E8EB819010100043B29698A6F21AD6BF17E5E397B85D404846BA7E5B813BF0CFE761649127B40653B29698A6F21AD6BF17E5E397B85D404846BA7E5B813BF0CFE761649127B406502202006C04080C040812401146B4B831A5617030303181DB9CF7C052616001DB9566E0526872A1D53F0D0052783500000CC73A819EE49906B5A27F9EECF94BA74599A834A6A8DCBE0D6F2D1EC3BB79B622596F07B5D0C777CB4478E8D3F34854F69859EF5D0F0C976800BD57571B13A71'O;
const octetstring c_atCertificate := '020130734784EEE700B70100809500000478A4897E6AC66EF68AE98839F05038D926661D0130EDD65B1EA733824FA4E606B223240C3CF3697EF2C1EC2F3E5D35875D120C5A27E4DDB7C87E01C236A7CF5201010004CF9EDB415860E74350607D809CD1D1EF0CD072E08DED4537F8E27D9583331910EC79523076F5B530926F0CD35EF48E668BCE3A8FB23930BFCFE438745799D8CD0220210AC040800100C0408101002401146B4B831A5617030303181DB9CF7C052616001DB9566E0526872A1D53F0D0052783500000DD8EE9C52CD6AA87C565781D9C299C7057C6322E0815C4428411CDCE2374293EE9E24B5462CA603DC69278A47707191D1F9A6F0EB166C88569F70451C55EEED4'O;
const octetstring c_rootCertificate := '020004004B000004966296BF6D47B5ED66DB32605D1074BCBAC97B5A73FE0D4413F6A1818D6D7E9A966296BF6D47B5ED66DB32605D1074BCBAC97B5A73FE0D4413F6A1818D6D7E9A02E02004865F866009014A9618814C774C0100004337D4953FCEBC99FD481A103514CE23B0E85511D2FC55B8CF98941A5436843ACA9B85949F2DF85F9D4D3E8A150EAB3D5004DF0B3DE3972216328615E5A7F816'O;
const octetstring c_aaCertificate := '0201e76042b201a5435502004b000004b80fbbf4b87fdc12ebd7f3dcb689ec1bd2f2ab4c76c158ae7cf5cefbd5a65bb8b80fbbf4b87fdc12ebd7f3dcb689ec1bd2f2ab4c76c158ae7cf5cefbd5a65bb802e02004865f866015014a9618814c774c01030119ff697804342dd62710000016852db5022a8799bfe0bd9b0226c87a83e3df70557e27b759119550d5273674b42a7e5586af5d61098dabc7785ac3b4189bad28a9fa7f430824fcd0f464b548'O;
const octetstring c_atCertificate := '02012a83ff49822ac92d01004b000004b7e7eab1eb9046831e9b0e868aefb6475b0a6ee8bcd7eadbcb80883f53ae1c51b7e7eab1eb9046831e9b0e868aefb6475b0a6ee8bcd7eadbcb80883f53ae1c5102802104865f010015014a9618814c774c01030119ff697804342dd627100000bcb445ceccdea6b38f196aaab2050d300b966a884a4ac653984b4a3104fbb97cab0d808608cafbb22753d90b0cce256f46830075b6653e973fd56daf99bc4535'O;
var Certificate v_ca;
var Certificate v_aa;
1186,13 → 1249,13
// CA-CA certificate
v_hashedId8 := f_calculateDigestFromCertificate(v_ca);
if (v_hashedId8 != '071464374303551a'O) {
if (v_hashedId8 != 'e76042b201a54355'O) {
setverdict(fail, "Digest does not match.");
stop;
} else {
setverdict(pass, "Digest match.");
}
if (substr(v_hashedId8, lengthof(v_hashedId8) - 3, 3) != f_HashedId3FromHashedId8('071464374303551a'O)) {
if (substr(v_hashedId8, lengthof(v_hashedId8) - 3, 3) != f_HashedId3FromHashedId8('e76042b201a54355'O)) {
setverdict(fail, "HashedId3 digest does not match.");
stop;
} else {
1203,7 → 1266,7
} // End of testcase tc_Certificate_07
testcase tc_Certificate_V2X_Pilot_PKI_08() runs on TCType system TCType {
const octetstring c_rootCertificate := '010100040d50696c6f74504b495f526f6f74808900000410c1b6c130e84711b558e69ce0fbc17de6b9a6c42bb7e1b962ef4cd5b07dadf8d214c65d8b7bd24acce01edfe5f186a94217de25e454763f5d83a1161860d6fc010100049b7d10065669dfe403ceb43e2a57b8061c86b9b8a0adf2ece2fefd5a09872525b89f1d8732a4d761e68446c23fb845cd5c8172d3067b9c61cdefbd6923c1fbc002e00b0105a4ec0110ec21010300000008610502f11fc54ca9d198de0177dd571f12e5945a771e20ceda080a00fbfc0d00b0b38f6ac60c18f2cd79d90c2afe45bd76349e0454817e184f92bf87d7c9b4'O;
const octetstring c_rootCertificate := '01090183CA2168B784FC6C021050696C6F74504B495F5043415F5349548089000004732CA0163B0E3CD6DE8789FED98DE772F3D54EBFF1D44ED556B683B0D8AE837C8B1EB52F25377244298655CDCB3D3CCEA8CEDA1AA5E57920C97FEC38F2237B0B0101000412FD16EA68D73575651CD7AED08023CFDC38AEE3CCAA178D672AB30A6FE7803CAEFCF1F79A373C7D77D84AE2DD079229D50E5745CD73398FB69D902617A6AAB602E00B0105A4EC0110EC210103000000A9A8140518E0C66DED7568E103C9D3927CF83B6D4692B7FA013BE586FB6BA7A17F0DD28FE14317E2B9F141084166F24F0CBD06AB926197F5F6A39C6003640E6400'O;
const octetstring c_rootCertId := '83CA2168B784FC6C'O;
const octetstring c_rootCrlCertificate := '010102b98efc434cffbe83ca2168b784fc6c000000010000002308e8352a08e8352a08faaa2a0000000058ed8b300faccc408d68408da414c251f1f922927c3bfa1d35d4cdbec5e2294e7145eb6b673153c7f2311e3ab79183850aee7395b773c628dfbd5fab283695db'O;
1250,34 → 1313,16
group profileCertificates {
/**
* @desc Validate 'verify signature' external function
* @desc Verify AT certificate signature
*/
testcase tc_profileCertificates_01() runs on TCType system TCType {
var boolean v_result;
v_result := f_verifyWithEcdsaNistp256WithSha256(
'020130734784EEE700B70100809500000478A4897E6AC66EF68AE98839F05038D926661D0130EDD65B1EA733824FA4E606B223240C3CF3697EF2C1EC2F3E5D35875D120C5A27E4DDB7C87E01C236A7CF5201010004CF9EDB415860E74350607D809CD1D1EF0CD072E08DED4537F8E27D9583331910EC79523076F5B530926F0CD35EF48E668BCE3A8FB23930BFCFE438745799D8CD0220210AC040800100C0408101002401146B4B831A5617030303181DB9CF7C052616001DB9566E0526872A1D53F0D0052783500000DD8EE9C52CD6AA87C565781D9C299C7057C6322E0815C4428411CDCE2374293EE9E24B5462CA603DC69278A47707191D1F9A6F0EB166C88569F70451C55EEED4'O,
'0000DD8EE9C52CD6AA87C565781D9C299C7057C6322E0815C4428411CDCE2374293EE9E24B5462CA603DC69278A47707191D1F9A6F0EB166C88569F70451C55EEED4'O,
'78A4897E6AC66EF68AE98839F05038D926661D0130EDD65B1EA733824FA4E606'O,
'B223240C3CF3697EF2C1EC2F3E5D35875D120C5A27E4DDB7C87E01C236A7CF52'O
);
f_loadCertificates("cfg01");
if (v_result == true) {
setverdict(pass, "Certificate verification match");
} else {
setverdict(fail, "Certificate verification mismatch");
}
log (vc_aaCertificate);
log (vc_atCertificate);
} // End of testcase tc_profileCertificates_01
/**
* @desc Verify AT certificate signature
*/
testcase tc_profileCertificates_02() runs on TCType system TCType {
var boolean v_result;
f_loadCertificates("cfg01");
v_result := f_verifyCertificateSignatureWithIssuingCertificate(
vc_atCertificate,
vc_aaCertificate
1289,7 → 1334,7
setverdict(fail, "Certificate verification mismatch");
}
} // End of testcase tc_profileCertificates_02
} // End of testcase tc_profileCertificates_01
} // End of group profileCertificates