Commit ee052906 authored by Yann Garcia's avatar Yann Garcia
Browse files

Change module EtsiTs102941MessagesItss into EtsiTs102941MessagesCa

parent b951e6f1
......@@ -152,7 +152,7 @@ module LibItsCommon_TypesAndValues {
const integer c_its_aid_IVI := 139;
const integer c_its_aid_TLC := 140;
const integer c_its_aid_GN := 141;
const integer c_its_aid_SCR := 35; // Secured Certificate Request
const integer c_its_aid_SCR := 623; // Secured Certificate Request, https://standards.ieee.org/products-services/regauth/psid/public.html
}
}
with {
......
......@@ -565,7 +565,8 @@ module LibItsPki_Functions {
),
m_headerInfo_inner_ec_request(
c_its_aid_SCR,
f_getCurrentTimeUtc())
f_getCurrentTimeUtc()
)
);
// Signed the encoded InnerEcRequestSignedForPop
v_tbs_signed := f_signWithEcdsaNistp256WithSha256(bit2oct(encvalue(v_tbs)), int2oct(0, 32), p_private_key);
......@@ -591,7 +592,7 @@ module LibItsPki_Functions {
} // End of function f_generate_inner_ec_request_signed_for_pop
function f_generate_inner_ec_response(
in octetstring p_inner_ec_request_hashed_id,
in octetstring p_inner_ec_request_hash,
in EtsiTs103097Certificate p_certificate,
out InnerEcResponse p_inner_ec_response
) return boolean {
......@@ -600,7 +601,7 @@ module LibItsPki_Functions {
// Build the Proof of Possession InnerEcResponse
p_inner_ec_response := valueof(
m_innerEcResponse_ok(
substr(p_inner_ec_request_hashed_id, 0, 16),
substr(p_inner_ec_request_hash, 0, 16),
p_certificate
)
);
......@@ -697,12 +698,13 @@ module LibItsPki_Functions {
p_eaHashedId8,
v_key_tag,
valueof(
m_certificate_subject_attributes(
m_certificate_subject_attributes( // FIXME Review subjectPermissions
p_ec_certificate.toBeSigned.appPermissions,
{ { subjectPermissions := { all_ := NULL }, minChainLength := 1, chainLengthRange := 0, eeType := '00000000'B } },
p_ec_certificate.toBeSigned.id,
p_ec_certificate.toBeSigned.validityPeriod,
p_ec_certificate.toBeSigned.region,
p_ec_certificate.toBeSigned.assuranceLevel,
p_ec_certificate.toBeSigned.appPermissions
p_ec_certificate.toBeSigned.assuranceLevel
))));
v_hash_shared_at_request := f_hashWithSha256(bit2oct(encvalue(p_inner_at_request.sharedAtRequest)));
log("v_hash_shared_at_request=", v_hash_shared_at_request);
......@@ -858,12 +860,21 @@ module LibItsPki_Functions {
} // End of function f_generate_authorization_validation_request
function f_generate_authorization_validation_response(
in InnerAtRequest p_inner_at_request,
in Certificate p_certificate,
in octetstring p_authorization_validation_request_hash,
in CertificateSubjectAttributes p_Certificate_subject_attributes,
out AuthorizationValidationResponse p_authorization_validation_response
) return boolean {
// TODO
return false;
// Local variables
// Build the Proof of Possession InnerEcResponse
p_authorization_validation_response := valueof(
m_authorizationValidationResponse_ok(
substr(p_authorization_validation_request_hash, 0, 16),
p_Certificate_subject_attributes
)
);
return true;
} // End of function f_generate_authorization_validation_response
} // End of group authorization_validation_xxx
......
......@@ -83,8 +83,8 @@ module LibItsPki_Templates {
} // End of template m_etsiTs102941Data_authorization_validation_request
template (value) EtsiTs102941Data m_etsiTs102941Data_authorization_validation_response(
in template (value) AuthorizationValidationResponse p_authorization_validation_response
) := {
in template (value) AuthorizationValidationResponse p_authorization_validation_response
) := {
version := PkiProtocolVersion,
content := {
authorizationValidationResponse := p_authorization_validation_response
......@@ -319,6 +319,23 @@ module LibItsPki_Templates {
ecSignature := p_ecSignature
} // End of template m_authorizationValidationRequest
template (present) AuthorizationValidationRequest mw_authorizationValidationRequest(
template (present) SharedAtRequest p_sharedAtRequest := ?,
template (present) EcSignature p_ecSignature := ?
) := {
sharedAtRequest := p_sharedAtRequest,
ecSignature := p_ecSignature
} // End of template mw_authorizationValidationRequest
template (value) AuthorizationValidationResponse m_authorizationValidationResponse_ok(
template (value) Oct16 p_requestHash,
template (value) CertificateSubjectAttributes p_confirmedSubjectAttributes
) := {
requestHash := p_requestHash,
responseCode := ok,
confirmedSubjectAttributes := p_confirmedSubjectAttributes
} // End of template m_authorizationValidationResponse_ok
template (present) AuthorizationValidationResponse mw_authorizationValidationResponse_ok(
template (present) Oct16 p_requestHash := ?,
template (present) CertificateSubjectAttributes p_confirmedSubjectAttributes := ?
......@@ -381,16 +398,14 @@ module LibItsPki_Templates {
) := {
ecSignature := p_ecSignature
} // End of template mw_ec_signature_ext_payload
template (omit) CertificateSubjectAttributes m_certificate_subject_attributes(
in template (value) SequenceOfPsidSsp p_appPermissions,
in template (value) SequenceOfPsidGroupPermissions p_certIssuePermissions,
in template (omit) CertificateId p_id := omit,
in template (omit) ValidityPeriod p_validityPeriod := omit,
in template (omit) GeographicRegion p_region := omit,
in template (omit) SubjectAssurance p_assuranceLevel := omit,
in template (omit) SequenceOfPsidSsp p_appPermissions := omit,
in template (omit) SequenceOfPsidGroupPermissions p_certIssuePermissions := omit
in template (omit) SubjectAssurance p_assuranceLevel := omit
) := {
id := p_id,
validityPeriod := p_validityPeriod,
......
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