blob: 86cdb0cb2b7da3fb50d0e32eee61b735feac27a3 [file] [log] [blame]
Philipp Maier08902cf2024-03-04 10:32:55 +01001/* SGP22 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 RSPDefinitions_Templates {
12
13import from PEDefinitions all;
14import from RSPDefinitions all;
15import from RSPDefinitions_Types all;
16
17import from PKIX1Explicit88 all;
18import from PKIX1Explicit88_Templates all;
19import from PKIX1Explicit88_Types all;
20
21import from PKIX1Implicit88 all;
22
23/* GSMA SGP.22, section 2.5.4 */
24template (present) BoundProfilePackage
25tr_boundProfilePackage := {
26 initialiseSecureChannelRequest := {
27 remoteOpId := ?,
28 transactionId := ?,
29 controlRefTemplate := {
30 keyType := ?,
31 keyLen := ?,
32 hostId := ?
33 },
34 smdpOtpk := ?,
35 smdpSign := ?
36 },
37 /* ES8+.ConfigureISDP */
38 firstSequenceOf87 := ?,
39 /* ES8+.StoreMetadata */
40 sequenceOf88 := ?,
41 /* ES8+.ReplaceSessionKeys (optional) */
42 secondSequenceOf87 := *,
43 /* ES8+.LoadProfileElements */
44 sequenceOf86 := ?
45}
46template (value) BoundProfilePackage
47ts_boundProfilePackage := {
48 initialiseSecureChannelRequest := {
49 remoteOpId := 1,
50 transactionId := 'AABBCC'O,
51 controlRefTemplate := {
52 keyType := '88'O, /* AES */
53 keyLen := '10'O, /* 16 byte key-length */
54 hostId := '01020304050607080910111213141516'O
55 },
56 smdpOtpk := '1122334455667788'O,
57 smdpSign := 'AABBCCDDEEFF0000'O
58 },
59 /* ES8+.ConfigureISDP */
60 firstSequenceOf87 := {'41414141414141414141414141414141414141414141414141414141414141'O,
61 '42424242424242424242424242424242424242424242424242424242424242'O,
62 '43434343434343434343434343434343434343434343434343434343434343'O},
63 /* ES8+.StoreMetadata */
64 sequenceOf88 := {'444444444444444444444444444444444444444444'O,
65 '454545454545454545454545454545454545454545'O,
66 '464646464646464646464646464646464646464646'O},
67 /* ES8+.ReplaceSessionKeys (optional) */
68 secondSequenceOf87 := omit,
69 /* ES8+.LoadProfileElements */
70 sequenceOf86 := {'474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747'O,
71 '484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848'O,
72 '494949494949494949494949494949494949494949494949494949494949494949494949494949494949494949494949494949494949494949494949'O,
73 '505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050'O,
74 '515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151'O}
75}
76
77/* GSMA SGP.22, section 2.5.6 */
78template (present) ProfileInstallationResult
79tr_profileInstallationResult := {
80 profileInstallationResultData := {
81 transactionId := ?,
82 notificationMetadata := {
83 seqNumber := ?,
84 profileManagementOperation := ?,
85 notificationAddress := ?,
86 iccid := *
87 },
88 smdpOid := ?,
89 finalResult := ?
90 },
91 euiccSignPIR := ?
92}
93template (value) ProfileInstallationResult
94ts_profileInstallationResult := {
95 profileInstallationResultData := {
96 transactionId := 'AABBCC'O,
97 notificationMetadata := {
98 seqNumber := 1234,
99 profileManagementOperation := '01'B, /* is this correct? (notificationInstall) */
100 notificationAddress := "smdp.example.com",
101 iccid := omit
102 },
103 smdpOid := id_rsp, /* random OBJECT IDENTIFIER for testing */
104 finalResult := {
105 successResult := {
106 aid := '0102030405'O,
107 simaResponse := '4141414141414141414141414141414141414141414141414141'O
108 }
109 }
110 },
111 euiccSignPIR := '00112233445566778899AABBCCDDEEFF'O
112}
113
114
115/* GSMA SGP.22, section 5.6.1 (ES9+) */
116template (present) RemoteProfileProvisioningRequest
117tr_initiateAuthenticationRequest(template (present) octetstring euiccChallenge := ?,
118 template (present) charstring smdpAddress := ?,
119 template (present) EUICCInfo1 euiccInfo1 := ?) := {
120 initiateAuthenticationRequest := {
121 euiccChallenge := euiccChallenge,
122 smdpAddress := smdpAddress,
123 euiccInfo1 := euiccInfo1
124 }
125}
126template (value) RemoteProfileProvisioningRequest
127ts_initiateAuthenticationRequest(template (value) octetstring euiccChallenge,
128 template (value) charstring smdpAddress,
129 template (value) EUICCInfo1 euiccInfo1) := {
130 initiateAuthenticationRequest := {
131 euiccChallenge := euiccChallenge,
132 smdpAddress := smdpAddress,
133 euiccInfo1 := euiccInfo1
134 }
135}
136template (present) RemoteProfileProvisioningResponse
137tr_initiateAuthenticationResponse(template (present) octetstring transactionId := ?,
138 template (present) ServerSigned1 serverSigned1 := ?,
139 template (present) octetstring serverSignature1 := ?,
140 template (present) SubjectKeyIdentifier euiccCiPKIdToBeUsed := ?,
141 template (present) Certificate serverCertificate := ?) := {
142 initiateAuthenticationResponse := {
143 initiateAuthenticationOk := {
144 transactionId := transactionId,
145 serverSigned1 := serverSigned1,
146 serverSignature1 := serverSignature1,
147 euiccCiPKIdToBeUsed := euiccCiPKIdToBeUsed,
148 serverCertificate := serverCertificate
149 }
150 }
151}
152template (value) RemoteProfileProvisioningResponse
153ts_initiateAuthenticationResponse(template (value) octetstring transactionId,
154 template (value) ServerSigned1 serverSigned1,
155 template (value) octetstring serverSignature1,
156 template (value) SubjectKeyIdentifier euiccCiPKIdToBeUsed,
157 template (value) Certificate serverCertificate) := {
158 initiateAuthenticationResponse := {
159 initiateAuthenticationOk := {
160 transactionId := transactionId,
161 serverSigned1 := serverSigned1,
162 serverSignature1 := serverSignature1,
163 euiccCiPKIdToBeUsed := euiccCiPKIdToBeUsed,
164 serverCertificate := serverCertificate
165 }
166 }
167}
168
169/* GSMA SGP.22, section 5.6.2 (ES9+) */
170template (present) RemoteProfileProvisioningRequest
171tr_getBoundProfilePackageRequest(template (present) octetstring transactionId := ?,
172 template (present) PrepareDownloadResponse prepareDownloadResponse := ?) := {
173 getBoundProfilePackageRequest := {
174 transactionId := transactionId,
175 prepareDownloadResponse := prepareDownloadResponse
176 }
177}
178template (value) RemoteProfileProvisioningRequest
179ts_getBoundProfilePackageRequest(template (value) octetstring transactionId,
180 template (value) PrepareDownloadResponse prepareDownloadResponse) := {
181 getBoundProfilePackageRequest := {
182 transactionId := transactionId,
183 prepareDownloadResponse := prepareDownloadResponse
184 }
185}
186template (present) RemoteProfileProvisioningResponse
187tr_getBoundProfilePackageResponse(template (present) octetstring transactionId := ?,
188 template (present) BoundProfilePackage boundProfilePackage := ?) := {
189 getBoundProfilePackageResponse := {
190 getBoundProfilePackageOk := {
191 transactionId := transactionId,
192 boundProfilePackage := boundProfilePackage
193 }
194 }
195}
196template (value) RemoteProfileProvisioningResponse
197ts_getBoundProfilePackageResponse(template (value) octetstring transactionId,
198 template (value) BoundProfilePackage boundProfilePackage) := {
199 getBoundProfilePackageResponse := {
200 getBoundProfilePackageOk := {
201 transactionId := transactionId,
202 boundProfilePackage := boundProfilePackage
203 }
204 }
205}
206
207/* GSMA SGP.22, section 5.6.3 (ES9+) */
208template (present) RemoteProfileProvisioningRequest
209tr_authenticateClientRequest(template (present) octetstring transactionId := ?,
210 template (present) AuthenticateServerResponse authenticateServerResponse := ?) := {
211 authenticateClientRequest := {
212 transactionId := transactionId,
213 authenticateServerResponse := authenticateServerResponse
214 }
215}
216template (value) RemoteProfileProvisioningRequest
217ts_authenticateClientRequest(template (value) octetstring transactionId,
218 template (value) AuthenticateServerResponse authenticateServerResponse) := {
219 authenticateClientRequest := {
220 transactionId := transactionId,
221 authenticateServerResponse := authenticateServerResponse
222 }
223}
224template (present) RemoteProfileProvisioningResponse
225tr_authenticateClientResponseEs9(template (present) octetstring transactionId := ?,
226 template (present) StoreMetadataRequest profileMetaData := ?,
227 template (present) SmdpSigned2 smdpSigned2 := ?,
228 template (present) octetstring smdpSignature2 := ?,
229 template (present) Certificate smdpCertificate := ?) := {
230 authenticateClientResponseEs9 := {
231 authenticateClientOk := {
232 transactionId := transactionId,
233 profileMetaData := profileMetaData,
234 smdpSigned2 := smdpSigned2,
235 smdpSignature2 := smdpSignature2,
236 smdpCertificate := smdpCertificate
237 }
238 }
239}
240template (value) RemoteProfileProvisioningResponse
241ts_authenticateClientResponseEs9(template (value) octetstring transactionId,
242 template (value) StoreMetadataRequest profileMetaData,
243 template (value) SmdpSigned2 smdpSigned2,
244 template (value) octetstring smdpSignature2,
245 template (value) Certificate smdpCertificate) := {
246 authenticateClientResponseEs9 := {
247 authenticateClientOk := {
248 transactionId := transactionId,
249 profileMetaData := profileMetaData,
250 smdpSigned2 := smdpSigned2,
251 smdpSignature2 := smdpSignature2,
252 smdpCertificate := smdpCertificate
253 }
254 }
255}
256
257/* GSMA SGP.22, section 5.6.4 (ES9+) */
258template (present) RemoteProfileProvisioningRequest
259tr_handleNotification(template (present) PendingNotification pendingNotification := ?) := {
260 handleNotification := {
261 pendingNotification := pendingNotification
262 }
263}
264template (value) RemoteProfileProvisioningRequest
265ts_handleNotification(template (value) PendingNotification pendingNotification) := {
266 handleNotification := {
267 pendingNotification := pendingNotification
268 }
269}
270
271/* GSMA SGP.22, section 5.6.5 (ES9+) */
272template (present) RemoteProfileProvisioningRequest
273tr_cancelSessionRequestEs9(template (present) octetstring transactionId := ?,
274 template (present) CancelSessionResponse cancelSessionResponse := ?) := {
275 cancelSessionRequestEs9 := {
276 transactionId := transactionId,
277 cancelSessionResponse := cancelSessionResponse
278 }
279}
280template (value) RemoteProfileProvisioningRequest
281ts_cancelSessionRequestEs9(template (value) octetstring transactionId,
282 template (value) CancelSessionResponse cancelSessionResponse) := {
283 cancelSessionRequestEs9 := {
284 transactionId := transactionId,
285 cancelSessionResponse := cancelSessionResponse
286 }
287}
288template (present) RemoteProfileProvisioningResponse
289tr_cancelSessionResponseEs9 := {
290 cancelSessionResponseEs9 := {
291 cancelSessionOk := { } /* This function has no output data */
292 }
293}
294template (value) RemoteProfileProvisioningResponse
295ts_cancelSessionResponseEs9 := {
296 cancelSessionResponseEs9 := {
297 cancelSessionOk := { } /* This function has no output data */
298 }
299}
300
301
302/* GSMA SGP.22, section 5.7.3 (ES10x) */
303template (present) EuiccConfiguredAddressesResponse
304tr_euiccConfiguredAddressesResponse := {
305 defaultDpAddress := *,
306 rootDsAddress := ?
307}
308template (value) EuiccConfiguredAddressesResponse
309ts_euiccConfiguredAddressesResponse := {
310 defaultDpAddress := "smdp.example.com",
311 rootDsAddress := "smds.example.com"
312}
313
314/* GSMA SGP.22, section 5.7.5 (ES10x) */
315template (present) PrepareDownloadResponse
316tr_prepareDownloadResponse := {
317 downloadResponseOk := {
318 euiccSigned2 := {
319 transactionId := ?,
320 euiccOtpk := ?,
321 hashCc := *
322 },
323 euiccSignature2 := ?
324 }
325}
326template (value) PrepareDownloadResponse
327ts_prepareDownloadResponse := {
328 downloadResponseOk := {
329 euiccSigned2 := {
330 transactionId := 'ABCDEF'O,
331 euiccOtpk := 'AABBCCDDEEFF'O,
332 hashCc := omit
333 },
334 euiccSignature2 := 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'O
335 }
336}
337
338/* GSMA SGP.22, section 5.7.7 (ES10x) */
339template (present) GetEuiccChallengeResponse
340tr_GetEuiccChallengeResponse := {
341 euiccChallenge := ?
342}
343template (value) GetEuiccChallengeResponse
344ts_GetEuiccChallengeResponse(template (value) octetstring euiccChallenge := '00112233445566778899AABBCCDDEEFF'O) := {
345 euiccChallenge := euiccChallenge
346}
347
348/* GSMA SGP.22, section 5.7.8 (ES10x) */
349template (present) EUICCInfo1
350tr_EUICCInfo1 := {
351 svn := ?,
352 euiccCiPKIdListForVerification := ?,
353 euiccCiPKIdListForSigning := ?
354}
355template (value) EUICCInfo1
356ts_EUICCInfo1 := {
357 svn := '020200'O,
358 euiccCiPKIdListForVerification := {
359 'C0BC70BA36929D43B467FF57570530E57AB8FCD8'O,
360 'F54172BDF98A95D65CBEB88A38A1C11D800A85C3'O
361 },
362 euiccCiPKIdListForSigning := {
363 'C0BC70BA36929D43B467FF57570530E57AB8FCD8'O,
364 'F54172BDF98A95D65CBEB88A38A1C11D800A85C3'O
365 }
366}
367
368/* GSMA SGP.22, section 5.7.8 (ES10x) */
369template (present) EUICCInfo2
370tr_EUICCInfo2 := {
371 profileVersion := ?,
372 svn := ?,
373 euiccFirmwareVer := ?,
374 extCardResource := ?,
375 uiccCapability := ?,
376 ts102241Version := *,
377 globalplatformVersion := *,
378 rspCapability := ?,
379 euiccCiPKIdListForVerification := ?,
380 euiccCiPKIdListForSigning := ?,
381 euiccCategory := *,
382 forbiddenProfilePolicyRules := *,
383 ppVersion := ?,
384 sasAcreditationNumber := ?,
385 certificationDataObject := *,
386 treProperties := *,
387 treProductReference := *,
388 additionalEuiccProfilePackageVersions := *
389}
390template (value) EUICCInfo2
391ts_EUICCInfo2 := {
392 profileVersion := '414243'O,
393 svn := '02000C'O,
394 euiccFirmwareVer := '414243'O,
395 extCardResource := '414243'O,
396 uiccCapability := '1111111111111111111'B,
397 ts102241Version := omit,
398 globalplatformVersion := omit,
399 rspCapability := '1111'B,
400 euiccCiPKIdListForVerification := {
401 'C0BC70BA36929D43B467FF57570530E57AB8FCD8'O,
402 'F54172BDF98A95D65CBEB88A38A1C11D800A85C3'O
403 },
404 euiccCiPKIdListForSigning := {
405 'C0BC70BA36929D43B467FF57570530E57AB8FCD8'O,
406 'F54172BDF98A95D65CBEB88A38A1C11D800A85C3'O
407 },
408 euiccCategory := omit,
409 forbiddenProfilePolicyRules := omit,
410 ppVersion := '414243'O,
411 sasAcreditationNumber := "123456",
412 certificationDataObject := omit,
413 treProperties := omit,
414 treProductReference := omit,
415 additionalEuiccProfilePackageVersions := omit
416}
417
418/* GSMA SGP.22, section 5.7.10 (ES10x) */
419template (value) RetrieveNotificationsListResponse
420ts_retrieveNotificationsListResponse := {
421 notificationList := {
422 {
423 profileInstallationResult := {
424 profileInstallationResultData := {
425 transactionId := 'AABBCC'O,
426 notificationMetadata := {
427 seqNumber := 1234,
428 profileManagementOperation := '01'B, /* is this correct? (notificationInstall) */
429 notificationAddress := "smdp.example.com",
430 iccid := omit
431 },
432 smdpOid := id_rsp, /* random OBJECT IDENTIFIER for testing */
433 finalResult := {
434 successResult := {
435 aid := 'A0000005591010FFFFFFFF8900000D00'O,
436 simaResponse := 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'O
437 }
438 }
439 },
440 euiccSignPIR := 'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB'O
441 }
442 }
443 }
444}
445
446/* GSMA SGP.22, section 5.7.11 (ES10x) */
447template (present) NotificationSentResponse
448tr_notificationSentResponse := {
449 deleteNotificationStatus := ?
450}
451template (value) NotificationSentResponse
452ts_notificationSentResponse := {
453 deleteNotificationStatus := 0 /* 0k */
454}
455
456/* GSMA SGP.22, section 5.7.13 (ES10x) */
457template (present) AuthenticateServerResponse
458tr_authenticateServerResponse := {
459 authenticateResponseOk := {
460 euiccSigned1 := {
461 transactionId := ?,
462 serverAddress := ?,
463 serverChallenge := ?,
464 euiccInfo2 := ?,
465 ctxParams1 := {
466 ctxParamsForCommonAuthentication := {
467 matchingId := *,
468 deviceInfo := {
469 tac := ?,
470 deviceCapabilities := {
471 gsmSupportedRelease := *,
472 utranSupportedRelease := *,
473 cdma2000onexSupportedRelease := *,
474 cdma2000hrpdSupportedRelease := *,
475 cdma2000ehrpdSupportedRelease := *,
476 eutranEpcSupportedRelease := *,
477 contactlessSupportedRelease := *,
478 rspCrlSupportedVersion := *,
479 nrEpcSupportedRelease := *,
480 nr5gcSupportedRelease := *,
481 eutran5gcSupportedRelease := *,
482 lpaSvn := *,
483 catSupportedClasses := *,
484 euiccFormFactorType := *,
485 deviceAdditionalFeatureSupport := *
486 },
487 imei := *
488 }
489 }
490 }
491 },
492 euiccSignature1 := ?,
493 euiccCertificate := ?,
494 eumCertificate := ?
495 }
496}
497template (value) AuthenticateServerResponse
498ts_authenticateServerResponse := {
499 authenticateResponseOk := {
500 euiccSigned1 := {
501 transactionId := 'ABCDEF'O,
502 serverAddress := "smdp.example.com",
503 serverChallenge := '01020304050607080910111213141516'O,
504 euiccInfo2 := ts_EUICCInfo2,
505 ctxParams1 := {
506 ctxParamsForCommonAuthentication := {
507 matchingId := omit,
508 deviceInfo := {
509 tac := '12345678'O,
510 deviceCapabilities := {
511 gsmSupportedRelease := omit,
512 utranSupportedRelease := omit,
513 cdma2000onexSupportedRelease := omit,
514 cdma2000hrpdSupportedRelease := omit,
515 cdma2000ehrpdSupportedRelease := omit,
516 eutranEpcSupportedRelease := omit,
517 contactlessSupportedRelease := omit,
518 rspCrlSupportedVersion := omit,
519 nrEpcSupportedRelease := omit,
520 nr5gcSupportedRelease := omit,
521 eutran5gcSupportedRelease := omit,
522 lpaSvn := omit,
523 catSupportedClasses := omit,
524 euiccFormFactorType := omit,
525 deviceAdditionalFeatureSupport := omit
526 },
527 imei := omit
528 }
529 }
530 }
531 },
532 euiccSignature1 := '12345678'O,
533 euiccCertificate := ts_cert_euicc_nist,
534// euiccCertificate := ts_cert_euicc_brp,
535 eumCertificate := ts_cert_eum_nist
536// eumCertificate := ts_cert_eum_brp
537
538 }
539}
540
541/* GSMA SGP.22, section 5.7.13 (ES10x) */
542template (present) CancelSessionResponseOk
543tr_cancelSessionResponseOk := {
544 euiccCancelSessionSigned := {
545 transactionId := ?,
546 smdpOid := ?,
547 reason := ?
548 },
549 euiccCancelSessionSignature := ?
550}
551template (value) CancelSessionResponseOk
552ts_cancelSessionResponseOk := {
553 euiccCancelSessionSigned := {
554 transactionId := 'AABBCC'O,
555 smdpOid := id_rspRole_euicc,
556 reason := 5
557 },
558 euiccCancelSessionSignature := '1234567890'O
559}
560template (present) CancelSessionResponse
561tr_cancelSessionResponse := {
562 cancelSessionResponseOk := tr_cancelSessionResponseOk
563}
564template (value) CancelSessionResponse
565ts_cancelSessionResponse := {
566 cancelSessionResponseOk := ts_cancelSessionResponseOk
567}
568
569/* GSMA SGP.22, section 5.7.20 (ES10x) */
570template (present) GetEuiccDataResponse
571tr_getEuiccDataResponse := {
572 eidValue := ?
573}
574template (value) GetEuiccDataResponse
575ts_getEuiccDataResponse(template (value) octetstring eidValue := '000102030405060708090A0B0C0D0E0F'O) := {
576 eidValue := eidValue
577}
578
579}