LibItsPki_Templates.ttcn 5.67 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
/**
 *  @author   ETSI / STF545
 *  @version  $URL$
 *            $Id$
 *  @desc     Module containing templates for IT PKI Protocol
 *  @copyright   ETSI Copyright Notification
 *               No part may be reproduced except as authorized by written permission.
 *               The copyright and the foregoing restriction extend to reproduction in all media.
 *               All rights reserved.
 *
 */
module LibItsPki_Templates {
    
garciay's avatar
garciay committed
14
15
16
17
18
19
20
21
22
23
    // LibCommon
    import from LibCommon_BasicTypesAndValues all;
    import from LibCommon_DataStrings all;
    
    // LibItsCommon
    import from LibItsCommon_TypesAndValues all;
    import from LibItsCommon_Functions all;
    import from LibItsCommon_TypesAndValues all;
    import from LibItsCommon_ASN1_NamedNumbers all;
    
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
    // LibIts
    import from IEEE1609dot2BaseTypes language "ASN.1:1997" all;
    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 EtsiTs103097Module language "ASN.1:1997" all;
    
    // LibItsSecurity
    import from LibItsSecurity_Templates all;
    
    template (value) EnrolmentRequestMessage m_enrolmentRequestMessage(
                                                                       in template (value) EncryptedData p_encryptedData
    ) modifies m_etsiTs103097Data_encrypted := {
    } // End of template m_enrolmentRequestMessage
    
garciay's avatar
garciay committed
40
41
42
43
44
    template (present) EnrolmentRequestMessage mw_enrolmentResponseMessage(
                                                                           template (present) EncryptedData p_encryptedData := ?
    ) modifies mw_etsiTs103097Data_encrypted := {
    } // End of template mw_enrolmentResponseMessage
    
45
46
47
48
49
50
    template (value) EtsiTs102941DataContent m_enrolmentRequest(
                                                                in template (value) InnerEcRequestSignedForPop p_enrolmentRequest
    ) := {
        enrolmentRequest := p_enrolmentRequest
    } // End of template m_enrolmentRequest
    
garciay's avatar
garciay committed
51
52
53
54
55
56
    template (present) EtsiTs102941DataContent mw_enrolmentResponse(
                                                                    template (present) InnerEcResponse p_enrolmentResponse
    ) := {
        enrolmentResponse := p_enrolmentResponse
    } // End of template mw_enrolmentResponse
    
57
58
59
60
61
62
63
64
65
66
    template (value) InnerEcRequest m_innerEcRequest(
                                                     in template (value) charstring p_itsId,
                                                     in template (value) PublicKeys p_publicKeys,
                                                     in template (value) CertificateSubjectAttributes p_requestedSubjectAttributes //(WITH COMPONENTS{certIssuePermissions ABSENT}),
    ) := {
        itsId                      := p_itsId,
        certificateFormat          := 1,
        publicKeys                 := p_publicKeys,
        requestedSubjectAttributes := p_requestedSubjectAttributes
    } // End of template m_innerEcRequest
garciay's avatar
garciay committed
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
        
    template (omit) PublicKeys m_publicKeys(
                                            in template (value) PublicVerificationKey p_verificationKey,
                                            in template (omit) PublicEncryptionKey p_encryptionKey := omit
    ) := {
      verificationKey := p_verificationKey,
      encryptionKey   := p_encryptionKey
    } // End of template m_publicKeys
    
    template PublicKeys mw_publicKeys(
                                      template (present) PublicVerificationKey p_verificationKey := ?,
                                      template PublicEncryptionKey p_encryptionKey := *
    ) := {
      verificationKey := p_verificationKey,
      encryptionKey   := p_encryptionKey
    } // End of template mw_publicKeys
    
    template (omit) CertificateSubjectAttributes m_certificateSubjectAttributes(
                                                                                in template (value) SequenceOfPsidSsp p_appPermissions,
                                                                                in template (omit) ValidityPeriod p_validityPeriod := omit,
                                                                                in template (omit) GeographicRegion p_region := omit,
                                                                                in template (omit) SubjectAssurance p_assuranceLevel := omit
    ) := {
      id 			       := { none_ := NULL },
      validityPeriod       := p_validityPeriod,
      region               := p_region,
      assuranceLevel       := p_assuranceLevel,
      appPermissions       := p_appPermissions,
      certIssuePermissions := omit
    } // End of template m_certificateSubjectAttributes

garciay's avatar
garciay committed
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    template (value) InnerEcResponse m_innerEcResponse_ok(
                                                          in template (value) Oct16 p_requestHash,
                                                          in template (value) EtsiTs103097Certificate p_certificate
    ) := {
      requestHash  := p_requestHash,
      responseCode := ok,
      certificate  := p_certificate
    } // End of template m_innerEcResponse
    
    template (value) InnerEcResponse m_innerEcResponse_ko(
                                                          in template (value) Oct16 p_requestHash,
                                                          in template (value) EnrolmentResponseCode p_responseCode
    ) := {
      requestHash  := p_requestHash,
      responseCode := p_responseCode,
      certificate  := omit
    } // End of template m_innerEcResponse
garciay's avatar
garciay committed
115
116
117
    
    
    
118
119
    
} // End of module LibItsPki_Templates