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 |
| 80 | ts_initiateAuthenticationRequestEsipa(template (value) octetstring euiccChallenge := '00112233445566778899aabbccddeeff'O) := { |
| 81 | initiateAuthenticationRequestEsipa := { |
| 82 | euiccChallenge := euiccChallenge, |
| 83 | smdpAddress := omit, |
| 84 | euiccInfo1 := omit |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | /* GSMA SGP.32, section 6.3.2.2 */ |
| 89 | template (present) EsipaMessageFromIpaToEim |
| 90 | tr_authenticateClientRequestEsipa := { |
| 91 | authenticateClientRequestEsipa := { |
| 92 | transactionId := ?, |
| 93 | authenticateServerResponse := { |
| 94 | authenticateResponseOk := ? |
| 95 | } |
| 96 | } |
| 97 | } |
| 98 | /* TODO: create coresponding ts_ template */ |
| 99 | |
| 100 | /* GSMA SGP.32, section 6.3.2.2 */ |
| 101 | template (present) EsipaMessageFromEimToIpa |
| 102 | tr_authenticateClientResponseEsipa_dse(template (present) octetstring transactionId := ?, |
| 103 | template (present) charstring activationCode := ?) := { |
| 104 | authenticateClientResponseEsipa := { |
| 105 | authenticateClientOkDSEsipa := { |
| 106 | transactionId := transactionId, |
| 107 | profileDownloadTrigger := { |
| 108 | profileDownloadData := { |
| 109 | activationCode := ? |
| 110 | }, |
| 111 | eimTransactionId := * |
| 112 | } |
| 113 | } |
| 114 | } |
| 115 | } |
| 116 | template (value) EsipaMessageFromEimToIpa |
| 117 | ts_authenticateClientResponseEsipa_dse(template (value) octetstring transactionId := 'ABCDEF'O, |
| 118 | template (value) charstring activationCode := "1$SMDP.EXAMPLE.COM$$1.3.6.1.4.1.31746") := { |
| 119 | authenticateClientResponseEsipa := { |
| 120 | authenticateClientOkDSEsipa := { |
| 121 | transactionId := transactionId, |
| 122 | profileDownloadTrigger := { |
| 123 | profileDownloadData := { |
| 124 | activationCode := activationCode |
| 125 | }, |
| 126 | eimTransactionId := omit |
| 127 | } |
| 128 | } |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | /* GSMA SGP.32, section 6.3.2.2 */ |
| 133 | template (present) EsipaMessageFromEimToIpa |
| 134 | tr_authenticateClientResponseEsipa_dpe(template (present) octetstring transactionId := ?) := { |
| 135 | authenticateClientResponseEsipa := { |
| 136 | authenticateClientOkDPEsipa := { |
| 137 | transactionId := transactionId, |
| 138 | profileMetaData := *, |
| 139 | smdpSigned2 := { |
| 140 | transactionId := ?, |
| 141 | ccRequiredFlag := ?, |
| 142 | bppEuiccOtpk := * |
| 143 | }, |
| 144 | smdpSignature2 := ?, |
| 145 | smdpCertificate := ?, |
| 146 | hashCc := * |
| 147 | } |
| 148 | } |
| 149 | } |
| 150 | template (value) EsipaMessageFromEimToIpa |
| 151 | ts_authenticateClientResponseEsipa_dpe(template (value) octetstring transactionId := 'ABCDEF'O) := { |
| 152 | authenticateClientResponseEsipa := { |
| 153 | authenticateClientOkDPEsipa := { |
| 154 | transactionId := transactionId, |
| 155 | profileMetaData := omit, |
| 156 | smdpSigned2 := { |
| 157 | transactionId := transactionId, |
| 158 | ccRequiredFlag := false, |
| 159 | bppEuiccOtpk := omit |
| 160 | }, |
| 161 | smdpSignature2 := 'AAAAAAAAAAAAAAAAAAAAAAAA'O, |
| 162 | smdpCertificate := ts_cert_s_sm_dpauth_nist, |
| 163 | // smdpCertificate := ts_cert_s_sm_dpauth_brp, |
| 164 | // smdpCertificate := ts_cert_s_sm_dp2auth_nist, |
| 165 | // smdpCertificate := ts_cert_s_sm_dp2auth_brp, |
| 166 | hashCc := omit |
| 167 | } |
| 168 | } |
| 169 | } |
| 170 | |
| 171 | /* GSMA SGP.32, section 6.3.2.6 */ |
| 172 | template (present) EsipaMessageFromIpaToEim |
| 173 | tr_getEimPackageRequest(template (present) octetstring eidValue := ?) := { |
| 174 | getEimPackageRequest := { |
| 175 | eidValue := eidValue, |
| 176 | notifyStateChange := *, |
| 177 | rPLMN := * |
| 178 | } |
| 179 | } |
| 180 | template (value) EsipaMessageFromIpaToEim |
| 181 | ts_getEimPackageRequest(template (value) octetstring eidValue) := { |
| 182 | getEimPackageRequest := { |
| 183 | eidValue := eidValue, |
| 184 | notifyStateChange := omit, |
| 185 | rPLMN := omit |
| 186 | } |
| 187 | } |
| 188 | |
| 189 | /* GSMA SGP.32, section 6.3.2.6 and 2.11.1.3 */ |
| 190 | template (present) EsipaMessageFromEimToIpa |
| 191 | tr_getEimPackageResponse_dnlTrigReq(template (present) charstring activationCode := ?) := { |
| 192 | getEimPackageResponse := { |
| 193 | profileDownloadTriggerRequest := { |
| 194 | profileDownloadData := { |
| 195 | activationCode := activationCode |
| 196 | }, |
| 197 | eimTransactionId := * |
| 198 | } |
| 199 | } |
| 200 | } |
| 201 | template (value) EsipaMessageFromEimToIpa |
| 202 | ts_getEimPackageResponse_dnlTrigReq(template (value) charstring activationCode := "1$SMDP.EXAMPLE.COM$$1.3.6.1.4.1.31746") := { |
| 203 | getEimPackageResponse := { |
| 204 | profileDownloadTriggerRequest := { |
| 205 | profileDownloadData := { |
| 206 | activationCode := activationCode |
| 207 | }, |
| 208 | eimTransactionId := omit |
| 209 | } |
| 210 | } |
| 211 | } |
| 212 | |
| 213 | /* GSMA SGP.32, section 6.3.2.6 and 2.11.1.2 */ |
| 214 | template (present) EsipaMessageFromEimToIpa |
| 215 | tr_getEimPackageResponse_euiccDataReq := { |
| 216 | getEimPackageResponse := { |
| 217 | ipaEuiccDataRequest := { |
| 218 | tagList := ?, |
| 219 | euiccCiPKId := *, |
| 220 | searchCriteria := * |
| 221 | } |
| 222 | } |
| 223 | } |
| 224 | template (value) EsipaMessageFromEimToIpa |
| 225 | ts_getEimPackageResponse_euiccDataReq := { |
| 226 | getEimPackageResponse := { |
| 227 | ipaEuiccDataRequest := { |
| 228 | tagList := '80BF20BF228384A5A688A9BF2B'O, |
| 229 | euiccCiPKId := omit, |
| 230 | searchCriteria := omit |
| 231 | } |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | /* GSMA SGP.32, section 6.3.2.6 */ |
| 236 | template (present) EsipaMessageFromEimToIpa |
| 237 | tr_getEimPackageResponse_eimPkgErrUndef := { |
| 238 | getEimPackageResponse := { |
| 239 | eimPackageError := ? |
| 240 | } |
| 241 | } |
| 242 | template (value) EsipaMessageFromEimToIpa |
| 243 | ts_getEimPackageResponse_eimPkgErrUndef := { |
| 244 | getEimPackageResponse := { |
| 245 | eimPackageError := 127 |
| 246 | } |
| 247 | } |
| 248 | |
| 249 | /* GSMA SGP.32, section 6.3.2.6 */ |
| 250 | template (value) EsipaMessageFromEimToIpa |
| 251 | ts_getEimPackageResponse_euiccPkgReq := { |
| 252 | getEimPackageResponse := { |
| 253 | euiccPackageRequest := { |
| 254 | euiccPackageSigned := { |
| 255 | eimId := "myEim", |
| 256 | eidValue := '00112233445566778899AABBCCDDEEFF'O, |
| 257 | counterValue := 123, |
| 258 | transactionId := omit, |
| 259 | euiccPackage := { |
| 260 | psmoList := { |
| 261 | { |
Philipp Maier | ac10cee | 2024-04-10 15:51:47 +0200 | [diff] [blame^] | 262 | enable := { |
| 263 | iccid := '123456789ABCDEFFAAAA'O, |
| 264 | rollbackFlag := NULL |
Philipp Maier | 08902cf | 2024-03-04 10:32:55 +0100 | [diff] [blame] | 265 | } |
| 266 | } |
| 267 | } |
| 268 | } |
| 269 | }, |
| 270 | eimSignature := '1234567890'O |
| 271 | } |
| 272 | } |
| 273 | } |
| 274 | |
| 275 | /* GSMA SGP.32, section 6.3.2.5 */ |
| 276 | template (present) EsipaMessageFromIpaToEim |
| 277 | tr_cancelSessionRequestEsipa := { |
| 278 | cancelSessionRequestEsipa := { |
| 279 | transactionId := ?, |
| 280 | cancelSessionResponse := { |
| 281 | cancelSessionResponseOk := tr_cancelSessionResponseOk |
| 282 | } |
| 283 | } |
| 284 | } |
| 285 | template (value) EsipaMessageFromIpaToEim |
| 286 | ts_cancelSessionRequestEsipa := { |
| 287 | cancelSessionRequestEsipa := { |
| 288 | transactionId := 'AABBCC'O, |
| 289 | cancelSessionResponse := { |
| 290 | cancelSessionResponseOk := ts_cancelSessionResponseOk |
| 291 | } |
| 292 | } |
| 293 | } |
| 294 | |
| 295 | /* GSMA SGP.32, section 6.3.2.5 */ |
| 296 | template (present) EsipaMessageFromEimToIpa |
| 297 | tr_cancelSessionResponseEsipa := { |
| 298 | cancelSessionResponseEsipa := { |
| 299 | cancelSessionOk := { |
| 300 | /* This function has no output data */ |
| 301 | } |
| 302 | } |
| 303 | } |
| 304 | template (value) EsipaMessageFromEimToIpa |
| 305 | ts_cancelSessionResponseEsipa := { |
| 306 | cancelSessionResponseEsipa := { |
| 307 | cancelSessionOk := { |
| 308 | /* This function has no output data */ |
| 309 | } |
| 310 | } |
| 311 | } |
| 312 | |
| 313 | /* GSMA SGP.32, section 6.3.2.3 */ |
| 314 | template (present) EsipaMessageFromEimToIpa |
| 315 | tr_getBoundProfilePackageResponseEsipa := { |
| 316 | getBoundProfilePackageResponseEsipa := { |
| 317 | getBoundProfilePackageOkEsipa := { |
| 318 | transactionId := *, |
| 319 | boundProfilePackage := tr_boundProfilePackage |
| 320 | } |
| 321 | } |
| 322 | } |
| 323 | template (value) EsipaMessageFromEimToIpa |
| 324 | ts_getBoundProfilePackageResponseEsipa := { |
| 325 | getBoundProfilePackageResponseEsipa := { |
| 326 | getBoundProfilePackageOkEsipa := { |
| 327 | transactionId := omit, |
| 328 | boundProfilePackage := ts_boundProfilePackage |
| 329 | } |
| 330 | } |
| 331 | } |
| 332 | |
| 333 | /* GSMA SGP.32, section 5.9.1 */ |
| 334 | template (present) EuiccPackageResult |
| 335 | tr_euiccPackageResult := { |
| 336 | euiccPackageResultSigned := { |
| 337 | euiccPackageResultDataSigned := { |
| 338 | eimId := ?, |
| 339 | counterValue := ?, |
| 340 | transactionId := *, |
| 341 | seqNumber := ?, |
| 342 | euiccResult := ? |
| 343 | }, |
| 344 | euiccSignEPR := ? |
| 345 | } |
| 346 | } |
| 347 | template (value) EuiccPackageResult |
| 348 | ts_euiccPackageResult := { |
| 349 | euiccPackageResultSigned := { |
| 350 | euiccPackageResultDataSigned := { |
| 351 | eimId := "myEim", |
| 352 | counterValue := 333, |
| 353 | transactionId := omit, |
| 354 | seqNumber := 1234, |
| 355 | euiccResult := { |
| 356 | { |
Philipp Maier | ac10cee | 2024-04-10 15:51:47 +0200 | [diff] [blame^] | 357 | enableResult := 0 |
Philipp Maier | 08902cf | 2024-03-04 10:32:55 +0100 | [diff] [blame] | 358 | } |
| 359 | } |
| 360 | }, |
| 361 | euiccSignEPR := 'AABBCCDDEEFF'O |
| 362 | } |
| 363 | } |
| 364 | |
| 365 | /* GSMA SGP.32, section 6.3.2.7 */ |
| 366 | /* TODO rename tr_provideEimPackageResultResponse to something like tr_provideEimPackageResultResponse_eimAck */ |
| 367 | template (present) EsipaMessageFromEimToIpa |
| 368 | tr_provideEimPackageResultResponse := { |
| 369 | provideEimPackageResultResponse := { |
| 370 | eimAcknowledgements := * |
| 371 | } |
| 372 | } |
| 373 | template (value) EsipaMessageFromEimToIpa |
| 374 | ts_provideEimPackageResultResponse(template (value) EimAcknowledgements eimAcknowledgements := {}) := { |
| 375 | provideEimPackageResultResponse := { |
| 376 | eimAcknowledgements := eimAcknowledgements |
| 377 | } |
| 378 | } |
| 379 | |
| 380 | /* GSMA SGP.32, section 2.11.1.2 */ |
| 381 | template (present) GetCertsResponse |
| 382 | tr_getCertsResponse := { |
| 383 | certs := { |
| 384 | eumCertificate := ?, |
| 385 | euiccCertificate := ? |
| 386 | } |
| 387 | } |
| 388 | template (value) GetCertsResponse |
| 389 | ts_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 */ |
| 397 | template (present) GetEimConfigurationDataResponse |
| 398 | tr_getEimConfigurationDataResponse := { |
| 399 | eimConfigurationDataList := ? |
| 400 | } |
| 401 | template (value) GetEimConfigurationDataResponse |
| 402 | ts_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 */ |
| 419 | template (present) AddInitialEimResponse |
| 420 | tr_addInitialEimResponse := { |
| 421 | addInitialEimOk := ? |
| 422 | } |
| 423 | template (value) AddInitialEimResponse |
Philipp Maier | d9887d3 | 2024-04-10 15:48:05 +0200 | [diff] [blame] | 424 | ts_addInitialEimResponse := { |
Philipp Maier | 08902cf | 2024-03-04 10:32:55 +0100 | [diff] [blame] | 425 | addInitialEimOk := { |
| 426 | { |
| 427 | addOk := NULL |
| 428 | } |
| 429 | } |
| 430 | } |
| 431 | |
Philipp Maier | 978ab44 | 2024-04-10 15:46:45 +0200 | [diff] [blame] | 432 | } |