blob: 0e5cf57ae851c30ffe5e390f3a290feae573bf77 [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}
Philipp Maier916b5fa2024-04-30 11:34:09 +020090template (value) EsipaMessageFromIpaToEim
91ts_authenticateClientRequestEsipa(template (value) octetstring transactionId := 'ABCDEF'O) := {
92 authenticateClientRequestEsipa := {
93 transactionId := transactionId,
94 authenticateServerResponse := {
95 authenticateResponseOk := {
96 euiccSigned1 := ts_euiccSigned1,
97 euiccSignature1 := '1234567890'O,
98 euiccCertificate := ts_cert_eum_nist,
99 eumCertificate := ts_cert_s_sm_dpauth_nist
100 }
101 }
102 }
103}
Philipp Maier08902cf2024-03-04 10:32:55 +0100104
105/* GSMA SGP.32, section 6.3.2.2 */
106template (present) EsipaMessageFromEimToIpa
107tr_authenticateClientResponseEsipa_dse(template (present) octetstring transactionId := ?,
108 template (present) charstring activationCode := ?) := {
109 authenticateClientResponseEsipa := {
110 authenticateClientOkDSEsipa := {
111 transactionId := transactionId,
112 profileDownloadTrigger := {
113 profileDownloadData := {
114 activationCode := ?
115 },
116 eimTransactionId := *
117 }
118 }
119 }
120}
121template (value) EsipaMessageFromEimToIpa
122ts_authenticateClientResponseEsipa_dse(template (value) octetstring transactionId := 'ABCDEF'O,
123 template (value) charstring activationCode := "1$SMDP.EXAMPLE.COM$$1.3.6.1.4.1.31746") := {
124 authenticateClientResponseEsipa := {
125 authenticateClientOkDSEsipa := {
126 transactionId := transactionId,
127 profileDownloadTrigger := {
128 profileDownloadData := {
129 activationCode := activationCode
130 },
131 eimTransactionId := omit
132 }
133 }
134 }
135}
136
137/* GSMA SGP.32, section 6.3.2.2 */
138template (present) EsipaMessageFromEimToIpa
139tr_authenticateClientResponseEsipa_dpe(template (present) octetstring transactionId := ?) := {
140 authenticateClientResponseEsipa := {
141 authenticateClientOkDPEsipa := {
142 transactionId := transactionId,
143 profileMetaData := *,
144 smdpSigned2 := {
145 transactionId := ?,
146 ccRequiredFlag := ?,
147 bppEuiccOtpk := *
148 },
149 smdpSignature2 := ?,
150 smdpCertificate := ?,
151 hashCc := *
152 }
153 }
154}
155template (value) EsipaMessageFromEimToIpa
156ts_authenticateClientResponseEsipa_dpe(template (value) octetstring transactionId := 'ABCDEF'O) := {
157 authenticateClientResponseEsipa := {
158 authenticateClientOkDPEsipa := {
159 transactionId := transactionId,
160 profileMetaData := omit,
161 smdpSigned2 := {
162 transactionId := transactionId,
163 ccRequiredFlag := false,
164 bppEuiccOtpk := omit
165 },
166 smdpSignature2 := 'AAAAAAAAAAAAAAAAAAAAAAAA'O,
167 smdpCertificate := ts_cert_s_sm_dpauth_nist,
168// smdpCertificate := ts_cert_s_sm_dpauth_brp,
169// smdpCertificate := ts_cert_s_sm_dp2auth_nist,
170// smdpCertificate := ts_cert_s_sm_dp2auth_brp,
171 hashCc := omit
172 }
173 }
174}
175
176/* GSMA SGP.32, section 6.3.2.6 */
177template (present) EsipaMessageFromIpaToEim
178tr_getEimPackageRequest(template (present) octetstring eidValue := ?) := {
179 getEimPackageRequest := {
180 eidValue := eidValue,
181 notifyStateChange := *,
182 rPLMN := *
183 }
184}
185template (value) EsipaMessageFromIpaToEim
186ts_getEimPackageRequest(template (value) octetstring eidValue) := {
187 getEimPackageRequest := {
188 eidValue := eidValue,
189 notifyStateChange := omit,
190 rPLMN := omit
191 }
192}
193
194/* GSMA SGP.32, section 6.3.2.6 and 2.11.1.3 */
195template (present) EsipaMessageFromEimToIpa
196tr_getEimPackageResponse_dnlTrigReq(template (present) charstring activationCode := ?) := {
197 getEimPackageResponse := {
198 profileDownloadTriggerRequest := {
199 profileDownloadData := {
200 activationCode := activationCode
201 },
202 eimTransactionId := *
203 }
204 }
205}
206template (value) EsipaMessageFromEimToIpa
207ts_getEimPackageResponse_dnlTrigReq(template (value) charstring activationCode := "1$SMDP.EXAMPLE.COM$$1.3.6.1.4.1.31746") := {
208 getEimPackageResponse := {
209 profileDownloadTriggerRequest := {
210 profileDownloadData := {
211 activationCode := activationCode
212 },
213 eimTransactionId := omit
214 }
215 }
216}
217
218/* GSMA SGP.32, section 6.3.2.6 and 2.11.1.2 */
219template (present) EsipaMessageFromEimToIpa
220tr_getEimPackageResponse_euiccDataReq := {
221 getEimPackageResponse := {
222 ipaEuiccDataRequest := {
223 tagList := ?,
224 euiccCiPKId := *,
225 searchCriteria := *
226 }
227 }
228}
229template (value) EsipaMessageFromEimToIpa
230ts_getEimPackageResponse_euiccDataReq := {
231 getEimPackageResponse := {
232 ipaEuiccDataRequest := {
233 tagList := '80BF20BF228384A5A688A9BF2B'O,
234 euiccCiPKId := omit,
235 searchCriteria := omit
236 }
237 }
238}
239
240/* GSMA SGP.32, section 6.3.2.6 */
241template (present) EsipaMessageFromEimToIpa
242tr_getEimPackageResponse_eimPkgErrUndef := {
243 getEimPackageResponse := {
244 eimPackageError := ?
245 }
246}
247template (value) EsipaMessageFromEimToIpa
248ts_getEimPackageResponse_eimPkgErrUndef := {
249 getEimPackageResponse := {
250 eimPackageError := 127
251 }
252}
253
254/* GSMA SGP.32, section 6.3.2.6 */
255template (value) EsipaMessageFromEimToIpa
256ts_getEimPackageResponse_euiccPkgReq := {
257 getEimPackageResponse := {
258 euiccPackageRequest := {
259 euiccPackageSigned := {
260 eimId := "myEim",
261 eidValue := '00112233445566778899AABBCCDDEEFF'O,
262 counterValue := 123,
263 transactionId := omit,
264 euiccPackage := {
265 psmoList := {
266 {
Philipp Maierac10cee2024-04-10 15:51:47 +0200267 enable := {
268 iccid := '123456789ABCDEFFAAAA'O,
269 rollbackFlag := NULL
Philipp Maier08902cf2024-03-04 10:32:55 +0100270 }
271 }
272 }
273 }
274 },
275 eimSignature := '1234567890'O
276 }
277 }
278}
279
280/* GSMA SGP.32, section 6.3.2.5 */
281template (present) EsipaMessageFromIpaToEim
282tr_cancelSessionRequestEsipa := {
283 cancelSessionRequestEsipa := {
284 transactionId := ?,
285 cancelSessionResponse := {
286 cancelSessionResponseOk := tr_cancelSessionResponseOk
287 }
288 }
289}
290template (value) EsipaMessageFromIpaToEim
291ts_cancelSessionRequestEsipa := {
292 cancelSessionRequestEsipa := {
293 transactionId := 'AABBCC'O,
294 cancelSessionResponse := {
295 cancelSessionResponseOk := ts_cancelSessionResponseOk
296 }
297 }
298}
299
300/* GSMA SGP.32, section 6.3.2.5 */
301template (present) EsipaMessageFromEimToIpa
302tr_cancelSessionResponseEsipa := {
303 cancelSessionResponseEsipa := {
304 cancelSessionOk := {
305 /* This function has no output data */
306 }
307 }
308}
309template (value) EsipaMessageFromEimToIpa
310ts_cancelSessionResponseEsipa := {
311 cancelSessionResponseEsipa := {
312 cancelSessionOk := {
313 /* This function has no output data */
314 }
315 }
316}
317
318/* GSMA SGP.32, section 6.3.2.3 */
Philipp Maier3b7bad32024-05-13 12:36:58 +0200319template (present) EsipaMessageFromIpaToEim
320tr_getBoundProfilePackageRequestEsipa := {
321 getBoundProfilePackageRequestEsipa := {
322 transactionId := ?,
323 prepareDownloadResponse := {
324 downloadResponseOk := tr_prepareDownloadResponseOk
325 }
326 }
327}
328template (value) EsipaMessageFromIpaToEim
329ts_getBoundProfilePackageRequestEsipa := {
330 getBoundProfilePackageRequestEsipa := {
331 transactionId := 'ABCDEF'O,
332 prepareDownloadResponse := {
333 downloadResponseOk := ts_prepareDownloadResponseOk
334 }
335 }
336}
337
338/* GSMA SGP.32, section 6.3.2.3 */
Philipp Maier08902cf2024-03-04 10:32:55 +0100339template (present) EsipaMessageFromEimToIpa
340tr_getBoundProfilePackageResponseEsipa := {
341 getBoundProfilePackageResponseEsipa := {
342 getBoundProfilePackageOkEsipa := {
343 transactionId := *,
344 boundProfilePackage := tr_boundProfilePackage
345 }
346 }
347}
348template (value) EsipaMessageFromEimToIpa
349ts_getBoundProfilePackageResponseEsipa := {
350 getBoundProfilePackageResponseEsipa := {
351 getBoundProfilePackageOkEsipa := {
352 transactionId := omit,
353 boundProfilePackage := ts_boundProfilePackage
354 }
355 }
356}
357
358/* GSMA SGP.32, section 5.9.1 */
359template (present) EuiccPackageResult
360tr_euiccPackageResult := {
361 euiccPackageResultSigned := {
362 euiccPackageResultDataSigned := {
363 eimId := ?,
364 counterValue := ?,
365 transactionId := *,
366 seqNumber := ?,
367 euiccResult := ?
368 },
369 euiccSignEPR := ?
370 }
371}
372template (value) EuiccPackageResult
373ts_euiccPackageResult := {
374 euiccPackageResultSigned := {
375 euiccPackageResultDataSigned := {
376 eimId := "myEim",
377 counterValue := 333,
378 transactionId := omit,
379 seqNumber := 1234,
380 euiccResult := {
381 {
Philipp Maierac10cee2024-04-10 15:51:47 +0200382 enableResult := 0
Philipp Maier08902cf2024-03-04 10:32:55 +0100383 }
384 }
385 },
386 euiccSignEPR := 'AABBCCDDEEFF'O
387 }
388}
389
390/* GSMA SGP.32, section 6.3.2.7 */
Philipp Maiere4de06e2024-04-10 15:58:22 +0200391template (present) EsipaMessageFromIpaToEim
392tr_provideEimPackageResult_ePRAndNotif := {
393 provideEimPackageResult := {
394 ePRAndNotifications := {
395 euiccPackageResult := ?,
396 notificationList := ?
397 }
398 }
399}
Philipp Maier08902cf2024-03-04 10:32:55 +0100400template (present) EsipaMessageFromEimToIpa
Philipp Maier88f24812024-04-10 15:55:51 +0200401tr_provideEimPackageResultResponse_eimAck := {
Philipp Maier08902cf2024-03-04 10:32:55 +0100402 provideEimPackageResultResponse := {
403 eimAcknowledgements := *
404 }
405}
406template (value) EsipaMessageFromEimToIpa
Philipp Maier88f24812024-04-10 15:55:51 +0200407ts_provideEimPackageResultResponse_eimAck(template (value) EimAcknowledgements eimAcknowledgements := {}) := {
Philipp Maier08902cf2024-03-04 10:32:55 +0100408 provideEimPackageResultResponse := {
409 eimAcknowledgements := eimAcknowledgements
410 }
411}
412
413/* GSMA SGP.32, section 2.11.1.2 */
414template (present) GetCertsResponse
415tr_getCertsResponse := {
416 certs := {
417 eumCertificate := ?,
418 euiccCertificate := ?
419 }
420}
421template (value) GetCertsResponse
422ts_getCertsResponse := {
423 certs := {
424 eumCertificate := ts_cert_s_sm_dpauth_nist,
425 euiccCertificate := ts_cert_eum_nist
426 }
427}
428
429/* GSMA SGP.32, section 5.9.18 */
430template (present) GetEimConfigurationDataResponse
431tr_getEimConfigurationDataResponse := {
432 eimConfigurationDataList := ?
433}
434template (value) GetEimConfigurationDataResponse
435ts_getEimConfigurationDataResponse(template (value) charstring eimFqdn := "127.0.0.1") := {
436 eimConfigurationDataList := {
437 {
438 eimId := "myEIM",
439 eimFqdn := eimFqdn,
440 eimIdType := omit,
441 counterValue := omit,
442 associationToken := 123,
443 eimPublicKeyData := omit,
444 trustedPublicKeyDataTls := omit,
445 eimSupportedProtocol := omit,
446 euiccCiPKId := omit
447 }
448 }
449}
450
451/* GSMA SGP.32, section 5.9.4 */
452template (present) AddInitialEimResponse
453tr_addInitialEimResponse := {
454 addInitialEimOk := ?
455}
456template (value) AddInitialEimResponse
Philipp Maierd9887d32024-04-10 15:48:05 +0200457ts_addInitialEimResponse := {
Philipp Maier08902cf2024-03-04 10:32:55 +0100458 addInitialEimOk := {
459 {
460 addOk := NULL
461 }
462 }
463}
464
Philipp Maier4a24fb02024-04-10 16:01:06 +0200465/* GSMA SGP.32, section 5.9.16 */
466template (present) ProfileRollbackRequest
467tr_profileRollbackRequest := {
468 refreshFlag := ?
469}
470template (value) ProfileRollbackRequest
471ts_profileRollbackRequest := {
472 refreshFlag := false
473}
474template (present) ProfileRollbackResponse
475tr_profileRollbackResponse := {
476 cmdResult := ?,
477 eUICCPackageResult := ?
478}
479template (value) ProfileRollbackResponse
480ts_profileRollbackResponse := {
481 cmdResult := 0,
482 eUICCPackageResult := {
483 euiccPackageResultSigned := {
484 euiccPackageResultDataSigned := {
485 eimId := "myEim",
486 counterValue := 333,
487 transactionId := omit,
488 seqNumber := 1234,
489 euiccResult := {
490 {
491 enableResult := 0
492 },
493 {
494 rollbackResult := 0
495 }
496 }
497 },
498 euiccSignEPR := 'AABBCCDDEEFF'O
499 }
500 }
501}
502
503
Philipp Maier978ab442024-04-10 15:46:45 +0200504}