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),
--
To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/43176?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: onomondo-eim
Gerrit-Branch: master
Gerrit-Change-Id: I43625be897f7a1cdbf0fa6b71ee651df993f8584
Gerrit-Change-Number: 43176
Gerrit-PatchSet: 16
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Attention is currently required from: Hoernchen.
dexter has posted comments on this change by Hoernchen. ( https://gerrit.osmocom.org/c/pysim/+/43551?usp=email )
Change subject: transport: stop the T=0 layer from breaking GP 6310
......................................................................
Patch Set 2:
(1 comment)
File pySim/global_platform/__init__.py:
https://gerrit.osmocom.org/c/pysim/+/43551/comment/1f30b9a9_c7b592eb?usp=em… :
PS2, Line 751: raise SwMatchError(sw, '9000/6310')
> I would recommend to check this back. When I look at the apidoc in exceptions. […]
I gave this a practical test: When I select the ISD and do a "get_status applications" for example, I end up in this code path. I am not sure if this is expected or not, at least with current master no such error is displayed.
I just wanted to inform you about this. If this is the expected behavior, everything should be fine.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/43551?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I10f8afa8dd5623a49a6a0e7132607b3a1fad2d8c
Gerrit-Change-Number: 43551
Gerrit-PatchSet: 2
Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 18 Sep 2026 08:31:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
dexter has submitted this change. ( https://gerrit.osmocom.org/c/onomondo-eim/+/43654?usp=email )
(
2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: esipa_asn1_handler: fix typos
......................................................................
esipa_asn1_handler: fix typos
Related: SYS#8100
Change-Id: I14416250cdb523f5c1a20d3a3e3dbe5cc6c53bcd
---
M src/esipa_asn1_handler.erl
1 file changed, 3 insertions(+), 3 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/src/esipa_asn1_handler.erl b/src/esipa_asn1_handler.erl
index 2fe7603..9cb264a 100644
--- a/src/esipa_asn1_handler.erl
+++ b/src/esipa_asn1_handler.erl
@@ -21,7 +21,7 @@
% initiateAuthenticationRequest. However the field is only missing in case the IPA capability minimizeEsipaBytes is
% used. This is an optional feature that this eIM does not support, so we can expect euiccInfo1 to be always present.
- % TODO: Popluate smdpAddress from Activation Code if missing: smdpAddress is declared as anan optional field in
+ % TODO: Popluate smdpAddress from Activation Code if missing: smdpAddress is declared as an optional field in
% InitiateAuthenticationRequestEsipa. If the field is missing, we can retrieve it from the Activation Code that is
% stored in the download Order (see also SGP.32, section 3.2.3.2, step 8).
@@ -229,8 +229,8 @@
% Sub-procedure Profile Installation (see also GSMA SGP.22, section 3.1.3.3). The eIM uses the
% result data contained in this message to conclude the download and to make the download results
% available to the REST API user. However, in rare cases it is possible that a
- % ProfileInstallationResult is received way too late as part of the Notification Delivery to
- % Notification Receivers (see also GSMA SGP.32, section 3.7) procedure. By then the context in the
+ % ProfileInstallationResult is received way too late as part of the notification delivery to
+ % notification receivers (see also GSMA SGP.32, section 3.7) procedure. By then the context in the
% eIM may be long gone. The eIM will be unable to match the ProfileInstallationResult to any
% context but it will foward it to the SMDP+ anyway.
case mnesia_db_work:bind(Pid, TransactionId) of
--
To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/43654?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: onomondo-eim
Gerrit-Branch: master
Gerrit-Change-Id: I14416250cdb523f5c1a20d3a3e3dbe5cc6c53bcd
Gerrit-Change-Number: 43654
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Attention is currently required from: laforge.
dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/onomondo-eim/+/43647?usp=email )
Change subject: crypto_utils: log EID and encoded EUM cert instead of decoded cert
......................................................................
Patch Set 3:
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/onomondo-eim/+/43647/comment/fd30f2b2_c96eab1f… :
PS2, Line 13: Let's instead log the EID of the
: eUICC that caused the problem, which is much more helpful then just
: a certificate dump that is barely readable.
> Mh, I think such an event is something one definitely wants to investigate further, if it ever happe […]
We could just log the binary blob of the EUM Certificate in addition the EID. I think this is a good compromise.
--
To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/43647?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: onomondo-eim
Gerrit-Branch: master
Gerrit-Change-Id: I33c19fee0bec31b4c6b3c8052976625f3213aac1
Gerrit-Change-Number: 43647
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Fri, 18 Sep 2026 07:41:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Attention is currently required from: dexter.
Hello Jenkins Builder, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/onomondo-eim/+/43654?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
The change is no longer submittable: Verified is unsatisfied now.
Change subject: esipa_asn1_handler: fix typos
......................................................................
esipa_asn1_handler: fix typos
Related: SYS#8100
Change-Id: I14416250cdb523f5c1a20d3a3e3dbe5cc6c53bcd
---
M src/esipa_asn1_handler.erl
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/onomondo-eim refs/changes/54/43654/3
--
To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/43654?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: onomondo-eim
Gerrit-Branch: master
Gerrit-Change-Id: I14416250cdb523f5c1a20d3a3e3dbe5cc6c53bcd
Gerrit-Change-Number: 43654
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>