LibItsSecurity_Templates.ttcn3 102 KB
Newer Older
         */
        template (value) ToBeSignedSecuredMessage m_toBeSignedSecuredMessage(
            in UInt8 p_security_profile,
            in template (value) HeaderFields p_header_fields,
            in template (value) SecPayloads p_payload_fields,
            in template (value) TrailerFieldType p_trailer_field_type
        ) := {
            protocol_version        := c_protocol_version,
            security_profile        := p_security_profile,
            header_fields           := p_header_fields,
            payload_fields          := p_payload_fields,
            trailer_fieldsLength    := 67, // 43h = lengthof(trailer_fields) // FIXME To be enhanced
            trailerFieldType        := p_trailer_field_type
        } // End of template m_toBeSignedSecuredMessage
        
        /**
         * @desc The certificate paylaod to be signed
         * @member p_certificate    The signed certificate to be verified
         * @see Draft ETSI TS 103 097 V1.1.6 Clause 7.4    Profiles for certificate
         */
        template (value) ToBeSignedCertificate m_toBeSignedCertificate(
                                                                       in template (value) Certificate p_certificate
        ) := {
            version                 := p_certificate.version, 
            signer_infos            := p_certificate.signer_infos,
            subject_info            := p_certificate.subject_info,
            subject_attributes      := p_certificate.subject_attributes,
garciay's avatar
garciay committed
            validity_restrictions   := p_certificate.validity_restrictions
        } // End of template m_toBeSignedCertificate
        
    } // End of group profileCertificates
    
    group taPrimitives {
        
        /**
         * @desc Enable security support
         */
        template (value) AcEnableSecurity m_enableSecurity(
                                                           in Oct32 p_signingPrivateKey,
                                                           in Oct32 p_signingPublicKeyX,
                                                           in Oct32 p_signingPublicKeyY,
                                                           in Oct32 p_encryptPrivateKey,
                                                           in Oct32 p_encryptPublicKeyX,
                                                           in Oct32 p_encryptPublicKeyY,
                                                           in octetstring p_toBeSignedSecuredMessageTemplateDigest,
                                                           in octetstring p_toBeSignedSecuredMessageTemplateCertificate
            signingPrivateKey                           := p_signingPrivateKey,
            signingPublicKeyX                           := p_signingPublicKeyX,
            signingPublicKeyY                           := p_signingPublicKeyY,
            encryptPrivateKey                           := p_encryptPrivateKey,
            encryptPublicKeyX                           := p_encryptPublicKeyX,
            encryptPublicKeyY                           := p_encryptPublicKeyY,
            toBeSignedSecuredMessageTemplateDigest      := p_toBeSignedSecuredMessageTemplateDigest,
            toBeSignedSecuredMessageTemplateCertificate := p_toBeSignedSecuredMessageTemplateCertificate
        } // End of template m_enableSecurity
        
        /**
         * @desc Disable security support
         */
        template (value) AcDisableSecurity m_disableSecurity := {
            disable := true
        } // End of template m_disableSecurity
        
    } // End of group taPrimitives
    
garciay's avatar
garciay committed
    group utPrimitives {
        
    } // End of group utPrimitives
    
} // End of module LibItsSecurity_Templates