Commit 2550f00a authored by garciay's avatar garciay
Browse files

Add work-around for PKI AdanpterControlPort and UpperTesterPort due to...

Add work-around for PKI AdanpterControlPort and UpperTesterPort due to incomplete _BASE class declaration
parent d704b5eb
......@@ -237,7 +237,8 @@ module LibItsPki_Functions {
} // End of function f_utInitializeIut
function f_sendUtTriggerPrimitive(
in HashAlgorithm p_hashAlgorithm,
in charstring p_cannonicalId,
in Oct1 p_encAlgorithm,
in octetstring p_private_key,
in octetstring p_publicKeyCompressed,
in integer p_compressedMode
......@@ -251,7 +252,7 @@ module LibItsPki_Functions {
v_compressed_public_key := '03'O & p_publicKeyCompressed;
}
v_ut_trigger_enrolment_request := { p_hashAlgorithm, p_private_key, v_compressed_public_key };
v_ut_trigger_enrolment_request := { p_cannonicalId, p_encAlgorithm, p_private_key, v_compressed_public_key };
utPort.send(UtPkiTrigger: { triggerEnrolmentRequest := v_ut_trigger_enrolment_request });
tc_ac.start;
alt {
......
......@@ -27,6 +27,7 @@ module LibItsPki_Templates {
import from EtsiTs102941BaseTypes language "ASN.1:1997" all;
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 EtsiTs103097Module language "ASN.1:1997" all;
......@@ -72,10 +73,10 @@ module LibItsPki_Templates {
}
} // End of template m_etsiTs102941Data_inner_at_response
template (value) EnrolmentRequestMessage m_enrolmentRequestMessage(
in template (value) EncryptedData p_encryptedData
) modifies m_etsiTs103097Data_encrypted := {
} // End of template m_enrolmentRequestMessage
template (value) EtsiTs103097Data m_authorizationValidationRequestMessage(
in template (value) EncryptedData p_encryptedData
) modifies m_etsiTs103097Data_encrypted := {
} // End of template m_authorizationValidationRequestMessage
template (present) EnrolmentRequestMessage mw_enrolmentRequestMessage(
template (present) EncryptedData p_encryptedData := ?
......@@ -271,4 +272,29 @@ module LibItsPki_Templates {
certificate := omit
} // End of template mw_innerAtResponse_ko
template (value) AuthorizationValidationRequest m_authorizationValidationRequest(
in template (value) SharedAtRequest p_sharedAtRequest,
in template (value) EcSignature p_ecSignature
) := {
sharedAtRequest := p_sharedAtRequest,
ecSignature := p_ecSignature
} // End of template m_authorizationValidationRequest
template (present) AuthorizationValidationResponse mw_authorizationValidationResponse_ok(
template (present) Oct16 p_requestHash := ?,
template (present) CertificateSubjectAttributes p_confirmedSubjectAttributes := ?
) := {
requestHash := p_requestHash,
responseCode := ok,
confirmedSubjectAttributes := p_confirmedSubjectAttributes
} // End of template mw_authorizationValidationResponse_ok
template (present) AuthorizationValidationResponse mw_authorizationValidationResponse_ko(
template (present) Oct16 p_requestHash := ?
) := {
requestHash := p_requestHash,
responseCode := complement(ok),
confirmedSubjectAttributes := omit
} // End of template mw_authorizationValidationResponse_ko
} // End of module LibItsPki_Templates
......@@ -44,7 +44,7 @@ module LibItsPki_TestSystem {
/**
* @desc Adapter control port
*/
type port AdapterControlPort message {
type port AdapterControlPkiPort message {
out AcPkiPrimitive;
in AcPkiResponse;
} // End of AdapterControlPort
......@@ -52,7 +52,7 @@ module LibItsPki_TestSystem {
/**
* @desc Upper Tester port
*/
type port UpperTesterPort message {
type port UpperTesterPkiPort message { // TODO This is a work-around for a TITAN bug: UpperTesterPort_BASE class declared after UpperTesterPort class
out UtPkiInitialize, UtPkiTrigger;
in UtPkiResults;
} // End of UpperTesterPort
......@@ -70,7 +70,7 @@ module LibItsPki_TestSystem {
group componentDefinitions {
type component ItsPkiSystem {
port AdapterControlPort acPort;
port AdapterControlPkiPort acPort;
port PkiPort pkiPort;
} // End of component ItsPkiSystem
......@@ -78,14 +78,14 @@ module LibItsPki_TestSystem {
} // End of component ItsPkiHttpSystem
type component ItsPkiItssSystem extends ItsPkiSystem {
port UpperTesterPort utPort;
port UpperTesterPkiPort utPort;
port GeoNetworkingPort geoNetworkingPort;
} // End of component ItsPkiItssSystem
} // End of group componentDefinitions
type component ItsPki extends ItsSecurityBaseComponent, ItsBaseMtc {
port AdapterControlPort acPort;
port AdapterControlPkiPort acPort;
port PkiPort pkiPort;
var Certificate vc_eaCertificate; /** Test Adapter EA certificate */
......@@ -101,7 +101,7 @@ module LibItsPki_TestSystem {
} // End of component ItsPki
type component ItsPkiItss extends ItsPki {
port UpperTesterPort utPort;
port UpperTesterPkiPort utPort;
port GeoNetworkingPort geoNetworkingPort;
} // End of component ItsPkiItss
......
......@@ -57,12 +57,14 @@ module LibItsPki_TypesAndValues {
/**
* @desc Request to trigger an EnrolmentRequest
* @member hashAlgorithm The Hash algorithm to be used (sha256 or sha384)
* @member cannonicalId The canonical identifier of the ITS-S
* @member encAlgorithm The encrypion algorithm to be used (Nist P256 or Brainpool P256)
* @member privateKey The private key to be used for signature of the requested EA certificate
* @member compressedPublickey The compressed public key to be used for signature of the requested EA certificate (format: [02|03]<compressed public key>
*/
type record TriggerEnrolmentRequest {
HashAlgorithm hashAlgorithm,
charstring cannonicalId,
Oct1 encAlgorithm,
octetstring privateKey,
octetstring compressedPublickey
} with {
......
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