| /* SGP22 Templates in TTCN-3 |
| * |
| * Author: Philipp Maier <pmaier@sysmocom.de> / sysmocom - s.f.m.c. GmbH |
| * |
| * Released under the terms of GNU General Public License, Version 2 or |
| * (at your option) any later version. |
| * |
| * SPDX-License-Identifier: GPL-2.0-or-later |
| */ |
| |
| module RSPDefinitions_Templates { |
| |
| import from PEDefinitions all; |
| import from RSPDefinitions all; |
| import from RSPDefinitions_Types all; |
| |
| import from PKIX1Explicit88 all; |
| import from PKIX1Explicit88_Templates all; |
| import from PKIX1Explicit88_Types all; |
| |
| import from PKIX1Implicit88 all; |
| |
| /* GSMA SGP.22, section 2.5.4 */ |
| template (present) BoundProfilePackage |
| tr_boundProfilePackage := { |
| initialiseSecureChannelRequest := { |
| remoteOpId := ?, |
| transactionId := ?, |
| controlRefTemplate := { |
| keyType := ?, |
| keyLen := ?, |
| hostId := ? |
| }, |
| smdpOtpk := ?, |
| smdpSign := ? |
| }, |
| /* ES8+.ConfigureISDP */ |
| firstSequenceOf87 := ?, |
| /* ES8+.StoreMetadata */ |
| sequenceOf88 := ?, |
| /* ES8+.ReplaceSessionKeys (optional) */ |
| secondSequenceOf87 := *, |
| /* ES8+.LoadProfileElements */ |
| sequenceOf86 := ? |
| } |
| template (value) BoundProfilePackage |
| ts_boundProfilePackage := { |
| initialiseSecureChannelRequest := { |
| remoteOpId := 1, |
| transactionId := 'AABBCC'O, |
| controlRefTemplate := { |
| keyType := '88'O, /* AES */ |
| keyLen := '10'O, /* 16 byte key-length */ |
| hostId := '01020304050607080910111213141516'O |
| }, |
| smdpOtpk := '1122334455667788'O, |
| smdpSign := 'AABBCCDDEEFF0000'O |
| }, |
| /* ES8+.ConfigureISDP */ |
| firstSequenceOf87 := {'41414141414141414141414141414141414141414141414141414141414141'O, |
| '42424242424242424242424242424242424242424242424242424242424242'O, |
| '43434343434343434343434343434343434343434343434343434343434343'O}, |
| /* ES8+.StoreMetadata */ |
| sequenceOf88 := {'444444444444444444444444444444444444444444'O, |
| '454545454545454545454545454545454545454545'O, |
| '464646464646464646464646464646464646464646'O}, |
| /* ES8+.ReplaceSessionKeys (optional) */ |
| secondSequenceOf87 := omit, |
| /* ES8+.LoadProfileElements */ |
| sequenceOf86 := {'474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747'O, |
| '484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848'O, |
| '494949494949494949494949494949494949494949494949494949494949494949494949494949494949494949494949494949494949494949494949'O, |
| '505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050'O, |
| '515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151'O} |
| } |
| |
| /* GSMA SGP.22, section 2.5.6 */ |
| template (present) ProfileInstallationResult |
| tr_profileInstallationResult := { |
| profileInstallationResultData := { |
| transactionId := ?, |
| notificationMetadata := { |
| seqNumber := ?, |
| profileManagementOperation := ?, |
| notificationAddress := ?, |
| iccid := * |
| }, |
| smdpOid := ?, |
| finalResult := ? |
| }, |
| euiccSignPIR := ? |
| } |
| template (value) ProfileInstallationResult |
| ts_profileInstallationResult := { |
| profileInstallationResultData := { |
| transactionId := 'AABBCC'O, |
| notificationMetadata := { |
| seqNumber := 1234, |
| profileManagementOperation := '01'B, /* is this correct? (notificationInstall) */ |
| notificationAddress := "smdp.example.com", |
| iccid := omit |
| }, |
| smdpOid := id_rsp, /* random OBJECT IDENTIFIER for testing */ |
| finalResult := { |
| successResult := { |
| aid := '0102030405'O, |
| simaResponse := '4141414141414141414141414141414141414141414141414141'O |
| } |
| } |
| }, |
| euiccSignPIR := '00112233445566778899AABBCCDDEEFF'O |
| } |
| |
| |
| /* GSMA SGP.22, section 5.6.1 (ES9+) */ |
| template (present) RemoteProfileProvisioningRequest |
| tr_initiateAuthenticationRequest(template (present) octetstring euiccChallenge := ?, |
| template (present) charstring smdpAddress := ?, |
| template (present) EUICCInfo1 euiccInfo1 := ?) := { |
| initiateAuthenticationRequest := { |
| euiccChallenge := euiccChallenge, |
| smdpAddress := smdpAddress, |
| euiccInfo1 := euiccInfo1 |
| } |
| } |
| template (value) RemoteProfileProvisioningRequest |
| ts_initiateAuthenticationRequest(template (value) octetstring euiccChallenge, |
| template (value) charstring smdpAddress, |
| template (value) EUICCInfo1 euiccInfo1) := { |
| initiateAuthenticationRequest := { |
| euiccChallenge := euiccChallenge, |
| smdpAddress := smdpAddress, |
| euiccInfo1 := euiccInfo1 |
| } |
| } |
| template (present) RemoteProfileProvisioningResponse |
| tr_initiateAuthenticationResponse(template (present) octetstring transactionId := ?, |
| template (present) ServerSigned1 serverSigned1 := ?, |
| template (present) octetstring serverSignature1 := ?, |
| template (present) SubjectKeyIdentifier euiccCiPKIdToBeUsed := ?, |
| template (present) Certificate serverCertificate := ?) := { |
| initiateAuthenticationResponse := { |
| initiateAuthenticationOk := { |
| transactionId := transactionId, |
| serverSigned1 := serverSigned1, |
| serverSignature1 := serverSignature1, |
| euiccCiPKIdToBeUsed := euiccCiPKIdToBeUsed, |
| serverCertificate := serverCertificate |
| } |
| } |
| } |
| template (value) RemoteProfileProvisioningResponse |
| ts_initiateAuthenticationResponse(template (value) octetstring transactionId, |
| template (value) ServerSigned1 serverSigned1, |
| template (value) octetstring serverSignature1, |
| template (value) SubjectKeyIdentifier euiccCiPKIdToBeUsed, |
| template (value) Certificate serverCertificate) := { |
| initiateAuthenticationResponse := { |
| initiateAuthenticationOk := { |
| transactionId := transactionId, |
| serverSigned1 := serverSigned1, |
| serverSignature1 := serverSignature1, |
| euiccCiPKIdToBeUsed := euiccCiPKIdToBeUsed, |
| serverCertificate := serverCertificate |
| } |
| } |
| } |
| |
| /* GSMA SGP.22, section 5.6.2 (ES9+) */ |
| template (present) RemoteProfileProvisioningRequest |
| tr_getBoundProfilePackageRequest(template (present) octetstring transactionId := ?, |
| template (present) PrepareDownloadResponse prepareDownloadResponse := ?) := { |
| getBoundProfilePackageRequest := { |
| transactionId := transactionId, |
| prepareDownloadResponse := prepareDownloadResponse |
| } |
| } |
| template (value) RemoteProfileProvisioningRequest |
| ts_getBoundProfilePackageRequest(template (value) octetstring transactionId, |
| template (value) PrepareDownloadResponse prepareDownloadResponse) := { |
| getBoundProfilePackageRequest := { |
| transactionId := transactionId, |
| prepareDownloadResponse := prepareDownloadResponse |
| } |
| } |
| template (present) RemoteProfileProvisioningResponse |
| tr_getBoundProfilePackageResponse(template (present) octetstring transactionId := ?, |
| template (present) BoundProfilePackage boundProfilePackage := ?) := { |
| getBoundProfilePackageResponse := { |
| getBoundProfilePackageOk := { |
| transactionId := transactionId, |
| boundProfilePackage := boundProfilePackage |
| } |
| } |
| } |
| template (value) RemoteProfileProvisioningResponse |
| ts_getBoundProfilePackageResponse(template (value) octetstring transactionId, |
| template (value) BoundProfilePackage boundProfilePackage) := { |
| getBoundProfilePackageResponse := { |
| getBoundProfilePackageOk := { |
| transactionId := transactionId, |
| boundProfilePackage := boundProfilePackage |
| } |
| } |
| } |
| |
| /* GSMA SGP.22, section 5.6.3 (ES9+) */ |
| template (present) RemoteProfileProvisioningRequest |
| tr_authenticateClientRequest(template (present) octetstring transactionId := ?, |
| template (present) AuthenticateServerResponse authenticateServerResponse := ?) := { |
| authenticateClientRequest := { |
| transactionId := transactionId, |
| authenticateServerResponse := authenticateServerResponse |
| } |
| } |
| template (value) RemoteProfileProvisioningRequest |
| ts_authenticateClientRequest(template (value) octetstring transactionId, |
| template (value) AuthenticateServerResponse authenticateServerResponse) := { |
| authenticateClientRequest := { |
| transactionId := transactionId, |
| authenticateServerResponse := authenticateServerResponse |
| } |
| } |
| template (present) RemoteProfileProvisioningResponse |
| tr_authenticateClientResponseEs9(template (present) octetstring transactionId := ?, |
| template (present) StoreMetadataRequest profileMetaData := ?, |
| template (present) SmdpSigned2 smdpSigned2 := ?, |
| template (present) octetstring smdpSignature2 := ?, |
| template (present) Certificate smdpCertificate := ?) := { |
| authenticateClientResponseEs9 := { |
| authenticateClientOk := { |
| transactionId := transactionId, |
| profileMetaData := profileMetaData, |
| smdpSigned2 := smdpSigned2, |
| smdpSignature2 := smdpSignature2, |
| smdpCertificate := smdpCertificate |
| } |
| } |
| } |
| template (value) RemoteProfileProvisioningResponse |
| ts_authenticateClientResponseEs9(template (value) octetstring transactionId, |
| template (value) StoreMetadataRequest profileMetaData, |
| template (value) SmdpSigned2 smdpSigned2, |
| template (value) octetstring smdpSignature2, |
| template (value) Certificate smdpCertificate) := { |
| authenticateClientResponseEs9 := { |
| authenticateClientOk := { |
| transactionId := transactionId, |
| profileMetaData := profileMetaData, |
| smdpSigned2 := smdpSigned2, |
| smdpSignature2 := smdpSignature2, |
| smdpCertificate := smdpCertificate |
| } |
| } |
| } |
| |
| /* GSMA SGP.22, section 5.6.4 (ES9+) */ |
| template (present) RemoteProfileProvisioningRequest |
| tr_handleNotification(template (present) PendingNotification pendingNotification := ?) := { |
| handleNotification := { |
| pendingNotification := pendingNotification |
| } |
| } |
| template (value) RemoteProfileProvisioningRequest |
| ts_handleNotification(template (value) PendingNotification pendingNotification) := { |
| handleNotification := { |
| pendingNotification := pendingNotification |
| } |
| } |
| |
| /* GSMA SGP.22, section 5.6.5 (ES9+) */ |
| template (present) RemoteProfileProvisioningRequest |
| tr_cancelSessionRequestEs9(template (present) octetstring transactionId := ?, |
| template (present) CancelSessionResponse cancelSessionResponse := ?) := { |
| cancelSessionRequestEs9 := { |
| transactionId := transactionId, |
| cancelSessionResponse := cancelSessionResponse |
| } |
| } |
| template (value) RemoteProfileProvisioningRequest |
| ts_cancelSessionRequestEs9(template (value) octetstring transactionId, |
| template (value) CancelSessionResponse cancelSessionResponse) := { |
| cancelSessionRequestEs9 := { |
| transactionId := transactionId, |
| cancelSessionResponse := cancelSessionResponse |
| } |
| } |
| template (present) RemoteProfileProvisioningResponse |
| tr_cancelSessionResponseEs9 := { |
| cancelSessionResponseEs9 := { |
| cancelSessionOk := { } /* This function has no output data */ |
| } |
| } |
| template (value) RemoteProfileProvisioningResponse |
| ts_cancelSessionResponseEs9 := { |
| cancelSessionResponseEs9 := { |
| cancelSessionOk := { } /* This function has no output data */ |
| } |
| } |
| |
| |
| /* GSMA SGP.22, section 5.7.3 (ES10x) */ |
| template (present) EuiccConfiguredAddressesResponse |
| tr_euiccConfiguredAddressesResponse := { |
| defaultDpAddress := *, |
| rootDsAddress := ? |
| } |
| template (value) EuiccConfiguredAddressesResponse |
| ts_euiccConfiguredAddressesResponse := { |
| defaultDpAddress := "smdp.example.com", |
| rootDsAddress := "smds.example.com" |
| } |
| |
| /* GSMA SGP.22, section 5.7.5 (ES10x) */ |
| template (present) PrepareDownloadResponse |
| tr_prepareDownloadResponse := { |
| downloadResponseOk := { |
| euiccSigned2 := { |
| transactionId := ?, |
| euiccOtpk := ?, |
| hashCc := * |
| }, |
| euiccSignature2 := ? |
| } |
| } |
| template (value) PrepareDownloadResponse |
| ts_prepareDownloadResponse := { |
| downloadResponseOk := { |
| euiccSigned2 := { |
| transactionId := 'ABCDEF'O, |
| euiccOtpk := 'AABBCCDDEEFF'O, |
| hashCc := omit |
| }, |
| euiccSignature2 := 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'O |
| } |
| } |
| |
| /* GSMA SGP.22, section 5.7.7 (ES10x) */ |
| template (present) GetEuiccChallengeResponse |
| tr_GetEuiccChallengeResponse := { |
| euiccChallenge := ? |
| } |
| template (value) GetEuiccChallengeResponse |
| ts_GetEuiccChallengeResponse(template (value) octetstring euiccChallenge := '00112233445566778899AABBCCDDEEFF'O) := { |
| euiccChallenge := euiccChallenge |
| } |
| |
| /* GSMA SGP.22, section 5.7.8 (ES10x) */ |
| template (present) EUICCInfo1 |
| tr_EUICCInfo1 := { |
| svn := ?, |
| euiccCiPKIdListForVerification := ?, |
| euiccCiPKIdListForSigning := ? |
| } |
| template (value) EUICCInfo1 |
| ts_EUICCInfo1 := { |
| svn := '020200'O, |
| euiccCiPKIdListForVerification := { |
| 'C0BC70BA36929D43B467FF57570530E57AB8FCD8'O, |
| 'F54172BDF98A95D65CBEB88A38A1C11D800A85C3'O |
| }, |
| euiccCiPKIdListForSigning := { |
| 'C0BC70BA36929D43B467FF57570530E57AB8FCD8'O, |
| 'F54172BDF98A95D65CBEB88A38A1C11D800A85C3'O |
| } |
| } |
| |
| /* GSMA SGP.22, section 5.7.8 (ES10x) */ |
| template (present) EUICCInfo2 |
| tr_EUICCInfo2 := { |
| profileVersion := ?, |
| svn := ?, |
| euiccFirmwareVer := ?, |
| extCardResource := ?, |
| uiccCapability := ?, |
| ts102241Version := *, |
| globalplatformVersion := *, |
| rspCapability := ?, |
| euiccCiPKIdListForVerification := ?, |
| euiccCiPKIdListForSigning := ?, |
| euiccCategory := *, |
| forbiddenProfilePolicyRules := *, |
| ppVersion := ?, |
| sasAcreditationNumber := ?, |
| certificationDataObject := *, |
| treProperties := *, |
| treProductReference := *, |
| additionalEuiccProfilePackageVersions := * |
| } |
| template (value) EUICCInfo2 |
| ts_EUICCInfo2 := { |
| profileVersion := '414243'O, |
| svn := '02000C'O, |
| euiccFirmwareVer := '414243'O, |
| extCardResource := '414243'O, |
| uiccCapability := '1111111111111111111'B, |
| ts102241Version := omit, |
| globalplatformVersion := omit, |
| rspCapability := '1111'B, |
| euiccCiPKIdListForVerification := { |
| 'C0BC70BA36929D43B467FF57570530E57AB8FCD8'O, |
| 'F54172BDF98A95D65CBEB88A38A1C11D800A85C3'O |
| }, |
| euiccCiPKIdListForSigning := { |
| 'C0BC70BA36929D43B467FF57570530E57AB8FCD8'O, |
| 'F54172BDF98A95D65CBEB88A38A1C11D800A85C3'O |
| }, |
| euiccCategory := omit, |
| forbiddenProfilePolicyRules := omit, |
| ppVersion := '414243'O, |
| sasAcreditationNumber := "123456", |
| certificationDataObject := omit, |
| treProperties := omit, |
| treProductReference := omit, |
| additionalEuiccProfilePackageVersions := omit |
| } |
| |
| /* GSMA SGP.22, section 5.7.10 (ES10x) */ |
| template (value) RetrieveNotificationsListResponse |
| ts_retrieveNotificationsListResponse := { |
| notificationList := { |
| { |
| profileInstallationResult := { |
| profileInstallationResultData := { |
| transactionId := 'AABBCC'O, |
| notificationMetadata := { |
| seqNumber := 1234, |
| profileManagementOperation := '01'B, /* is this correct? (notificationInstall) */ |
| notificationAddress := "smdp.example.com", |
| iccid := omit |
| }, |
| smdpOid := id_rsp, /* random OBJECT IDENTIFIER for testing */ |
| finalResult := { |
| successResult := { |
| aid := 'A0000005591010FFFFFFFF8900000D00'O, |
| simaResponse := 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'O |
| } |
| } |
| }, |
| euiccSignPIR := 'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB'O |
| } |
| } |
| } |
| } |
| |
| /* GSMA SGP.22, section 5.7.11 (ES10x) */ |
| template (present) NotificationSentResponse |
| tr_notificationSentResponse := { |
| deleteNotificationStatus := ? |
| } |
| template (value) NotificationSentResponse |
| ts_notificationSentResponse := { |
| deleteNotificationStatus := 0 /* 0k */ |
| } |
| |
| /* GSMA SGP.22, section 5.7.13 (ES10x) */ |
| template (present) AuthenticateServerResponse |
| tr_authenticateServerResponse := { |
| authenticateResponseOk := { |
| euiccSigned1 := { |
| transactionId := ?, |
| serverAddress := ?, |
| serverChallenge := ?, |
| euiccInfo2 := ?, |
| ctxParams1 := { |
| ctxParamsForCommonAuthentication := { |
| matchingId := *, |
| deviceInfo := { |
| tac := ?, |
| deviceCapabilities := { |
| gsmSupportedRelease := *, |
| utranSupportedRelease := *, |
| cdma2000onexSupportedRelease := *, |
| cdma2000hrpdSupportedRelease := *, |
| cdma2000ehrpdSupportedRelease := *, |
| eutranEpcSupportedRelease := *, |
| contactlessSupportedRelease := *, |
| rspCrlSupportedVersion := *, |
| nrEpcSupportedRelease := *, |
| nr5gcSupportedRelease := *, |
| eutran5gcSupportedRelease := *, |
| lpaSvn := *, |
| catSupportedClasses := *, |
| euiccFormFactorType := *, |
| deviceAdditionalFeatureSupport := * |
| }, |
| imei := * |
| } |
| } |
| } |
| }, |
| euiccSignature1 := ?, |
| euiccCertificate := ?, |
| eumCertificate := ? |
| } |
| } |
| template (value) AuthenticateServerResponse |
| ts_authenticateServerResponse := { |
| authenticateResponseOk := { |
| euiccSigned1 := { |
| transactionId := 'ABCDEF'O, |
| serverAddress := "smdp.example.com", |
| serverChallenge := '01020304050607080910111213141516'O, |
| euiccInfo2 := ts_EUICCInfo2, |
| ctxParams1 := { |
| ctxParamsForCommonAuthentication := { |
| matchingId := omit, |
| deviceInfo := { |
| tac := '12345678'O, |
| deviceCapabilities := { |
| gsmSupportedRelease := omit, |
| utranSupportedRelease := omit, |
| cdma2000onexSupportedRelease := omit, |
| cdma2000hrpdSupportedRelease := omit, |
| cdma2000ehrpdSupportedRelease := omit, |
| eutranEpcSupportedRelease := omit, |
| contactlessSupportedRelease := omit, |
| rspCrlSupportedVersion := omit, |
| nrEpcSupportedRelease := omit, |
| nr5gcSupportedRelease := omit, |
| eutran5gcSupportedRelease := omit, |
| lpaSvn := omit, |
| catSupportedClasses := omit, |
| euiccFormFactorType := omit, |
| deviceAdditionalFeatureSupport := omit |
| }, |
| imei := omit |
| } |
| } |
| } |
| }, |
| euiccSignature1 := '12345678'O, |
| euiccCertificate := ts_cert_euicc_nist, |
| // euiccCertificate := ts_cert_euicc_brp, |
| eumCertificate := ts_cert_eum_nist |
| // eumCertificate := ts_cert_eum_brp |
| |
| } |
| } |
| |
| /* GSMA SGP.22, section 5.7.13 (ES10x) */ |
| template (present) CancelSessionResponseOk |
| tr_cancelSessionResponseOk := { |
| euiccCancelSessionSigned := { |
| transactionId := ?, |
| smdpOid := ?, |
| reason := ? |
| }, |
| euiccCancelSessionSignature := ? |
| } |
| template (value) CancelSessionResponseOk |
| ts_cancelSessionResponseOk := { |
| euiccCancelSessionSigned := { |
| transactionId := 'AABBCC'O, |
| smdpOid := id_rspRole_euicc, |
| reason := 5 |
| }, |
| euiccCancelSessionSignature := '1234567890'O |
| } |
| template (present) CancelSessionResponse |
| tr_cancelSessionResponse := { |
| cancelSessionResponseOk := tr_cancelSessionResponseOk |
| } |
| template (value) CancelSessionResponse |
| ts_cancelSessionResponse := { |
| cancelSessionResponseOk := ts_cancelSessionResponseOk |
| } |
| |
| /* GSMA SGP.22, section 5.7.20 (ES10x) */ |
| template (present) GetEuiccDataResponse |
| tr_getEuiccDataResponse := { |
| eidValue := ? |
| } |
| template (value) GetEuiccDataResponse |
| ts_getEuiccDataResponse(template (value) octetstring eidValue := '000102030405060708090A0B0C0D0E0F'O) := { |
| eidValue := eidValue |
| } |
| |
| } |