Commit 1085f670 authored by Yann Garcia's avatar Yann Garcia
Browse files

Big fixes and enhancements from CV2X#2 Plugtest

parent 9ed0fa56
This diff is collapsed.
......@@ -119,6 +119,11 @@ module LibItsPki_Pics {
* @desc End point for the TLM
*/
modulepar charstring PICS_HEADER_HOST_TLM := "www.its.tlm.org";
/**
* @desc
*/
modulepar charstring PICS_HTTP_POST_URI_DC := "www.its.ec.org";
/**
* @desc Certificate used by the Test System
......@@ -204,12 +209,12 @@ module LibItsPki_Pics {
/**
* @desc Factory private key for verification Brainpool P256 r1
*/
modulepar octetstring PICS_ITS_S_SIGN_BRAINPOOLP256r1_PRIVATE_KEY := '6D585B716D06F75EC2B8A8ADEBFCE6ED35B0640C2AFBFF25FE48FC81A6732D4F'O;
modulepar octetstring PICS_ITS_S_SIGN_BRAINPOOLP256r1_PRIVATE_KEY := '2CCBC88C6AD0FBB78AE50DA63366E64445F069369CED4605485442F524A0791E'O;
/**
* @desc Factory compressed public key for verification Brainpool P256 r1
*/
modulepar octetstring PICS_ITS_S_SIGN_BRAINPOOLP256r1_PUBLIC_KEY := '02A92BA3B770B040B8D958D5BD2CC9B537212D6963F50EA3E4784FEFA5D0454C12'O;
modulepar octetstring PICS_ITS_S_SIGN_BRAINPOOLP256r1_PUBLIC_KEY := '02A7A21F8FEE8DF454B7AF80A7C78CBC506C16F491C72BDC54F0CE98F20C15C59B'O;
/**
* @desc Factory private key for encryption Brainpool P384 r1
......@@ -219,21 +224,27 @@ module LibItsPki_Pics {
/**
* @desc Factory private key for verification Brainpool P384 r1
*/
modulepar octetstring PICS_ITS_S_SIGN_BRAINPOOLP384r1_PRIVATE_KEY := '3CD977195A579787C84D5900F4CB6341E0C3D2750B140C5380E6F03CE3FBA0022F7541DEABDCED4790D313ED8F56ACA8'O;
modulepar octetstring PICS_ITS_S_SIGN_BRAINPOOLP384r1_PRIVATE_KEY := '0F94E957F915B39E545FE845A8B4681D52F9D144353FFE36879F3DC9AFDE4001EDE55D5234EB977425E44D95BD6D3328'O;
/**
* @desc Factory compressed public key for verification Brainpool P384 r1
*/
modulepar octetstring PICS_ITS_S_SIGN_BRAINPOOLP384r1_PUBLIC_KEY := '0243FF5C96984C2C3F5FD5C5F6551C90F5FAEE1E5E8301763E4AF1E9D627F3474E554B82EE98EC4B49808DFF61B35F8313'O;
modulepar octetstring PICS_ITS_S_SIGN_BRAINPOOLP384r1_PUBLIC_KEY := '0210E2B13DCC736F22A1E9C6E156177BD0CB106D34897EF8D596CF3A7AC4034003AD2BB3FA4F65C723F665BEF089858C4F'O;
/**
* @desc Canonical ITSS-S identifier
*/
modulepar octetstring PICS_ITS_S_CANONICAL_ID := '1B4CA1210123AE900BBE6C3EBAE7E87DA20DBDAB1E7B2EC0691C51C1021900AA'O;
modulepar octetstring PICS_ITS_S_CANONICAL_ID := '455453492D4954532D303031'O;
/**
* @desc Invalid Canonical ITSS-S identifier
*/
modulepar octetstring PICS_INVALID_ITS_S_CANONICAL_ID := 'BABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABA'O;
modulepar octetstring PICS_INVALID_ITS_S_CANONICAL_ID := '455453492D4954532D30303145454545'O;
/**
* @desc Set to true if the IUT support CertificateId shall be set to the choice name
* @see ETSI TS 103 097 Clause 7.2.2 Enrolment credential
*/
modulepar boolean PICS_EC_SUBJECT_ATTRIBUT_ID := false;
} // End of module LibItsPki_Pics
......@@ -290,16 +290,16 @@ module LibItsPki_Templates {
in template (value) PublicVerificationKey p_verificationKey,
in template (omit) PublicEncryptionKey p_encryptionKey := omit
) := {
verificationKey := p_verificationKey,
encryptionKey := p_encryptionKey
verificationKey := p_verificationKey,
encryptionKey := p_encryptionKey
} // End of template m_publicKeys
template PublicKeys mw_publicKeys(
template (present) PublicVerificationKey p_verificationKey := ?,
template PublicEncryptionKey p_encryptionKey := *
) := {
verificationKey := p_verificationKey,
encryptionKey := p_encryptionKey
verificationKey := p_verificationKey,
encryptionKey := p_encryptionKey
} // End of template mw_publicKeys
template (omit) CertificateSubjectAttributes m_certificateSubjectAttributes_id_none(
......@@ -308,12 +308,12 @@ module LibItsPki_Templates {
in template (omit) GeographicRegion p_region := omit,
in template (omit) SubjectAssurance p_assuranceLevel := omit
) := {
id := { none_ := NULL },
validityPeriod := p_validityPeriod,
region := p_region,
assuranceLevel := p_assuranceLevel,
appPermissions := p_appPermissions,
certIssuePermissions := omit
id := { none_ := NULL },
validityPeriod := p_validityPeriod,
region := p_region,
assuranceLevel := p_assuranceLevel,
appPermissions := p_appPermissions,
certIssuePermissions := omit
} // End of template m_certificateSubjectAttributes_id_none
template (omit) CertificateSubjectAttributes m_certificateSubjectAttributes_id_omit(
......@@ -322,7 +322,7 @@ module LibItsPki_Templates {
in template (omit) GeographicRegion p_region := omit,
in template (omit) SubjectAssurance p_assuranceLevel := omit
) modifies m_certificateSubjectAttributes_id_none := {
id := omit
id := omit
} // End of template m_certificateSubjectAttributes_id_omit
template (omit) CertificateSubjectAttributes m_certificateSubjectAttributes_id_name(
......@@ -332,39 +332,39 @@ module LibItsPki_Templates {
in template (omit) GeographicRegion p_region := omit,
in template (omit) SubjectAssurance p_assuranceLevel := omit
) := {
id := { name := p_name },
validityPeriod := p_validityPeriod,
region := p_region,
assuranceLevel := p_assuranceLevel,
appPermissions := p_appPermissions,
certIssuePermissions := omit
id := { name := p_name },
validityPeriod := p_validityPeriod,
region := p_region,
assuranceLevel := p_assuranceLevel,
appPermissions := p_appPermissions,
certIssuePermissions := omit
} // End of template m_certificateSubjectAttributes_id_name
template (value) InnerEcResponse m_innerEcResponse_ok(
in template (value) Oct16 p_requestHash,
in template (value) EtsiTs103097Certificate p_certificate
) := {
requestHash := p_requestHash,
responseCode := ok,
certificate := p_certificate
requestHash := p_requestHash,
responseCode := ok,
certificate := p_certificate
} // End of template m_innerEcResponse_ok
template (present) InnerEcResponse mw_innerEcResponse_ok(
template (present) Oct16 p_requestHash := ?,
template (present) EtsiTs103097Certificate p_certificate := ?
) := {
requestHash := p_requestHash,
responseCode := ok,
certificate := p_certificate
requestHash := p_requestHash,
responseCode := ok,
certificate := p_certificate
} // End of template mw_innerEcResponse_ok
template (value) InnerEcResponse m_innerEcResponse_ko(
in template (value) Oct16 p_requestHash,
in template (value) EnrolmentResponseCode p_responseCode
) := {
requestHash := p_requestHash,
responseCode := p_responseCode,
certificate := omit
requestHash := p_requestHash,
responseCode := p_responseCode,
certificate := omit
} // End of template m_innerEcResponse_ko
template (present) InnerEcResponse mw_innerEcResponse_ko(
......@@ -380,9 +380,9 @@ module LibItsPki_Templates {
in template (value) Oct16 p_requestHash,
in template (value) EtsiTs103097Certificate p_certificate
) := {
requestHash := p_requestHash,
responseCode := ok,
certificate := p_certificate
requestHash := p_requestHash,
responseCode := ok,
certificate := p_certificate
} // End of template m_innerAtResponse_ok
template (present) InnerAtResponse mw_innerAtResponse_ok(
......
......@@ -102,6 +102,13 @@ module LibItsPki_TestSystem {
var HashedId8 vc_aaHashedId8; /** Test Adapter AA HashedId8 for decryption of IUT's response */
var octetstring vc_aaWholeHash; /** Test Adapter AA whole-hash for signature check */
var octetstring vc_aaWholeHash256; /** Test Adapter AA whole-hash using SHA 256 for encryption because of encryption key size == 32 */
var PrivateEcKeys vc_ec_private_keys;
var PublicCompressedEcKeys vc_ec_public_compressed_key;
var EcCompressedModes vc_ec_compressed_modes;
var EcHashedId8 vc_ec_hashed_id8;
var EcCertificates vc_ec_certificates;
var integer vc_ec_keys_counter;
} // End of component ItsPkiHttp
/**
......
......@@ -141,6 +141,11 @@ module LibItsPki_TypesAndValues {
type record of CtlCommand CtlCommands;
type record of octetstring PrivateEcKeys;
type record of octetstring PublicCompressedEcKeys;
type record of integer EcCompressedModes;
type record of HashedId8 EcHashedId8;
type record of EtsiTs103097Certificate EcCertificates;
}
with {
variant ""
......
......@@ -2270,9 +2270,9 @@ module LibItsSecurity_Functions {
* @return true on success, false otherwise
*/
function f_getCertificateHash(
in charstring p_certificate_id,
out octetstring p_hash
) return boolean {
in charstring p_certificate_id,
out octetstring p_hash
) return boolean {
log(">>> f_getCertificateHash: ", p_certificate_id);
if (not fx_readCertificateHash(p_certificate_id, p_hash)){
......
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