blob: 86c20552eac8127f808c090ba704cc86d1076929 [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 := *,
31 serverSigned1 := {
32 transactionId := ?,
33 euiccChallenge := euiccChallenge,
34 serverAddress := serverAddress,
35 serverChallenge := ?
36 },
37 serverSignature1 := ?,
38 euiccCiPKIdToBeUsed := ?,
39 serverCertificate := ?,
40 matchingId := *,
41 ctxParams1 := *
42 }
43 }
44}
45
46template (value) EsipaMessageFromEimToIpa
47ts_initiateAuthenticationResponseEsipa(template (value) octetstring euiccChallenge := '00112233445566778899AABBCCDDEEFF'O,
48 template (value) universal charstring serverAddress := "smdp.example.com") := {
49 initiateAuthenticationResponseEsipa := {
50 initiateAuthenticationOkEsipa := {
51 transactionId := omit,
52 serverSigned1 := {
53 transactionId := 'ABCDEF'O,
54 euiccChallenge := euiccChallenge,
55 serverAddress := "smdp.example.com",
56 serverChallenge := '01020304050607080910111213141516'O
57 },
58 serverSignature1 := '01020304'O,
59 euiccCiPKIdToBeUsed := 'F54172BDF98A95D65CBEB88A38A1C11D800A85C3'O, /* NIST */
60 serverCertificate := ts_cert_s_sm_dpauth_nist,
61// serverCertificate := ts_cert_s_sm_dpauth_brp,
62// serverCertificate := ts_cert_s_sm_dp2auth_nist,
63// serverCertificate := ts_cert_s_sm_dp2auth_brp,
64 matchingId := omit,
65 ctxParams1 := omit
66 }
67 }
68}
69
70/* GSMA SGP.32, section 6.3.2.1 */
71template (present) EsipaMessageFromIpaToEim
72tr_initiateAuthenticationRequestEsipa(template (present) octetstring euiccChallenge := ?) := {
73 initiateAuthenticationRequestEsipa := {
74 euiccChallenge := euiccChallenge,
75 smdpAddress := *,
76 euiccInfo1 := *
77 }
78}
79template (value) EsipaMessageFromIpaToEim
Philipp Maiere73a6a32024-04-25 15:48:37 +020080ts_initiateAuthenticationRequestEsipa(template (value) octetstring euiccChallenge := '00112233445566778899aabbccddeeff'O,
81 template (omit) charstring smdpAddress := "smdp.example.com",
82 template (omit) EUICCInfo1 euiccInfo1 := ts_EUICCInfo1) := {
Philipp Maier08902cf2024-03-04 10:32:55 +010083 initiateAuthenticationRequestEsipa := {
84 euiccChallenge := euiccChallenge,
Philipp Maiere73a6a32024-04-25 15:48:37 +020085 smdpAddress := smdpAddress,
86 euiccInfo1 := euiccInfo1
Philipp Maier08902cf2024-03-04 10:32:55 +010087 }
88}
89
90/* GSMA SGP.32, section 6.3.2.2 */
91template (present) EsipaMessageFromIpaToEim
92tr_authenticateClientRequestEsipa := {
93 authenticateClientRequestEsipa := {
94 transactionId := ?,
95 authenticateServerResponse := {
96 authenticateResponseOk := ?
97 }
98 }
99}
100/* TODO: create coresponding ts_ template */
101
102/* GSMA SGP.32, section 6.3.2.2 */
103template (present) EsipaMessageFromEimToIpa
104tr_authenticateClientResponseEsipa_dse(template (present) octetstring transactionId := ?,
105 template (present) charstring activationCode := ?) := {
106 authenticateClientResponseEsipa := {
107 authenticateClientOkDSEsipa := {
108 transactionId := transactionId,
109 profileDownloadTrigger := {
110 profileDownloadData := {
111 activationCode := ?
112 },
113 eimTransactionId := *
114 }
115 }
116 }
117}
118template (value) EsipaMessageFromEimToIpa
119ts_authenticateClientResponseEsipa_dse(template (value) octetstring transactionId := 'ABCDEF'O,
120 template (value) charstring activationCode := "1$SMDP.EXAMPLE.COM$$1.3.6.1.4.1.31746") := {
121 authenticateClientResponseEsipa := {
122 authenticateClientOkDSEsipa := {
123 transactionId := transactionId,
124 profileDownloadTrigger := {
125 profileDownloadData := {
126 activationCode := activationCode
127 },
128 eimTransactionId := omit
129 }
130 }
131 }
132}
133
134/* GSMA SGP.32, section 6.3.2.2 */
135template (present) EsipaMessageFromEimToIpa
136tr_authenticateClientResponseEsipa_dpe(template (present) octetstring transactionId := ?) := {
137 authenticateClientResponseEsipa := {
138 authenticateClientOkDPEsipa := {
139 transactionId := transactionId,
140 profileMetaData := *,
141 smdpSigned2 := {
142 transactionId := ?,
143 ccRequiredFlag := ?,
144 bppEuiccOtpk := *
145 },
146 smdpSignature2 := ?,
147 smdpCertificate := ?,
148 hashCc := *
149 }
150 }
151}
152template (value) EsipaMessageFromEimToIpa
153ts_authenticateClientResponseEsipa_dpe(template (value) octetstring transactionId := 'ABCDEF'O) := {
154 authenticateClientResponseEsipa := {
155 authenticateClientOkDPEsipa := {
156 transactionId := transactionId,
157 profileMetaData := omit,
158 smdpSigned2 := {
159 transactionId := transactionId,
160 ccRequiredFlag := false,
161 bppEuiccOtpk := omit
162 },
163 smdpSignature2 := 'AAAAAAAAAAAAAAAAAAAAAAAA'O,
164 smdpCertificate := ts_cert_s_sm_dpauth_nist,
165// smdpCertificate := ts_cert_s_sm_dpauth_brp,
166// smdpCertificate := ts_cert_s_sm_dp2auth_nist,
167// smdpCertificate := ts_cert_s_sm_dp2auth_brp,
168 hashCc := omit
169 }
170 }
171}
172
173/* GSMA SGP.32, section 6.3.2.6 */
174template (present) EsipaMessageFromIpaToEim
175tr_getEimPackageRequest(template (present) octetstring eidValue := ?) := {
176 getEimPackageRequest := {
177 eidValue := eidValue,
178 notifyStateChange := *,
179 rPLMN := *
180 }
181}
182template (value) EsipaMessageFromIpaToEim
183ts_getEimPackageRequest(template (value) octetstring eidValue) := {
184 getEimPackageRequest := {
185 eidValue := eidValue,
186 notifyStateChange := omit,
187 rPLMN := omit
188 }
189}
190
191/* GSMA SGP.32, section 6.3.2.6 and 2.11.1.3 */
192template (present) EsipaMessageFromEimToIpa
193tr_getEimPackageResponse_dnlTrigReq(template (present) charstring activationCode := ?) := {
194 getEimPackageResponse := {
195 profileDownloadTriggerRequest := {
196 profileDownloadData := {
197 activationCode := activationCode
198 },
199 eimTransactionId := *
200 }
201 }
202}
203template (value) EsipaMessageFromEimToIpa
204ts_getEimPackageResponse_dnlTrigReq(template (value) charstring activationCode := "1$SMDP.EXAMPLE.COM$$1.3.6.1.4.1.31746") := {
205 getEimPackageResponse := {
206 profileDownloadTriggerRequest := {
207 profileDownloadData := {
208 activationCode := activationCode
209 },
210 eimTransactionId := omit
211 }
212 }
213}
214
215/* GSMA SGP.32, section 6.3.2.6 and 2.11.1.2 */
216template (present) EsipaMessageFromEimToIpa
217tr_getEimPackageResponse_euiccDataReq := {
218 getEimPackageResponse := {
219 ipaEuiccDataRequest := {
220 tagList := ?,
221 euiccCiPKId := *,
222 searchCriteria := *
223 }
224 }
225}
226template (value) EsipaMessageFromEimToIpa
227ts_getEimPackageResponse_euiccDataReq := {
228 getEimPackageResponse := {
229 ipaEuiccDataRequest := {
230 tagList := '80BF20BF228384A5A688A9BF2B'O,
231 euiccCiPKId := omit,
232 searchCriteria := omit
233 }
234 }
235}
236
237/* GSMA SGP.32, section 6.3.2.6 */
238template (present) EsipaMessageFromEimToIpa
239tr_getEimPackageResponse_eimPkgErrUndef := {
240 getEimPackageResponse := {
241 eimPackageError := ?
242 }
243}
244template (value) EsipaMessageFromEimToIpa
245ts_getEimPackageResponse_eimPkgErrUndef := {
246 getEimPackageResponse := {
247 eimPackageError := 127
248 }
249}
250
251/* GSMA SGP.32, section 6.3.2.6 */
252template (value) EsipaMessageFromEimToIpa
253ts_getEimPackageResponse_euiccPkgReq := {
254 getEimPackageResponse := {
255 euiccPackageRequest := {
256 euiccPackageSigned := {
257 eimId := "myEim",
258 eidValue := '00112233445566778899AABBCCDDEEFF'O,
259 counterValue := 123,
260 transactionId := omit,
261 euiccPackage := {
262 psmoList := {
263 {
Philipp Maierac10cee2024-04-10 15:51:47 +0200264 enable := {
265 iccid := '123456789ABCDEFFAAAA'O,
266 rollbackFlag := NULL
Philipp Maier08902cf2024-03-04 10:32:55 +0100267 }
268 }
269 }
270 }
271 },
272 eimSignature := '1234567890'O
273 }
274 }
275}
276
277/* GSMA SGP.32, section 6.3.2.5 */
278template (present) EsipaMessageFromIpaToEim
279tr_cancelSessionRequestEsipa := {
280 cancelSessionRequestEsipa := {
281 transactionId := ?,
282 cancelSessionResponse := {
283 cancelSessionResponseOk := tr_cancelSessionResponseOk
284 }
285 }
286}
287template (value) EsipaMessageFromIpaToEim
288ts_cancelSessionRequestEsipa := {
289 cancelSessionRequestEsipa := {
290 transactionId := 'AABBCC'O,
291 cancelSessionResponse := {
292 cancelSessionResponseOk := ts_cancelSessionResponseOk
293 }
294 }
295}
296
297/* GSMA SGP.32, section 6.3.2.5 */
298template (present) EsipaMessageFromEimToIpa
299tr_cancelSessionResponseEsipa := {
300 cancelSessionResponseEsipa := {
301 cancelSessionOk := {
302 /* This function has no output data */
303 }
304 }
305}
306template (value) EsipaMessageFromEimToIpa
307ts_cancelSessionResponseEsipa := {
308 cancelSessionResponseEsipa := {
309 cancelSessionOk := {
310 /* This function has no output data */
311 }
312 }
313}
314
315/* GSMA SGP.32, section 6.3.2.3 */
316template (present) EsipaMessageFromEimToIpa
317tr_getBoundProfilePackageResponseEsipa := {
318 getBoundProfilePackageResponseEsipa := {
319 getBoundProfilePackageOkEsipa := {
320 transactionId := *,
321 boundProfilePackage := tr_boundProfilePackage
322 }
323 }
324}
325template (value) EsipaMessageFromEimToIpa
326ts_getBoundProfilePackageResponseEsipa := {
327 getBoundProfilePackageResponseEsipa := {
328 getBoundProfilePackageOkEsipa := {
329 transactionId := omit,
330 boundProfilePackage := ts_boundProfilePackage
331 }
332 }
333}
334
335/* GSMA SGP.32, section 5.9.1 */
336template (present) EuiccPackageResult
337tr_euiccPackageResult := {
338 euiccPackageResultSigned := {
339 euiccPackageResultDataSigned := {
340 eimId := ?,
341 counterValue := ?,
342 transactionId := *,
343 seqNumber := ?,
344 euiccResult := ?
345 },
346 euiccSignEPR := ?
347 }
348}
349template (value) EuiccPackageResult
350ts_euiccPackageResult := {
351 euiccPackageResultSigned := {
352 euiccPackageResultDataSigned := {
353 eimId := "myEim",
354 counterValue := 333,
355 transactionId := omit,
356 seqNumber := 1234,
357 euiccResult := {
358 {
Philipp Maierac10cee2024-04-10 15:51:47 +0200359 enableResult := 0
Philipp Maier08902cf2024-03-04 10:32:55 +0100360 }
361 }
362 },
363 euiccSignEPR := 'AABBCCDDEEFF'O
364 }
365}
366
367/* GSMA SGP.32, section 6.3.2.7 */
Philipp Maiere4de06e2024-04-10 15:58:22 +0200368template (present) EsipaMessageFromIpaToEim
369tr_provideEimPackageResult_ePRAndNotif := {
370 provideEimPackageResult := {
371 ePRAndNotifications := {
372 euiccPackageResult := ?,
373 notificationList := ?
374 }
375 }
376}
Philipp Maier08902cf2024-03-04 10:32:55 +0100377template (present) EsipaMessageFromEimToIpa
Philipp Maier88f24812024-04-10 15:55:51 +0200378tr_provideEimPackageResultResponse_eimAck := {
Philipp Maier08902cf2024-03-04 10:32:55 +0100379 provideEimPackageResultResponse := {
380 eimAcknowledgements := *
381 }
382}
383template (value) EsipaMessageFromEimToIpa
Philipp Maier88f24812024-04-10 15:55:51 +0200384ts_provideEimPackageResultResponse_eimAck(template (value) EimAcknowledgements eimAcknowledgements := {}) := {
Philipp Maier08902cf2024-03-04 10:32:55 +0100385 provideEimPackageResultResponse := {
386 eimAcknowledgements := eimAcknowledgements
387 }
388}
389
390/* GSMA SGP.32, section 2.11.1.2 */
391template (present) GetCertsResponse
392tr_getCertsResponse := {
393 certs := {
394 eumCertificate := ?,
395 euiccCertificate := ?
396 }
397}
398template (value) GetCertsResponse
399ts_getCertsResponse := {
400 certs := {
401 eumCertificate := ts_cert_s_sm_dpauth_nist,
402 euiccCertificate := ts_cert_eum_nist
403 }
404}
405
406/* GSMA SGP.32, section 5.9.18 */
407template (present) GetEimConfigurationDataResponse
408tr_getEimConfigurationDataResponse := {
409 eimConfigurationDataList := ?
410}
411template (value) GetEimConfigurationDataResponse
412ts_getEimConfigurationDataResponse(template (value) charstring eimFqdn := "127.0.0.1") := {
413 eimConfigurationDataList := {
414 {
415 eimId := "myEIM",
416 eimFqdn := eimFqdn,
417 eimIdType := omit,
418 counterValue := omit,
419 associationToken := 123,
420 eimPublicKeyData := omit,
421 trustedPublicKeyDataTls := omit,
422 eimSupportedProtocol := omit,
423 euiccCiPKId := omit
424 }
425 }
426}
427
428/* GSMA SGP.32, section 5.9.4 */
429template (present) AddInitialEimResponse
430tr_addInitialEimResponse := {
431 addInitialEimOk := ?
432}
433template (value) AddInitialEimResponse
Philipp Maierd9887d32024-04-10 15:48:05 +0200434ts_addInitialEimResponse := {
Philipp Maier08902cf2024-03-04 10:32:55 +0100435 addInitialEimOk := {
436 {
437 addOk := NULL
438 }
439 }
440}
441
Philipp Maier4a24fb02024-04-10 16:01:06 +0200442/* GSMA SGP.32, section 5.9.16 */
443template (present) ProfileRollbackRequest
444tr_profileRollbackRequest := {
445 refreshFlag := ?
446}
447template (value) ProfileRollbackRequest
448ts_profileRollbackRequest := {
449 refreshFlag := false
450}
451template (present) ProfileRollbackResponse
452tr_profileRollbackResponse := {
453 cmdResult := ?,
454 eUICCPackageResult := ?
455}
456template (value) ProfileRollbackResponse
457ts_profileRollbackResponse := {
458 cmdResult := 0,
459 eUICCPackageResult := {
460 euiccPackageResultSigned := {
461 euiccPackageResultDataSigned := {
462 eimId := "myEim",
463 counterValue := 333,
464 transactionId := omit,
465 seqNumber := 1234,
466 euiccResult := {
467 {
468 enableResult := 0
469 },
470 {
471 rollbackResult := 0
472 }
473 }
474 },
475 euiccSignEPR := 'AABBCCDDEEFF'O
476 }
477 }
478}
479
480
Philipp Maier978ab442024-04-10 15:46:45 +0200481}