Commit b74f5807 authored by garciay's avatar garciay
Browse files

Add support of AuthorizarionRequest/Response

parent 2550f00a
Loading
Loading
Loading
Loading
+13 −0
Original line number Original line Diff line number Diff line
@@ -3,6 +3,8 @@ module LibItsPki_EncdecDeclarations {
  // LibIts
  // LibIts
  import from EtsiTs102941BaseTypes language "ASN.1:1997" all;
  import from EtsiTs102941BaseTypes language "ASN.1:1997" all;
  import from EtsiTs102941TypesEnrolment 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 EtsiTs102941MessagesItss language "ASN.1:1997" all;
  import from EtsiTs103097Module language "ASN.1:1997" all;
  import from EtsiTs103097Module language "ASN.1:1997" all;
  
  
@@ -37,4 +39,15 @@ module LibItsPki_EncdecDeclarations {
  external function fx_dec_InnerEcResponse(inout bitstring b, out EtsiTs102941TypesEnrolment.InnerEcResponse p) return integer
  external function fx_dec_InnerEcResponse(inout bitstring b, out EtsiTs102941TypesEnrolment.InnerEcResponse p) return integer
  with {extension "prototype(sliding) decode(PER)"}
  with {extension "prototype(sliding) decode(PER)"}
    
    
  /**
   * @desc Encoding function for EtsiTs102941TypesAuthorization SharedAtRequest
   * @param p The certificate to encode
   * @return The encode message in OER format
   */
  external function fx_enc_SharedAtRequest(in EtsiTs102941TypesAuthorization.SharedAtRequest p) return bitstring
  with {extension "prototype(convert) encode(PER)"}
    
  external function fx_dec_SharedAtRequest(inout bitstring b, out EtsiTs102941TypesAuthorization.SharedAtRequest p) return integer
  with {extension "prototype(sliding) decode(PER)"}
    
} // End of module LibItsPki_EncdecDeclarations 
} // End of module LibItsPki_EncdecDeclarations 
+355 −27

File changed.

Preview size limit exceeded, changes collapsed.

+5 −0
Original line number Original line Diff line number Diff line
@@ -30,4 +30,9 @@ module LibItsPki_Pics {
   */
   */
  modulepar charstring PICS_HTTP_GET_URI := "/its/inner_ec_request";
  modulepar charstring PICS_HTTP_GET_URI := "/its/inner_ec_request";


  /**
   * @desc Canonical ITSS-S identifier
   */
  modulepar charstring PICS_ITS_S_CANONICAL_ID := "CanonicalItsId";
  
} // End of module LibItsPki_Pics
} // End of module LibItsPki_Pics
+64 −0
Original line number Original line Diff line number Diff line
@@ -297,4 +297,68 @@ module LibItsPki_Templates {
    confirmedSubjectAttributes := omit
    confirmedSubjectAttributes := omit
  } // End of template mw_authorizationValidationResponse_ko
  } // End of template mw_authorizationValidationResponse_ko


  template (value) SharedAtRequest m_shared_at_request(
                                                       in template (value) HashedId8 p_eaId,
                                                       in template (value) Oct16 p_keyTag,
                                                       in template (value) CertificateSubjectAttributes p_requestedSubjectAttributes
                                                       ) := {
    eaId                       := p_eaId,
    keyTag                     := p_keyTag,
    certificateFormat          := 1,
    requestedSubjectAttributes := p_requestedSubjectAttributes
  } // End of template m_shared_at_request
  
  template (present) SharedAtRequest mw_shared_at_request(
                                                          template (present) HashedId8 p_eaId := ?,
                                                          template (present) Oct16 p_keyTag := ?,
                                                          template (present) CertificateSubjectAttributes p_requestedSubjectAttributes := ?
                                                       ) := {
    eaId                       := p_eaId,
    keyTag                     := p_keyTag,
    certificateFormat          := 1,
    requestedSubjectAttributes := p_requestedSubjectAttributes
  } // End of template mw_shared_at_request

  template (value) EcSignature m_ec_signature(
                                              in template (value) EtsiTs103097Data p_encryptedEcSignature
                                              ) := {
    encryptedEcSignature := p_encryptedEcSignature
  } // End of template m_ec_signature
  
  template (present) EcSignature mw_ec_signature(
                                                 template (present) EtsiTs103097Data p_encryptedEcSignature := ?
                                              ) := {
    encryptedEcSignature := p_encryptedEcSignature
  } // End of template mw_ec_signature

  template (value) EcSignature m_ec_signature_ext_payload(
                                                          in template (value) EtsiTs103097Data p_ecSignature
                                                          ) := {
    ecSignature := p_ecSignature
  } // End of template m_ec_signature_ext_payload
  
  template (present) EcSignature mw_ec_signature_ext_payload(
                                                             template (present) EtsiTs103097Data p_ecSignature := ?
                                                             ) := {
    ecSignature := p_ecSignature
  } // End of template mw_ec_signature_ext_payload



  template (omit) CertificateSubjectAttributes m_certificate_subject_attributes(
                                                                                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
                                                                                ) := {
    id                   := p_id,
    validityPeriod       := p_validityPeriod,
    region               := p_region,
    assuranceLevel       := p_assuranceLevel,
    appPermissions       := p_appPermissions,
    certIssuePermissions := p_certIssuePermissions
  } // End of template m_certificate_subject_attributes
  
} // End of module LibItsPki_Templates
} // End of module LibItsPki_Templates
+5 −2
Original line number Original line Diff line number Diff line
@@ -20,6 +20,8 @@ module LibItsPki_TestSystem {
  import from IEEE1609dot2 language "ASN.1:1997" all;
  import from IEEE1609dot2 language "ASN.1:1997" all;
  import from EtsiTs102941BaseTypes language "ASN.1:1997" all;
  import from EtsiTs102941BaseTypes language "ASN.1:1997" all;
  import from EtsiTs102941TypesEnrolment 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 EtsiTs102941MessagesItss language "ASN.1:1997" all;
  import from EtsiTs103097Module language "ASN.1:1997" all;
  import from EtsiTs103097Module language "ASN.1:1997" all;
  
  
@@ -62,7 +64,7 @@ module LibItsPki_TestSystem {
  group interfacePorts {
  group interfacePorts {
    
    
    type port PkiPort message {
    type port PkiPort message {
      inout InnerEcRequest, InnerEcResponse;
      inout InnerEcRequest, InnerEcResponse, AuthorizationValidationRequest, AuthorizationValidationResponse;
    } // End of PkiPort
    } // End of PkiPort
    
    
  } // End of group interfacePorts
  } // End of group interfacePorts
@@ -89,6 +91,7 @@ module LibItsPki_TestSystem {
    port PkiPort pkiPort;
    port PkiPort pkiPort;
    
    
    var Certificate vc_eaCertificate;       /** Test Adapter EA certificate */
    var Certificate vc_eaCertificate;       /** Test Adapter EA certificate */
    var HashedId8   vc_eaHashedId8;         /** Test Adapter EA HashedId8 for decryption of IUT's response */
  } // End of component ItsPki
  } // End of component ItsPki
  
  
  type component ItsPkiHttp extends ItsSecurityBaseComponent, HttpComponent {
  type component ItsPkiHttp extends ItsSecurityBaseComponent, HttpComponent {
Loading