dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/onomondo-eim/+/42870?usp=email )
Change subject: asn1/SGP32Definitions: apply workarounds ......................................................................
asn1/SGP32Definitions: apply workarounds
- Some ASN.1 structs from SGP.22 are re-defined under the same name by SGP.32. This leads to name clashes, which most ASN.1 compilers have problems with. Prefixing the re-defined struct in SGP.32 with "SGP32-" solves the problem.
- The erlang asn1ct ASN.1 compiler seems to misinterpret the ASN.1 spec when a context specific tag is used (redundently) on a child struct definition and in the parent definition at the same time. Removing te context specific tag on the child struct definition solves the problem.
Change-Id: Id90b005fc3c8c8f737b0c740d4c067f90842a1fe Related: SYS#8100 --- M asn1/SGP32Definitions.asn1 1 file changed, 73 insertions(+), 44 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/onomondo-eim refs/changes/70/42870/1
diff --git a/asn1/SGP32Definitions.asn1 b/asn1/SGP32Definitions.asn1 index 290ca2b..dffa6c8 100644 --- a/asn1/SGP32Definitions.asn1 +++ b/asn1/SGP32Definitions.asn1 @@ -78,7 +78,7 @@ }, setFallbackAttribute [8] SEQUENCE {iccid [APPLICATION 26] Iccid}, unsetFallbackAttribute [9] SEQUENCE {}, - setDefaultDpAddress [101] SetDefaultDpAddressRequest -- Tag 'BF65' + setDefaultDpAddress [101] SGP32-SetDefaultDpAddressRequest -- Tag 'BF65' } IpaEuiccDataRequest ::= [82] SEQUENCE { -- Tag BF52 tagList [APPLICATION 28] OCTET STRING, -- Tag '5C' @@ -105,7 +105,8 @@ } EimAcknowledgements ::= [83] SEQUENCE OF SequenceNumber -- Tag BF53 SequenceNumber ::= [0] INTEGER -EuiccPackageResult ::= [81] CHOICE { -- Tag 'BF51' #SupportedForPsmoV1.0.0# +-- workaround for erlang asn1ct: remove already specified context-specific tag [81] +EuiccPackageResult ::= CHOICE { -- Tag 'BF51' #SupportedForPsmoV1.0.0# euiccPackageResultSigned EuiccPackageResultSigned, euiccPackageErrorSigned EuiccPackageErrorSigned, euiccPackageErrorUnsigned EuiccPackageErrorUnsigned @@ -125,7 +126,7 @@ enableResult [3] EnableProfileResult, disableResult [4] DisableProfileResult, deleteResult [5] DeleteProfileResult, - listProfileInfoResult [45] ProfileInfoListResponse, + listProfileInfoResult [45] SGP32-ProfileInfoListResponse, getRATResult [6] RulesAuthorisationTable, -- see SGP.22 configureImmediateEnableResult [7] ConfigureImmediateEnableResult, addEimResult [8] AddEimResult, @@ -141,7 +142,7 @@ interruption(3), undefinedError(127) }, - setDefaultDpAddressResult [101] SetDefaultDpAddressResponse + setDefaultDpAddressResult [101] SGP32-SetDefaultDpAddressResponse } EuiccPackageErrorSigned ::= SEQUENCE { euiccPackageErrorDataSigned EuiccPackageErrorDataSigned, @@ -198,11 +199,14 @@ returnFallbackProfile(21), undefinedError(127) } -ProfileInfoListResponse ::= [45] CHOICE { - profileInfoListOk SEQUENCE OF ProfileInfo, -- see SGP.22 - profileInfoListError ProfileInfoListError +-- workaround for erlang asn1ct: remove already specified context-specific tag [45] +-- workaround: add prefix ("SGP32-") to avoid clash with SGP.22 +SGP32-ProfileInfoListResponse ::= CHOICE { + profileInfoListOk SEQUENCE OF SGP32-ProfileInfo, -- see SGP.22 + profileInfoListError SGP32-ProfileInfoListError } -ProfileInfoListError ::= INTEGER { +-- workaround: add prefix ("SGP32-") to avoid clash with SGP.22 +SGP32-ProfileInfoListError ::= INTEGER { incorrectInputValues(1), profileChangeOngoing (11), undefinedError(127) @@ -275,12 +279,13 @@ ipaEuiccDataErrorCode IpaEuiccDataErrorCode }
-IpaEuiccDataResponse ::= [82] CHOICE { -- Tag 'BF52' +-- workaround for erlang asn1ct: remove already specified context-specific tag [82] +IpaEuiccDataResponse ::= CHOICE { -- Tag 'BF52' ipaEuiccData IpaEuiccData, ipaEuiccDataResponseError IpaEuiccDataResponseError }
-PendingNotificationList ::= SEQUENCE OF PendingNotification +PendingNotificationList ::= SEQUENCE OF SGP32-PendingNotification EuiccPackageResultList ::= SEQUENCE OF EuiccPackageResult
IpaEuiccData ::= SEQUENCE { @@ -288,7 +293,7 @@ defaultSmdpAddress [1] UTF8String OPTIONAL, -- Tag '81' euiccPackageResultList [2] EuiccPackageResultList OPTIONAL, -- Tag 'A2' euiccInfo1 [32] EUICCInfo1 OPTIONAL, -- Tag 'BF20' - euiccInfo2 [34] EUICCInfo2 OPTIONAL, -- Tag 'BF22' + euiccInfo2 [34] SGP32-EUICCInfo2 OPTIONAL, -- Tag 'BF22' rootSmdsAddress [3] UTF8String OPTIONAL, -- Tag '83' associationToken [4] INTEGER OPTIONAL, -- Tag '84' eumCertificate [5] Certificate OPTIONAL, -- Tag 'A5' @@ -300,7 +305,7 @@ ProfileDownloadTriggerResult ::= [84] SEQUENCE { -- tag 'BF54' eimTransactionId [2] TransactionId OPTIONAL, profileDownloadTriggerResultData CHOICE { - profileInstallationResult [55] ProfileInstallationResult, -- see SGP.22 [4] + profileInstallationResult [55] SGP32-ProfileInstallationResult, -- see SGP.22 [4] profileDownloadError SEQUENCE { profileDownloadErrorReason [0] INTEGER { ecallActive (104), @@ -342,7 +347,8 @@ } OPTIONAL } -- Definition of ProfileInfo -ProfileInfo ::= [PRIVATE 3] SEQUENCE { -- Tag 'E3' +-- workaround: add prefix ("SGP32-") to avoid clash with SGP.22 +SGP32-ProfileInfo ::= [PRIVATE 3] SEQUENCE { -- Tag 'E3' iccid Iccid OPTIONAL, isdpAid [APPLICATION 15] OctetTo16 OPTIONAL, -- AID of the ISD-P containing the Profile, tag '4F' profileState [112] ProfileState OPTIONAL, -- Tag '9F70' @@ -361,7 +367,8 @@ fallbackAttribute [38] BOOLEAN DEFAULT FALSE, -- Tag '9F26', indicates a Fallback Profile if set to TRUE fallbackAllowed [103] BOOLEAN OPTIONAL -- Tag '9F67', indicates if Fallback is authorized by the Profile Owner } -StoreMetadataRequest ::= [37] SEQUENCE { -- Tag 'BF25' +-- workaround: add prefix ("SGP32-") to avoid clash with SGP.22 +SGP32-StoreMetadataRequest ::= [37] SEQUENCE { -- Tag 'BF25' iccid Iccid, serviceProviderName [17] UTF8String (SIZE(0..32)), -- Tag '91' profileName [18] UTF8String (SIZE(0..64)), -- Tag '92' (corresponds to 'Short Description' defined in SGP.21 [2]) @@ -376,11 +383,13 @@ ecallIndication [123] BOOLEAN OPTIONAL, -- Tag '9F7B' fallbackAllowed [103] BOOLEAN OPTIONAL -- Tag '9F67' } -AuthenticateClientRequest ::= [59] SEQUENCE { -- Tag 'BF3B' +-- workaround: add prefix ("SGP32-") to avoid clash with SGP.22 +SGP32-AuthenticateClientRequest ::= [59] SEQUENCE { -- Tag 'BF3B' transactionId [0] TransactionId, - authenticateServerResponse [56] AuthenticateServerResponse -- This is the response from ES10b.AuthenticateServer + authenticateServerResponse [56] SGP32-AuthenticateServerResponse -- This is the response from ES10b.AuthenticateServer } -EUICCInfo2 ::= [34] SEQUENCE { -- Tag 'BF22' +-- workaround: add prefix ("SGP32-") to avoid clash with SGP.22 +SGP32-EUICCInfo2 ::= [34] SEQUENCE { -- Tag 'BF22' profileVersion [1] VersionType, -- Base eUICC Profile package version supported svn [2] VersionType, -- GSMA SGP.22 version supported (SVN)referenced by SGP.32 euiccFirmwareVer [3] VersionType, -- eUICC Firmware version @@ -445,7 +454,8 @@ undefinedError(127) } } -EuiccMemoryResetRequest ::= [100] SEQUENCE { -- Tag 'BF64' +-- workaround: add prefix ("SGP32-") to avoid clash with SGP.22 +SGP32-EuiccMemoryResetRequest ::= [100] SEQUENCE { -- Tag 'BF64' resetOptions [2] BIT STRING { deleteOperationalProfiles(0), deleteFieldLoadedTestProfiles(1), @@ -456,7 +466,8 @@ resetImmediateEnableConfig (6) } } -EuiccMemoryResetResponse ::= [100] SEQUENCE { -- Tag 'BF64' +-- workaround: add prefix ("SGP32-") to avoid clash with SGP.22 +SGP32-EuiccMemoryResetResponse ::= [100] SEQUENCE { -- Tag 'BF64' resetResult INTEGER {ok(0), nothingToDelete(1), catBusy(5), ecallActive(104), undefinedError(127)}, resetEimResult INTEGER {ok(0), nothingToDelete(1), eimResetNotSupported(2), undefinedError(127)} OPTIONAL, resetImmediateEnableConfigResult INTEGER {ok(0), resetIECNotSupported (1), undefinedError(127)} OPTIONAL @@ -471,14 +482,17 @@ }, getCertsError INTEGER {invalidCiPKId(1), undfinedError(127)} } -RetrieveNotificationsListRequest ::= [43] SEQUENCE { -- Tag 'BF2B' +-- workaround: add prefix ("SGP32-") to avoid clash with SGP.22 +SGP32-RetrieveNotificationsListRequest ::= [43] SEQUENCE { -- Tag 'BF2B' searchCriteria CHOICE { seqNumber [0] INTEGER, profileManagementOperation [1] NotificationEvent, euiccPackageResults [2] NULL } OPTIONAL } -RetrieveNotificationsListResponse ::= [43] CHOICE { -- Tag 'BF2B' +-- workaround for erlang asn1ct: remove already specified context-specific tag [43] +-- workaround: add prefix ("SGP32-") to avoid clash with SGP.22 +SGP32-RetrieveNotificationsListResponse ::= CHOICE { -- Tag 'BF2B' notificationList PendingNotificationList, -- Tag 'A0' notificationsListResultError INTEGER { undefinedError(127)}, -- Tag '81' euiccPackageResultList EuiccPackageResultList -- Tag 'A2' @@ -593,13 +607,17 @@ parametersNotAvailable(1), undefinedError(127) } -SetDefaultDpAddressRequest ::= [101] SEQUENCE { -- Tag 'BF65' +-- workaround for erlang asn1ct: remove already specified context-specific tag +SGP32-SetDefaultDpAddressRequest ::= [101] SEQUENCE { -- Tag 'BF65' defaultDpAddress UTF8String -- Default SM-DP+ address as an FQDN } -SetDefaultDpAddressResponse ::= [101] SEQUENCE { -- Tag 'BF65' +-- workaround for erlang asn1ct: remove already specified context-specific tag +SGP32-SetDefaultDpAddressResponse ::= [101] SEQUENCE { -- Tag 'BF65' setDefaultDpAddressResult INTEGER { ok (0), undefinedError (127)} } -PrepareDownloadResponse ::= [33] CHOICE { -- Tag 'BF21' +-- workaround for erlang asn1ct: remove already specified context-specific tag [33] +-- workaround: add prefix ("SGP32-") to avoid clash with SGP.22 +SGP32-PrepareDownloadResponse ::= CHOICE { -- Tag 'BF21' downloadResponseOk PrepareDownloadResponseOk, downloadResponseError PrepareDownloadResponseError, compactDownloadResponseOk CompactPrepareDownloadResponseOk @@ -612,27 +630,31 @@ euiccOtpk [APPLICATION 73] OCTET STRING OPTIONAL, -- otPK.EUICC.ECKA, tag '5F49' euiccOtpk is always present except if bppEuiccOtpk was chosen by the eUICC hashCc Octet32 OPTIONAL -- Hash of confirmation code, if not received from eIM } -EuiccSigned1 ::= SEQUENCE { +-- workaround: add prefix ("SGP32-") to avoid clash with SGP.22 +SGP32-EuiccSigned1 ::= SEQUENCE { transactionId [0] TransactionId, serverAddress [3] UTF8String, serverChallenge [4] Octet16, -- The RSP Server Challenge - euiccInfo2 [34] EUICCInfo2, + euiccInfo2 [34] SGP32-EUICCInfo2, ctxParams1 CtxParams1 } -AuthenticateResponseOk ::= SEQUENCE { - euiccSigned1 EuiccSigned1, -- Signed information +-- workaround: add prefix ("SGP32-") to avoid clash with SGP.22 +SGP32-AuthenticateResponseOk ::= SEQUENCE { + euiccSigned1 SGP32-EuiccSigned1, -- Signed information euiccSignature1 [APPLICATION 55] OCTET STRING, --EUICC_Sign1, tag 5F37 euiccCertificate Certificate, -- eUICC Certificate (CERT.EUICC.ECDSA) signed by the EUM eumCertificate Certificate -- EUM Certificate (CERT.EUM.ECDSA) signed by the requested CI } -AuthenticateServerResponse ::= [56] CHOICE { -- Tag 'BF38' - authenticateResponseOk AuthenticateResponseOk, +-- workaround for erlang asn1ct: remove already specified context-specific tag [56] +-- workaround: add prefix ("SGP32-") to avoid clash with SGP.22 +SGP32-AuthenticateServerResponse ::= CHOICE { -- Tag 'BF38' + authenticateResponseOk SGP32-AuthenticateResponseOk, authenticateResponseError AuthenticateResponseError, compactAuthenticateResponseOk CompactAuthenticateResponseOk } CompactAuthenticateResponseOk ::= SEQUENCE { signedData CHOICE { - euiccSigned1 EuiccSigned1, + euiccSigned1 SGP32-EuiccSigned1, compactEuiccSigned1 [0] CompactEuiccSigned1 -- Compact version of EuiccSigned1 }, euiccSignature1 [APPLICATION 55] OCTET STRING, -- tag 5F37 signature on EuiccSigned1 @@ -643,13 +665,15 @@ extCardResource [4] OCTET STRING, -- Extended Card Resource Information according to ETSI TS 102 226 extracted from euiccInfo2, ctxParams1 [2] CtxParams1 OPTIONAL -- ctxParams1 may be left out by IPA if eIM ctxParams1 was received from the eIM } -PendingNotification ::= CHOICE { - profileInstallationResult [55] ProfileInstallationResult, -- tag 'BF37' +-- workaround: add prefix ("SGP32-") to avoid clash with SGP.22 +SGP32-PendingNotification ::= CHOICE { + profileInstallationResult [55] SGP32-ProfileInstallationResult, -- tag 'BF37' otherSignedNotification OtherSignedNotification, compactProfileInstallationResult [0] CompactProfileInstallationResult, compactOtherSignedNotification [1] CompactOtherSignedNotification } -ProfileInstallationResult ::= [55] SEQUENCE { -- Tag 'BF37' +-- workaround: add prefix ("SGP32-") to avoid clash with SGP.22 +SGP32-ProfileInstallationResult ::= [55] SEQUENCE { -- Tag 'BF37' profileInstallationResultData [39] ProfileInstallationResultData, euiccSignPIR EuiccSignPIR } @@ -675,7 +699,9 @@ tbsOtherNotification NotificationMetadata, euiccNotificationSignature [APPLICATION 55] OCTET STRING -- eUICC signature of tbsOtherNotification, Tag '5F37' } -CancelSessionResponse ::= [65] CHOICE { -- Tag 'BF41' +-- workaround for erlang asn1ct: remove already specified context-specific tag [65] +-- workaround: add prefix ("SGP32-") to avoid clash with SGP.22 +SGP32-CancelSessionResponse ::= CHOICE { -- Tag 'BF41' cancelSessionResponseOk CancelSessionResponseOk, cancelSessionResponseError INTEGER {invalidTransactionId(5), undefinedError(127)}, compactCancelSessionResponseOk CompactCancelSessionResponseOk @@ -736,7 +762,7 @@ } AuthenticateClientRequestEsipa ::= [59] SEQUENCE { -- Tag 'BF3B' transactionId [0] TransactionId, -- The TransactionID generated by the SM-DP+/SM-DS - authenticateServerResponse [56] AuthenticateServerResponse -- This is the response from ES10b.AuthenticateServer, possibly in compact format + authenticateServerResponse [56] SGP32-AuthenticateServerResponse -- This is the response from ES10b.AuthenticateServer, possibly in compact format } AuthenticateClientResponseEsipa ::= [59] CHOICE { -- Tag 'BF3B' authenticateClientOkDPEsipa AuthenticateClientOkDPEsipa, @@ -760,7 +786,7 @@ } AuthenticateClientOkDPEsipa ::= SEQUENCE { transactionId [0] TransactionId OPTIONAL, -- The TransactionID generated by the SM-DP+ - profileMetaData [37] StoreMetadataRequest OPTIONAL, + profileMetaData [37] SGP32-StoreMetadataRequest OPTIONAL, smdpSigned2 SmdpSigned2, -- Signed information smdpSignature2 [APPLICATION 55] OCTET STRING, -- Tag '5F37' smdpCertificate Certificate, -- CERT.DPpb.ECDSA @@ -772,7 +798,7 @@ } GetBoundProfilePackageRequestEsipa ::= [58] SEQUENCE { -- Tag 'BF3A' transactionId [0] TransactionId, -- The TransactionID generated by the SM-DP+ - prepareDownloadResponse [33] PrepareDownloadResponse -- This is the response from ES10b.PrepareDownload, possibly in compact format + prepareDownloadResponse [33] SGP32-PrepareDownloadResponse -- This is the response from ES10b.PrepareDownload, possibly in compact format } GetBoundProfilePackageResponseEsipa ::= [58] CHOICE { -- Tag 'BF3A' getBoundProfilePackageOkEsipa GetBoundProfilePackageOkEsipa, @@ -792,23 +818,25 @@ transactionId [0] TransactionId OPTIONAL, -- The TransactionID generated by the SM-DP+ boundProfilePackage [54] BoundProfilePackage } -HandleNotificationEsipa ::= [61] CHOICE { -- Tag 'BF3D' - pendingNotification [0] PendingNotification, -- A Notification to be delivered to a Notification Receiver, possibly in compact format +-- workaround for erlang asn1ct: remove already specified context-specific tag [61] +HandleNotificationEsipa ::= CHOICE { -- Tag 'BF3D' + pendingNotification [0] SGP32-PendingNotification, -- A Notification to be delivered to a Notification Receiver, possibly in compact format provideEimPackageResult [80] ProvideEimPackageResult -- Tag 'BF50' } CancelSessionRequestEsipa ::= [65] SEQUENCE { -- Tag 'BF41' transactionId TransactionId, -- The TransactionID generated by the SM-DP+ - cancelSessionResponse CancelSessionResponse -- This is the response from ES10b. CancelSession function, possibly in compact format + cancelSessionResponse SGP32-CancelSessionResponse -- This is the response from ES10b. CancelSession function, possibly in compact format } CancelSessionResponseEsipa ::= [65] CHOICE { -- Tag 'BF41' - cancelSessionOk CancelSessionOk, + cancelSessionOk SGP32-CancelSessionOk, cancelSessionError INTEGER { invalidTransactionId(1), euiccSignatureInvalid(2), undefinedError(127) } } -CancelSessionOk ::= SEQUENCE { -- This function has no output data +-- workaround: add prefix ("SGP32-") to avoid clash with SGP.22 +SGP32-CancelSessionOk ::= SEQUENCE { -- This function has no output data } StateChangeCause ::= INTEGER { otherEim(0), -- for change(s) requested by another registered eIM @@ -861,7 +889,8 @@ eimPackageResultResponseError [0] EimPackageResultResponseError }
-ProvideEimPackageResult ::= [80] SEQUENCE { -- Tag 'BF50' +-- workaround for erlang asn1ct: remove already specified context-specific tag [80] +ProvideEimPackageResult ::= SEQUENCE { -- Tag 'BF50' eidValue [APPLICATION 26] Octet16 OPTIONAL, -- Tag '5A' eimPackageResult EimPackageResult }