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 | { |
| 262 | configureAutoEnable := { |
| 263 | autoEnableFlag := NULL, |
| 264 | smdpOid := omit, |
| 265 | smdpAddress := omit |
| 266 | } |
| 267 | } |
| 268 | } |
| 269 | } |
| 270 | }, |
| 271 | eimSignature := '1234567890'O |
| 272 | } |
| 273 | } |
| 274 | } |
| 275 | |
| 276 | /* GSMA SGP.32, section 6.3.2.5 */ |
| 277 | template (present) EsipaMessageFromIpaToEim |
| 278 | tr_cancelSessionRequestEsipa := { |
| 279 | cancelSessionRequestEsipa := { |
| 280 | transactionId := ?, |
| 281 | cancelSessionResponse := { |
| 282 | cancelSessionResponseOk := tr_cancelSessionResponseOk |
| 283 | } |
| 284 | } |
| 285 | } |
| 286 | template (value) EsipaMessageFromIpaToEim |
| 287 | ts_cancelSessionRequestEsipa := { |
| 288 | cancelSessionRequestEsipa := { |
| 289 | transactionId := 'AABBCC'O, |
| 290 | cancelSessionResponse := { |
| 291 | cancelSessionResponseOk := ts_cancelSessionResponseOk |
| 292 | } |
| 293 | } |
| 294 | } |
| 295 | |
| 296 | /* GSMA SGP.32, section 6.3.2.5 */ |
| 297 | template (present) EsipaMessageFromEimToIpa |
| 298 | tr_cancelSessionResponseEsipa := { |
| 299 | cancelSessionResponseEsipa := { |
| 300 | cancelSessionOk := { |
| 301 | /* This function has no output data */ |
| 302 | } |
| 303 | } |
| 304 | } |
| 305 | template (value) EsipaMessageFromEimToIpa |
| 306 | ts_cancelSessionResponseEsipa := { |
| 307 | cancelSessionResponseEsipa := { |
| 308 | cancelSessionOk := { |
| 309 | /* This function has no output data */ |
| 310 | } |
| 311 | } |
| 312 | } |
| 313 | |
| 314 | /* GSMA SGP.32, section 6.3.2.3 */ |
| 315 | template (present) EsipaMessageFromEimToIpa |
| 316 | tr_getBoundProfilePackageResponseEsipa := { |
| 317 | getBoundProfilePackageResponseEsipa := { |
| 318 | getBoundProfilePackageOkEsipa := { |
| 319 | transactionId := *, |
| 320 | boundProfilePackage := tr_boundProfilePackage |
| 321 | } |
| 322 | } |
| 323 | } |
| 324 | template (value) EsipaMessageFromEimToIpa |
| 325 | ts_getBoundProfilePackageResponseEsipa := { |
| 326 | getBoundProfilePackageResponseEsipa := { |
| 327 | getBoundProfilePackageOkEsipa := { |
| 328 | transactionId := omit, |
| 329 | boundProfilePackage := ts_boundProfilePackage |
| 330 | } |
| 331 | } |
| 332 | } |
| 333 | |
| 334 | /* GSMA SGP.32, section 5.9.1 */ |
| 335 | template (present) EuiccPackageResult |
| 336 | tr_euiccPackageResult := { |
| 337 | euiccPackageResultSigned := { |
| 338 | euiccPackageResultDataSigned := { |
| 339 | eimId := ?, |
| 340 | counterValue := ?, |
| 341 | transactionId := *, |
| 342 | seqNumber := ?, |
| 343 | euiccResult := ? |
| 344 | }, |
| 345 | euiccSignEPR := ? |
| 346 | } |
| 347 | } |
| 348 | template (value) EuiccPackageResult |
| 349 | ts_euiccPackageResult := { |
| 350 | euiccPackageResultSigned := { |
| 351 | euiccPackageResultDataSigned := { |
| 352 | eimId := "myEim", |
| 353 | counterValue := 333, |
| 354 | transactionId := omit, |
| 355 | seqNumber := 1234, |
| 356 | euiccResult := { |
| 357 | { |
| 358 | configureAutoEnableResult := 0 |
| 359 | } |
| 360 | } |
| 361 | }, |
| 362 | euiccSignEPR := 'AABBCCDDEEFF'O |
| 363 | } |
| 364 | } |
| 365 | |
| 366 | /* GSMA SGP.32, section 6.3.2.7 */ |
| 367 | /* TODO rename tr_provideEimPackageResultResponse to something like tr_provideEimPackageResultResponse_eimAck */ |
| 368 | template (present) EsipaMessageFromEimToIpa |
| 369 | tr_provideEimPackageResultResponse := { |
| 370 | provideEimPackageResultResponse := { |
| 371 | eimAcknowledgements := * |
| 372 | } |
| 373 | } |
| 374 | template (value) EsipaMessageFromEimToIpa |
| 375 | ts_provideEimPackageResultResponse(template (value) EimAcknowledgements eimAcknowledgements := {}) := { |
| 376 | provideEimPackageResultResponse := { |
| 377 | eimAcknowledgements := eimAcknowledgements |
| 378 | } |
| 379 | } |
| 380 | |
| 381 | /* GSMA SGP.32, section 2.11.1.2 */ |
| 382 | template (present) GetCertsResponse |
| 383 | tr_getCertsResponse := { |
| 384 | certs := { |
| 385 | eumCertificate := ?, |
| 386 | euiccCertificate := ? |
| 387 | } |
| 388 | } |
| 389 | template (value) GetCertsResponse |
| 390 | ts_getCertsResponse := { |
| 391 | certs := { |
| 392 | eumCertificate := ts_cert_s_sm_dpauth_nist, |
| 393 | euiccCertificate := ts_cert_eum_nist |
| 394 | } |
| 395 | } |
| 396 | |
| 397 | /* GSMA SGP.32, section 5.9.18 */ |
| 398 | template (present) GetEimConfigurationDataResponse |
| 399 | tr_getEimConfigurationDataResponse := { |
| 400 | eimConfigurationDataList := ? |
| 401 | } |
| 402 | template (value) GetEimConfigurationDataResponse |
| 403 | ts_getEimConfigurationDataResponse(template (value) charstring eimFqdn := "127.0.0.1") := { |
| 404 | eimConfigurationDataList := { |
| 405 | { |
| 406 | eimId := "myEIM", |
| 407 | eimFqdn := eimFqdn, |
| 408 | eimIdType := omit, |
| 409 | counterValue := omit, |
| 410 | associationToken := 123, |
| 411 | eimPublicKeyData := omit, |
| 412 | trustedPublicKeyDataTls := omit, |
| 413 | eimSupportedProtocol := omit, |
| 414 | euiccCiPKId := omit |
| 415 | } |
| 416 | } |
| 417 | } |
| 418 | |
| 419 | /* GSMA SGP.32, section 5.9.4 */ |
| 420 | template (present) AddInitialEimResponse |
| 421 | tr_addInitialEimResponse := { |
| 422 | addInitialEimOk := ? |
| 423 | } |
| 424 | template (value) AddInitialEimResponse |
Philipp Maier | d9887d3 | 2024-04-10 15:48:05 +0200 | [diff] [blame^] | 425 | ts_addInitialEimResponse := { |
Philipp Maier | 08902cf | 2024-03-04 10:32:55 +0100 | [diff] [blame] | 426 | addInitialEimOk := { |
| 427 | { |
| 428 | addOk := NULL |
| 429 | } |
| 430 | } |
| 431 | } |
| 432 | |
| 433 | } |