dexter has uploaded this change for review.
WIP: 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, 8 insertions(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/onomondo-eim refs/changes/76/43176/1
diff --git a/asn1/SGP32Definitions.asn1 b/asn1/SGP32Definitions.asn1
index cc052b4..d5500bf 100644
--- a/asn1/SGP32Definitions.asn1
+++ b/asn1/SGP32Definitions.asn1
@@ -383,10 +383,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'
@@ -613,9 +614,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
@@ -643,9 +643,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
@@ -758,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,
@@ -794,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,
To view, visit change 43176. To unsubscribe, or for help writing mail filters, visit settings.