Philipp Maier | 08902cf | 2024-03-04 10:32:55 +0100 | [diff] [blame] | 1 | /* 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 | |
| 11 | module SGP32Definitions_Templates { |
| 12 | |
| 13 | import from SGP32Definitions all; |
| 14 | import from SGP32Definitions_Types all; |
| 15 | |
| 16 | import from RSPDefinitions all; |
| 17 | import from RSPDefinitions_Types all; |
| 18 | import from RSPDefinitions_Templates all; |
| 19 | |
| 20 | import from PKIX1Explicit88 all; |
| 21 | import from PKIX1Explicit88_Templates all; |
| 22 | import from PKIX1Explicit88_Types all; |
| 23 | |
| 24 | /* GSMA SGP.32, section 6.3.2.1 */ |
| 25 | template (present) EsipaMessageFromEimToIpa |
| 26 | tr_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 | |
| 46 | template (value) EsipaMessageFromEimToIpa |
| 47 | ts_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 */ |
| 71 | template (present) EsipaMessageFromIpaToEim |
| 72 | tr_initiateAuthenticationRequestEsipa(template (present) octetstring euiccChallenge := ?) := { |
| 73 | initiateAuthenticationRequestEsipa := { |
| 74 | euiccChallenge := euiccChallenge, |
| 75 | smdpAddress := *, |
| 76 | euiccInfo1 := * |
| 77 | } |
| 78 | } |
| 79 | template (value) EsipaMessageFromIpaToEim |
Philipp Maier | e73a6a3 | 2024-04-25 15:48:37 +0200 | [diff] [blame] | 80 | ts_initiateAuthenticationRequestEsipa(template (value) octetstring euiccChallenge := '00112233445566778899aabbccddeeff'O, |
| 81 | template (omit) charstring smdpAddress := "smdp.example.com", |
| 82 | template (omit) EUICCInfo1 euiccInfo1 := ts_EUICCInfo1) := { |
Philipp Maier | 08902cf | 2024-03-04 10:32:55 +0100 | [diff] [blame] | 83 | initiateAuthenticationRequestEsipa := { |
| 84 | euiccChallenge := euiccChallenge, |
Philipp Maier | e73a6a3 | 2024-04-25 15:48:37 +0200 | [diff] [blame] | 85 | smdpAddress := smdpAddress, |
| 86 | euiccInfo1 := euiccInfo1 |
Philipp Maier | 08902cf | 2024-03-04 10:32:55 +0100 | [diff] [blame] | 87 | } |
| 88 | } |
| 89 | |
| 90 | /* GSMA SGP.32, section 6.3.2.2 */ |
| 91 | template (present) EsipaMessageFromIpaToEim |
| 92 | tr_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 */ |
| 103 | template (present) EsipaMessageFromEimToIpa |
| 104 | tr_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 | } |
| 118 | template (value) EsipaMessageFromEimToIpa |
| 119 | ts_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 */ |
| 135 | template (present) EsipaMessageFromEimToIpa |
| 136 | tr_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 | } |
| 152 | template (value) EsipaMessageFromEimToIpa |
| 153 | ts_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 */ |
| 174 | template (present) EsipaMessageFromIpaToEim |
| 175 | tr_getEimPackageRequest(template (present) octetstring eidValue := ?) := { |
| 176 | getEimPackageRequest := { |
| 177 | eidValue := eidValue, |
| 178 | notifyStateChange := *, |
| 179 | rPLMN := * |
| 180 | } |
| 181 | } |
| 182 | template (value) EsipaMessageFromIpaToEim |
| 183 | ts_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 */ |
| 192 | template (present) EsipaMessageFromEimToIpa |
| 193 | tr_getEimPackageResponse_dnlTrigReq(template (present) charstring activationCode := ?) := { |
| 194 | getEimPackageResponse := { |
| 195 | profileDownloadTriggerRequest := { |
| 196 | profileDownloadData := { |
| 197 | activationCode := activationCode |
| 198 | }, |
| 199 | eimTransactionId := * |
| 200 | } |
| 201 | } |
| 202 | } |
| 203 | template (value) EsipaMessageFromEimToIpa |
| 204 | ts_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 */ |
| 216 | template (present) EsipaMessageFromEimToIpa |
| 217 | tr_getEimPackageResponse_euiccDataReq := { |
| 218 | getEimPackageResponse := { |
| 219 | ipaEuiccDataRequest := { |
| 220 | tagList := ?, |
| 221 | euiccCiPKId := *, |
| 222 | searchCriteria := * |
| 223 | } |
| 224 | } |
| 225 | } |
| 226 | template (value) EsipaMessageFromEimToIpa |
| 227 | ts_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 */ |
| 238 | template (present) EsipaMessageFromEimToIpa |
| 239 | tr_getEimPackageResponse_eimPkgErrUndef := { |
| 240 | getEimPackageResponse := { |
| 241 | eimPackageError := ? |
| 242 | } |
| 243 | } |
| 244 | template (value) EsipaMessageFromEimToIpa |
| 245 | ts_getEimPackageResponse_eimPkgErrUndef := { |
| 246 | getEimPackageResponse := { |
| 247 | eimPackageError := 127 |
| 248 | } |
| 249 | } |
| 250 | |
| 251 | /* GSMA SGP.32, section 6.3.2.6 */ |
| 252 | template (value) EsipaMessageFromEimToIpa |
| 253 | ts_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 Maier | ac10cee | 2024-04-10 15:51:47 +0200 | [diff] [blame] | 264 | enable := { |
| 265 | iccid := '123456789ABCDEFFAAAA'O, |
| 266 | rollbackFlag := NULL |
Philipp Maier | 08902cf | 2024-03-04 10:32:55 +0100 | [diff] [blame] | 267 | } |
| 268 | } |
| 269 | } |
| 270 | } |
| 271 | }, |
| 272 | eimSignature := '1234567890'O |
| 273 | } |
| 274 | } |
| 275 | } |
| 276 | |
| 277 | /* GSMA SGP.32, section 6.3.2.5 */ |
| 278 | template (present) EsipaMessageFromIpaToEim |
| 279 | tr_cancelSessionRequestEsipa := { |
| 280 | cancelSessionRequestEsipa := { |
| 281 | transactionId := ?, |
| 282 | cancelSessionResponse := { |
| 283 | cancelSessionResponseOk := tr_cancelSessionResponseOk |
| 284 | } |
| 285 | } |
| 286 | } |
| 287 | template (value) EsipaMessageFromIpaToEim |
| 288 | ts_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 */ |
| 298 | template (present) EsipaMessageFromEimToIpa |
| 299 | tr_cancelSessionResponseEsipa := { |
| 300 | cancelSessionResponseEsipa := { |
| 301 | cancelSessionOk := { |
| 302 | /* This function has no output data */ |
| 303 | } |
| 304 | } |
| 305 | } |
| 306 | template (value) EsipaMessageFromEimToIpa |
| 307 | ts_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 */ |
| 316 | template (present) EsipaMessageFromEimToIpa |
| 317 | tr_getBoundProfilePackageResponseEsipa := { |
| 318 | getBoundProfilePackageResponseEsipa := { |
| 319 | getBoundProfilePackageOkEsipa := { |
| 320 | transactionId := *, |
| 321 | boundProfilePackage := tr_boundProfilePackage |
| 322 | } |
| 323 | } |
| 324 | } |
| 325 | template (value) EsipaMessageFromEimToIpa |
| 326 | ts_getBoundProfilePackageResponseEsipa := { |
| 327 | getBoundProfilePackageResponseEsipa := { |
| 328 | getBoundProfilePackageOkEsipa := { |
| 329 | transactionId := omit, |
| 330 | boundProfilePackage := ts_boundProfilePackage |
| 331 | } |
| 332 | } |
| 333 | } |
| 334 | |
| 335 | /* GSMA SGP.32, section 5.9.1 */ |
| 336 | template (present) EuiccPackageResult |
| 337 | tr_euiccPackageResult := { |
| 338 | euiccPackageResultSigned := { |
| 339 | euiccPackageResultDataSigned := { |
| 340 | eimId := ?, |
| 341 | counterValue := ?, |
| 342 | transactionId := *, |
| 343 | seqNumber := ?, |
| 344 | euiccResult := ? |
| 345 | }, |
| 346 | euiccSignEPR := ? |
| 347 | } |
| 348 | } |
| 349 | template (value) EuiccPackageResult |
| 350 | ts_euiccPackageResult := { |
| 351 | euiccPackageResultSigned := { |
| 352 | euiccPackageResultDataSigned := { |
| 353 | eimId := "myEim", |
| 354 | counterValue := 333, |
| 355 | transactionId := omit, |
| 356 | seqNumber := 1234, |
| 357 | euiccResult := { |
| 358 | { |
Philipp Maier | ac10cee | 2024-04-10 15:51:47 +0200 | [diff] [blame] | 359 | enableResult := 0 |
Philipp Maier | 08902cf | 2024-03-04 10:32:55 +0100 | [diff] [blame] | 360 | } |
| 361 | } |
| 362 | }, |
| 363 | euiccSignEPR := 'AABBCCDDEEFF'O |
| 364 | } |
| 365 | } |
| 366 | |
| 367 | /* GSMA SGP.32, section 6.3.2.7 */ |
Philipp Maier | e4de06e | 2024-04-10 15:58:22 +0200 | [diff] [blame] | 368 | template (present) EsipaMessageFromIpaToEim |
| 369 | tr_provideEimPackageResult_ePRAndNotif := { |
| 370 | provideEimPackageResult := { |
| 371 | ePRAndNotifications := { |
| 372 | euiccPackageResult := ?, |
| 373 | notificationList := ? |
| 374 | } |
| 375 | } |
| 376 | } |
Philipp Maier | 08902cf | 2024-03-04 10:32:55 +0100 | [diff] [blame] | 377 | template (present) EsipaMessageFromEimToIpa |
Philipp Maier | 88f2481 | 2024-04-10 15:55:51 +0200 | [diff] [blame] | 378 | tr_provideEimPackageResultResponse_eimAck := { |
Philipp Maier | 08902cf | 2024-03-04 10:32:55 +0100 | [diff] [blame] | 379 | provideEimPackageResultResponse := { |
| 380 | eimAcknowledgements := * |
| 381 | } |
| 382 | } |
| 383 | template (value) EsipaMessageFromEimToIpa |
Philipp Maier | 88f2481 | 2024-04-10 15:55:51 +0200 | [diff] [blame] | 384 | ts_provideEimPackageResultResponse_eimAck(template (value) EimAcknowledgements eimAcknowledgements := {}) := { |
Philipp Maier | 08902cf | 2024-03-04 10:32:55 +0100 | [diff] [blame] | 385 | provideEimPackageResultResponse := { |
| 386 | eimAcknowledgements := eimAcknowledgements |
| 387 | } |
| 388 | } |
| 389 | |
| 390 | /* GSMA SGP.32, section 2.11.1.2 */ |
| 391 | template (present) GetCertsResponse |
| 392 | tr_getCertsResponse := { |
| 393 | certs := { |
| 394 | eumCertificate := ?, |
| 395 | euiccCertificate := ? |
| 396 | } |
| 397 | } |
| 398 | template (value) GetCertsResponse |
| 399 | ts_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 */ |
| 407 | template (present) GetEimConfigurationDataResponse |
| 408 | tr_getEimConfigurationDataResponse := { |
| 409 | eimConfigurationDataList := ? |
| 410 | } |
| 411 | template (value) GetEimConfigurationDataResponse |
| 412 | ts_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 */ |
| 429 | template (present) AddInitialEimResponse |
| 430 | tr_addInitialEimResponse := { |
| 431 | addInitialEimOk := ? |
| 432 | } |
| 433 | template (value) AddInitialEimResponse |
Philipp Maier | d9887d3 | 2024-04-10 15:48:05 +0200 | [diff] [blame] | 434 | ts_addInitialEimResponse := { |
Philipp Maier | 08902cf | 2024-03-04 10:32:55 +0100 | [diff] [blame] | 435 | addInitialEimOk := { |
| 436 | { |
| 437 | addOk := NULL |
| 438 | } |
| 439 | } |
| 440 | } |
| 441 | |
Philipp Maier | 4a24fb0 | 2024-04-10 16:01:06 +0200 | [diff] [blame] | 442 | /* GSMA SGP.32, section 5.9.16 */ |
| 443 | template (present) ProfileRollbackRequest |
| 444 | tr_profileRollbackRequest := { |
| 445 | refreshFlag := ? |
| 446 | } |
| 447 | template (value) ProfileRollbackRequest |
| 448 | ts_profileRollbackRequest := { |
| 449 | refreshFlag := false |
| 450 | } |
| 451 | template (present) ProfileRollbackResponse |
| 452 | tr_profileRollbackResponse := { |
| 453 | cmdResult := ?, |
| 454 | eUICCPackageResult := ? |
| 455 | } |
| 456 | template (value) ProfileRollbackResponse |
| 457 | ts_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 Maier | 978ab44 | 2024-04-10 15:46:45 +0200 | [diff] [blame] | 481 | } |