laforge has submitted this change. ( https://gerrit.osmocom.org/c/onomondo-eim/+/43176?usp=email )
Change subject: SGP32Definitions: invert asn1ct tag workaround ......................................................................
SGP32Definitions: invert asn1ct tag workaround
The erlang asn1ct compiler runs into problems when a context specific ASN.1 tag is applied twice, which is the case in the original SGP.32 SGP32Definitions spec.
Currently we remove the excess tag on the ASN.1 struct definition. This works fine as long as the structs are only used internally, which is the case when ASN.1 ESipa bindings are used. When the JSON ESipa bindings are used, many of the structs are used directly. A missing context specific tag on the struct definition will then obviously cause interoperability problems.
With this patch we invert the workaround, we now no longer remove the context specific tag at the struct definition, instead we remove it at the struct member in each parent struct.
Related: SYS#8100 Change-Id: I43625be897f7a1cdbf0fa6b71ee651df993f8584 --- M asn1/SGP32Definitions.asn1 1 file changed, 33 insertions(+), 28 deletions(-)
Approvals: jolly: Looks good to me, but someone else must approve Jenkins Builder: Verified laforge: Looks good to me, approved
diff --git a/asn1/SGP32Definitions.asn1 b/asn1/SGP32Definitions.asn1 index b82e352..5bae2c7 100644 --- a/asn1/SGP32Definitions.asn1 +++ b/asn1/SGP32Definitions.asn1 @@ -105,8 +105,7 @@ } EimAcknowledgements ::= [83] SEQUENCE OF SequenceNumber -- Tag BF53 SequenceNumber ::= [0] INTEGER --- workaround for erlang asn1ct: remove already specified context-specific tag [81] -EuiccPackageResult ::= CHOICE { -- Tag 'BF51' #SupportedForPsmoV1.0.0# +EuiccPackageResult ::= [81] CHOICE { -- Tag 'BF51' #SupportedForPsmoV1.0.0# euiccPackageResultSigned EuiccPackageResultSigned, euiccPackageErrorSigned EuiccPackageErrorSigned, euiccPackageErrorUnsigned EuiccPackageErrorUnsigned @@ -122,11 +121,12 @@ seqNumber [3] INTEGER, euiccResult SEQUENCE OF EuiccResultData } +-- workaround for erlang asn1ct: remove already specified context-specific tag [45] on member listProfileInfoResult EuiccResultData ::= CHOICE { enableResult [3] EnableProfileResult, disableResult [4] DisableProfileResult, deleteResult [5] DeleteProfileResult, - listProfileInfoResult [45] SGP32-ProfileInfoListResponse, + listProfileInfoResult SGP32-ProfileInfoListResponse, getRATResult [6] RulesAuthorisationTable, -- see SGP.22 configureImmediateEnableResult [7] ConfigureImmediateEnableResult, addEimResult [8] AddEimResult, @@ -199,9 +199,8 @@ returnFallbackProfile(21), undefinedError(127) } --- workaround for erlang asn1ct: remove already specified context-specific tag [45] -- workaround: add prefix ("SGP32-") to avoid clash with SGP.22 -SGP32-ProfileInfoListResponse ::= CHOICE { +SGP32-ProfileInfoListResponse ::= [45] CHOICE { profileInfoListOk SEQUENCE OF SGP32-ProfileInfo, -- see SGP.22 profileInfoListError SGP32-ProfileInfoListError } @@ -279,8 +278,7 @@ ipaEuiccDataErrorCode IpaEuiccDataErrorCode }
--- workaround for erlang asn1ct: remove already specified context-specific tag [82] -IpaEuiccDataResponse ::= CHOICE { -- Tag 'BF52' +IpaEuiccDataResponse ::= [82] CHOICE { -- Tag 'BF52' ipaEuiccData IpaEuiccData, ipaEuiccDataResponseError IpaEuiccDataResponseError } @@ -383,10 +381,11 @@ ecallIndication [123] BOOLEAN OPTIONAL, -- Tag '9F7B' fallbackAllowed [103] BOOLEAN OPTIONAL -- Tag '9F67' } +-- workaround for erlang asn1ct: remove already specified context-specific tag [56] on member authenticateServerResponse -- workaround: add prefix ("SGP32-") to avoid clash with SGP.22 SGP32-AuthenticateClientRequest ::= [59] SEQUENCE { -- Tag 'BF3B' transactionId [0] TransactionId, - authenticateServerResponse [56] SGP32-AuthenticateServerResponse -- This is the response from ES10b.AuthenticateServer + authenticateServerResponse SGP32-AuthenticateServerResponse -- This is the response from ES10b.AuthenticateServer } -- workaround: add prefix ("SGP32-") to avoid clash with SGP.22 SGP32-EUICCInfo2 ::= [34] SEQUENCE { -- Tag 'BF22' @@ -511,6 +510,7 @@ ProfileRollbackRequest ::= [88] SEQUENCE { -- Tag 'BF58' refreshFlag BOOLEAN -- indicating whether REFRESH is required } +-- workaround for erlang asn1ct: remove already specified context-specific tag [81] on member eUICCPackageResult ProfileRollbackResponse ::= [88] SEQUENCE { -- Tag 'BF58' cmdResult INTEGER { ok(0), @@ -519,7 +519,7 @@ commandError(7), undefinedError(127) }, - eUICCPackageResult [81] EuiccPackageResult OPTIONAL + eUICCPackageResult EuiccPackageResult OPTIONAL } ConfigureImmediateProfileEnablingRequest ::= [89] SEQUENCE { -- Tag 'BF59' immediateEnableFlag [0] NULL OPTIONAL, @@ -612,9 +612,8 @@ SGP32-SetDefaultDpAddressResponse ::= [101] SEQUENCE { -- Tag 'BF65' setDefaultDpAddressResult INTEGER { ok (0), undefinedError (127)} } --- 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' +SGP32-PrepareDownloadResponse ::= [33] CHOICE { -- Tag 'BF21' downloadResponseOk PrepareDownloadResponseOk, downloadResponseError PrepareDownloadResponseError, compactDownloadResponseOk CompactPrepareDownloadResponseOk @@ -642,9 +641,8 @@ euiccCertificate Certificate, -- eUICC Certificate (CERT.EUICC.ECDSA) signed by the EUM eumCertificate Certificate -- EUM Certificate (CERT.EUM.ECDSA) signed by the requested CI } --- 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' +SGP32-AuthenticateServerResponse ::= [56] CHOICE { -- Tag 'BF38' authenticateResponseOk SGP32-AuthenticateResponseOk, authenticateResponseError AuthenticateResponseError, compactAuthenticateResponseOk CompactAuthenticateResponseOk @@ -710,15 +708,17 @@ CompactEuiccCancelSessionSigned ::= SEQUENCE { reason CancelSessionReason OPTIONAL } +-- workaround for erlang asn1ct: remove already specified context-specific tag [61] on member handleNotificationEsipa +-- workaround for erlang asn1ct: remove already specified context-specific tag [80] on member provideEimPackageResult EsipaMessageFromIpaToEim ::= CHOICE { initiateAuthenticationRequestEsipa [57] InitiateAuthenticationRequestEsipa, -- Tag 'BF39' authenticateClientRequestEsipa [59] AuthenticateClientRequestEsipa, -- Tag 'BF3B' getBoundProfilePackageRequestEsipa [58] GetBoundProfilePackageRequestEsipa, -- Tag 'BF3A' cancelSessionRequestEsipa [65] CancelSessionRequestEsipa, -- Tag 'BF41' - handleNotificationEsipa [61] HandleNotificationEsipa, -- Tag 'BF3D' + handleNotificationEsipa HandleNotificationEsipa, -- Tag 'BF3D' transferEimPackageResponse [78] TransferEimPackageResponse, -- Tag 'BF4E' getEimPackageRequest [79] GetEimPackageRequest, -- Tag 'BF4F' - provideEimPackageResult [80] ProvideEimPackageResult -- Tag 'BF50' + provideEimPackageResult ProvideEimPackageResult -- Tag 'BF50' } EsipaMessageFromEimToIpa ::= CHOICE { initiateAuthenticationResponseEsipa [57] InitiateAuthenticationResponseEsipa, -- Tag 'BF39' @@ -757,9 +757,10 @@ matchingId UTF8String OPTIONAL, ctxParams1 [2] CtxParams1 OPTIONAL } +-- workaround for erlang asn1ct: remove already specified context-specific tag [56] on member authenticateServerResponse AuthenticateClientRequestEsipa ::= [59] SEQUENCE { -- Tag 'BF3B' transactionId [0] TransactionId, -- The TransactionID generated by the SM-DP+/SM-DS - authenticateServerResponse [56] SGP32-AuthenticateServerResponse -- This is the response from ES10b.AuthenticateServer, possibly in compact format + authenticateServerResponse SGP32-AuthenticateServerResponse -- This is the response from ES10b.AuthenticateServer, possibly in compact format } AuthenticateClientResponseEsipa ::= [59] CHOICE { -- Tag 'BF3B' authenticateClientOkDPEsipa AuthenticateClientOkDPEsipa, @@ -793,9 +794,10 @@ transactionId [0] TransactionId, -- The TransactionID generated by the SM-DS profileDownloadTrigger [84] ProfileDownloadTriggerRequest OPTIONAL -- Tag 'BF54' } +-- workaround for erlang asn1ct: remove already specified context-specific tag [33] on member prepareDownloadResponse GetBoundProfilePackageRequestEsipa ::= [58] SEQUENCE { -- Tag 'BF3A' transactionId [0] TransactionId, -- The TransactionID generated by the SM-DP+ - prepareDownloadResponse [33] SGP32-PrepareDownloadResponse -- This is the response from ES10b.PrepareDownload, possibly in compact format + prepareDownloadResponse SGP32-PrepareDownloadResponse -- This is the response from ES10b.PrepareDownload, possibly in compact format } GetBoundProfilePackageResponseEsipa ::= [58] CHOICE { -- Tag 'BF3A' getBoundProfilePackageOkEsipa GetBoundProfilePackageOkEsipa, @@ -815,10 +817,10 @@ transactionId [0] TransactionId OPTIONAL, -- The TransactionID generated by the SM-DP+ boundProfilePackage [54] BoundProfilePackage } --- workaround for erlang asn1ct: remove already specified context-specific tag [61] -HandleNotificationEsipa ::= CHOICE { -- Tag 'BF3D' +-- workaround for erlang asn1ct: remove already specified context-specific tag [80] on member provideEimPackageResult +HandleNotificationEsipa ::= [61] 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' + provideEimPackageResult ProvideEimPackageResult -- Tag 'BF50' } CancelSessionRequestEsipa ::= [65] SEQUENCE { -- Tag 'BF41' transactionId TransactionId, -- The TransactionID generated by the SM-DP+ @@ -875,19 +877,20 @@ eimPackageResultErrorCode EimPackageResultErrorCode }
+-- workaround for erlang asn1ct: remove already specified context-specific tag [81] on member euiccPackageResult +-- workaround for erlang asn1ct: remove already specified context-specific tag [82] on member ipaEuiccDataResponse EimPackageResult ::= CHOICE { - euiccPackageResult [81] EuiccPackageResult, -- Tag 'BF51' + euiccPackageResult EuiccPackageResult, -- Tag 'BF51' ePRAndNotifications SEQUENCE { - euiccPackageResult [81] EuiccPackageResult, -- Tag 'BF51' + euiccPackageResult EuiccPackageResult, -- Tag 'BF51' notificationList [0] PendingNotificationList -- Tag 'A0' }, - ipaEuiccDataResponse [82] IpaEuiccDataResponse, -- Tag 'BF52' + ipaEuiccDataResponse IpaEuiccDataResponse, -- Tag 'BF52' profileDownloadTriggerResult [84] ProfileDownloadTriggerResult, -- Tag 'BF54' eimPackageResultResponseError [0] EimPackageResultResponseError }
--- workaround for erlang asn1ct: remove already specified context-specific tag [80] -ProvideEimPackageResult ::= SEQUENCE { -- Tag 'BF50' +ProvideEimPackageResult ::= [80] SEQUENCE { -- Tag 'BF50' eidValue [APPLICATION 26] Octet16 OPTIONAL, -- Tag '5A' eimPackageResult EimPackageResult } @@ -907,13 +910,15 @@ eimAcknowledgements [83] EimAcknowledgements, -- Tag 'BF53' profileDownloadTriggerRequest [84] ProfileDownloadTriggerRequest -- Tag 'BF54' } +-- workaround for erlang asn1ct: remove already specified context-specific tag [81] on member euiccPackageResult +-- workaround for erlang asn1ct: remove already specified context-specific tag [82] on member ipaEuiccDataResponse TransferEimPackageResponse ::= [78] CHOICE { -- Tag 'BF4E' - euiccPackageResult [81] EuiccPackageResult, -- Tag 'BF51' + euiccPackageResult EuiccPackageResult, -- Tag 'BF51' ePRAndNotifications SEQUENCE { - euiccPackageResult [81] EuiccPackageResult, -- Tag 'BF51' + euiccPackageResult EuiccPackageResult, -- Tag 'BF51' notificationList [0] PendingNotificationList -- Tag 'A0' }, - ipaEuiccDataResponse [82] IpaEuiccDataResponse, -- Tag 'BF52' + ipaEuiccDataResponse IpaEuiccDataResponse, -- Tag 'BF52' eimPackageReceived NULL, eimPackageError INTEGER { invalidPackageFormat(1),