lists.osmocom.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2026
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
List overview
Download
gerrit-log
August 2026
----- 2026 -----
October 2026
September 2026
August 2026
July 2026
June 2026
May 2026
April 2026
March 2026
February 2026
January 2026
----- 2025 -----
December 2025
November 2025
October 2025
September 2025
August 2025
July 2025
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
gerrit-log@lists.osmocom.org
1 participants
2269 discussions
Start a n
N
ew thread
[L] Change in onomondo-ipa[master]: V1.2: Change of IpaEuiccDataRequest and results
by laforge
27 Aug '26
27 Aug '26
laforge has submitted this change. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43062?usp=email
) ( 10 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: V1.2: Change of IpaEuiccDataRequest and results ...................................................................... V1.2: Change of IpaEuiccDataRequest and results Section 2.11.1.2 * Changed tags, added tag * Two search criteria: searchCriteriaNotification, searchCriteriaEuiccPackageResult Both search criteria of the eUICC Data Request are converted into search criteria of Retrieve Notifications List Request. The tags have not only changed, but also a new tag for requesting eUICC Package Results has been added. This request cannot be emulated, because a non IoT eUICC does not store these results. In case of emulation, the eUICC Result Data includes an empty eUICC Package Result List. Related: SYS#8101 Change-Id: I411111c71787ce27615b6b66fc8b19488883d15b --- M asn1/SGP32Definitions.asn M src/ipa/libasn/IpaEuiccDataRequest.c M src/ipa/libasn/IpaEuiccDataRequest.h M src/ipa/libipa/es10b_retr_notif_from_lst.c M src/ipa/libipa/es10b_retr_notif_from_lst.h M src/ipa/libipa/proc_euicc_data_req.c 6 files changed, 203 insertions(+), 82 deletions(-) Approvals: Jenkins Builder: Verified dexter: Looks good to me, approved diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index 786ebe5..6a29c31 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -117,8 +117,10 @@ euiccCiPKIdentifierToBeUsed OCTET STRING OPTIONAL, -- CI Public Key Identifier (possibly truncated) supported on the eUICC for signature creation searchCriteriaNotification [1] CHOICE { seqNumber [0] INTEGER, - profileManagementOperation [1] NotificationEvent, - euiccPackageResults [2] NULL + profileManagementOperation [1] NotificationEvent + } OPTIONAL, + searchCriteriaEuiccPackageResult [2] CHOICE { + seqNumber [0] INTEGER } OPTIONAL, eimTransactionId [3] TransactionId OPTIONAL -- Tag '83' } diff --git a/src/ipa/libasn/IpaEuiccDataRequest.c b/src/ipa/libasn/IpaEuiccDataRequest.c index fa1924d..9e2852d 100644 --- a/src/ipa/libasn/IpaEuiccDataRequest.c +++ b/src/ipa/libasn/IpaEuiccDataRequest.c @@ -11,7 +11,15 @@ { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_searchCriteriaNotification_constr_4 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_type_searchCriteriaEuiccPackageResult_constr_8 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_searchCriteriaEuiccPackageResult_constr_8 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; @@ -34,20 +42,10 @@ 0, 0, /* No default value */ "profileManagementOperation" }, - { ATF_NOFLAGS, 0, offsetof(struct IpaEuiccDataRequest__searchCriteriaNotification, choice.euiccPackageResults), - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_NULL, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "euiccPackageResults" - }, }; static const asn_TYPE_tag2member_t asn_MAP_searchCriteriaNotification_tag2el_4[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* seqNumber */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* profileManagementOperation */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* euiccPackageResults */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* profileManagementOperation */ }; static asn_CHOICE_specifics_t asn_SPC_searchCriteriaNotification_specs_4 = { sizeof(struct IpaEuiccDataRequest__searchCriteriaNotification), @@ -55,9 +53,9 @@ offsetof(struct IpaEuiccDataRequest__searchCriteriaNotification, present), sizeof(((struct IpaEuiccDataRequest__searchCriteriaNotification *)0)->present), asn_MAP_searchCriteriaNotification_tag2el_4, - 3, /* Count of tags in the map */ + 2, /* Count of tags in the map */ 0, 0, - 3 /* Extensions start */ + 2 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_searchCriteriaNotification_4 = { @@ -70,10 +68,49 @@ 0, /* No tags (count) */ { &asn_OER_type_searchCriteriaNotification_constr_4, &asn_PER_type_searchCriteriaNotification_constr_4, CHOICE_constraint }, asn_MBR_searchCriteriaNotification_4, - 3, /* Elements count */ + 2, /* Elements count */ &asn_SPC_searchCriteriaNotification_specs_4 /* Additional specs */ }; +static asn_TYPE_member_t asn_MBR_searchCriteriaEuiccPackageResult_8[] = { + { ATF_NOFLAGS, 0, offsetof(struct IpaEuiccDataRequest__searchCriteriaEuiccPackageResult, choice.seqNumber), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "seqNumber" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_searchCriteriaEuiccPackageResult_tag2el_8[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* seqNumber */ +}; +static asn_CHOICE_specifics_t asn_SPC_searchCriteriaEuiccPackageResult_specs_8 = { + sizeof(struct IpaEuiccDataRequest__searchCriteriaEuiccPackageResult), + offsetof(struct IpaEuiccDataRequest__searchCriteriaEuiccPackageResult, _asn_ctx), + offsetof(struct IpaEuiccDataRequest__searchCriteriaEuiccPackageResult, present), + sizeof(((struct IpaEuiccDataRequest__searchCriteriaEuiccPackageResult *)0)->present), + asn_MAP_searchCriteriaEuiccPackageResult_tag2el_8, + 1, /* Count of tags in the map */ + 0, 0, + 1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_searchCriteriaEuiccPackageResult_8 = { + "searchCriteriaEuiccPackageResult", + "searchCriteriaEuiccPackageResult", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_searchCriteriaEuiccPackageResult_constr_8, &asn_PER_type_searchCriteriaEuiccPackageResult_constr_8, CHOICE_constraint }, + asn_MBR_searchCriteriaEuiccPackageResult_8, + 1, /* Elements count */ + &asn_SPC_searchCriteriaEuiccPackageResult_specs_8 /* Additional specs */ +}; + asn_TYPE_member_t asn_MBR_IpaEuiccDataRequest_1[] = { { ATF_NOFLAGS, 0, offsetof(struct IpaEuiccDataRequest, tagList), (ASN_TAG_CLASS_APPLICATION | (28 << 2)), @@ -84,7 +121,7 @@ 0, 0, /* No default value */ "tagList" }, - { ATF_POINTER, 3, offsetof(struct IpaEuiccDataRequest, euiccCiPKIdentifierToBeUsed), + { ATF_POINTER, 4, offsetof(struct IpaEuiccDataRequest, euiccCiPKIdentifierToBeUsed), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_OCTET_STRING, @@ -93,7 +130,7 @@ 0, 0, /* No default value */ "euiccCiPKIdentifierToBeUsed" }, - { ATF_POINTER, 2, offsetof(struct IpaEuiccDataRequest, searchCriteriaNotification), + { ATF_POINTER, 3, offsetof(struct IpaEuiccDataRequest, searchCriteriaNotification), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_searchCriteriaNotification_4, @@ -102,6 +139,15 @@ 0, 0, /* No default value */ "searchCriteriaNotification" }, + { ATF_POINTER, 2, offsetof(struct IpaEuiccDataRequest, searchCriteriaEuiccPackageResult), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_searchCriteriaEuiccPackageResult_8, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "searchCriteriaEuiccPackageResult" + }, { ATF_POINTER, 1, offsetof(struct IpaEuiccDataRequest, eimTransactionId), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ @@ -112,7 +158,7 @@ "eimTransactionId" }, }; -static const int asn_MAP_IpaEuiccDataRequest_oms_1[] = { 1, 2, 3 }; +static const int asn_MAP_IpaEuiccDataRequest_oms_1[] = { 1, 2, 3, 4 }; static const ber_tlv_tag_t asn_DEF_IpaEuiccDataRequest_tags_1[] = { (ASN_TAG_CLASS_CONTEXT | (82 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) @@ -121,16 +167,17 @@ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, 0, 0 }, /* euiccCiPKIdentifierToBeUsed */ { (ASN_TAG_CLASS_APPLICATION | (28 << 2)), 0, 0, 0 }, /* tagList */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 }, /* searchCriteriaNotification */ - { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* eimTransactionId */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 3, 0, 0 }, /* searchCriteriaEuiccPackageResult */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 4, 0, 0 } /* eimTransactionId */ }; asn_SEQUENCE_specifics_t asn_SPC_IpaEuiccDataRequest_specs_1 = { sizeof(struct IpaEuiccDataRequest), offsetof(struct IpaEuiccDataRequest, _asn_ctx), asn_MAP_IpaEuiccDataRequest_tag2el_1, - 4, /* Count of tags in the map */ + 5, /* Count of tags in the map */ asn_MAP_IpaEuiccDataRequest_oms_1, /* Optional members */ - 3, 0, /* Root/Additions */ - 4, /* First extension addition */ + 4, 0, /* Root/Additions */ + 5, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_IpaEuiccDataRequest = { "IpaEuiccDataRequest", @@ -144,7 +191,7 @@ /sizeof(asn_DEF_IpaEuiccDataRequest_tags_1[0]), /* 2 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_IpaEuiccDataRequest_1, - 4, /* Elements count */ + 5, /* Elements count */ &asn_SPC_IpaEuiccDataRequest_specs_1 /* Additional specs */ }; diff --git a/src/ipa/libasn/IpaEuiccDataRequest.h b/src/ipa/libasn/IpaEuiccDataRequest.h index c4f0a87..b3f0347 100644 --- a/src/ipa/libasn/IpaEuiccDataRequest.h +++ b/src/ipa/libasn/IpaEuiccDataRequest.h @@ -16,7 +16,6 @@ #include "TransactionId.h" #include <NativeInteger.h> #include "NotificationEvent.h" -#include <NULL.h> #include <constr_CHOICE.h> #include <constr_SEQUENCE.h> @@ -28,11 +27,16 @@ typedef enum IpaEuiccDataRequest__searchCriteriaNotification_PR { IpaEuiccDataRequest__searchCriteriaNotification_PR_NOTHING, /* No components present */ IpaEuiccDataRequest__searchCriteriaNotification_PR_seqNumber, - IpaEuiccDataRequest__searchCriteriaNotification_PR_profileManagementOperation, - IpaEuiccDataRequest__searchCriteriaNotification_PR_euiccPackageResults + IpaEuiccDataRequest__searchCriteriaNotification_PR_profileManagementOperation /* Extensions may appear below */ } IpaEuiccDataRequest__searchCriteriaNotification_PR; +typedef enum IpaEuiccDataRequest__searchCriteriaEuiccPackageResult_PR { + IpaEuiccDataRequest__searchCriteriaEuiccPackageResult_PR_NOTHING, /* No components present */ + IpaEuiccDataRequest__searchCriteriaEuiccPackageResult_PR_seqNumber + /* Extensions may appear below */ + +} IpaEuiccDataRequest__searchCriteriaEuiccPackageResult_PR; /* IpaEuiccDataRequest */ typedef struct IpaEuiccDataRequest { @@ -43,7 +47,6 @@ union IpaEuiccDataRequest__searchCriteriaNotification_u { long seqNumber; NotificationEvent_t profileManagementOperation; - NULL_t euiccPackageResults; /* * This type is extensible, * possible extensions are below. @@ -53,6 +56,19 @@ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } *searchCriteriaNotification; + struct IpaEuiccDataRequest__searchCriteriaEuiccPackageResult { + IpaEuiccDataRequest__searchCriteriaEuiccPackageResult_PR present; + union IpaEuiccDataRequest__searchCriteriaEuiccPackageResult_u { + long seqNumber; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } *searchCriteriaEuiccPackageResult; TransactionId_t *eimTransactionId /* OPTIONAL */; /* * This type is extensible, @@ -66,7 +82,7 @@ /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_IpaEuiccDataRequest; extern asn_SEQUENCE_specifics_t asn_SPC_IpaEuiccDataRequest_specs_1; -extern asn_TYPE_member_t asn_MBR_IpaEuiccDataRequest_1[4]; +extern asn_TYPE_member_t asn_MBR_IpaEuiccDataRequest_1[5]; #ifdef __cplusplus } diff --git a/src/ipa/libipa/es10b_retr_notif_from_lst.c b/src/ipa/libipa/es10b_retr_notif_from_lst.c index bd90b3a..ae2cc8e 100644 --- a/src/ipa/libipa/es10b_retr_notif_from_lst.c +++ b/src/ipa/libipa/es10b_retr_notif_from_lst.c @@ -66,6 +66,12 @@ } } +static void empty_euicc_package_result_list(struct ipa_es10b_retr_notif_from_lst_res *res) +{ + res->sgp32_res = IPA_ALLOC_ZERO(struct SGP32_RetrieveNotificationsListResponse); + res->sgp32_res->present = SGP32_RetrieveNotificationsListResponse_PR_euiccPackageResultList; +} + /*! Free a converted notificationList (RetrieveNotificationsListResponse). */ void free_converted_notification_list(PendingNotificationList_t *lst) { @@ -155,31 +161,32 @@ struct RetrieveNotificationsListRequest__searchCriteria search_criteria = { 0 }; struct ipa_buf *es10b_req = NULL; - if (req->dr_search_criteria) { - /* Convert from foreigen searchCriteria (see comment in header file) */ - switch (req->dr_search_criteria->present) { - case IpaEuiccDataRequest__searchCriteriaNotification_PR_seqNumber: - search_criteria.present = RetrieveNotificationsListRequest__searchCriteria_PR_seqNumber; - search_criteria.choice.seqNumber = req->dr_search_criteria->choice.seqNumber; - break; - case IpaEuiccDataRequest__searchCriteriaNotification_PR_profileManagementOperation: - search_criteria.present = - RetrieveNotificationsListRequest__searchCriteria_PR_profileManagementOperation; - search_criteria.choice.profileManagementOperation = - req->dr_search_criteria->choice.profileManagementOperation; - break; - case IpaEuiccDataRequest__searchCriteriaNotification_PR_euiccPackageResults: - IPA_LOGP_ES10X("RetrieveNotificationsList", LERROR, - "unsupported euiccPackageResults searchCriteria in IpaEuiccDataRequest!\n"); - search_criteria.present = RetrieveNotificationsListRequest__searchCriteria_PR_NOTHING; - break; - default: - IPA_LOGP_ES10X("RetrieveNotificationsList", LERROR, - "empty searchCriteria in IpaEuiccDataRequest!\n"); + switch (req->dr_tag) { + case 0xA0: + if (!req->dr_search_criteria_notification) { + IPA_LOGP_ES10X("RetrieveNotificationsList", LDEBUG, + "no searchCriteria in IpaEuiccDataRequest, requesting all notifiactions.\n"); search_criteria.present = RetrieveNotificationsListRequest__searchCriteria_PR_NOTHING; break; } - } else { + switch (req->dr_search_criteria_notification->present) { + case IpaEuiccDataRequest__searchCriteriaNotification_PR_seqNumber: + search_criteria.present = RetrieveNotificationsListRequest__searchCriteria_PR_seqNumber; + search_criteria.choice.seqNumber = req->search_criteria.choice.seqNumber; + break; + case IpaEuiccDataRequest__searchCriteriaNotification_PR_profileManagementOperation: + search_criteria.present = RetrieveNotificationsListRequest__searchCriteria_PR_profileManagementOperation; + search_criteria.choice.profileManagementOperation = + req->search_criteria.choice.profileManagementOperation; + break; + default: + IPA_LOGP_ES10X("RetrieveNotificationsList", LDEBUG, + "empty searchCriteria in IpaEuiccDataRequest, requesting all notifiactions.\n"); + search_criteria.present = RetrieveNotificationsListRequest__searchCriteria_PR_NOTHING; + break; + } + break; + default: /* Use native search_criteria as provided by caller */ search_criteria.present = req->search_criteria.present; switch (req->search_criteria.present) { @@ -215,32 +222,55 @@ struct SGP32_RetrieveNotificationsListRequest__searchCriteria search_criteria = { 0 }; struct ipa_buf *es10b_req = NULL; - if (req->dr_search_criteria) { - /* Convert from foreigen searchCriteria (see comment in header file) */ - switch (req->dr_search_criteria->present) { + switch (req->dr_tag) { + case 0xA0: + if (!req->dr_search_criteria_notification) { + IPA_LOGP_ES10X("RetrieveNotificationsList", LDEBUG, + "no searchCriteria in IpaEuiccDataRequest, requesting all notifiactions.\n"); + search_criteria.present = SGP32_RetrieveNotificationsListRequest__searchCriteria_PR_NOTHING; + break; + } + switch (req->dr_search_criteria_notification->present) { case IpaEuiccDataRequest__searchCriteriaNotification_PR_seqNumber: search_criteria.present = SGP32_RetrieveNotificationsListRequest__searchCriteria_PR_seqNumber; - search_criteria.choice.seqNumber = req->dr_search_criteria->choice.seqNumber; + search_criteria.choice.seqNumber = req->dr_search_criteria_notification->choice.seqNumber; break; case IpaEuiccDataRequest__searchCriteriaNotification_PR_profileManagementOperation: search_criteria.present = SGP32_RetrieveNotificationsListRequest__searchCriteria_PR_profileManagementOperation; search_criteria.choice.profileManagementOperation = - req->dr_search_criteria->choice.profileManagementOperation; - break; - case IpaEuiccDataRequest__searchCriteriaNotification_PR_euiccPackageResults: - search_criteria.present = - SGP32_RetrieveNotificationsListRequest__searchCriteria_PR_euiccPackageResults; - search_criteria.choice.euiccPackageResults = - req->dr_search_criteria->choice.euiccPackageResults; + req->dr_search_criteria_notification->choice.profileManagementOperation; break; default: - IPA_LOGP_ES10X("RetrieveNotificationsList", LERROR, - "empty searchCriteria in IpaEuiccDataRequest!\n"); - search_criteria.present = RetrieveNotificationsListRequest__searchCriteria_PR_NOTHING; + IPA_LOGP_ES10X("RetrieveNotificationsList", LDEBUG, + "empty searchCriteria in IpaEuiccDataRequest, requesting all notifiactions.\n"); + search_criteria.present = + SGP32_RetrieveNotificationsListRequest__searchCriteria_PR_NOTHING; break; } - } else { + break; + case 0xA2: + if (!req->dr_search_criteria_epr) { + IPA_LOGP_ES10X("RetrieveNotificationsList", LDEBUG, + "no searchCriteria in IpaEuiccDataRequest, requesting all eUICC Package Results.\n"); + search_criteria.present = + SGP32_RetrieveNotificationsListRequest__searchCriteria_PR_euiccPackageResults; + break; + } + switch (req->dr_search_criteria_epr->present) { + case IpaEuiccDataRequest__searchCriteriaEuiccPackageResult_PR_seqNumber: + search_criteria.present = + SGP32_RetrieveNotificationsListRequest__searchCriteria_PR_seqNumber; + search_criteria.choice.seqNumber = + req->dr_search_criteria_notification->choice.seqNumber; + break; + default: + search_criteria.present = + SGP32_RetrieveNotificationsListRequest__searchCriteria_PR_euiccPackageResults; + break; + } + break; + default: /* Use native search_criteria as provided by caller */ search_criteria = req->search_criteria; } @@ -265,10 +295,17 @@ struct ipa_es10b_retr_notif_from_lst_res *res = IPA_ALLOC_ZERO(struct ipa_es10b_retr_notif_from_lst_res); int rc; - if (ctx->cfg->iot_euicc_emu_enabled) + if (ctx->cfg->iot_euicc_emu_enabled) { + if (req->dr_tag == 0xA2) { + IPA_LOGP_ES10X("RetrieveNotificationsList", LINFO, + "IoT eUICC emulation active, provide empty euiccPackageResult list.\n"); + empty_euicc_package_result_list(res); + return res; + } es10b_req = enc_retr_notif_from_lst_req(req); - else + } else { es10b_req = enc_retr_notif_from_lst_req_sgp32(req); + } if (!es10b_req) { IPA_LOGP_ES10X("RetrieveNotificationsList", LERROR, "unable to encode ES10b request\n"); goto error; diff --git a/src/ipa/libipa/es10b_retr_notif_from_lst.h b/src/ipa/libipa/es10b_retr_notif_from_lst.h index 2773356..33aaf5d 100644 --- a/src/ipa/libipa/es10b_retr_notif_from_lst.h +++ b/src/ipa/libipa/es10b_retr_notif_from_lst.h @@ -19,7 +19,9 @@ /* When the caller has access to a search searchCriteria that originates from an IpaEuiccDataRequest, the * pointer to it may be passed here. The function will then atomatically convert the searchCriteria into * the native RetrieveNotificationsListRequest format. */ - const struct IpaEuiccDataRequest__searchCriteriaNotification *dr_search_criteria; + const struct IpaEuiccDataRequest__searchCriteriaNotification *dr_search_criteria_notification; + const struct IpaEuiccDataRequest__searchCriteriaEuiccPackageResult *dr_search_criteria_epr; + uint16_t dr_tag; }; struct ipa_es10b_retr_notif_from_lst_res { diff --git a/src/ipa/libipa/proc_euicc_data_req.c b/src/ipa/libipa/proc_euicc_data_req.c index 41cd592..d099694 100644 --- a/src/ipa/libipa/proc_euicc_data_req.c +++ b/src/ipa/libipa/proc_euicc_data_req.c @@ -105,7 +105,8 @@ struct ipa_es10b_get_certs_req get_certs_req = { 0 }; struct ipa_es10b_get_certs_res *get_certs_res = NULL; struct ipa_es10b_retr_notif_from_lst_req retr_notif_from_lst_req = { 0 }; - struct ipa_es10b_retr_notif_from_lst_res *retr_notif_from_lst_res = NULL; + struct ipa_es10b_retr_notif_from_lst_res *retr_notif_from_lst_res_a0 = NULL; + struct ipa_es10b_retr_notif_from_lst_res *retr_notif_from_lst_res_a2 = NULL; struct ipa_esipa_prvde_eim_pkg_rslt_req prvde_eim_pkg_rslt_req = { 0 }; struct ipa_esipa_prvde_eim_pkg_rslt_res *prvde_eim_pkg_rslt_res = NULL; @@ -114,7 +115,7 @@ /* Collect requested data */ tag_list = IPA_BUF_FROM_ASN(&pars->ipa_euicc_data_request->tagList); - if (ipa_tag_in_taglist(0x80, tag_list)) { + if (ipa_tag_in_taglist(0x81, tag_list)) { IPA_LOGP(SIPA, LINFO, "eIM asks for Default SM-DP+ address\n"); euicc_cfg_addr = ipa_es10a_get_euicc_cfg_addr(ctx); if (euicc_cfg_addr && euicc_cfg_addr->res->defaultDpAddress) @@ -180,7 +181,7 @@ } } - if (ipa_tag_in_taglist(0x88, tag_list)) { + if (ipa_tag_in_taglist(0xA8, tag_list)) { IPA_LOGP(SIPA, LINFO, "eIM asks for IPA Capabilities\n"); ipa_euicc_data_response.choice.ipaEuiccData.ipaCapabilities = make_ipa_capabilties(); } else { @@ -194,15 +195,29 @@ ipa_euicc_data_response.choice.ipaEuiccData.deviceInfo = NULL; } - if (ipa_tag_in_taglist(0xBF2B, tag_list)) { - IPA_LOGP(SIPA, LINFO, "eIM asks for List of Notifications and/or eUICC Package Results\n"); + if (ipa_tag_in_taglist(0xA0, tag_list)) { + IPA_LOGP(SIPA, LINFO, "eIM asks for List of Notifications\n"); - retr_notif_from_lst_req.dr_search_criteria = pars->ipa_euicc_data_request->searchCriteriaNotification; - retr_notif_from_lst_res = ipa_es10b_retr_notif_from_lst(ctx, &retr_notif_from_lst_req); - if (retr_notif_from_lst_res && retr_notif_from_lst_res->sgp32_res && - retr_notif_from_lst_res->sgp32_res->present == SGP32_RetrieveNotificationsListResponse_PR_notificationList) { + retr_notif_from_lst_req.dr_search_criteria_notification = pars->ipa_euicc_data_request->searchCriteriaNotification; + retr_notif_from_lst_req.dr_tag = 0xA0; + retr_notif_from_lst_res_a0 = ipa_es10b_retr_notif_from_lst(ctx, &retr_notif_from_lst_req); + if (retr_notif_from_lst_res_a0 && retr_notif_from_lst_res_a0->sgp32_res && + retr_notif_from_lst_res_a0->sgp32_res->present == SGP32_RetrieveNotificationsListResponse_PR_notificationList) { ipa_euicc_data_response.choice.ipaEuiccData.notificationsList = - (struct PendingNotificationList *)&retr_notif_from_lst_res->sgp32_res->choice.notificationList; + &retr_notif_from_lst_res_a0->sgp32_res->choice.notificationList; + } + } + + if (ipa_tag_in_taglist(0xA2, tag_list)) { + IPA_LOGP(SIPA, LINFO, "eIM asks for eUICC Package Results\n"); + + retr_notif_from_lst_req.dr_search_criteria_epr = pars->ipa_euicc_data_request->searchCriteriaEuiccPackageResult; + retr_notif_from_lst_req.dr_tag = 0xA2; + retr_notif_from_lst_res_a2 = ipa_es10b_retr_notif_from_lst(ctx, &retr_notif_from_lst_req); + if (retr_notif_from_lst_res_a2 && retr_notif_from_lst_res_a2->sgp32_res && + retr_notif_from_lst_res_a2->sgp32_res->present == SGP32_RetrieveNotificationsListResponse_PR_euiccPackageResultList) { + ipa_euicc_data_response.choice.ipaEuiccData.euiccPackageResultList = + &retr_notif_from_lst_res_a2->sgp32_res->choice.euiccPackageResultList; } } @@ -226,7 +241,8 @@ ipa_es10b_get_euicc_info_free(euicc_info_2); ipa_es10b_get_eim_cfg_data_free(eim_cfg_data); ipa_es10b_get_certs_res_free(get_certs_res); - ipa_es10b_retr_notif_from_lst_res_free(retr_notif_from_lst_res); + ipa_es10b_retr_notif_from_lst_res_free(retr_notif_from_lst_res_a0); + ipa_es10b_retr_notif_from_lst_res_free(retr_notif_from_lst_res_a2); ipa_esipa_prvde_eim_pkg_rslt_free(prvde_eim_pkg_rslt_res); return 0; error: @@ -236,7 +252,8 @@ ipa_es10b_get_euicc_info_free(euicc_info_2); ipa_es10b_get_eim_cfg_data_free(eim_cfg_data); ipa_es10b_get_certs_res_free(get_certs_res); - ipa_es10b_retr_notif_from_lst_res_free(retr_notif_from_lst_res); + ipa_es10b_retr_notif_from_lst_res_free(retr_notif_from_lst_res_a0); + ipa_es10b_retr_notif_from_lst_res_free(retr_notif_from_lst_res_a2); ipa_esipa_prvde_eim_pkg_rslt_free(prvde_eim_pkg_rslt_res); IPA_LOGP(SIPA, LINFO, "IPA get EUICC data failed!\n"); return -EINVAL; -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43062?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: I411111c71787ce27615b6b66fc8b19488883d15b Gerrit-Change-Number: 43062 Gerrit-PatchSet: 13 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1
0
0
0
[XS] Change in onomondo-ipa[master]: V1.2: Change tag of eimIdType in EimIdInfo
by laforge
27 Aug '26
27 Aug '26
laforge has submitted this change. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43065?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: V1.2: Change tag of eimIdType in EimIdInfo ...................................................................... V1.2: Change tag of eimIdType in EimIdInfo Reference: SGP.23 Section 2.11.2.1 Related: SYS#8101 Change-Id: Id96353ef74ffe51aa7de4848832f32e8f58ab4df --- M asn1/SGP32Definitions.asn M src/ipa/libasn/EimIdInfo.c 2 files changed, 3 insertions(+), 3 deletions(-) Approvals: dexter: Looks good to me, approved Jenkins Builder: Verified diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index 4fbda2a..41f1025 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -299,7 +299,7 @@ } EimIdInfo ::= SEQUENCE { eimId [0] UTF8String (SIZE(1..128)), - eimIdType [4] EimIdType OPTIONAL -- present in case of eimIdTypeOid and eimIdTypeFqdn + eimIdType [2] EimIdType OPTIONAL -- present in case of eimIdTypeOid and eimIdTypeFqdn } -- ASN1STOP diff --git a/src/ipa/libasn/EimIdInfo.c b/src/ipa/libasn/EimIdInfo.c index 9dc4d68..3ef299c 100644 --- a/src/ipa/libasn/EimIdInfo.c +++ b/src/ipa/libasn/EimIdInfo.c @@ -58,7 +58,7 @@ "eimId" }, { ATF_POINTER, 1, offsetof(struct EimIdInfo, eimIdType), - (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_EimIdType, 0, @@ -73,7 +73,7 @@ }; static const asn_TYPE_tag2member_t asn_MAP_EimIdInfo_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* eimId */ - { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 1, 0, 0 } /* eimIdType */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 } /* eimIdType */ }; asn_SEQUENCE_specifics_t asn_SPC_EimIdInfo_specs_1 = { sizeof(struct EimIdInfo), -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43065?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: Id96353ef74ffe51aa7de4848832f32e8f58ab4df Gerrit-Change-Number: 43065 Gerrit-PatchSet: 13 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1
0
0
0
[XS] Change in onomondo-ipa[master]: V1.2: Add error codes to GetEimPackageResponse
by laforge
27 Aug '26
27 Aug '26
laforge has submitted this change. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43066?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: V1.2: Add error codes to GetEimPackageResponse ...................................................................... V1.2: Add error codes to GetEimPackageResponse Add several new error codes to eimPackageError in GetEimPackageResponse. These errors are displayed during IPA process. Reference: SGP.23 Section 6.3.2.6 Related: SYS#8101 Change-Id: Ic0cdce1f5269794f37c5da3a63985706a7959184 --- M asn1/SGP32Definitions.asn M src/ipa/libasn/GetEimPackageResponse.h M src/ipa/libipa/esipa_get_eim_pkg.c 3 files changed, 9 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified dexter: Looks good to me, approved diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index 41f1025..4652cdd 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -1028,6 +1028,9 @@ profileDownloadTriggerRequest [84] ProfileDownloadTriggerRequest, -- Tag 'BF54' eimPackageError INTEGER { noEimPackageAvailable(1), + eidNotFound(2), + invalidEid(3), + missingEid(4), undefinedError(127) } } diff --git a/src/ipa/libasn/GetEimPackageResponse.h b/src/ipa/libasn/GetEimPackageResponse.h index 6a97c8e..126cf41 100644 --- a/src/ipa/libasn/GetEimPackageResponse.h +++ b/src/ipa/libasn/GetEimPackageResponse.h @@ -34,6 +34,9 @@ } GetEimPackageResponse_PR; typedef enum GetEimPackageResponse__eimPackageError { GetEimPackageResponse__eimPackageError_noEimPackageAvailable = 1, + GetEimPackageResponse__eimPackageError_eidNotFound = 2, + GetEimPackageResponse__eimPackageError_invalidEid = 3, + GetEimPackageResponse__eimPackageError_missingEid = 4, GetEimPackageResponse__eimPackageError_undefinedError = 127 } e_GetEimPackageResponse__eimPackageError; diff --git a/src/ipa/libipa/esipa_get_eim_pkg.c b/src/ipa/libipa/esipa_get_eim_pkg.c index 0ecafd5..4145ac3 100644 --- a/src/ipa/libipa/esipa_get_eim_pkg.c +++ b/src/ipa/libipa/esipa_get_eim_pkg.c @@ -22,6 +22,9 @@ static const struct num_str_map error_code_strings[] = { { GetEimPackageResponse__eimPackageError_noEimPackageAvailable, "noEimPackageAvailable" }, + { GetEimPackageResponse__eimPackageError_eidNotFound, "eidNotFound" }, + { GetEimPackageResponse__eimPackageError_invalidEid, "invalidEid" }, + { GetEimPackageResponse__eimPackageError_missingEid, "missingEid" }, { GetEimPackageResponse__eimPackageError_undefinedError, "undefinedError" }, { 0, NULL } }; -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43066?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: Ic0cdce1f5269794f37c5da3a63985706a7959184 Gerrit-Change-Number: 43066 Gerrit-PatchSet: 13 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1
0
0
0
[XS] Change in onomondo-ipa[master]: V1.2: Specify tag values in HandleNotificationEsipa
by laforge
27 Aug '26
27 Aug '26
laforge has submitted this change. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43067?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: V1.2: Specify tag values in HandleNotificationEsipa ...................................................................... V1.2: Specify tag values in HandleNotificationEsipa Add specific tag values to fields in HandleNotificationEsipa. Reference: SGP.23 Section 6.3.2.4 Related: SYS#8101 Change-Id: I3abeb7295fd43e499105086a49bd62c4f835aeed --- M asn1/SGP32Definitions.asn M src/ipa/libasn/HandleNotificationEsipa.c 2 files changed, 4 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified dexter: Looks good to me, approved diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index 4652cdd..a53fe51 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -980,8 +980,8 @@ -- Section 6.3.2.4 -- ASN1START HandleNotificationEsipa ::= [61] CHOICE { -- Tag 'BF3D' - pendingNotification SGP32-PendingNotification, -- A Notification to be delivered to a Notification Receiver, possibly in compact format - provideEimPackageResult ProvideEimPackageResult + pendingNotification [0] SGP32-PendingNotification, -- A Notification to be delivered to a Notification Receiver, possibly in compact format + provideEimPackageResult [80] ProvideEimPackageResult -- Tag 'BF50' } -- ASN1STOP diff --git a/src/ipa/libasn/HandleNotificationEsipa.c b/src/ipa/libasn/HandleNotificationEsipa.c index ec44dd7..8f00be9 100644 --- a/src/ipa/libasn/HandleNotificationEsipa.c +++ b/src/ipa/libasn/HandleNotificationEsipa.c @@ -26,7 +26,7 @@ "pendingNotification" }, { ATF_NOFLAGS, 0, offsetof(struct HandleNotificationEsipa, choice.provideEimPackageResult), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_CONTEXT | (80 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_ProvideEimPackageResult, 0, @@ -40,7 +40,7 @@ }; static const asn_TYPE_tag2member_t asn_MAP_HandleNotificationEsipa_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pendingNotification */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* provideEimPackageResult */ + { (ASN_TAG_CLASS_CONTEXT | (80 << 2)), 1, 0, 0 } /* provideEimPackageResult */ }; asn_CHOICE_specifics_t asn_SPC_HandleNotificationEsipa_specs_1 = { sizeof(struct HandleNotificationEsipa), -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43067?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: I3abeb7295fd43e499105086a49bd62c4f835aeed Gerrit-Change-Number: 43067 Gerrit-PatchSet: 13 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1
0
0
0
[XS] Change in onomondo-ipa[master]: V1.2: Rename field in GetBoundProfilePackageResponseEsipa
by laforge
27 Aug '26
27 Aug '26
laforge has submitted this change. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43068?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: V1.2: Rename field in GetBoundProfilePackageResponseEsipa ...................................................................... V1.2: Rename field in GetBoundProfilePackageResponseEsipa Rename field profileMetadataMismatch to metadataMismatch in GetBoundProfilePackageResponseEsipa. Reference: SGP.23 Section 6.3.2.3 Related: SYS#8101 Change-Id: I87965b68bde39d29317f9848aa3a88d9966c4e78 --- M asn1/SGP32Definitions.asn M src/ipa/libasn/GetBoundProfilePackageResponseEsipa.h M src/ipa/libipa/esipa_get_bnd_prfle_pkg.c 3 files changed, 4 insertions(+), 4 deletions(-) Approvals: dexter: Looks good to me, approved Jenkins Builder: Verified diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index a53fe51..4ebe917 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -966,7 +966,7 @@ confirmationCodeRetriesExceeded(4), bppRebindingRefused(5), downloadOrderExpired(6), - profileMetadataMismatch(50), + metadataMismatch(50), invalidTransactionId(95), undefinedError(127) } diff --git a/src/ipa/libasn/GetBoundProfilePackageResponseEsipa.h b/src/ipa/libasn/GetBoundProfilePackageResponseEsipa.h index 50366ce..b458fa2 100644 --- a/src/ipa/libasn/GetBoundProfilePackageResponseEsipa.h +++ b/src/ipa/libasn/GetBoundProfilePackageResponseEsipa.h @@ -35,7 +35,7 @@ GetBoundProfilePackageResponseEsipa__getBoundProfilePackageErrorEsipa_confirmationCodeRetriesExceeded = 4, GetBoundProfilePackageResponseEsipa__getBoundProfilePackageErrorEsipa_bppRebindingRefused = 5, GetBoundProfilePackageResponseEsipa__getBoundProfilePackageErrorEsipa_downloadOrderExpired = 6, - GetBoundProfilePackageResponseEsipa__getBoundProfilePackageErrorEsipa_profileMetadataMismatch = 50, + GetBoundProfilePackageResponseEsipa__getBoundProfilePackageErrorEsipa_metadataMismatch = 50, GetBoundProfilePackageResponseEsipa__getBoundProfilePackageErrorEsipa_invalidTransactionId = 95, GetBoundProfilePackageResponseEsipa__getBoundProfilePackageErrorEsipa_undefinedError = 127 } e_GetBoundProfilePackageResponseEsipa__getBoundProfilePackageErrorEsipa; diff --git a/src/ipa/libipa/esipa_get_bnd_prfle_pkg.c b/src/ipa/libipa/esipa_get_bnd_prfle_pkg.c index 4e25c3b..d988d0e 100644 --- a/src/ipa/libipa/esipa_get_bnd_prfle_pkg.c +++ b/src/ipa/libipa/esipa_get_bnd_prfle_pkg.c @@ -36,8 +36,8 @@ "bppRebindingRefused" }, { GetBoundProfilePackageResponseEsipa__getBoundProfilePackageErrorEsipa_downloadOrderExpired, "downloadOrderExpired" }, - { GetBoundProfilePackageResponseEsipa__getBoundProfilePackageErrorEsipa_profileMetadataMismatch, - "profileMetadataMismatch" }, + { GetBoundProfilePackageResponseEsipa__getBoundProfilePackageErrorEsipa_metadataMismatch, + "metadataMismatch" }, { GetBoundProfilePackageResponseEsipa__getBoundProfilePackageErrorEsipa_invalidTransactionId, "invalidTransactionId" }, { GetBoundProfilePackageResponseEsipa__getBoundProfilePackageErrorEsipa_undefinedError, "undefinedError" }, -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43068?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: I87965b68bde39d29317f9848aa3a88d9966c4e78 Gerrit-Change-Number: 43068 Gerrit-PatchSet: 13 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1
0
0
0
[S] Change in onomondo-ipa[master]: V1.2: Change tag in TransferEimPackageResponse
by laforge
27 Aug '26
27 Aug '26
laforge has submitted this change. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43070?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: V1.2: Change tag in TransferEimPackageResponse ...................................................................... V1.2: Change tag in TransferEimPackageResponse Change tag value of notificationList in TransferEimPackageResponse. Also change it from RetrieveNotificationsListResponse to PendingNotificationList. Reference: SGP.23 Section 6.3.1 Related: SYS#8101 Change-Id: I4c9cdd1b79ec22a1d5e36d1720cf5c703890c28b --- M asn1/SGP32Definitions.asn M src/ipa/libasn/SGP32-RetrieveNotificationsListResponse.c M src/ipa/libasn/SGP32-RetrieveNotificationsListResponse.h M src/ipa/libasn/TransferEimPackageResponse.c M src/ipa/libasn/TransferEimPackageResponse.h 5 files changed, 9 insertions(+), 12 deletions(-) Approvals: dexter: Looks good to me, approved Jenkins Builder: Verified diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index 77e1f16..acf31d6 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -1085,7 +1085,7 @@ euiccPackageResult [81] EuiccPackageResult, -- Tag 'BF51' ePRAndNotifications SEQUENCE { euiccPackageResult [81] EuiccPackageResult, -- Tag 'BF51' - notificationList [43] SGP32-RetrieveNotificationsListResponse -- Tag 'BF2B' + notificationList [0] PendingNotificationList -- Tag 'A0' }, ipaEuiccDataResponse [82] IpaEuiccDataResponse, -- Tag 'BF52' eimPackageReceived NULL, diff --git a/src/ipa/libasn/SGP32-RetrieveNotificationsListResponse.c b/src/ipa/libasn/SGP32-RetrieveNotificationsListResponse.c index 29fb7c0..9c79532 100644 --- a/src/ipa/libasn/SGP32-RetrieveNotificationsListResponse.c +++ b/src/ipa/libasn/SGP32-RetrieveNotificationsListResponse.c @@ -10,12 +10,12 @@ static asn_oer_constraints_t asn_OER_type_SGP32_RetrieveNotificationsListResponse_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; -asn_per_constraints_t asn_PER_type_SGP32_RetrieveNotificationsListResponse_constr_1 CC_NOTUSED = { +static asn_per_constraints_t asn_PER_type_SGP32_RetrieveNotificationsListResponse_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; -asn_TYPE_member_t asn_MBR_SGP32_RetrieveNotificationsListResponse_1[] = { +static asn_TYPE_member_t asn_MBR_SGP32_RetrieveNotificationsListResponse_1[] = { { ATF_NOFLAGS, 0, offsetof(struct SGP32_RetrieveNotificationsListResponse, choice.notificationList), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ @@ -52,7 +52,7 @@ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* notificationsListResultError */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* euiccPackageResultList */ }; -asn_CHOICE_specifics_t asn_SPC_SGP32_RetrieveNotificationsListResponse_specs_1 = { +static asn_CHOICE_specifics_t asn_SPC_SGP32_RetrieveNotificationsListResponse_specs_1 = { sizeof(struct SGP32_RetrieveNotificationsListResponse), offsetof(struct SGP32_RetrieveNotificationsListResponse, _asn_ctx), offsetof(struct SGP32_RetrieveNotificationsListResponse, present), diff --git a/src/ipa/libasn/SGP32-RetrieveNotificationsListResponse.h b/src/ipa/libasn/SGP32-RetrieveNotificationsListResponse.h index 380cffe..d204f13 100644 --- a/src/ipa/libasn/SGP32-RetrieveNotificationsListResponse.h +++ b/src/ipa/libasn/SGP32-RetrieveNotificationsListResponse.h @@ -53,9 +53,6 @@ /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_SGP32_RetrieveNotificationsListResponse; -extern asn_CHOICE_specifics_t asn_SPC_SGP32_RetrieveNotificationsListResponse_specs_1; -extern asn_TYPE_member_t asn_MBR_SGP32_RetrieveNotificationsListResponse_1[3]; -extern asn_per_constraints_t asn_PER_type_SGP32_RetrieveNotificationsListResponse_constr_1; #ifdef __cplusplus } diff --git a/src/ipa/libasn/TransferEimPackageResponse.c b/src/ipa/libasn/TransferEimPackageResponse.c index 365b82a..4498e59 100644 --- a/src/ipa/libasn/TransferEimPackageResponse.c +++ b/src/ipa/libasn/TransferEimPackageResponse.c @@ -26,9 +26,9 @@ "euiccPackageResult" }, { ATF_NOFLAGS, 0, offsetof(struct TransferEimPackageResponse__ePRAndNotifications, notificationList), - (ASN_TAG_CLASS_CONTEXT | (43 << 2)), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ - &asn_DEF_SGP32_RetrieveNotificationsListResponse, + &asn_DEF_PendingNotificationList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ @@ -39,7 +39,7 @@ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_ePRAndNotifications_tag2el_3[] = { - { (ASN_TAG_CLASS_CONTEXT | (43 << 2)), 1, 0, 0 }, /* notificationList */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* notificationList */ { (ASN_TAG_CLASS_CONTEXT | (81 << 2)), 0, 0, 0 } /* euiccPackageResult */ }; static asn_SEQUENCE_specifics_t asn_SPC_ePRAndNotifications_specs_3 = { diff --git a/src/ipa/libasn/TransferEimPackageResponse.h b/src/ipa/libasn/TransferEimPackageResponse.h index 7c61340..e82d871 100644 --- a/src/ipa/libasn/TransferEimPackageResponse.h +++ b/src/ipa/libasn/TransferEimPackageResponse.h @@ -16,7 +16,7 @@ #include "IpaEuiccDataResponse.h" #include <NULL.h> #include <NativeInteger.h> -#include "SGP32-RetrieveNotificationsListResponse.h" +#include "PendingNotificationList.h" #include <constr_SEQUENCE.h> #include <constr_CHOICE.h> @@ -48,7 +48,7 @@ EuiccPackageResult_t euiccPackageResult; struct TransferEimPackageResponse__ePRAndNotifications { EuiccPackageResult_t euiccPackageResult; - SGP32_RetrieveNotificationsListResponse_t notificationList; + PendingNotificationList_t notificationList; /* * This type is extensible, * possible extensions are below. -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43070?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: I4c9cdd1b79ec22a1d5e36d1720cf5c703890c28b Gerrit-Change-Number: 43070 Gerrit-PatchSet: 13 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1
0
0
0
[S] Change in onomondo-ipa[master]: V1.2: Add eimValue to CompactOtherSignedNotification
by laforge
27 Aug '26
27 Aug '26
laforge has submitted this change. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43071?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: V1.2: Add eimValue to CompactOtherSignedNotification ...................................................................... V1.2: Add eimValue to CompactOtherSignedNotification The IPA just forwards the message, so no change in process is required. Reference: SGP.23 Section 5.14.7 Related: SYS#8101 Change-Id: I0183ef6555d23d762e6c8fa8584453b3a07d4940 --- M asn1/SGP32Definitions.asn M src/ipa/libasn/CompactOtherSignedNotification.c M src/ipa/libasn/CompactOtherSignedNotification.h 3 files changed, 22 insertions(+), 7 deletions(-) Approvals: dexter: Looks good to me, approved Jenkins Builder: Verified diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index acf31d6..605b3be 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -836,6 +836,7 @@ simaResponse OCTET STRING OPTIONAL -- MUST be present if the simaResponse value (EUICCResponse) is different from the 9-byte value ‘30 07 A0 05 30 03 80 01 00’ representing success } CompactOtherSignedNotification ::= SEQUENCE { + eidValue [APPLICATION 26] Octet16 OPTIONAL, -- Tag '5A' tbsOtherNotification NotificationMetadata, euiccNotificationSignature [APPLICATION 55] OCTET STRING -- eUICC signature of tbsOtherNotification, Tag '5F37' } diff --git a/src/ipa/libasn/CompactOtherSignedNotification.c b/src/ipa/libasn/CompactOtherSignedNotification.c index 1fa5d4b..9406fd7 100644 --- a/src/ipa/libasn/CompactOtherSignedNotification.c +++ b/src/ipa/libasn/CompactOtherSignedNotification.c @@ -8,6 +8,15 @@ #include "CompactOtherSignedNotification.h" asn_TYPE_member_t asn_MBR_CompactOtherSignedNotification_1[] = { + { ATF_POINTER, 1, offsetof(struct CompactOtherSignedNotification, eidValue), + (ASN_TAG_CLASS_APPLICATION | (26 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Octet16, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eidValue" + }, { ATF_NOFLAGS, 0, offsetof(struct CompactOtherSignedNotification, tbsOtherNotification), (ASN_TAG_CLASS_CONTEXT | (47 << 2)), 0, @@ -27,20 +36,23 @@ "euiccNotificationSignature" }, }; +static const int asn_MAP_CompactOtherSignedNotification_oms_1[] = { 0 }; static const ber_tlv_tag_t asn_DEF_CompactOtherSignedNotification_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_CompactOtherSignedNotification_tag2el_1[] = { - { (ASN_TAG_CLASS_APPLICATION | (55 << 2)), 1, 0, 0 }, /* euiccNotificationSignature */ - { (ASN_TAG_CLASS_CONTEXT | (47 << 2)), 0, 0, 0 } /* tbsOtherNotification */ + { (ASN_TAG_CLASS_APPLICATION | (26 << 2)), 0, 0, 0 }, /* eidValue */ + { (ASN_TAG_CLASS_APPLICATION | (55 << 2)), 2, 0, 0 }, /* euiccNotificationSignature */ + { (ASN_TAG_CLASS_CONTEXT | (47 << 2)), 1, 0, 0 } /* tbsOtherNotification */ }; asn_SEQUENCE_specifics_t asn_SPC_CompactOtherSignedNotification_specs_1 = { sizeof(struct CompactOtherSignedNotification), offsetof(struct CompactOtherSignedNotification, _asn_ctx), asn_MAP_CompactOtherSignedNotification_tag2el_1, - 2, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 2, /* First extension addition */ + 3, /* Count of tags in the map */ + asn_MAP_CompactOtherSignedNotification_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_CompactOtherSignedNotification = { "CompactOtherSignedNotification", @@ -54,7 +66,7 @@ /sizeof(asn_DEF_CompactOtherSignedNotification_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_CompactOtherSignedNotification_1, - 2, /* Elements count */ + 3, /* Elements count */ &asn_SPC_CompactOtherSignedNotification_specs_1 /* Additional specs */ }; diff --git a/src/ipa/libasn/CompactOtherSignedNotification.h b/src/ipa/libasn/CompactOtherSignedNotification.h index c6067cf..9747ba4 100644 --- a/src/ipa/libasn/CompactOtherSignedNotification.h +++ b/src/ipa/libasn/CompactOtherSignedNotification.h @@ -12,6 +12,7 @@ #include <asn_application.h> /* Including external dependencies */ +#include "Octet16.h" #include "NotificationMetadata.h" #include <OCTET_STRING.h> #include <constr_SEQUENCE.h> @@ -22,6 +23,7 @@ /* CompactOtherSignedNotification */ typedef struct CompactOtherSignedNotification { + Octet16_t *eidValue /* OPTIONAL */; NotificationMetadata_t tbsOtherNotification; OCTET_STRING_t euiccNotificationSignature; /* @@ -36,7 +38,7 @@ /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_CompactOtherSignedNotification; extern asn_SEQUENCE_specifics_t asn_SPC_CompactOtherSignedNotification_specs_1; -extern asn_TYPE_member_t asn_MBR_CompactOtherSignedNotification_1[2]; +extern asn_TYPE_member_t asn_MBR_CompactOtherSignedNotification_1[3]; #ifdef __cplusplus } -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43071?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: I0183ef6555d23d762e6c8fa8584453b3a07d4940 Gerrit-Change-Number: 43071 Gerrit-PatchSet: 13 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1
0
0
0
[M] Change in onomondo-ipa[master]: V1.2: Rename field in PSMO
by laforge
27 Aug '26
27 Aug '26
laforge has submitted this change. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43069?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: V1.2: Rename field in PSMO ...................................................................... V1.2: Rename field in PSMO Rename two field in PSMO. Reference: SGP.23 Section 2.11.1.1.3 Related: SYS#8101 Change-Id: I9336f18aaf104629845948877294437188979376 --- M asn1/SGP32Definitions.asn M src/ipa/libasn/Psmo.c M src/ipa/libasn/Psmo.h M src/ipa/libipa/context.h M src/ipa/libipa/es10b_euicc_mem_rst.c M src/ipa/libipa/es10b_immediate_enable.c M src/ipa/libipa/es10b_load_bnd_prfle_pkg.c M src/ipa/libipa/es10b_load_euicc_pkg.c M src/ipa/libipa/ipad.c 9 files changed, 67 insertions(+), 63 deletions(-) Approvals: Jenkins Builder: Verified dexter: Looks good to me, approved diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index 4ebe917..77e1f16 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -100,8 +100,8 @@ getRAT [6] SEQUENCE {}, configureImmediateEnable [7] SEQUENCE { immediateEnableFlag [0] NULL OPTIONAL, - smdpOid [1] OBJECT IDENTIFIER OPTIONAL, - smdpAddress [2] UTF8String OPTIONAL + defaultSmdpOid [1] OBJECT IDENTIFIER OPTIONAL, + defaultSmdpAddress [2] UTF8String OPTIONAL }, setFallbackAttribute [8] SEQUENCE {iccid [APPLICATION 26] Iccid}, unsetFallbackAttribute [9] SEQUENCE {}, diff --git a/src/ipa/libasn/Psmo.c b/src/ipa/libasn/Psmo.c index e6bb849..d3683a9 100644 --- a/src/ipa/libasn/Psmo.c +++ b/src/ipa/libasn/Psmo.c @@ -194,23 +194,23 @@ 0, 0, /* No default value */ "immediateEnableFlag" }, - { ATF_POINTER, 2, offsetof(struct Psmo__configureImmediateEnable, smdpOid), + { ATF_POINTER, 2, offsetof(struct Psmo__configureImmediateEnable, defaultSmdpOid), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_OBJECT_IDENTIFIER, 0, { 0, 0, 0 }, 0, 0, /* No default value */ - "smdpOid" + "defaultSmdpOid" }, - { ATF_POINTER, 1, offsetof(struct Psmo__configureImmediateEnable, smdpAddress), + { ATF_POINTER, 1, offsetof(struct Psmo__configureImmediateEnable, defaultSmdpAddress), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_UTF8String, 0, { 0, 0, 0 }, 0, 0, /* No default value */ - "smdpAddress" + "defaultSmdpAddress" }, }; static const int asn_MAP_configureImmediateEnable_oms_15[] = { 0, 1, 2 }; @@ -220,8 +220,8 @@ }; static const asn_TYPE_tag2member_t asn_MAP_configureImmediateEnable_tag2el_15[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* immediateEnableFlag */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* smdpOid */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* smdpAddress */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* defaultSmdpOid */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* defaultSmdpAddress */ }; static asn_SEQUENCE_specifics_t asn_SPC_configureImmediateEnable_specs_15 = { sizeof(struct Psmo__configureImmediateEnable), diff --git a/src/ipa/libasn/Psmo.h b/src/ipa/libasn/Psmo.h index e00f820..71779fd 100644 --- a/src/ipa/libasn/Psmo.h +++ b/src/ipa/libasn/Psmo.h @@ -88,8 +88,8 @@ } getRAT; struct Psmo__configureImmediateEnable { NULL_t *immediateEnableFlag /* OPTIONAL */; - OBJECT_IDENTIFIER_t *smdpOid /* OPTIONAL */; - UTF8String_t *smdpAddress /* OPTIONAL */; + OBJECT_IDENTIFIER_t *defaultSmdpOid /* OPTIONAL */; + UTF8String_t *defaultSmdpAddress /* OPTIONAL */; /* * This type is extensible, * possible extensions are below. diff --git a/src/ipa/libipa/context.h b/src/ipa/libipa/context.h index e0080d4..bb5472e 100644 --- a/src/ipa/libipa/context.h +++ b/src/ipa/libipa/context.h @@ -30,8 +30,8 @@ /*! Immediate Profile Enabling configuration (set via configureImmidiateEnable PSMO) */ struct { bool flag; - struct ipa_buf *smdp_oid; - struct ipa_buf *smdp_address; + struct ipa_buf *default_smdp_oid; + struct ipa_buf *default_smdp_address; bool refresh; } immediate_enable; } iot_euicc_emu; @@ -61,8 +61,8 @@ /*! cached data to support the emulation of the ES10b function ImmidiateEnable */ struct { - struct ipa_buf *smdp_oid; - struct ipa_buf *smdp_address; + struct ipa_buf *default_smdp_oid; + struct ipa_buf *default_smdp_address; struct ipa_buf *profile_aid; } immediate_enable; } iot_euicc_emu; diff --git a/src/ipa/libipa/es10b_euicc_mem_rst.c b/src/ipa/libipa/es10b_euicc_mem_rst.c index 5c9d6d2..bb30e3a 100644 --- a/src/ipa/libipa/es10b_euicc_mem_rst.c +++ b/src/ipa/libipa/es10b_euicc_mem_rst.c @@ -212,10 +212,10 @@ if (req->immediate_enable_cfg) { IPA_LOGP_ES10X("eUICCMemoryReset", LINFO, "IoT eUICC emulation active, also clearing immediate enable configuration...\n"); - IPA_FREE(ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid); - ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid = NULL; - IPA_FREE(ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address); - ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address = NULL; + IPA_FREE(ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_oid); + ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_oid = NULL; + IPA_FREE(ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_address); + ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_address = NULL; ctx->nvstate.iot_euicc_emu.immediate_enable.flag = false; } diff --git a/src/ipa/libipa/es10b_immediate_enable.c b/src/ipa/libipa/es10b_immediate_enable.c index 2c76153..6c37283 100644 --- a/src/ipa/libipa/es10b_immediate_enable.c +++ b/src/ipa/libipa/es10b_immediate_enable.c @@ -100,18 +100,18 @@ } /* We also need either the smdp_oid or the smdp_address to verify against */ - if (ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid == NULL && - ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address == NULL) { + if (ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_oid == NULL && + ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_address == NULL) { rc = ImmediateEnableResponse__immediateEnableResult_immediateEnableNotAvailable; goto error; } /* Ensure the session context is present and complete */ - if (ctx->iot_euicc_emu.immediate_enable.smdp_address == NULL) { + if (ctx->iot_euicc_emu.immediate_enable.default_smdp_address == NULL) { rc = ImmediateEnableResponse__immediateEnableResult_noSessionContext; goto error; } - if (ctx->iot_euicc_emu.immediate_enable.smdp_oid == NULL) { + if (ctx->iot_euicc_emu.immediate_enable.default_smdp_oid == NULL) { rc = ImmediateEnableResponse__immediateEnableResult_noSessionContext; goto error; } @@ -121,30 +121,30 @@ } /* Verify smdp OID (if configured) */ - if (ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid) { - if (ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid->len != - ctx->iot_euicc_emu.immediate_enable.smdp_oid->len) { + if (ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_oid) { + if (ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_oid->len != + ctx->iot_euicc_emu.immediate_enable.default_smdp_oid->len) { rc = ImmediateEnableResponse__immediateEnableResult_immediateEnableNotAvailable; goto error; } - if (memcmp(ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid->data, - ctx->iot_euicc_emu.immediate_enable.smdp_oid->data, - ctx->iot_euicc_emu.immediate_enable.smdp_oid->len)) { + if (memcmp(ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_oid->data, + ctx->iot_euicc_emu.immediate_enable.default_smdp_oid->data, + ctx->iot_euicc_emu.immediate_enable.default_smdp_oid->len)) { rc = ImmediateEnableResponse__immediateEnableResult_immediateEnableNotAvailable; goto error; } } /* Verify smdp address (if configured) */ - if (ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address) { - if (ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address->len != - ctx->iot_euicc_emu.immediate_enable.smdp_address->len) { + if (ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_address) { + if (ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_address->len != + ctx->iot_euicc_emu.immediate_enable.default_smdp_address->len) { rc = ImmediateEnableResponse__immediateEnableResult_immediateEnableNotAvailable; goto error; } - if (memcmp(ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address->data, - ctx->iot_euicc_emu.immediate_enable.smdp_address->data, - ctx->iot_euicc_emu.immediate_enable.smdp_address->len)) { + if (memcmp(ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_address->data, + ctx->iot_euicc_emu.immediate_enable.default_smdp_address->data, + ctx->iot_euicc_emu.immediate_enable.default_smdp_address->len)) { rc = ImmediateEnableResponse__immediateEnableResult_immediateEnableNotAvailable; goto error; } @@ -175,10 +175,10 @@ } /* Ensure the auto enable data is cleared after use */ - ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.smdp_oid); - ctx->iot_euicc_emu.immediate_enable.smdp_oid = NULL; - ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.smdp_address); - ctx->iot_euicc_emu.immediate_enable.smdp_address = NULL; + ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.default_smdp_oid); + ctx->iot_euicc_emu.immediate_enable.default_smdp_oid = NULL; + ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.default_smdp_address); + ctx->iot_euicc_emu.immediate_enable.default_smdp_address = NULL; ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.profile_aid); ctx->iot_euicc_emu.immediate_enable.profile_aid = NULL; diff --git a/src/ipa/libipa/es10b_load_bnd_prfle_pkg.c b/src/ipa/libipa/es10b_load_bnd_prfle_pkg.c index 946ccb2..60a52eb 100644 --- a/src/ipa/libipa/es10b_load_bnd_prfle_pkg.c +++ b/src/ipa/libipa/es10b_load_bnd_prfle_pkg.c @@ -33,8 +33,8 @@ return; /* Collect smdpOid and smdpAddress so that we can verify later whether the immediate enable is granted or not. */ - ctx->iot_euicc_emu.immediate_enable.smdp_oid = IPA_BUF_FROM_ASN(&prfle_inst_res_data->smdpOid); - ctx->iot_euicc_emu.immediate_enable.smdp_address = + ctx->iot_euicc_emu.immediate_enable.default_smdp_oid = IPA_BUF_FROM_ASN(&prfle_inst_res_data->smdpOid); + ctx->iot_euicc_emu.immediate_enable.default_smdp_address = IPA_BUF_FROM_ASN(&prfle_inst_res_data->notificationMetadata.notificationAddress); /* Collect AID of the profile so that we later know which profile to enable. */ @@ -69,10 +69,10 @@ /* In case IoT eUICC emulation is active, ensure that the immediate enable data is cleared. (This data has no * relevance in case a real IoT eUICC is used.) */ - ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.smdp_oid); - ctx->iot_euicc_emu.immediate_enable.smdp_oid = NULL; - ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.smdp_address); - ctx->iot_euicc_emu.immediate_enable.smdp_address = NULL; + ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.default_smdp_oid); + ctx->iot_euicc_emu.immediate_enable.default_smdp_oid = NULL; + ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.default_smdp_address); + ctx->iot_euicc_emu.immediate_enable.default_smdp_address = NULL; ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.profile_aid); ctx->iot_euicc_emu.immediate_enable.profile_aid = NULL; diff --git a/src/ipa/libipa/es10b_load_euicc_pkg.c b/src/ipa/libipa/es10b_load_euicc_pkg.c index 7e20d5e..569704c 100644 --- a/src/ipa/libipa/es10b_load_euicc_pkg.c +++ b/src/ipa/libipa/es10b_load_euicc_pkg.c @@ -247,18 +247,19 @@ else ctx->nvstate.iot_euicc_emu.immediate_enable.flag = false; - /* Update smdpOid */ - ipa_buf_free(ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid); - ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid = NULL; - if (configureImmediateEnable_psmo->smdpOid) - ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid = IPA_BUF_FROM_ASN(configureImmediateEnable_psmo->smdpOid); + /* Update defaultSmdpOid */ + ipa_buf_free(ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_oid); + ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_oid = NULL; + if (configureImmediateEnable_psmo->defaultSmdpOid) + ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_oid = + IPA_BUF_FROM_ASN(configureImmediateEnable_psmo->defaultSmdpOid); - /* Update smdpAddress */ - ipa_buf_free(ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address); - ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address = NULL; - if (configureImmediateEnable_psmo->smdpAddress) - ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address = - IPA_BUF_FROM_ASN(configureImmediateEnable_psmo->smdpAddress); + /* Update defaultSmdpAddress */ + ipa_buf_free(ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_address); + ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_address = NULL; + if (configureImmediateEnable_psmo->defaultSmdpAddress) + ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_address = + IPA_BUF_FROM_ASN(configureImmediateEnable_psmo->defaultSmdpAddress); euicc_result_data->choice.configureImmediateEnableResult = ConfigureImmediateEnableResult_ok; diff --git a/src/ipa/libipa/ipad.c b/src/ipa/libipa/ipad.c index 180377e..8a770c5 100644 --- a/src/ipa/libipa/ipad.c +++ b/src/ipa/libipa/ipad.c @@ -43,8 +43,8 @@ { /* free dynamically allocated struct members (append code for new members here) */ IPA_FREE(nvstate->iot_euicc_emu.eim_cfg_ber); - IPA_FREE(nvstate->iot_euicc_emu.immediate_enable.smdp_oid); - IPA_FREE(nvstate->iot_euicc_emu.immediate_enable.smdp_address); + IPA_FREE(nvstate->iot_euicc_emu.immediate_enable.default_smdp_oid); + IPA_FREE(nvstate->iot_euicc_emu.immediate_enable.default_smdp_address); } static void nvstate_reset(struct ipa_nvstate *nvstate) @@ -82,8 +82,9 @@ /* serialize dynamically allocated struct members (append code for new members here) */ nvstate_bin = nvstate_serialize_ipa_buf(nvstate_bin, nvstate->iot_euicc_emu.eim_cfg_ber); - nvstate_bin = nvstate_serialize_ipa_buf(nvstate_bin, nvstate->iot_euicc_emu.immediate_enable.smdp_oid); - nvstate_bin = nvstate_serialize_ipa_buf(nvstate_bin, nvstate->iot_euicc_emu.immediate_enable.smdp_address); + nvstate_bin = nvstate_serialize_ipa_buf(nvstate_bin, nvstate->iot_euicc_emu.immediate_enable.default_smdp_oid); + nvstate_bin = nvstate_serialize_ipa_buf(nvstate_bin, + nvstate->iot_euicc_emu.immediate_enable.default_smdp_address); return nvstate_bin; } @@ -131,8 +132,10 @@ /* deserialize dynamically allocated struct members (append code for new members here) */ nvstate->iot_euicc_emu.eim_cfg_ber = nvstate_deserialize_ipa_buf(&nvstate_data, &nvstate_data_len); - nvstate->iot_euicc_emu.immediate_enable.smdp_oid = nvstate_deserialize_ipa_buf(&nvstate_data, &nvstate_data_len); - nvstate->iot_euicc_emu.immediate_enable.smdp_address = nvstate_deserialize_ipa_buf(&nvstate_data, &nvstate_data_len); + nvstate->iot_euicc_emu.immediate_enable.default_smdp_oid = + nvstate_deserialize_ipa_buf(&nvstate_data, &nvstate_data_len); + nvstate->iot_euicc_emu.immediate_enable.default_smdp_address = + nvstate_deserialize_ipa_buf(&nvstate_data, &nvstate_data_len); } /*! Read eIM configuration from eUICC and pick a suitable eIM. @@ -463,8 +466,8 @@ nvstate = nvstate_serialize(&ctx->nvstate); IPA_FREE(ctx->iot_euicc_emu.rollback_iccid); - ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.smdp_oid); - ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.smdp_address); + ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.default_smdp_oid); + ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.default_smdp_address); ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.profile_aid); IPA_FREE(ctx->eim_id); IPA_FREE(ctx->eim_fqdn); -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43069?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: I9336f18aaf104629845948877294437188979376 Gerrit-Change-Number: 43069 Gerrit-PatchSet: 13 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1
0
0
0
[S] Change in onomondo-ipa[master]: V1.2: Add eimTransactionId to InitiateAuthenticationRequestEsipa
by laforge
27 Aug '26
27 Aug '26
laforge has submitted this change. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43056?usp=email
) ( 6 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: V1.2: Add eimTransactionId to InitiateAuthenticationRequestEsipa ...................................................................... V1.2: Add eimTransactionId to InitiateAuthenticationRequestEsipa Add new eimTransactionId field to InitiateAuthenticationRequestEsipa. The eimTransactionId walks through the IPA process like this: * The eimTransactionId is retrieved from ProfileDownloadTriggerRequest at proc_eim_pkg_retr.c. * Then it is handed to the Common Mutual Authentication Procedure at proc_indirect_prfle_dwnld.c. * There it is handed to the InitiateAuthentication function at proc_cmn_mtl_auth.c. * There it is stored in initiateAuthenticationRequestEsipa at esipa_init_auth.c. Reference: SGP.32 Section 5.14.1 Related: SYS#8101 Change-Id: I1c8ef6fc0a3f7ab5735e401597fc8c6b2021fc09 --- M asn1/SGP32Definitions.asn M src/ipa/libasn/InitiateAuthenticationRequestEsipa.c M src/ipa/libasn/InitiateAuthenticationRequestEsipa.h M src/ipa/libipa/esipa_init_auth.c M src/ipa/libipa/esipa_init_auth.h M src/ipa/libipa/proc_cmn_mtl_auth.c M src/ipa/libipa/proc_cmn_mtl_auth.h M src/ipa/libipa/proc_eim_pkg_retr.c M src/ipa/libipa/proc_indirect_prfle_dwnld.c M src/ipa/libipa/proc_indirect_prfle_dwnld.h 10 files changed, 31 insertions(+), 9 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified dexter: Looks good to me, approved diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index 391585e..89c3be7 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -870,7 +870,8 @@ InitiateAuthenticationRequestEsipa ::= [57] SEQUENCE { -- Tag 'BF39' euiccChallenge [1] Octet16, -- random eUICC challenge smdpAddress [3] UTF8String OPTIONAL, - euiccInfo1 EUICCInfo1 OPTIONAL + euiccInfo1 EUICCInfo1 OPTIONAL, + eimTransactionId [2] TransactionId OPTIONAL } InitiateAuthenticationResponseEsipa ::= [57] CHOICE { -- Tag 'BF39' initiateAuthenticationOkEsipa InitiateAuthenticationOkEsipa, diff --git a/src/ipa/libasn/InitiateAuthenticationRequestEsipa.c b/src/ipa/libasn/InitiateAuthenticationRequestEsipa.c index 1366a8d..f148fca 100644 --- a/src/ipa/libasn/InitiateAuthenticationRequestEsipa.c +++ b/src/ipa/libasn/InitiateAuthenticationRequestEsipa.c @@ -17,7 +17,7 @@ 0, 0, /* No default value */ "euiccChallenge" }, - { ATF_POINTER, 2, offsetof(struct InitiateAuthenticationRequestEsipa, smdpAddress), + { ATF_POINTER, 3, offsetof(struct InitiateAuthenticationRequestEsipa, smdpAddress), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_UTF8String, @@ -26,7 +26,7 @@ 0, 0, /* No default value */ "smdpAddress" }, - { ATF_POINTER, 1, offsetof(struct InitiateAuthenticationRequestEsipa, euiccInfo1), + { ATF_POINTER, 2, offsetof(struct InitiateAuthenticationRequestEsipa, euiccInfo1), (ASN_TAG_CLASS_CONTEXT | (32 << 2)), 0, &asn_DEF_EUICCInfo1, @@ -35,14 +35,24 @@ 0, 0, /* No default value */ "euiccInfo1" }, + { ATF_POINTER, 1, offsetof(struct InitiateAuthenticationRequestEsipa, eimTransactionId), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_TransactionId, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eimTransactionId" + }, }; -static const int asn_MAP_InitiateAuthenticationRequestEsipa_oms_1[] = { 1, 2 }; +static const int asn_MAP_InitiateAuthenticationRequestEsipa_oms_1[] = { 1, 2, 3 }; static const ber_tlv_tag_t asn_DEF_InitiateAuthenticationRequestEsipa_tags_1[] = { (ASN_TAG_CLASS_CONTEXT | (57 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_InitiateAuthenticationRequestEsipa_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* euiccChallenge */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 3, 0, 0 }, /* eimTransactionId */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 1, 0, 0 }, /* smdpAddress */ { (ASN_TAG_CLASS_CONTEXT | (32 << 2)), 2, 0, 0 } /* euiccInfo1 */ }; @@ -50,10 +60,10 @@ sizeof(struct InitiateAuthenticationRequestEsipa), offsetof(struct InitiateAuthenticationRequestEsipa, _asn_ctx), asn_MAP_InitiateAuthenticationRequestEsipa_tag2el_1, - 3, /* Count of tags in the map */ + 4, /* Count of tags in the map */ asn_MAP_InitiateAuthenticationRequestEsipa_oms_1, /* Optional members */ - 2, 0, /* Root/Additions */ - 3, /* First extension addition */ + 3, 0, /* Root/Additions */ + 4, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_InitiateAuthenticationRequestEsipa = { "InitiateAuthenticationRequestEsipa", @@ -67,7 +77,7 @@ /sizeof(asn_DEF_InitiateAuthenticationRequestEsipa_tags_1[0]), /* 2 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_InitiateAuthenticationRequestEsipa_1, - 3, /* Elements count */ + 4, /* Elements count */ &asn_SPC_InitiateAuthenticationRequestEsipa_specs_1 /* Additional specs */ }; diff --git a/src/ipa/libasn/InitiateAuthenticationRequestEsipa.h b/src/ipa/libasn/InitiateAuthenticationRequestEsipa.h index e043267..886081a 100644 --- a/src/ipa/libasn/InitiateAuthenticationRequestEsipa.h +++ b/src/ipa/libasn/InitiateAuthenticationRequestEsipa.h @@ -14,6 +14,7 @@ /* Including external dependencies */ #include "Octet16.h" #include <UTF8String.h> +#include "TransactionId.h" #include <constr_SEQUENCE.h> #ifdef __cplusplus @@ -28,6 +29,7 @@ Octet16_t euiccChallenge; UTF8String_t *smdpAddress /* OPTIONAL */; struct EUICCInfo1 *euiccInfo1 /* OPTIONAL */; + TransactionId_t *eimTransactionId /* OPTIONAL */; /* * This type is extensible, * possible extensions are below. @@ -40,7 +42,7 @@ /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_InitiateAuthenticationRequestEsipa; extern asn_SEQUENCE_specifics_t asn_SPC_InitiateAuthenticationRequestEsipa_specs_1; -extern asn_TYPE_member_t asn_MBR_InitiateAuthenticationRequestEsipa_1[3]; +extern asn_TYPE_member_t asn_MBR_InitiateAuthenticationRequestEsipa_1[4]; #ifdef __cplusplus } diff --git a/src/ipa/libipa/esipa_init_auth.c b/src/ipa/libipa/esipa_init_auth.c index 89a3e58..30be69d 100644 --- a/src/ipa/libipa/esipa_init_auth.c +++ b/src/ipa/libipa/esipa_init_auth.c @@ -55,6 +55,9 @@ /* eUICC info */ msg_to_eim.choice.initiateAuthenticationRequestEsipa.euiccInfo1 = (EUICCInfo1_t *) req->euicc_info_1; + /* eIM transaction ID */ + msg_to_eim.choice.initiateAuthenticationRequestEsipa.eimTransactionId = (OCTET_STRING_t *)req->eim_transaction_id; + /* Encode */ return ipa_esipa_msg_to_eim_enc(&msg_to_eim, "InitiateAuthentication"); } diff --git a/src/ipa/libipa/esipa_init_auth.h b/src/ipa/libipa/esipa_init_auth.h index 1f91c1c..a2dfd73 100644 --- a/src/ipa/libipa/esipa_init_auth.h +++ b/src/ipa/libipa/esipa_init_auth.h @@ -16,6 +16,7 @@ const uint8_t *euicc_challenge; const char *smdp_addr; const EUICCInfo1_t *euicc_info_1; + const OCTET_STRING_t *eim_transaction_id; }; struct ipa_esipa_init_auth_res { diff --git a/src/ipa/libipa/proc_cmn_mtl_auth.c b/src/ipa/libipa/proc_cmn_mtl_auth.c index df9fcc9..a8670ae 100644 --- a/src/ipa/libipa/proc_cmn_mtl_auth.c +++ b/src/ipa/libipa/proc_cmn_mtl_auth.c @@ -176,6 +176,7 @@ init_auth_req.euicc_challenge = euicc_challenge; init_auth_req.smdp_addr = (char *)pars->smdp_addr; init_auth_req.euicc_info_1 = euicc_info->euicc_info_1; + init_auth_req.eim_transaction_id = pars->eim_transaction_id; init_auth_res = ipa_esipa_init_auth(ctx, &init_auth_req); if (!init_auth_res) goto error; diff --git a/src/ipa/libipa/proc_cmn_mtl_auth.h b/src/ipa/libipa/proc_cmn_mtl_auth.h index a74fb69..7fd3ff5 100644 --- a/src/ipa/libipa/proc_cmn_mtl_auth.h +++ b/src/ipa/libipa/proc_cmn_mtl_auth.h @@ -16,6 +16,7 @@ const struct ipa_buf *allowed_ca; const char *smdp_addr; const char *ac_token; + const OCTET_STRING_t *eim_transaction_id; }; struct ipa_esipa_auth_clnt_res *ipa_proc_cmn_mtl_auth(struct ipa_context *ctx, diff --git a/src/ipa/libipa/proc_eim_pkg_retr.c b/src/ipa/libipa/proc_eim_pkg_retr.c index 6795cad..620140e 100644 --- a/src/ipa/libipa/proc_eim_pkg_retr.c +++ b/src/ipa/libipa/proc_eim_pkg_retr.c @@ -129,6 +129,7 @@ indirect_prfle_dwnlod_pars.ac = IPA_STR_FROM_ASN(&get_eim_pkg_res->dwnld_trigger_request->profileDownloadData-> choice.activationCode); + indirect_prfle_dwnlod_pars.eim_transaction_id = get_eim_pkg_res->dwnld_trigger_request->eimTransactionId; rc = ipa_proc_indirect_prfle_dwnlod(ctx, &indirect_prfle_dwnlod_pars); IPA_FREE((void *)indirect_prfle_dwnlod_pars.ac); if (rc < 0) diff --git a/src/ipa/libipa/proc_indirect_prfle_dwnld.c b/src/ipa/libipa/proc_indirect_prfle_dwnld.c index 045796a..9bc1467 100644 --- a/src/ipa/libipa/proc_indirect_prfle_dwnld.c +++ b/src/ipa/libipa/proc_indirect_prfle_dwnld.c @@ -55,6 +55,7 @@ cmn_mtl_auth_pars.allowed_ca = pars->allowed_ca; cmn_mtl_auth_pars.smdp_addr = activation_code->sm_dp_plus_address; cmn_mtl_auth_pars.ac_token = activation_code->ac_token; + cmn_mtl_auth_pars.eim_transaction_id = pars->eim_transaction_id; auth_clnt_res = ipa_proc_cmn_mtl_auth(ctx, &cmn_mtl_auth_pars); if (!auth_clnt_res) { IPA_LOGP(SIPA, LERROR, "cannot continue, mutual authentication failed!\n"); diff --git a/src/ipa/libipa/proc_indirect_prfle_dwnld.h b/src/ipa/libipa/proc_indirect_prfle_dwnld.h index a856b3d..e3993af 100644 --- a/src/ipa/libipa/proc_indirect_prfle_dwnld.h +++ b/src/ipa/libipa/proc_indirect_prfle_dwnld.h @@ -15,6 +15,7 @@ const char *ac; const uint8_t *tac; const struct ipa_buf *allowed_ca; + const OCTET_STRING_t *eim_transaction_id; }; int ipa_proc_indirect_prfle_dwnlod(struct ipa_context *ctx, const struct ipa_proc_indirect_prfle_dwnlod_pars *pars); -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43056?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: I1c8ef6fc0a3f7ab5735e401597fc8c6b2021fc09 Gerrit-Change-Number: 43056 Gerrit-PatchSet: 10 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1
0
0
0
[L] Change in onomondo-ipa[master]: V1.2: Add function ES10b.GetConnectivityParameters
by laforge
27 Aug '26
27 Aug '26
laforge has submitted this change. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43054?usp=email
) Change subject: V1.2: Add function ES10b.GetConnectivityParameters ...................................................................... V1.2: Add function ES10b.GetConnectivityParameters Add new library function to get connectivity parameters from IoT eUICC. Also add an option to the command line interface to call the library function. The function cannot be emulated with non-IoT eUICC. Reference: SGP.32 Section 5.9.24 Related: SYS#8101 Change-Id: I075590e095dbbe05fa6cdb0a96d5b38c7a17ff78 --- M asn1/SGP32Definitions.asn M include/onomondo/ipa/ipad.h M src/ipa/libasn/CMakeLists.txt A src/ipa/libasn/ConnectivityParameters.c A src/ipa/libasn/ConnectivityParameters.h A src/ipa/libasn/ConnectivityParametersError.c A src/ipa/libasn/ConnectivityParametersError.h A src/ipa/libasn/GetConnectivityParametersRequest.c A src/ipa/libasn/GetConnectivityParametersRequest.h A src/ipa/libasn/GetConnectivityParametersResponse.c A src/ipa/libasn/GetConnectivityParametersResponse.h M src/ipa/libipa/CMakeLists.txt A src/ipa/libipa/es10b_get_conn_params.c A src/ipa/libipa/es10b_get_conn_params.h M src/ipa/libipa/ipad.c M src/ipa/main.c 16 files changed, 589 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index c3fea8c..becc11b 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -723,6 +723,25 @@ } -- ASN1STOP +-- Section 5.9.24 +-- ASN1START +GetConnectivityParametersRequest ::= [95] SEQUENCE { -- Tag 'BF5F' +} +-- ASN1STOP +-- ASN1START +GetConnectivityParametersResponse ::= [95] CHOICE { -- Tag 'BF5F' + connectivityParameters ConnectivityParameters, + connectivityParametersError ConnectivityParametersError +} +ConnectivityParameters ::= SEQUENCE { + httpParams [1] OCTET STRING OPTIONAL -- Also used for CoAP +} +ConnectivityParametersError ::= INTEGER { + parametersNotAvailable(1), + undefinedError(127) +} +-- ASN1STOP + -- Section 5.9.25 -- ASN1START SGP32-SetDefaultDpAddressRequest ::= [101] SEQUENCE { -- Tag 'BF65' diff --git a/include/onomondo/ipa/ipad.h b/include/onomondo/ipa/ipad.h index e356f45..42086fa 100644 --- a/include/onomondo/ipa/ipad.h +++ b/include/onomondo/ipa/ipad.h @@ -98,6 +98,7 @@ int ipa_return_from_fallback(struct ipa_context *ctx); int ipa_enable_emerg_prfle(struct ipa_context *ctx); int ipa_disable_emerg_prfle(struct ipa_context *ctx); +int ipa_get_connnectivity_parameters(struct ipa_context *ctx, struct ipa_buf **http_params); int ipa_poll(struct ipa_context *ctx); void ipa_close(struct ipa_context *ctx); struct ipa_buf *ipa_free_ctx(struct ipa_context *ctx); diff --git a/src/ipa/libasn/CMakeLists.txt b/src/ipa/libasn/CMakeLists.txt index 82328de..b1f9d8a 100644 --- a/src/ipa/libasn/CMakeLists.txt +++ b/src/ipa/libasn/CMakeLists.txt @@ -194,6 +194,10 @@ ConfigureImmediateProfileEnablingResponse.h ConfigureISDPRequest.c ConfigureISDPRequest.h +ConnectivityParameters.c +ConnectivityParametersError.c +ConnectivityParametersError.h +ConnectivityParameters.h constraints.c constraints.h constr_CHOICE.c @@ -411,6 +415,10 @@ GetCertsRequest.h GetCertsResponse.c GetCertsResponse.h +GetConnectivityParametersRequest.c +GetConnectivityParametersRequest.h +GetConnectivityParametersResponse.c +GetConnectivityParametersResponse.h GetEimConfigurationDataRequest.c GetEimConfigurationDataRequest.h GetEimConfigurationDataResponse.c diff --git a/src/ipa/libasn/ConnectivityParameters.c b/src/ipa/libasn/ConnectivityParameters.c new file mode 100644 index 0000000..37c2e43 --- /dev/null +++ b/src/ipa/libasn/ConnectivityParameters.c @@ -0,0 +1,52 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#include "ConnectivityParameters.h" + +asn_TYPE_member_t asn_MBR_ConnectivityParameters_1[] = { + { ATF_POINTER, 1, offsetof(struct ConnectivityParameters, httpParams), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "httpParams" + }, +}; +static const int asn_MAP_ConnectivityParameters_oms_1[] = { 0 }; +static const ber_tlv_tag_t asn_DEF_ConnectivityParameters_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_ConnectivityParameters_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 } /* httpParams */ +}; +asn_SEQUENCE_specifics_t asn_SPC_ConnectivityParameters_specs_1 = { + sizeof(struct ConnectivityParameters), + offsetof(struct ConnectivityParameters, _asn_ctx), + asn_MAP_ConnectivityParameters_tag2el_1, + 1, /* Count of tags in the map */ + asn_MAP_ConnectivityParameters_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_ConnectivityParameters = { + "ConnectivityParameters", + "ConnectivityParameters", + &asn_OP_SEQUENCE, + asn_DEF_ConnectivityParameters_tags_1, + sizeof(asn_DEF_ConnectivityParameters_tags_1) + /sizeof(asn_DEF_ConnectivityParameters_tags_1[0]), /* 1 */ + asn_DEF_ConnectivityParameters_tags_1, /* Same as above */ + sizeof(asn_DEF_ConnectivityParameters_tags_1) + /sizeof(asn_DEF_ConnectivityParameters_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_ConnectivityParameters_1, + 1, /* Elements count */ + &asn_SPC_ConnectivityParameters_specs_1 /* Additional specs */ +}; + diff --git a/src/ipa/libasn/ConnectivityParameters.h b/src/ipa/libasn/ConnectivityParameters.h new file mode 100644 index 0000000..7174cea --- /dev/null +++ b/src/ipa/libasn/ConnectivityParameters.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#ifndef _ConnectivityParameters_H_ +#define _ConnectivityParameters_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include <OCTET_STRING.h> +#include <constr_SEQUENCE.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* ConnectivityParameters */ +typedef struct ConnectivityParameters { + OCTET_STRING_t *httpParams /* OPTIONAL */; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ConnectivityParameters_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ConnectivityParameters; +extern asn_SEQUENCE_specifics_t asn_SPC_ConnectivityParameters_specs_1; +extern asn_TYPE_member_t asn_MBR_ConnectivityParameters_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _ConnectivityParameters_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libasn/ConnectivityParametersError.c b/src/ipa/libasn/ConnectivityParametersError.c new file mode 100644 index 0000000..c42280c --- /dev/null +++ b/src/ipa/libasn/ConnectivityParametersError.c @@ -0,0 +1,31 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#include "ConnectivityParametersError.h" + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_ConnectivityParametersError_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_ConnectivityParametersError = { + "ConnectivityParametersError", + "ConnectivityParametersError", + &asn_OP_NativeInteger, + asn_DEF_ConnectivityParametersError_tags_1, + sizeof(asn_DEF_ConnectivityParametersError_tags_1) + /sizeof(asn_DEF_ConnectivityParametersError_tags_1[0]), /* 1 */ + asn_DEF_ConnectivityParametersError_tags_1, /* Same as above */ + sizeof(asn_DEF_ConnectivityParametersError_tags_1) + /sizeof(asn_DEF_ConnectivityParametersError_tags_1[0]), /* 1 */ + { 0, 0, NativeInteger_constraint }, + 0, 0, /* Defined elsewhere */ + 0 /* No specifics */ +}; + diff --git a/src/ipa/libasn/ConnectivityParametersError.h b/src/ipa/libasn/ConnectivityParametersError.h new file mode 100644 index 0000000..92f24b5 --- /dev/null +++ b/src/ipa/libasn/ConnectivityParametersError.h @@ -0,0 +1,49 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#ifndef _ConnectivityParametersError_H_ +#define _ConnectivityParametersError_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include <NativeInteger.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum ConnectivityParametersError { + ConnectivityParametersError_parametersNotAvailable = 1, + ConnectivityParametersError_undefinedError = 127 +} e_ConnectivityParametersError; + +/* ConnectivityParametersError */ +typedef long ConnectivityParametersError_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ConnectivityParametersError; +asn_struct_free_f ConnectivityParametersError_free; +asn_struct_print_f ConnectivityParametersError_print; +asn_constr_check_f ConnectivityParametersError_constraint; +ber_type_decoder_f ConnectivityParametersError_decode_ber; +der_type_encoder_f ConnectivityParametersError_encode_der; +xer_type_decoder_f ConnectivityParametersError_decode_xer; +xer_type_encoder_f ConnectivityParametersError_encode_xer; +oer_type_decoder_f ConnectivityParametersError_decode_oer; +oer_type_encoder_f ConnectivityParametersError_encode_oer; +per_type_decoder_f ConnectivityParametersError_decode_uper; +per_type_encoder_f ConnectivityParametersError_encode_uper; + +#ifdef __cplusplus +} +#endif + +#endif /* _ConnectivityParametersError_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libasn/GetConnectivityParametersRequest.c b/src/ipa/libasn/GetConnectivityParametersRequest.c new file mode 100644 index 0000000..2abebd7 --- /dev/null +++ b/src/ipa/libasn/GetConnectivityParametersRequest.c @@ -0,0 +1,36 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#include "GetConnectivityParametersRequest.h" + +static const ber_tlv_tag_t asn_DEF_GetConnectivityParametersRequest_tags_1[] = { + (ASN_TAG_CLASS_CONTEXT | (95 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SEQUENCE_specifics_t asn_SPC_GetConnectivityParametersRequest_specs_1 = { + sizeof(struct GetConnectivityParametersRequest), + offsetof(struct GetConnectivityParametersRequest, _asn_ctx), + 0, /* No top level tags */ + 0, /* No tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_GetConnectivityParametersRequest = { + "GetConnectivityParametersRequest", + "GetConnectivityParametersRequest", + &asn_OP_SEQUENCE, + asn_DEF_GetConnectivityParametersRequest_tags_1, + sizeof(asn_DEF_GetConnectivityParametersRequest_tags_1) + /sizeof(asn_DEF_GetConnectivityParametersRequest_tags_1[0]) - 1, /* 1 */ + asn_DEF_GetConnectivityParametersRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_GetConnectivityParametersRequest_tags_1) + /sizeof(asn_DEF_GetConnectivityParametersRequest_tags_1[0]), /* 2 */ + { 0, 0, SEQUENCE_constraint }, + 0, 0, /* No members */ + &asn_SPC_GetConnectivityParametersRequest_specs_1 /* Additional specs */ +}; + diff --git a/src/ipa/libasn/GetConnectivityParametersRequest.h b/src/ipa/libasn/GetConnectivityParametersRequest.h new file mode 100644 index 0000000..70c4c8f --- /dev/null +++ b/src/ipa/libasn/GetConnectivityParametersRequest.h @@ -0,0 +1,40 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#ifndef _GetConnectivityParametersRequest_H_ +#define _GetConnectivityParametersRequest_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include <constr_SEQUENCE.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* GetConnectivityParametersRequest */ +typedef struct GetConnectivityParametersRequest { + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GetConnectivityParametersRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GetConnectivityParametersRequest; + +#ifdef __cplusplus +} +#endif + +#endif /* _GetConnectivityParametersRequest_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libasn/GetConnectivityParametersResponse.c b/src/ipa/libasn/GetConnectivityParametersResponse.c new file mode 100644 index 0000000..a7b547a --- /dev/null +++ b/src/ipa/libasn/GetConnectivityParametersResponse.c @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#include "GetConnectivityParametersResponse.h" + +static asn_oer_constraints_t asn_OER_type_GetConnectivityParametersResponse_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_GetConnectivityParametersResponse_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_GetConnectivityParametersResponse_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GetConnectivityParametersResponse, choice.connectivityParameters), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ConnectivityParameters, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "connectivityParameters" + }, + { ATF_NOFLAGS, 0, offsetof(struct GetConnectivityParametersResponse, choice.connectivityParametersError), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ConnectivityParametersError, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "connectivityParametersError" + }, +}; +static const ber_tlv_tag_t asn_DEF_GetConnectivityParametersResponse_tags_1[] = { + (ASN_TAG_CLASS_CONTEXT | (95 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_GetConnectivityParametersResponse_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* connectivityParameters */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* connectivityParametersError */ +}; +static asn_CHOICE_specifics_t asn_SPC_GetConnectivityParametersResponse_specs_1 = { + sizeof(struct GetConnectivityParametersResponse), + offsetof(struct GetConnectivityParametersResponse, _asn_ctx), + offsetof(struct GetConnectivityParametersResponse, present), + sizeof(((struct GetConnectivityParametersResponse *)0)->present), + asn_MAP_GetConnectivityParametersResponse_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_GetConnectivityParametersResponse = { + "GetConnectivityParametersResponse", + "GetConnectivityParametersResponse", + &asn_OP_CHOICE, + asn_DEF_GetConnectivityParametersResponse_tags_1, + sizeof(asn_DEF_GetConnectivityParametersResponse_tags_1) + /sizeof(asn_DEF_GetConnectivityParametersResponse_tags_1[0]), /* 1 */ + asn_DEF_GetConnectivityParametersResponse_tags_1, /* Same as above */ + sizeof(asn_DEF_GetConnectivityParametersResponse_tags_1) + /sizeof(asn_DEF_GetConnectivityParametersResponse_tags_1[0]), /* 1 */ + { &asn_OER_type_GetConnectivityParametersResponse_constr_1, &asn_PER_type_GetConnectivityParametersResponse_constr_1, CHOICE_constraint }, + asn_MBR_GetConnectivityParametersResponse_1, + 2, /* Elements count */ + &asn_SPC_GetConnectivityParametersResponse_specs_1 /* Additional specs */ +}; + diff --git a/src/ipa/libasn/GetConnectivityParametersResponse.h b/src/ipa/libasn/GetConnectivityParametersResponse.h new file mode 100644 index 0000000..940a2bc --- /dev/null +++ b/src/ipa/libasn/GetConnectivityParametersResponse.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#ifndef _GetConnectivityParametersResponse_H_ +#define _GetConnectivityParametersResponse_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include "ConnectivityParameters.h" +#include "ConnectivityParametersError.h" +#include <constr_CHOICE.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum GetConnectivityParametersResponse_PR { + GetConnectivityParametersResponse_PR_NOTHING, /* No components present */ + GetConnectivityParametersResponse_PR_connectivityParameters, + GetConnectivityParametersResponse_PR_connectivityParametersError + /* Extensions may appear below */ + +} GetConnectivityParametersResponse_PR; + +/* GetConnectivityParametersResponse */ +typedef struct GetConnectivityParametersResponse { + GetConnectivityParametersResponse_PR present; + union GetConnectivityParametersResponse_u { + ConnectivityParameters_t connectivityParameters; + ConnectivityParametersError_t connectivityParametersError; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GetConnectivityParametersResponse_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GetConnectivityParametersResponse; + +#ifdef __cplusplus +} +#endif + +#endif /* _GetConnectivityParametersResponse_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libipa/CMakeLists.txt b/src/ipa/libipa/CMakeLists.txt index d25b35b..e85d128 100644 --- a/src/ipa/libipa/CMakeLists.txt +++ b/src/ipa/libipa/CMakeLists.txt @@ -24,6 +24,7 @@ es10b_ret_from_fallback.c es10b_en_emerg_prfle.c es10b_dis_emerg_prfle.c + es10b_get_conn_params.c es10c_delete_prfle.c es10c_disable_prfle.c es10c_enable_prfle.c diff --git a/src/ipa/libipa/es10b_get_conn_params.c b/src/ipa/libipa/es10b_get_conn_params.c new file mode 100644 index 0000000..8805e54 --- /dev/null +++ b/src/ipa/libipa/es10b_get_conn_params.c @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2026 sysmocom - s.f.m.c. GmbH. All rights reserved. + * + * SPDX-License-Identifier: AGPL-3.0-only + * + * Author: Philipp Maier <pmaier(a)sysmocom.de> / sysmocom - s.f.m.c. GmbH + * Andreas Eversberg <aeversberg(a)sysmocom.de> / sysmocom - s.f.m.c. GmbH + * + * See also: GSMA SGP.22, 5.9.20: Function (ES10b): ExecuteFallbackMechanism + */ + +#include <stdio.h> +#include <assert.h> +#include <onomondo/ipa/utils.h> +#include "context.h" +#include "utils.h" +#include "euicc.h" +#include "es10x.h" +#include "es10b_get_conn_params.h" +#include <GetConnectivityParametersRequest.h> + +static const struct num_str_map error_code_strings[] = { + { ConnectivityParametersError_parametersNotAvailable, "parametersNotAvailable" }, + { ConnectivityParametersError_undefinedError, "undefinedError" }, + { 0, NULL } +}; + +static int dec_get_conn_params_res(struct ipa_es10b_get_conn_params_res *res, const struct ipa_buf *es10b_res) +{ + struct GetConnectivityParametersResponse *asn = NULL; + + asn = ipa_es10x_res_dec(&asn_DEF_GetConnectivityParametersResponse, es10b_res, "GetConnectivityParameters"); + if (!asn) + return -EINVAL; + + switch (asn->present) { + case GetConnectivityParametersResponse_PR_connectivityParameters: + IPA_LOGP_ES10X("GetConnectivityParametersResponse", LERROR, "function succeeded!\n"); + break; + case GetConnectivityParametersResponse_PR_connectivityParametersError: + IPA_LOGP_ES10X("GetConnectivityParametersResponse", LERROR, "function failed with error code %ld=%s!\n", + asn->choice.connectivityParametersError, + ipa_str_from_num(error_code_strings, asn->choice.connectivityParametersError, "(unknown)")); + break; + default: + IPA_LOGP_ES10X("GetConnectivityParametersRequest", LERROR, "empty GetConnectivityParametersResponse response!\n"); + break; + } + + res->res = asn; + return 0; +} + +static struct GetConnectivityParametersResponse *generate_conn_params_err(void) +{ + struct GetConnectivityParametersResponse *res = IPA_ALLOC_ZERO(struct GetConnectivityParametersResponse); + + assert(res); + res->present = GetConnectivityParametersResponse_PR_connectivityParametersError; + res->choice.connectivityParametersError = ConnectivityParametersError_undefinedError; + return res; +} + +/*! Function (Es10b): GetConnectivityParameters. + * \param[inout] ctx pointer to ipa_context. + * \returns pointer newly allocated struct with function result, NULL on error. */ +struct ipa_es10b_get_conn_params_res *ipa_es10b_get_conn_params(struct ipa_context *ctx) +{ + struct ipa_buf *es10b_req = NULL; + struct ipa_buf *es10b_res = NULL; + struct GetConnectivityParametersRequest req = { 0 }; + struct ipa_es10b_get_conn_params_res *res = IPA_ALLOC_ZERO(struct ipa_es10b_get_conn_params_res); + int rc; + + if (ctx->cfg->iot_euicc_emu_enabled) { + IPA_LOGP_ES10X("GetConnectivityParametersRequest", LERROR, + "Unable to emulate retrieval of connectivity patameters.\n"); + res->res = generate_conn_params_err(); + return res; + } + + es10b_req = ipa_es10x_req_enc(&asn_DEF_GetConnectivityParametersRequest, &req, "GetConnectivityParameters"); + if (!es10b_req) { + IPA_LOGP_ES10X("GetConnectivityParametersRequest", LERROR, "unable to encode Es10b request\n"); + goto error; + } + + es10b_res = ipa_euicc_transceive_es10x(ctx, es10b_req); + if (!es10b_res) { + IPA_LOGP_ES10X("GetConnectivityParametersRequest", LERROR, "no Es10b response\n"); + goto error; + } + + rc = dec_get_conn_params_res(res, es10b_res); + if (rc < 0) + goto error; + + IPA_FREE(es10b_req); + IPA_FREE(es10b_res); + return res; +error: + IPA_FREE(es10b_req); + IPA_FREE(es10b_res); + ipa_es10b_get_conn_params_res_free(res); + return NULL; +} + +/*! Free results of function (Es10b): GetConnectivityParameters. + * \param[in] res pointer to function result. */ +void ipa_es10b_get_conn_params_res_free(struct ipa_es10b_get_conn_params_res *res) +{ + IPA_ES10X_RES_FREE(asn_DEF_GetConnectivityParametersResponse, res); +} diff --git a/src/ipa/libipa/es10b_get_conn_params.h b/src/ipa/libipa/es10b_get_conn_params.h new file mode 100644 index 0000000..75feeca --- /dev/null +++ b/src/ipa/libipa/es10b_get_conn_params.h @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2026 sysmocom - s.f.m.c. GmbH. All rights reserved. + * + * SPDX-License-Identifier: AGPL-3.0-only + */ + +#pragma once + +#include <GetConnectivityParametersResponse.h> +struct ipa_context; + +struct ipa_es10b_get_conn_params_res { + struct GetConnectivityParametersResponse *res; +}; + +struct ipa_es10b_get_conn_params_res *ipa_es10b_get_conn_params(struct ipa_context *ctx); +void ipa_es10b_get_conn_params_res_free(struct ipa_es10b_get_conn_params_res *res); diff --git a/src/ipa/libipa/ipad.c b/src/ipa/libipa/ipad.c index 1798c37..180377e 100644 --- a/src/ipa/libipa/ipad.c +++ b/src/ipa/libipa/ipad.c @@ -29,6 +29,7 @@ #include "es10b_ret_from_fallback.h" #include "es10b_en_emerg_prfle.h" #include "es10b_dis_emerg_prfle.h" +#include "es10b_get_conn_params.h" #include "proc_euicc_pkg_dwnld_exec.h" #include "proc_notif_delivery.h" @@ -345,6 +346,40 @@ return rc; } +/*! Get connectivity parameters from active profile. + * \param[inout] ctx pointer to ipa_context. + * \param[out] http_params pointer to the HTTP parameters pointer to be returned. + * \returns 0 on success, negative on error. */ +int ipa_get_connnectivity_parameters(struct ipa_context *ctx, struct ipa_buf **http_params) +{ + struct ipa_es10b_get_conn_params_res *res; + int rc = -EINVAL; + + *http_params = NULL; + + res = ipa_es10b_get_conn_params(ctx); + if (!res) + return -EIO; + switch (res->res->present) { + case GetConnectivityParametersResponse_PR_connectivityParameters: + if (res->res->choice.connectivityParameters.httpParams) { + *http_params = ipa_buf_alloc_data(res->res->choice.connectivityParameters.httpParams->size, + res->res->choice.connectivityParameters.httpParams->buf); + } + rc = 0; + break; + case GetConnectivityParametersResponse_PR_connectivityParametersError: + if (res->res->choice.connectivityParametersError == ConnectivityParametersError_parametersNotAvailable) + rc = 0; + break; + case GetConnectivityParametersResponse_PR_NOTHING: + ; + } + ipa_es10b_get_conn_params_res_free(res); + + return rc; +} + static int check_canaries(struct ipa_context *ctx) { if (ctx->check_http) diff --git a/src/ipa/main.c b/src/ipa/main.c index 4312a25..4a61762 100644 --- a/src/ipa/main.c +++ b/src/ipa/main.c @@ -32,6 +32,7 @@ OPER_RETURN_FROM_FALLBACK, OPER_ENABLE_EMERG_PRFLE, OPER_DISABLE_EMERG_PRFLE, + OPER_GET_CONN_PARAMS, }; bool running = true; @@ -76,6 +77,7 @@ printf(" return-from-fallback ........ Trigger return from fallback profile to previous profile\n"); printf(" enable-emergency-profile .... Trigger enabling of emergency profile\n"); printf(" disable-emergency-profile ... Trigger return from emergency profile to previous profile\n"); + printf(" get-connectivity-parameters . Get connectivity parameters from acurrently active profile\n"); } struct ipa_buf *load_ber_from_file(char *dir, char *file) @@ -252,6 +254,8 @@ operation = OPER_ENABLE_EMERG_PRFLE; } else if (!strcmp(argv[optind], "disable-emergency-profile")) { operation = OPER_DISABLE_EMERG_PRFLE; + } else if (!strcmp(argv[optind], "get-connectivity-parameters")) { + operation = OPER_GET_CONN_PARAMS; } else if (!!strcmp(argv[optind], "get-eim-package")) { printf("unknown operation: %s\n", argv[optind]); exit(-1); @@ -379,6 +383,19 @@ /* Trigger return from emergency profile to previous profile */ ipa_disable_emerg_prfle(ctx); break; + case OPER_GET_CONN_PARAMS: + struct ipa_buf *http_params; + /* Get optional connectivity parameters to reach eIM. */ + rc = ipa_get_connnectivity_parameters(ctx, &http_params); + if (rc < 0) + goto leave; + if (http_params) { + IPA_LOGP(SMAIN, LINFO, "HTTP paramms: %s\n", ipa_buf_hexdump(http_params)); + ipa_buf_free(http_params); + } else { + IPA_LOGP(SMAIN, LINFO, "No HTTP paramms available\n"); + } + break; } leave: -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43054?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: I075590e095dbbe05fa6cdb0a96d5b38c7a17ff78 Gerrit-Change-Number: 43054 Gerrit-PatchSet: 11 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1
0
0
0
← Newer
1
...
30
31
32
33
34
35
36
...
227
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
Results per page:
10
25
50
100
200