lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

September 2026

  • 1 participants
  • 1894 discussions
[XS] Change in onomondo-eim[master]: es9p_client: use SGP.32 specific AuthenticateServerResponse type
by laforge 09 Sep '26

09 Sep '26
laforge has submitted this change. ( https://gerrit.osmocom.org/c/onomondo-eim/+/43429?usp=email ) Change subject: es9p_client: use SGP.32 specific AuthenticateServerResponse type ...................................................................... es9p_client: use SGP.32 specific AuthenticateServerResponse type SGP.32 re-defines the AuthenticateServerResponse type. This is in particular due to the SGP.32 specific EUICCInfo2 type, which is contained in this struct. This means we have to use the re-defined type for encoding. Since the RSPDefinitions have "EXTENSIBILITY IMPLIED", the extra fields added to EUICCInfo2 are ignored by the SM-DP+. Change-Id: Ia550804d1d73f9704aa3135819926c7615379d1a Related: SYS#8100 --- M src/es9p_client.erl 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/es9p_client.erl b/src/es9p_client.erl index ac89456..8a901e8 100644 --- a/src/es9p_client.erl +++ b/src/es9p_client.erl @@ -224,9 +224,11 @@ request_json({authenticateClientRequest, AuthClientReq}, BaseUrl) -> Json = #{ <<"transactionId">> => utils:binary_to_hex(maps:get(transactionId, AuthClientReq)), + % The AuthenticateServerResponse type has been re-defined by SGP.32, in particular to accommodate for the SGP.32 + % specific EUICCInfo2 type (see also SGP.32, section 5.6.1). <<"authenticateServerResponse">> => enc_asn1_b64( - 'RSPDefinitions', - 'AuthenticateServerResponse', + 'SGP32Definitions', + 'SGP32-AuthenticateServerResponse', maps:get(authenticateServerResponse, AuthClientReq) ) }, -- To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/43429?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: Ia550804d1d73f9704aa3135819926c7615379d1a Gerrit-Change-Number: 43429 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1 0
0 0
[M] Change in onomondo-eim[master]: es9p_client: make asn.1 encoder/decoder functions more flexible
by laforge 09 Sep '26

09 Sep '26
laforge has submitted this change. ( https://gerrit.osmocom.org/c/onomondo-eim/+/43428?usp=email ) Change subject: es9p_client: make asn.1 encoder/decoder functions more flexible ...................................................................... es9p_client: make asn.1 encoder/decoder functions more flexible The encoder and decoder functions we currently use have the spec name hardcoded in the function body. Let's change the functions so that we have the spec name as a parameter for more flexibility Related: SYS#8100 Change-Id: Idfb280d3863998dd0387c65c478d9c765eadf106 --- M src/es9p_client.erl 1 file changed, 33 insertions(+), 22 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/es9p_client.erl b/src/es9p_client.erl index 9bf3856..ac89456 100644 --- a/src/es9p_client.erl +++ b/src/es9p_client.erl @@ -157,17 +157,14 @@ {ok, 503, ""} end. -% encode RSP ASN.1 data of given type + base64-encode it -rsp_enc_asn1_b64(TypeName, Data) -> - {ok, Bin} = 'RSPDefinitions':encode(TypeName, Data), +% encode ASN.1 data of given type + base64-encode it +enc_asn1_b64(SpecName, TypeName, Data) -> + {ok, Bin} = SpecName:encode(TypeName, Data), base64:encode(Bin). -% base64-decode and RSP ASN.1 decode data of given type -rsp_dec_b64_asn1(TypeName, Data) -> - {ok, Dec} = 'RSPDefinitions':decode(TypeName, base64:decode(Data)), - Dec. -pki_dec_b64_asn1(TypeName, Data) -> - {ok, Dec} = 'PKIX1Explicit88':decode(TypeName, base64:decode(Data)), +% base64-decode and ASN.1 decode data of given type +dec_asn1_b64(SpecName, TypeName, Data) -> + {ok, Dec} = SpecName:decode(TypeName, base64:decode(Data)), Dec. % convert from RemoteProfileProvisioningRequest to weird ASN.1-base64-in-JSON @@ -182,7 +179,9 @@ Json = #{ <<"euiccChallenge">> => base64:encode(maps:get(euiccChallenge, InitAuthReq)), <<"smdpAddress">> => maps:get(smdpAddress, InitAuthReq), - <<"euiccInfo1">> => rsp_enc_asn1_b64('EUICCInfo1', maps:get(euiccInfo1, InitAuthReq)) + <<"euiccInfo1">> => enc_asn1_b64( + 'RSPDefinitions', 'EUICCInfo1', maps:get(euiccInfo1, InitAuthReq) + ) }, {ok, _HtppStatus, JsonResp} = make_req_json(BaseUrl, "initiateAuthentication", Json), @@ -195,14 +194,17 @@ } -> R = #{ transactionId => utils:hex_to_binary(maps:get(<<"transactionId">>, JsonResp)), - serverSigned1 => rsp_dec_b64_asn1( - 'ServerSigned1', maps:get(<<"serverSigned1">>, JsonResp) + serverSigned1 => dec_asn1_b64( + 'RSPDefinitions', + 'ServerSigned1', + maps:get(<<"serverSigned1">>, JsonResp) ), serverSignature1 => base64:decode(maps:get(<<"serverSignature1">>, JsonResp)), euiccCiPKIdToBeUsed => base64:decode( maps:get(<<"euiccCiPKIdToBeUsed">>, JsonResp) ), - serverCertificate => pki_dec_b64_asn1( + serverCertificate => dec_asn1_b64( + 'PKIX1Explicit88', 'Certificate', maps:get( <<"serverCertificate">>, @@ -222,7 +224,8 @@ request_json({authenticateClientRequest, AuthClientReq}, BaseUrl) -> Json = #{ <<"transactionId">> => utils:binary_to_hex(maps:get(transactionId, AuthClientReq)), - <<"authenticateServerResponse">> => rsp_enc_asn1_b64( + <<"authenticateServerResponse">> => enc_asn1_b64( + 'RSPDefinitions', 'AuthenticateServerResponse', maps:get(authenticateServerResponse, AuthClientReq) ) @@ -237,18 +240,22 @@ } -> R = #{ transactionId => utils:hex_to_binary(maps:get(<<"transactionId">>, JsonResp)), - profileMetaData => rsp_dec_b64_asn1( + profileMetaData => dec_asn1_b64( + 'RSPDefinitions', 'StoreMetadataRequest', maps:get( <<"profileMetadata">>, JsonResp ) ), - smdpSigned2 => rsp_dec_b64_asn1( - 'SmdpSigned2', maps:get(<<"smdpSigned2">>, JsonResp) + smdpSigned2 => dec_asn1_b64( + 'RSPDefinitions', + 'SmdpSigned2', + maps:get(<<"smdpSigned2">>, JsonResp) ), smdpSignature2 => base64:decode(maps:get(<<"smdpSignature2">>, JsonResp)), - smdpCertificate => pki_dec_b64_asn1( + smdpCertificate => dec_asn1_b64( + 'PKIX1Explicit88', 'Certificate', maps:get(<<"smdpCertificate">>, JsonResp) ) @@ -263,7 +270,8 @@ request_json({getBoundProfilePackageRequest, GetBppReq}, BaseUrl) -> Json = #{ <<"transactionId">> => utils:binary_to_hex(maps:get(transactionId, GetBppReq)), - <<"prepareDownloadResponse">> => rsp_enc_asn1_b64( + <<"prepareDownloadResponse">> => enc_asn1_b64( + 'RSPDefinitions', 'PrepareDownloadResponse', maps:get(prepareDownloadResponse, GetBppReq) ) @@ -278,7 +286,8 @@ } -> R = #{ transactionId => utils:hex_to_binary(maps:get(<<"transactionId">>, JsonResp)), - boundProfilePackage => rsp_dec_b64_asn1( + boundProfilePackage => dec_asn1_b64( + 'RSPDefinitions', 'BoundProfilePackage', maps:get(<<"boundProfilePackage">>, JsonResp) ) @@ -293,7 +302,8 @@ request_json({cancelSessionRequestEs9, CancelSessReq}, BaseUrl) -> Json = #{ <<"transactionId">> => utils:binary_to_hex(maps:get(transactionId, CancelSessReq)), - <<"cancelSessionResponse">> => rsp_enc_asn1_b64( + <<"cancelSessionResponse">> => enc_asn1_b64( + 'RSPDefinitions', 'CancelSessionResponse', maps:get(cancelSessionResponse, CancelSessReq) ) @@ -316,7 +326,8 @@ % GSMA SGP.22, section 6.5.2.9 and section 6.6.2.4 request_json({handleNotification, HandleNotifReq}, BaseUrl) -> Json = #{ - <<"pendingNotification">> => rsp_enc_asn1_b64( + <<"pendingNotification">> => enc_asn1_b64( + 'RSPDefinitions', 'PendingNotification', maps:get(pendingNotification, HandleNotifReq) ) -- To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/43428?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: Idfb280d3863998dd0387c65c478d9c765eadf106 Gerrit-Change-Number: 43428 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1 0
0 0
[S] Change in onomondo-eim[master]: esipa_asn1_handler: set ecallIndication and fallbackAllowed
by laforge 09 Sep '26

09 Sep '26
laforge has submitted this change. ( https://gerrit.osmocom.org/c/onomondo-eim/+/43430?usp=email ) Change subject: esipa_asn1_handler: set ecallIndication and fallbackAllowed ...................................................................... esipa_asn1_handler: set ecallIndication and fallbackAllowed SGP.32 adds two new fields (ecallIndication and fallbackAllowed) to the StoreMetadataRequest. Those fields have to be added to the StoreMetadataRequest before it is sent to the IPAd via the AuthenticateClientResponseEsipa. Change-Id: I4b7673007018d32d062e238d811f655d332f7195 Related: SYS#8100 --- M priv/rest_api_resource_schema.json M src/esipa_asn1_handler.erl 2 files changed, 26 insertions(+), 3 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/priv/rest_api_resource_schema.json b/priv/rest_api_resource_schema.json index 4ddbb8e..69b0060 100644 --- a/priv/rest_api_resource_schema.json +++ b/priv/rest_api_resource_schema.json @@ -21,6 +21,14 @@ "activationCode": { "description": "see GSMA SGP.22, section 4.1", "type": "string" + }, + "ecallIndication": { + "description": "see GSMA SGP.32, section 4.4", + "type": "boolean" + }, + "fallbackAllowed": { + "description": "see GSMA SGP.32, section 4.4", + "type": "boolean" } }, "required": [ diff --git a/src/esipa_asn1_handler.erl b/src/esipa_asn1_handler.erl index df208cf..c006a7a 100644 --- a/src/esipa_asn1_handler.erl +++ b/src/esipa_asn1_handler.erl @@ -58,7 +58,7 @@ %GSMA SGP.32, section 6.3.2.2 handle_asn1(Pid, {authenticateClientRequestEsipa, EsipaReq}) -> TransactionId = maps:get(transactionId, EsipaReq), - {EidValue, _, WorkState} = mnesia_db_work:pickup(Pid, TransactionId), + {EidValue, Order, WorkState} = mnesia_db_work:pickup(Pid, TransactionId), BaseUrl = maps:get(smdpAddress, WorkState), % setup ES9+ request message @@ -91,7 +91,21 @@ EsipaResp = case Es9Resp of {authenticateClientOk, AuthClntRespEs9} -> - {authenticateClientOkDPEsipa, AuthClntRespEs9}; + % Populate ecallIndication and fallbackAllowed of SGP32-StoreMetadataRequest + {[{<<"download">>, {Download}}]} = Order, + EcallIndication = proplists:get_value(<<"ecallIndication">>, Download, false), + FallbackAllowed = proplists:get_value(<<"fallbackAllowed">>, Download, false), + StoreMetadataRequest = maps:merge( + maps:get(profileMetaData, AuthClntRespEs9), + #{ + ecallIndication => EcallIndication, + fallbackAllowed => FallbackAllowed + } + ), + AuthenticateClientOkDPEsipa = AuthClntRespEs9#{ + profileMetaData => StoreMetadataRequest + }, + {authenticateClientOkDPEsipa, AuthenticateClientOkDPEsipa}; {authenticateClientError, AuthClntErr} -> OutcomeEs9p = [{[{authenticateClientError, AuthClntErr}]}], ok = mnesia_db_work:finish(Pid, OutcomeEs9p, EsipaReq), @@ -277,7 +291,8 @@ EimTransactionId = rand:bytes(16), mnesia_db_work:bind(Pid, EimTransactionId), mnesia_db_work:update(Pid, #{}), - {[{<<"download">>, {[{<<"activationCode">>, ActivationCode}]}}]} = Order, + {[{<<"download">>, {Download}}]} = Order, + ActivationCode = proplists:get_value(<<"activationCode">>, Download), {profileDownloadTriggerRequest, #{ profileDownloadData => {activationCode, ActivationCode}, eimTransactionId => EimTransactionId -- To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/43430?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: I4b7673007018d32d062e238d811f655d332f7195 Gerrit-Change-Number: 43430 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1 0
0 0
[XS] Change in onomondo-eim[master]: esipa_asn_handler: add TODO about missing download options
by laforge 09 Sep '26

09 Sep '26
laforge has submitted this change. ( https://gerrit.osmocom.org/c/onomondo-eim/+/43449?usp=email ) ( 1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: esipa_asn_handler: add TODO about missing download options ...................................................................... esipa_asn_handler: add TODO about missing download options SGP.32 also defines other download trigger options next to the commonly used activationCode method. Let's add a related TODO to the code. Related: SYS#8100 Change-Id: I5e72416284027731627c264fa81c62a4a9a0d407 --- M src/esipa_asn1_handler.erl 1 file changed, 3 insertions(+), 0 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 c006a7a..f1be50a 100644 --- a/src/esipa_asn1_handler.erl +++ b/src/esipa_asn1_handler.erl @@ -292,6 +292,9 @@ mnesia_db_work:bind(Pid, EimTransactionId), mnesia_db_work:update(Pid, #{}), {[{<<"download">>, {Download}}]} = Order, + % TODO: Add missing download options: This eIM currently only allows to trigger a profile download using + % an activationCode (option a) It still lacks download triggers via SM-DS (option b) and downloads from + % the default SM-DP+ (option c). See also GSMA SGP.32, section 3.2.3.2 ActivationCode = proplists:get_value(<<"activationCode">>, Download), {profileDownloadTriggerRequest, #{ profileDownloadData => {activationCode, ActivationCode}, -- To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/43449?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: I5e72416284027731627c264fa81c62a4a9a0d407 Gerrit-Change-Number: 43449 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1 0
0 0
[XS] Change in onomondo-eim[master]: crypto_utils: extend TODO for better understanding
by laforge 09 Sep '26

09 Sep '26
laforge has submitted this change. ( https://gerrit.osmocom.org/c/onomondo-eim/+/43502?usp=email ) Change subject: crypto_utils: extend TODO for better understanding ...................................................................... crypto_utils: extend TODO for better understanding Related: SYS#8100 Change-Id: I411a3b4216b3c0d707d571b7a0c178e001931139 --- M src/crypto_utils.erl 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/crypto_utils.erl b/src/crypto_utils.erl index cb50415..4a43407 100644 --- a/src/crypto_utils.erl +++ b/src/crypto_utils.erl @@ -31,7 +31,7 @@ %Encode the association token as BER TLV IE enc_association_token(AssociationToken) -> - %TODO: replace this with a proper ASN.1 encoding function. + %TODO: Define an ASN.1 type for the AssociationToken and use it to get rid of this half-baked encoder function. AssociationTokenBinary = utils:integer_to_bytes(AssociationToken), AssociationTokenLength = utils:integer_to_bytes(byte_size(AssociationTokenBinary)), utils:join_binary_list([<<132>>, AssociationTokenLength, AssociationTokenBinary]). -- To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/43502?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: I411a3b4216b3c0d707d571b7a0c178e001931139 Gerrit-Change-Number: 43502 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1 0
0 0
[XS] Change in onomondo-eim[master]: crypto_utils: remove already fixed TODO
by laforge 09 Sep '26

09 Sep '26
laforge has submitted this change. ( https://gerrit.osmocom.org/c/onomondo-eim/+/43501?usp=email ) Change subject: crypto_utils: remove already fixed TODO ...................................................................... crypto_utils: remove already fixed TODO The signature check has been fixed some time ago and is in place. For real IoT eUICCs the signature of eUICC packages is checked. Related: SYS#8100 Change-Id: I214cfd5f77c497d421525a91c06b1d99e0b7d6af --- M src/crypto_utils.erl 1 file changed, 0 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/crypto_utils.erl b/src/crypto_utils.erl index 7d051a1..cb50415 100644 --- a/src/crypto_utils.erl +++ b/src/crypto_utils.erl @@ -4,9 +4,6 @@ % % Author: Philipp Maier <pmaier(a)sysmocom.de> / sysmocom - s.f.m.c. GmbH -%TODO: This code still lacks the verification of signatures, the reason for this is that it was still not possible to -%verify a signature in practice. - -module(crypto_utils). -export([ -- To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/43501?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: I214cfd5f77c497d421525a91c06b1d99e0b7d6af Gerrit-Change-Number: 43501 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1 0
0 0
[XS] Change in onomondo-eim[master]: onomondo_eim_app: add TODO to improve logger
by laforge 09 Sep '26

09 Sep '26
laforge has submitted this change. ( https://gerrit.osmocom.org/c/onomondo-eim/+/43503?usp=email ) Change subject: onomondo_eim_app: add TODO to improve logger ...................................................................... onomondo_eim_app: add TODO to improve logger Related: SYS#8100 Change-Id: Ia3b35f81d2a1eb0732d55678d553902bb562fd6d --- M src/onomondo_eim_app.erl 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/onomondo_eim_app.erl b/src/onomondo_eim_app.erl index 1d8c73f..07a2ed6 100644 --- a/src/onomondo_eim_app.erl +++ b/src/onomondo_eim_app.erl @@ -98,6 +98,10 @@ start(_Type, _Args) -> {ok, Vsn} = application:get_key(onomondo_eim, vsn), + + % TODO: Improve logging: The current use of log messages and format-strings is very bulky to handle. We should find + % something more effective here. A short explanatory text with the context attached as a map would be much more + % effective than fumbling with string format arguments. logger:notice("eIM! version: ~s~n", [Vsn]), % Startup database -- To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/43503?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: Ia3b35f81d2a1eb0732d55678d553902bb562fd6d Gerrit-Change-Number: 43503 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1 0
0 0
[S] Change in onomondo-eim[master]: es9p_client: remove unused function
by laforge 09 Sep '26

09 Sep '26
laforge has submitted this change. ( https://gerrit.osmocom.org/c/onomondo-eim/+/43504?usp=email ) Change subject: es9p_client: remove unused function ...................................................................... es9p_client: remove unused function The tryme function was used during development to try out the es9p_client in isolation. We have a proper TTCN3 test harness now, so we no longer need such testcode. It can be removed. Related: SYS#8100 Change-Id: I1dbdec39a60f59a693c241847272a2094672728f --- M src/es9p_client.erl 1 file changed, 1 insertion(+), 28 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/es9p_client.erl b/src/es9p_client.erl index 8a901e8..712ee9d 100644 --- a/src/es9p_client.erl +++ b/src/es9p_client.erl @@ -12,7 +12,7 @@ -module(es9p_client). --export([request_json/2, request_asn1/2, tryme/0]). +-export([request_json/2, request_asn1/2]). % Depending on whether SSL is enabled or disabled we get a different HTTP prefix. make_http_prefix() -> @@ -358,30 +358,3 @@ % In any case, this function is currently place holder, since this eIM currently only supports ES9+ JSON bindings % (esipa_asn1_handler currently only calls request_json). Asn1Resp. - -tryme() -> - Req = - {initiateAuthenticationRequest, #{ - euiccChallenge => - <<98, 247, 104, 103, 113, 183, 83, 201, 207, 31, 83, 25, 64, 67, 206, 171>>, - euiccInfo1 => - #{ - euiccCiPKIdListForSigning => - [ - <<245, 65, 114, 189, 249, 138, 149, 214, 92, 190, 184, 138, 56, 161, - 193, 29, 128, 10, 133, 195>>, - <<192, 188, 112, 186, 54, 146, 157, 67, 180, 103, 255, 87, 87, 5, 48, - 229, 122, 184, 252, 216>> - ], - euiccCiPKIdListForVerification => - [ - <<245, 65, 114, 189, 249, 138, 149, 214, 92, 190, 184, 138, 56, 161, - 193, 29, 128, 10, 133, 195>>, - <<192, 188, 112, 186, 54, 146, 157, 67, 180, 103, 255, 87, 87, 5, 48, - 229, 122, 184, 252, 216>> - ], - svn => <<2, 3, 0>> - }, - smdpAddress => <<"127.0.0.1">> - }}, - request_json(Req, <<"127.0.0.1:4430">>). -- To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/43504?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: I1dbdec39a60f59a693c241847272a2094672728f Gerrit-Change-Number: 43504 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1 0
0 0
[XS] Change in onomondo-eim[master]: es9p_client: rephrase TODOs for better understanding
by laforge 09 Sep '26

09 Sep '26
laforge has submitted this change. ( https://gerrit.osmocom.org/c/onomondo-eim/+/43505?usp=email ) Change subject: es9p_client: rephrase TODOs for better understanding ...................................................................... es9p_client: rephrase TODOs for better understanding Related: SYS#8100 Change-Id: I5ac1f84129e3848ab37a806b3408e38e22810a3e --- M src/es9p_client.erl 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/es9p_client.erl b/src/es9p_client.erl index 712ee9d..4f79110 100644 --- a/src/es9p_client.erl +++ b/src/es9p_client.erl @@ -54,7 +54,8 @@ }, % construct body from encoded json ReqBody = jiffy:encode(JsonBodyWithHdr, [force_utf8]), - % TODO: actually verify the certificate by providing custom root CA Cert + % TODO: Pass proper CA certificate to hackney, so that the eIM can be sure that the identity of the SM-DP+ is + % properly verfied. At the moment we do not verify anything, which is risky. SslOptions = [{verify, verify_none}], Options = [{ssl_options, SslOptions}, with_body], logger:debug( @@ -109,7 +110,8 @@ ], % construct body from encoded ASN.1 {ok, ReqBody} = 'RSPDefinitions':encode('RemoteProfileProvisioningRequest', Asn1Body), - % TODO: actually verify the certificate by providing custom root CA Cert + % TODO: Pass proper CA certificate to hackney, so that the eIM can be sure that the identity of the SM-DP+ is + % properly verfied. At the moment we do not verify anything, which is risky. SslOptions = [{verify, verify_none}], Options = [{ssl_options, SslOptions}, with_body], logger:debug( -- To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/43505?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: I5ac1f84129e3848ab37a806b3408e38e22810a3e Gerrit-Change-Number: 43505 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1 0
0 0
[S] Change in onomondo-eim[master]: esipa_asn1_handler: Add TODOs to address missing checks
by laforge 09 Sep '26

09 Sep '26
laforge has submitted this change. ( https://gerrit.osmocom.org/c/onomondo-eim/+/43506?usp=email ) Change subject: esipa_asn1_handler: Add TODOs to address missing checks ...................................................................... esipa_asn1_handler: Add TODOs to address missing checks The ASN.1 handler code lacks several checks that are required by SGP.32. Profile downloads will work fine, but we won't catch errors early. Related: SYS#8100 Change-Id: I6174fba0760a0192d59db68a430b10ab7726bcb3 --- M src/esipa_asn1_handler.erl 1 file changed, 28 insertions(+), 4 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 f1be50a..2fe7603 100644 --- a/src/esipa_asn1_handler.erl +++ b/src/esipa_asn1_handler.erl @@ -21,6 +21,10 @@ % 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 + % 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). + % setup ES9+ request message Es9Req = {initiateAuthenticationRequest, EsipaReq}, @@ -31,16 +35,20 @@ EsipaResp = case Es9Resp of {initiateAuthenticationOk, InitAuthOk} -> + % TODO: Verify serverAddress in serverSigned1: In case we ad to extract the smdpAddress from the + % Activation Code we should make sure that smdpAddress and serverAddress are equal. + % TODO: Verify SM-DP+ OID. An Activation Code may contain an SM-DP+ OID. Make sure that this OID + % matches the OID from the serverCertificate (see also SGP.32, section 3.2.3.2, step 10). TransactionId = maps:get(transactionId, InitAuthOk), mnesia_db_work:bind(Pid, TransactionId), % TODO: matchingId and ctxParams1 are not defined in the ES9+ InitiateAuthenticationResponse message. % However in ESipa those fields are optional fields and either one of it should be populated in case an % AC is used (which we do). This means we should populate those fields. The matchingId can be extracted % from the AC, which we have in the Order. If the IPAd supports eimCtxParams1Generation then it should - % be find if we would just add the matchingId field like so: maps:merge(InitAuthOk, #{matchingId => - % FIXME). Otherwise we would have to add a ctxParams1 field and populate it with the matchingId and the - % deviceInfo. The deviceInfo can be retrieved via an eUICC data request. - % (see GSMA SGP.32, section 3.1.2.3). + % be fine if we would just add the matchingId field like so: maps:merge(InitAuthOk, #{matchingId => + % MatchingId}). Otherwise we would have to add a ctxParams1 field and populate it with the matchingId + % and the deviceInfo. The deviceInfo can be retrieved via an eUICC data request. (see also GSMA SGP.32, + % section 3.2.3.2, step 11). InitAuthOkEsipa = #{ transactionId => maps:get(transactionId, InitAuthOk), serverSigned1 => maps:get(serverSigned1, InitAuthOk), @@ -102,6 +110,17 @@ fallbackAllowed => FallbackAllowed } ), + % TODO: Verify profileMetaData in case the IPAd is not able to verify the profileMetaData: At the + % moment we assume that the IPAd is able to verify the profileMetaData, but there may be IPAd + % implementations which cannot verify the profileMetaData (eimProfileMetadataVerification). In those + % cases the eIM is responsible to verify the profileMetaData, which is not implemnted yet (see also + % SGP.32, section 3.2.3.2, step 15 and 19). + % TODO: Implement compatibility Check: At the moment it is the responsibility of the REST API user to + % ensure that eIM and IPAd are compatible. Currently the REST API user must request the IpaCapabilities + % via an eUICC Data Request and know for himself what capability combinations will work with this eIM. + % To simplify this we should automate this process by requesting and caching the IpaCapabilities once, + % so that we the info within reach when we need it (similar to how we cache signPubKey, see also + % mnesia_db_euicc.hrl). AuthenticateClientOkDPEsipa = AuthClntRespEs9#{ profileMetaData => StoreMetadataRequest }, @@ -296,6 +315,11 @@ % an activationCode (option a) It still lacks download triggers via SM-DS (option b) and downloads from % the default SM-DP+ (option c). See also GSMA SGP.32, section 3.2.3.2 ActivationCode = proplists:get_value(<<"activationCode">>, Download), + % TODO: Check the contents of ActivationCode. The eIM should check the provided Activation Code and stop + % the procedure in case the Activation Code is invalid. However, it should also be mentioned that The + % missing check only has a minor impact since an invalid Activation Code will be detected on the IPAd + % side, which will cause the procedure to stop as well. (see also SGP.32, section 3.2.3.2, step 1 and + % step 4). {profileDownloadTriggerRequest, #{ profileDownloadData => {activationCode, ActivationCode}, eimTransactionId => EimTransactionId -- To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/43506?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: I6174fba0760a0192d59db68a430b10ab7726bcb3 Gerrit-Change-Number: 43506 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • ...
  • 190
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.