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

Change module EtsiTs102941MessagesItss into EtsiTs102941MessagesCa

parent a1a1ccbc
......@@ -20,7 +20,7 @@ module LibItsHttp_BinaryMessageBodyTypes {
import from IEEE1609dot2 language "ASN.1:1997" all;
import from EtsiTs102941BaseTypes language "ASN.1:1997" all;
import from EtsiTs102941TypesEnrolment language "ASN.1:1997" all;
import from EtsiTs102941MessagesItss language "ASN.1:1997" all;
import from EtsiTs102941MessagesCa language "ASN.1:1997" all;
import from EtsiTs103097Module language "ASN.1:1997" all;
type union BinaryBody {
......
......@@ -19,7 +19,7 @@ module LibItsHttp_BinaryTemplates {
import from IEEE1609dot2 language "ASN.1:1997" all;
import from EtsiTs102941BaseTypes language "ASN.1:1997" all;
import from EtsiTs102941TypesEnrolment language "ASN.1:1997" all;
import from EtsiTs102941MessagesItss language "ASN.1:1997" all;
import from EtsiTs102941MessagesCa language "ASN.1:1997" all;
import from EtsiTs103097Module language "ASN.1:1997" all;
template (value) BinaryBody m_binary_body_raw(
......
......@@ -5,16 +5,16 @@ module LibItsPki_EncdecDeclarations {
import from EtsiTs102941TypesEnrolment language "ASN.1:1997" all;
import from EtsiTs102941TypesAuthorization language "ASN.1:1997" all;
import from EtsiTs102941TypesAuthorizationValidation language "ASN.1:1997" all;
import from EtsiTs102941MessagesItss language "ASN.1:1997" all;
import from EtsiTs102941MessagesCa language "ASN.1:1997" all;
import from EtsiTs103097Module language "ASN.1:1997" all;
import from LibItsSecurity_TypesAndValues all;
external function fx_enc_EtsiTs102941Data(in EtsiTs102941MessagesItss.EtsiTs102941Data p_etsi_ts_102941_data) return bitstring
external function fx_enc_EtsiTs102941Data(in EtsiTs102941MessagesCa.EtsiTs102941Data p_etsi_ts_102941_data) return bitstring
with {extension "prototype(convert) encode(PER)"}
external function fx_dec_EtsiTs102941Data(inout bitstring b, out EtsiTs102941MessagesItss.EtsiTs102941Data p_etsi_ts_102941_data)return integer
external function fx_dec_EtsiTs102941Data(inout bitstring b, out EtsiTs102941MessagesCa.EtsiTs102941Data p_etsi_ts_102941_data)return integer
with {extension "prototype(sliding) decode(PER)"}
/**
......
......@@ -25,7 +25,7 @@ module LibItsPki_Functions {
import from EtsiTs102941TypesEnrolment language "ASN.1:1997" all;
import from EtsiTs102941TypesAuthorization language "ASN.1:1997" all;
import from EtsiTs102941TypesAuthorizationValidation language "ASN.1:1997" all;
import from EtsiTs102941MessagesItss language "ASN.1:1997" all;
import from EtsiTs102941MessagesCa language "ASN.1:1997" all;
import from EtsiTs103097Module language "ASN.1:1997" all;
import from ITS_Container language "ASN.1:1997" all;
import from CAM_PDU_Descriptions language "ASN.1:1997" all;
......@@ -323,7 +323,6 @@ module LibItsPki_Functions {
) runs on ItsPkiHttp {
var InnerEcRequest v_inner_ec_request;
var Ieee1609Dot2Data v_inner_ec_request_signed_for_pop;
var bitstring v_inner_ec_request_signed_for_pop_msg;
if (f_generate_inner_ec_request(p_private_key, p_publicKeyCompressed, p_compressedMode, v_inner_ec_request) == false) {
log("*** f_http_build_invalid_enrolment_request: ERROR: Failed to generate InnerEcRequest ***");
......@@ -335,10 +334,9 @@ module LibItsPki_Functions {
f_selfOrClientSyncAndVerdict("error", e_error);
}
// Secure InnerEcRequestSignedForPoP message
v_inner_ec_request_signed_for_pop_msg := encvalue(m_etsiTs102941Data_inner_ec_request_signed_for_pop(v_inner_ec_request_signed_for_pop));
// Get 16 last byte of SHA256 of InnerEcRequestSignedForPop
p_hash_inner_ec_request_signed_for_pop := f_hashWithSha256(int2oct(12345, 32)); // Invalid InnseEcRequestSignedForPop
if (f_build_pki_secured_message(vc_eaPrivateKey, valueof(m_signerIdentifier_self), vc_eaHashedId8, p_publicKeyCompressed, p_compressedMode, bit2oct(v_inner_ec_request_signed_for_pop_msg), p_ieee1609dot2_signed_and_encrypted_data) == false) {
if (f_build_pki_secured_message(vc_eaPrivateKey, valueof(m_signerIdentifier_self), vc_eaHashedId8, p_publicKeyCompressed, p_compressedMode, bit2oct(encvalue(m_etsiTs102941Data_inner_ec_request_signed_for_pop(v_inner_ec_request_signed_for_pop))), p_ieee1609dot2_signed_and_encrypted_data) == false) {
log("*** f_http_build_invalid_enrolment_request: ERROR: Failed to generate InnerEcRequestSignedForPop ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
......@@ -364,15 +362,14 @@ module LibItsPki_Functions {
) runs on ItsPkiHttp {
// Local variables
var AuthorizationValidationRequest v_authorization_validation_request;
var bitstring v_authorization_validation_request_msg;
if (f_generate_authorization_validation_request(vc_eaCertificate, vc_eaHashedId8, p_private_key, p_publicKeyCompressed, p_compressedMode, v_authorization_validation_request) == false) {
log("*** f_http_build_authorization_validation_request: ERROR: Failed to generate AuthorizationValidationRequest ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
// FIXME Encapsulate v_authorization_validation_request into EtsiTs102941Data structure
if (f_build_pki_secured_message(vc_eaPrivateKey, valueof(m_signerIdentifier_self), vc_eaHashedId8, p_publicKeyCompressed, p_compressedMode, bit2oct(encvalue(v_authorization_validation_request)), p_ieee1609dot2_signed_and_encrypted_data) == false) {
if (f_build_pki_secured_message(vc_eaPrivateKey, valueof(m_signerIdentifier_self), vc_eaHashedId8, p_publicKeyCompressed, p_compressedMode, bit2oct(encvalue(m_etsiTs102941Data_authorization_validation_request(v_authorization_validation_request))), p_ieee1609dot2_signed_and_encrypted_data) == false) {
log("*** f_http_build_authorization_validation_request: ERROR: Failed to generate InnerEcRequestSignedForPop ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
......
......@@ -28,7 +28,7 @@ module LibItsPki_Templates {
import from EtsiTs102941TypesEnrolment language "ASN.1:1997" all;
import from EtsiTs102941TypesAuthorization language "ASN.1:1997" all;
import from EtsiTs102941TypesAuthorizationValidation language "ASN.1:1997" all;
import from EtsiTs102941MessagesItss language "ASN.1:1997" all;
import from EtsiTs102941MessagesCa language "ASN.1:1997" all;
import from EtsiTs103097Module language "ASN.1:1997" all;
// LibItsSecurity
......@@ -56,11 +56,11 @@ module LibItsPki_Templates {
} // End of template m_etsiTs102941Data_inner_ec_response
template (value) EtsiTs102941Data m_etsiTs102941Data_inner_at_request(
in template (value) InnerAtRequest p_inner_at_response
in template (value) InnerAtRequest p_inner_at_request
) := {
version := PkiProtocolVersion,
content := {
authorizationRequest := p_inner_at_response
authorizationRequest := p_inner_at_request
}
} // End of template m_etsiTs102941Data_inner_at_request
......@@ -73,6 +73,24 @@ module LibItsPki_Templates {
}
} // End of template m_etsiTs102941Data_inner_at_response
template (value) EtsiTs102941Data m_etsiTs102941Data_authorization_validation_request(
in template (value) AuthorizationValidationRequest p_authorization_validation_request
) := {
version := PkiProtocolVersion,
content := {
authorizationValidationRequest := p_authorization_validation_request
}
} // End of template m_etsiTs102941Data_authorization_validation_request
template (value) EtsiTs102941Data m_etsiTs102941Data_authorization_validation_response(
in template (value) AuthorizationValidationResponse p_authorization_validation_response
) := {
version := PkiProtocolVersion,
content := {
authorizationValidationResponse := p_authorization_validation_response
}
} // End of template m_etsiTs102941Data_authorization_validation_response
template (present) EnrolmentRequestMessage mw_enrolmentRequestMessage(
template (present) EncryptedData p_encryptedData := ?
) modifies mw_etsiTs103097Data_encrypted := {
......@@ -148,6 +166,12 @@ module LibItsPki_Templates {
authorizationResponse := p_authorizationResponse
} // End of template mw_authorizationResponse
template (present) EtsiTs102941DataContent mw_authorizationValidationResponse(
template (present) AuthorizationValidationResponse p_authorization_alidation_response := ?
) := {
authorizationValidationResponse := p_authorization_alidation_response
} // End of template mw_authorizationValidationResponse
template (value) InnerEcRequest m_innerEcRequest(
in template (value) charstring p_itsId,
in template (value) PublicKeys p_publicKeys,
......
......@@ -22,7 +22,7 @@ module LibItsPki_TestSystem {
import from EtsiTs102941TypesEnrolment language "ASN.1:1997" all;
import from EtsiTs102941TypesAuthorization language "ASN.1:1997" all;
import from EtsiTs102941TypesAuthorizationValidation language "ASN.1:1997" all;
import from EtsiTs102941MessagesItss language "ASN.1:1997" all;
import from EtsiTs102941MessagesCa language "ASN.1:1997" all;
import from EtsiTs103097Module language "ASN.1:1997" all;
// LibItsCommon
......@@ -46,7 +46,7 @@ module LibItsPki_TestSystem {
/**
* @desc Adapter control port
*/
type port AdapterControlPkiPort message {
type port AdapterControlPort message {
out AcPkiPrimitive;
in AcPkiResponse;
} // End of AdapterControlPort
......@@ -54,7 +54,7 @@ module LibItsPki_TestSystem {
/**
* @desc Upper Tester port
*/
type port UpperTesterPkiPort message { // TODO This is a work-around for a TITAN bug: UpperTesterPort_BASE class declared after UpperTesterPort class
type port UpperTesterPort message {
out UtPkiInitialize, UtPkiTrigger;
in UtPkiResults;
} // End of UpperTesterPort
......@@ -72,7 +72,7 @@ module LibItsPki_TestSystem {
group componentDefinitions {
type component ItsPkiSystem {
port AdapterControlPkiPort acPort;
port AdapterControlPort acPort;
port PkiPort pkiPort;
} // End of component ItsPkiSystem
......@@ -80,14 +80,14 @@ module LibItsPki_TestSystem {
} // End of component ItsPkiHttpSystem
type component ItsPkiItssSystem extends ItsPkiSystem {
port UpperTesterPkiPort utPort;
port UpperTesterPort utPort;
port GeoNetworkingPort geoNetworkingPort;
} // End of component ItsPkiItssSystem
} // End of group componentDefinitions
type component ItsPki extends ItsSecurityBaseComponent, ItsBaseMtc {
port AdapterControlPkiPort acPort;
port AdapterControlPort acPort;
port PkiPort pkiPort;
var Certificate vc_eaCertificate; /** Test Adapter EA certificate */
......@@ -104,7 +104,7 @@ module LibItsPki_TestSystem {
} // End of component ItsPki
type component ItsPkiItss extends ItsPki {
port UpperTesterPkiPort utPort;
port UpperTesterPort utPort;
port GeoNetworkingPort geoNetworkingPort;
} // End of component ItsPkiItss
......
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