blob: 98a2bba022e541c7a1d00d877217be8ffc4fe0c1 [file] [log] [blame]
Philipp Maier08902cf2024-03-04 10:32:55 +01001/* SGP32 Templates in TTCN-3
2 *
3 * Author: Philipp Maier <pmaier@sysmocom.de> / sysmocom - s.f.m.c. GmbH
4 *
5 * Released under the terms of GNU General Public License, Version 2 or
6 * (at your option) any later version.
7 *
8 * SPDX-License-Identifier: GPL-2.0-or-later
9 */
10
11module SGP32Definitions_Templates {
12
13import from SGP32Definitions all;
14import from SGP32Definitions_Types all;
15
16import from RSPDefinitions all;
17import from RSPDefinitions_Types all;
18import from RSPDefinitions_Templates all;
19
20import from PKIX1Explicit88 all;
21import from PKIX1Explicit88_Templates all;
22import from PKIX1Explicit88_Types all;
23
24/* GSMA SGP.32, section 6.3.2.1 */
25template (present) EsipaMessageFromEimToIpa
26tr_initiateAuthenticationResponseEsipa(template (present) octetstring euiccChallenge := ?,
27 template (present) universal charstring serverAddress := ?) := {
28 initiateAuthenticationResponseEsipa := {
29 initiateAuthenticationOkEsipa := {
30 transactionId := *,
Philipp Maier746f43e2024-04-29 12:17:12 +020031 serverSigned1 := tr_serverSigned1(euiccChallenge := euiccChallenge, serverAddress := serverAddress),
Philipp Maier08902cf2024-03-04 10:32:55 +010032 serverSignature1 := ?,
33 euiccCiPKIdToBeUsed := ?,
34 serverCertificate := ?,
35 matchingId := *,
36 ctxParams1 := *
37 }
38 }
39}
40
41template (value) EsipaMessageFromEimToIpa
42ts_initiateAuthenticationResponseEsipa(template (value) octetstring euiccChallenge := '00112233445566778899AABBCCDDEEFF'O,
43 template (value) universal charstring serverAddress := "smdp.example.com") := {
44 initiateAuthenticationResponseEsipa := {
45 initiateAuthenticationOkEsipa := {
46 transactionId := omit,
Philipp Maier746f43e2024-04-29 12:17:12 +020047 serverSigned1 := ts_serverSigned1(euiccChallenge := euiccChallenge, serverAddress := serverAddress),
Philipp Maier08902cf2024-03-04 10:32:55 +010048 serverSignature1 := '01020304'O,
49 euiccCiPKIdToBeUsed := 'F54172BDF98A95D65CBEB88A38A1C11D800A85C3'O, /* NIST */
50 serverCertificate := ts_cert_s_sm_dpauth_nist,
51// serverCertificate := ts_cert_s_sm_dpauth_brp,
52// serverCertificate := ts_cert_s_sm_dp2auth_nist,
53// serverCertificate := ts_cert_s_sm_dp2auth_brp,
54 matchingId := omit,
55 ctxParams1 := omit
56 }
57 }
58}
59
60/* GSMA SGP.32, section 6.3.2.1 */
61template (present) EsipaMessageFromIpaToEim
62tr_initiateAuthenticationRequestEsipa(template (present) octetstring euiccChallenge := ?) := {
63 initiateAuthenticationRequestEsipa := {
64 euiccChallenge := euiccChallenge,
65 smdpAddress := *,
66 euiccInfo1 := *
67 }
68}
69template (value) EsipaMessageFromIpaToEim
Philipp Maiere73a6a32024-04-25 15:48:37 +020070ts_initiateAuthenticationRequestEsipa(template (value) octetstring euiccChallenge := '00112233445566778899aabbccddeeff'O,
71 template (omit) charstring smdpAddress := "smdp.example.com",
72 template (omit) EUICCInfo1 euiccInfo1 := ts_EUICCInfo1) := {
Philipp Maier08902cf2024-03-04 10:32:55 +010073 initiateAuthenticationRequestEsipa := {
74 euiccChallenge := euiccChallenge,
Philipp Maiere73a6a32024-04-25 15:48:37 +020075 smdpAddress := smdpAddress,
76 euiccInfo1 := euiccInfo1
Philipp Maier08902cf2024-03-04 10:32:55 +010077 }
78}
79
80/* GSMA SGP.32, section 6.3.2.2 */
81template (present) EsipaMessageFromIpaToEim
82tr_authenticateClientRequestEsipa := {
83 authenticateClientRequestEsipa := {
84 transactionId := ?,
85 authenticateServerResponse := {
86 authenticateResponseOk := ?
87 }
88 }
89}
90/* TODO: create coresponding ts_ template */
91
92/* GSMA SGP.32, section 6.3.2.2 */
93template (present) EsipaMessageFromEimToIpa
94tr_authenticateClientResponseEsipa_dse(template (present) octetstring transactionId := ?,
95 template (present) charstring activationCode := ?) := {
96 authenticateClientResponseEsipa := {
97 authenticateClientOkDSEsipa := {
98 transactionId := transactionId,
99 profileDownloadTrigger := {
100 profileDownloadData := {
101 activationCode := ?
102 },
103 eimTransactionId := *
104 }
105 }
106 }
107}
108template (value) EsipaMessageFromEimToIpa
109ts_authenticateClientResponseEsipa_dse(template (value) octetstring transactionId := 'ABCDEF'O,
110 template (value) charstring activationCode := "1$SMDP.EXAMPLE.COM$$1.3.6.1.4.1.31746") := {
111 authenticateClientResponseEsipa := {
112 authenticateClientOkDSEsipa := {
113 transactionId := transactionId,
114 profileDownloadTrigger := {
115 profileDownloadData := {
116 activationCode := activationCode
117 },
118 eimTransactionId := omit
119 }
120 }
121 }
122}
123
124/* GSMA SGP.32, section 6.3.2.2 */
125template (present) EsipaMessageFromEimToIpa
126tr_authenticateClientResponseEsipa_dpe(template (present) octetstring transactionId := ?) := {
127 authenticateClientResponseEsipa := {
128 authenticateClientOkDPEsipa := {
129 transactionId := transactionId,
130 profileMetaData := *,
131 smdpSigned2 := {
132 transactionId := ?,
133 ccRequiredFlag := ?,
134 bppEuiccOtpk := *
135 },
136 smdpSignature2 := ?,
137 smdpCertificate := ?,
138 hashCc := *
139 }
140 }
141}
142template (value) EsipaMessageFromEimToIpa
143ts_authenticateClientResponseEsipa_dpe(template (value) octetstring transactionId := 'ABCDEF'O) := {
144 authenticateClientResponseEsipa := {
145 authenticateClientOkDPEsipa := {
146 transactionId := transactionId,
147 profileMetaData := omit,
148 smdpSigned2 := {
149 transactionId := transactionId,
150 ccRequiredFlag := false,
151 bppEuiccOtpk := omit
152 },
153 smdpSignature2 := 'AAAAAAAAAAAAAAAAAAAAAAAA'O,
154 smdpCertificate := ts_cert_s_sm_dpauth_nist,
155// smdpCertificate := ts_cert_s_sm_dpauth_brp,
156// smdpCertificate := ts_cert_s_sm_dp2auth_nist,
157// smdpCertificate := ts_cert_s_sm_dp2auth_brp,
158 hashCc := omit
159 }
160 }
161}
162
163/* GSMA SGP.32, section 6.3.2.6 */
164template (present) EsipaMessageFromIpaToEim
165tr_getEimPackageRequest(template (present) octetstring eidValue := ?) := {
166 getEimPackageRequest := {
167 eidValue := eidValue,
168 notifyStateChange := *,
169 rPLMN := *
170 }
171}
172template (value) EsipaMessageFromIpaToEim
173ts_getEimPackageRequest(template (value) octetstring eidValue) := {
174 getEimPackageRequest := {
175 eidValue := eidValue,
176 notifyStateChange := omit,
177 rPLMN := omit
178 }
179}
180
181/* GSMA SGP.32, section 6.3.2.6 and 2.11.1.3 */
182template (present) EsipaMessageFromEimToIpa
183tr_getEimPackageResponse_dnlTrigReq(template (present) charstring activationCode := ?) := {
184 getEimPackageResponse := {
185 profileDownloadTriggerRequest := {
186 profileDownloadData := {
187 activationCode := activationCode
188 },
189 eimTransactionId := *
190 }
191 }
192}
193template (value) EsipaMessageFromEimToIpa
194ts_getEimPackageResponse_dnlTrigReq(template (value) charstring activationCode := "1$SMDP.EXAMPLE.COM$$1.3.6.1.4.1.31746") := {
195 getEimPackageResponse := {
196 profileDownloadTriggerRequest := {
197 profileDownloadData := {
198 activationCode := activationCode
199 },
200 eimTransactionId := omit
201 }
202 }
203}
204
205/* GSMA SGP.32, section 6.3.2.6 and 2.11.1.2 */
206template (present) EsipaMessageFromEimToIpa
207tr_getEimPackageResponse_euiccDataReq := {
208 getEimPackageResponse := {
209 ipaEuiccDataRequest := {
210 tagList := ?,
211 euiccCiPKId := *,
212 searchCriteria := *
213 }
214 }
215}
216template (value) EsipaMessageFromEimToIpa
217ts_getEimPackageResponse_euiccDataReq := {
218 getEimPackageResponse := {
219 ipaEuiccDataRequest := {
220 tagList := '80BF20BF228384A5A688A9BF2B'O,
221 euiccCiPKId := omit,
222 searchCriteria := omit
223 }
224 }
225}
226
227/* GSMA SGP.32, section 6.3.2.6 */
228template (present) EsipaMessageFromEimToIpa
229tr_getEimPackageResponse_eimPkgErrUndef := {
230 getEimPackageResponse := {
231 eimPackageError := ?
232 }
233}
234template (value) EsipaMessageFromEimToIpa
235ts_getEimPackageResponse_eimPkgErrUndef := {
236 getEimPackageResponse := {
237 eimPackageError := 127
238 }
239}
240
241/* GSMA SGP.32, section 6.3.2.6 */
242template (value) EsipaMessageFromEimToIpa
243ts_getEimPackageResponse_euiccPkgReq := {
244 getEimPackageResponse := {
245 euiccPackageRequest := {
246 euiccPackageSigned := {
247 eimId := "myEim",
248 eidValue := '00112233445566778899AABBCCDDEEFF'O,
249 counterValue := 123,
250 transactionId := omit,
251 euiccPackage := {
252 psmoList := {
253 {
Philipp Maierac10cee2024-04-10 15:51:47 +0200254 enable := {
255 iccid := '123456789ABCDEFFAAAA'O,
256 rollbackFlag := NULL
Philipp Maier08902cf2024-03-04 10:32:55 +0100257 }
258 }
259 }
260 }
261 },
262 eimSignature := '1234567890'O
263 }
264 }
265}
266
267/* GSMA SGP.32, section 6.3.2.5 */
268template (present) EsipaMessageFromIpaToEim
269tr_cancelSessionRequestEsipa := {
270 cancelSessionRequestEsipa := {
271 transactionId := ?,
272 cancelSessionResponse := {
273 cancelSessionResponseOk := tr_cancelSessionResponseOk
274 }
275 }
276}
277template (value) EsipaMessageFromIpaToEim
278ts_cancelSessionRequestEsipa := {
279 cancelSessionRequestEsipa := {
280 transactionId := 'AABBCC'O,
281 cancelSessionResponse := {
282 cancelSessionResponseOk := ts_cancelSessionResponseOk
283 }
284 }
285}
286
287/* GSMA SGP.32, section 6.3.2.5 */
288template (present) EsipaMessageFromEimToIpa
289tr_cancelSessionResponseEsipa := {
290 cancelSessionResponseEsipa := {
291 cancelSessionOk := {
292 /* This function has no output data */
293 }
294 }
295}
296template (value) EsipaMessageFromEimToIpa
297ts_cancelSessionResponseEsipa := {
298 cancelSessionResponseEsipa := {
299 cancelSessionOk := {
300 /* This function has no output data */
301 }
302 }
303}
304
305/* GSMA SGP.32, section 6.3.2.3 */
306template (present) EsipaMessageFromEimToIpa
307tr_getBoundProfilePackageResponseEsipa := {
308 getBoundProfilePackageResponseEsipa := {
309 getBoundProfilePackageOkEsipa := {
310 transactionId := *,
311 boundProfilePackage := tr_boundProfilePackage
312 }
313 }
314}
315template (value) EsipaMessageFromEimToIpa
316ts_getBoundProfilePackageResponseEsipa := {
317 getBoundProfilePackageResponseEsipa := {
318 getBoundProfilePackageOkEsipa := {
319 transactionId := omit,
320 boundProfilePackage := ts_boundProfilePackage
321 }
322 }
323}
324
325/* GSMA SGP.32, section 5.9.1 */
326template (present) EuiccPackageResult
327tr_euiccPackageResult := {
328 euiccPackageResultSigned := {
329 euiccPackageResultDataSigned := {
330 eimId := ?,
331 counterValue := ?,
332 transactionId := *,
333 seqNumber := ?,
334 euiccResult := ?
335 },
336 euiccSignEPR := ?
337 }
338}
339template (value) EuiccPackageResult
340ts_euiccPackageResult := {
341 euiccPackageResultSigned := {
342 euiccPackageResultDataSigned := {
343 eimId := "myEim",
344 counterValue := 333,
345 transactionId := omit,
346 seqNumber := 1234,
347 euiccResult := {
348 {
Philipp Maierac10cee2024-04-10 15:51:47 +0200349 enableResult := 0
Philipp Maier08902cf2024-03-04 10:32:55 +0100350 }
351 }
352 },
353 euiccSignEPR := 'AABBCCDDEEFF'O
354 }
355}
356
357/* GSMA SGP.32, section 6.3.2.7 */
Philipp Maiere4de06e2024-04-10 15:58:22 +0200358template (present) EsipaMessageFromIpaToEim
359tr_provideEimPackageResult_ePRAndNotif := {
360 provideEimPackageResult := {
361 ePRAndNotifications := {
362 euiccPackageResult := ?,
363 notificationList := ?
364 }
365 }
366}
Philipp Maier08902cf2024-03-04 10:32:55 +0100367template (present) EsipaMessageFromEimToIpa
Philipp Maier88f24812024-04-10 15:55:51 +0200368tr_provideEimPackageResultResponse_eimAck := {
Philipp Maier08902cf2024-03-04 10:32:55 +0100369 provideEimPackageResultResponse := {
370 eimAcknowledgements := *
371 }
372}
373template (value) EsipaMessageFromEimToIpa
Philipp Maier88f24812024-04-10 15:55:51 +0200374ts_provideEimPackageResultResponse_eimAck(template (value) EimAcknowledgements eimAcknowledgements := {}) := {
Philipp Maier08902cf2024-03-04 10:32:55 +0100375 provideEimPackageResultResponse := {
376 eimAcknowledgements := eimAcknowledgements
377 }
378}
379
380/* GSMA SGP.32, section 2.11.1.2 */
381template (present) GetCertsResponse
382tr_getCertsResponse := {
383 certs := {
384 eumCertificate := ?,
385 euiccCertificate := ?
386 }
387}
388template (value) GetCertsResponse
389ts_getCertsResponse := {
390 certs := {
391 eumCertificate := ts_cert_s_sm_dpauth_nist,
392 euiccCertificate := ts_cert_eum_nist
393 }
394}
395
396/* GSMA SGP.32, section 5.9.18 */
397template (present) GetEimConfigurationDataResponse
398tr_getEimConfigurationDataResponse := {
399 eimConfigurationDataList := ?
400}
401template (value) GetEimConfigurationDataResponse
402ts_getEimConfigurationDataResponse(template (value) charstring eimFqdn := "127.0.0.1") := {
403 eimConfigurationDataList := {
404 {
405 eimId := "myEIM",
406 eimFqdn := eimFqdn,
407 eimIdType := omit,
408 counterValue := omit,
409 associationToken := 123,
410 eimPublicKeyData := omit,
411 trustedPublicKeyDataTls := omit,
412 eimSupportedProtocol := omit,
413 euiccCiPKId := omit
414 }
415 }
416}
417
418/* GSMA SGP.32, section 5.9.4 */
419template (present) AddInitialEimResponse
420tr_addInitialEimResponse := {
421 addInitialEimOk := ?
422}
423template (value) AddInitialEimResponse
Philipp Maierd9887d32024-04-10 15:48:05 +0200424ts_addInitialEimResponse := {
Philipp Maier08902cf2024-03-04 10:32:55 +0100425 addInitialEimOk := {
426 {
427 addOk := NULL
428 }
429 }
430}
431
Philipp Maier4a24fb02024-04-10 16:01:06 +0200432/* GSMA SGP.32, section 5.9.16 */
433template (present) ProfileRollbackRequest
434tr_profileRollbackRequest := {
435 refreshFlag := ?
436}
437template (value) ProfileRollbackRequest
438ts_profileRollbackRequest := {
439 refreshFlag := false
440}
441template (present) ProfileRollbackResponse
442tr_profileRollbackResponse := {
443 cmdResult := ?,
444 eUICCPackageResult := ?
445}
446template (value) ProfileRollbackResponse
447ts_profileRollbackResponse := {
448 cmdResult := 0,
449 eUICCPackageResult := {
450 euiccPackageResultSigned := {
451 euiccPackageResultDataSigned := {
452 eimId := "myEim",
453 counterValue := 333,
454 transactionId := omit,
455 seqNumber := 1234,
456 euiccResult := {
457 {
458 enableResult := 0
459 },
460 {
461 rollbackResult := 0
462 }
463 }
464 },
465 euiccSignEPR := 'AABBCCDDEEFF'O
466 }
467 }
468}
469
470
Philipp Maier978ab442024-04-10 15:46:45 +0200471}