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

Keyboard Shortcuts

Thread View

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

gerrit-log

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

August 2026

  • 1 participants
  • 2269 discussions
[S] Change in libosmo-sigtran[master]: sccp2sua: fix buffer overrun in osmo_isup_party_parse()
by laforge 05 Aug '26

05 Aug '26
Attention is currently required from: fixeria. laforge has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/43163?usp=email ) Change subject: sccp2sua: fix buffer overrun in osmo_isup_party_parse() ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/43163?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: Iccfbcf22a719544399c7a524b293de9e1a040cf8 Gerrit-Change-Number: 43163 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Wed, 05 Aug 2026 17:54:10 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in onomondo-ipa[master]: V1.2: Add more error codes to AddInitialEimResponse
by laforge 05 Aug '26

05 Aug '26
Attention is currently required from: jolly. laforge has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/onomondo-ipa/+/43045?usp=email ) Change subject: V1.2: Add more error codes to AddInitialEimResponse ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/onomondo-ipa/+/43045?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: Ib4bc1e06b6571d18ff46080f5e5ba1fe3bc0be70 Gerrit-Change-Number: 43045 Gerrit-PatchSet: 2 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> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Comment-Date: Wed, 05 Aug 2026 16:18:50 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[L] Change in onomondo-ipa[master]: V1.2: Add function ES10b.DisableEmergencyProfile
by laforge 05 Aug '26

05 Aug '26
Attention is currently required from: dexter, jolly. laforge has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/onomondo-ipa/+/43044?usp=email ) Change subject: V1.2: Add function ES10b.DisableEmergencyProfile ...................................................................... Patch Set 3: (1 comment) File src/ipa/main.c: https://gerrit.osmocom.org/c/onomondo-ipa/+/43044/comment/6ba53b2f_a1a12cd7… : PS3, Line 56: printf(" --disable-emergency-profile. Trigger return from emergency profile to previous profile\n"); see my comment on an earlier patch of this series about options that are not options but actually mutually exclusive actions/operations/modes -- To view, visit https://gerrit.osmocom.org/c/onomondo-ipa/+/43044?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: I2af2077228fb8c5fa3f254acc15bd0afaa33fe43 Gerrit-Change-Number: 43044 Gerrit-PatchSet: 3 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Wed, 05 Aug 2026 16:18:33 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No
1 0
0 0
[L] Change in onomondo-ipa[master]: V1.2: Add function ES10b.ReturnFromFallback
by laforge 05 Aug '26

05 Aug '26
Attention is currently required from: dexter, jolly. laforge has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/onomondo-ipa/+/43042?usp=email ) Change subject: V1.2: Add function ES10b.ReturnFromFallback ...................................................................... Patch Set 3: (1 comment) File src/ipa/main.c: https://gerrit.osmocom.org/c/onomondo-ipa/+/43042/comment/9308da02_3b5c02c8… : PS3, Line 42: tatic void print_help(void) : { : printf("options:\n"); : printf(" -h ......................... print this text.\n"); : printf(" -t TAC ..................... set TAC (default: %s)\n", DEFAULT_TAC); : printf(" -e eimId ................... set preferred eIM (in case the eUICC has multiple)\n"); : printf(" -r N ....................... set reader number (default: %d)\n", DEFAULT_READER_NUMBER); : printf(" -c N ....................... set logical channel number (default: %d)\n", DEFAULT_CHANNEL_NUMBER); : printf(" -f PATH .................... set initial eIM configuration\n"); : printf(" -m ......................... reset eUICC memory\n"); : printf(" --refresh-flag.............. Make eUICC send a CAT refresh after switching profile\n"); : printf(" --execute-fallback-mechanism Trigger enabling of fallback profile\n"); : printf(" --return-from-fallback...... Trigger return from fallback profile to previous profile\n"); : printf(" -n PATH .................... path to nvstate file (default: %s)\n", DEFAULT_NVSTATE_PATH); : printf(" -y NUM ..................... number of retries for ESipa requests (default: %u)\n", : DEFAULT_ESIPA_REQ_RETRIES); : printf(" -a ......................... ask end user for consent\n"); : printf(" -C ......................... CA (Certificate Authority) Bundle file\n"); : printf(" -S ......................... disable HTTPS\n"); : printf(" -I ......................... disable SSL certificate verification (insecure)\n"); : printf(" -E ......................... emulate IoT eUICC (compatibility mode to use consumer eUICCs)\n"); : printf(" -1 ......................... force the IPAd to process only one eUICC package (debug, use with caution)\n"); : } I have a general problem with this flat approach of options, mixing actual flags/options (like -t/-e/-r/-c/-n/-y/-a/-C/-S/-I/-E/-1) with the actual operations. The operation like execute-fallback-mechanism or return-from-fallback are exclusive-or and modify what the tool does in general. Those should be something like `--mode initial-eim-config|execute-fallback-mechanism|return-from-fallback|normal` or `--operation ...` with a defualt to normal operation. OR osme other syntax that distinguishes the operational mode from optional flags. -- To view, visit https://gerrit.osmocom.org/c/onomondo-ipa/+/43042?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: Ib49a8ef3a5ea5639d881ca51eaeeea24f083fe0e Gerrit-Change-Number: 43042 Gerrit-PatchSet: 3 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Wed, 05 Aug 2026 16:17:04 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No
1 0
0 0
[L] Change in onomondo-ipa[master]: V1.2: Add function ES10b.ExecuteFallbackMechanism
by laforge 05 Aug '26

05 Aug '26
Attention is currently required from: dexter, jolly. laforge has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/onomondo-ipa/+/43041?usp=email ) Change subject: V1.2: Add function ES10b.ExecuteFallbackMechanism ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/onomondo-ipa/+/43041?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: Ia751f0888c36f39ddfadf7f8bb923a8ee50178dc Gerrit-Change-Number: 43041 Gerrit-PatchSet: 3 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> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Wed, 05 Aug 2026 16:12:38 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[L] Change in onomondo-ipa[master]: V1.2: EuiccResultData.setFallbackAttribute / unsetFallbackAttribute
by laforge 05 Aug '26

05 Aug '26
laforge has submitted this change. ( https://gerrit.osmocom.org/c/onomondo-ipa/+/43030?usp=email ) Change subject: V1.2: EuiccResultData.setFallbackAttribute / unsetFallbackAttribute ...................................................................... V1.2: EuiccResultData.setFallbackAttribute / unsetFallbackAttribute Add setFallbackAttribute and unsetFallbackAttribute to EuiccResultData. The IoT eUICC emulation just acknowledges the operation with a log message and does nothing. A non IoT eUICC does not support fallback. Reference: SGP.32 Section 2.11.1.1.3 Related: SYS#8101 Change-Id: I59fba32cb12de22f71b3238adcbab5fc7f66e991 --- M asn1/SGP32Definitions.asn M src/ipa/libasn/CMakeLists.txt M src/ipa/libasn/EuiccResultData.c M src/ipa/libasn/EuiccResultData.h M src/ipa/libasn/Psmo.c M src/ipa/libasn/Psmo.h A src/ipa/libasn/SetFallbackAttributeResult.c A src/ipa/libasn/SetFallbackAttributeResult.h A src/ipa/libasn/UnsetFallbackAttributeResult.c A src/ipa/libasn/UnsetFallbackAttributeResult.h M src/ipa/libipa/es10b_load_euicc_pkg.c 11 files changed, 377 insertions(+), 17 deletions(-) Approvals: Jenkins Builder: Verified dexter: Looks good to me, approved diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index 3b91400..c37ac17 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -102,7 +102,9 @@ immediateEnableFlag [0] NULL OPTIONAL, smdpOid [1] OBJECT IDENTIFIER OPTIONAL, smdpAddress [2] UTF8String OPTIONAL - } + }, + setFallbackAttribute [8] SEQUENCE {iccid [APPLICATION 26] Iccid}, + unsetFallbackAttribute [9] SEQUENCE {} } -- ASN1STOP @@ -172,6 +174,8 @@ updateEimResult [10] UpdateEimResult, listEimResult [11] ListEimResult, rollbackResult [12] RollbackProfileResult, + setFallbackAttributeResult [13] SetFallbackAttributeResult, + unsetFallbackAttributeResult [14] UnsetFallbackAttributeResult, processingTerminated INTEGER { resultSizeOverflow(1), unknownOrDamagedCommand(2), @@ -231,6 +235,20 @@ ok(0), undefinedError(127) } +SetFallbackAttributeResult ::= INTEGER { + ok(0), + iccidOrAidNotFound (1), + fallbackNotAllowed (2), + fallbackProfileEnabled (3), + undefinedError (127) +} +UnsetFallbackAttributeResult ::= INTEGER { + ok(0), + noFallbackAttribute(2), + fallbackProfileEnabled (3), + commandError(7), + undefinedError (127) +} AddEimResult ::= CHOICE { associationToken [4] INTEGER, addEimResultCode INTEGER { diff --git a/src/ipa/libasn/CMakeLists.txt b/src/ipa/libasn/CMakeLists.txt index 90d7b42..68338fb 100644 --- a/src/ipa/libasn/CMakeLists.txt +++ b/src/ipa/libasn/CMakeLists.txt @@ -786,6 +786,8 @@ SetDefaultDpAddressRequest.h SetDefaultDpAddressResponse.c SetDefaultDpAddressResponse.h +SetFallbackAttributeResult.c +SetFallbackAttributeResult.h SetNicknameRequest.c SetNicknameRequest.h SetNicknameResponse.c @@ -892,6 +894,8 @@ UniquePostalName.h UniversalString.c UniversalString.h +UnsetFallbackAttributeResult.c +UnsetFallbackAttributeResult.h UpdateEimResult.c UpdateEimResult.h UpdateMetadataRequest.c diff --git a/src/ipa/libasn/EuiccResultData.c b/src/ipa/libasn/EuiccResultData.c index 08f4119..15fc272 100644 --- a/src/ipa/libasn/EuiccResultData.c +++ b/src/ipa/libasn/EuiccResultData.c @@ -11,7 +11,7 @@ { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_EuiccResultData_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 0, 11 } /* (0..11,...) */, + { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 0, 13 } /* (0..13,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; @@ -115,6 +115,24 @@ 0, 0, /* No default value */ "rollbackResult" }, + { ATF_NOFLAGS, 0, offsetof(struct EuiccResultData, choice.setFallbackAttributeResult), + (ASN_TAG_CLASS_CONTEXT | (13 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_SetFallbackAttributeResult, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "setFallbackAttributeResult" + }, + { ATF_NOFLAGS, 0, offsetof(struct EuiccResultData, choice.unsetFallbackAttributeResult), + (ASN_TAG_CLASS_CONTEXT | (14 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_UnsetFallbackAttributeResult, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "unsetFallbackAttributeResult" + }, { ATF_NOFLAGS, 0, offsetof(struct EuiccResultData, choice.processingTerminated), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, @@ -125,10 +143,10 @@ "processingTerminated" }, }; -static const unsigned asn_MAP_EuiccResultData_to_canonical_1[] = { 11, 0, 1, 2, 4, 5, 6, 7, 8, 9, 10, 3 }; -static const unsigned asn_MAP_EuiccResultData_from_canonical_1[] = { 1, 2, 3, 11, 4, 5, 6, 7, 8, 9, 10, 0 }; +static const unsigned asn_MAP_EuiccResultData_to_canonical_1[] = { 13, 0, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 3 }; +static const unsigned asn_MAP_EuiccResultData_from_canonical_1[] = { 1, 2, 3, 13, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0 }; static const asn_TYPE_tag2member_t asn_MAP_EuiccResultData_tag2el_1[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 11, 0, 0 }, /* processingTerminated */ + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 13, 0, 0 }, /* processingTerminated */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 0, 0, 0 }, /* enableResult */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 1, 0, 0 }, /* disableResult */ { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 2, 0, 0 }, /* deleteResult */ @@ -139,6 +157,8 @@ { (ASN_TAG_CLASS_CONTEXT | (10 << 2)), 8, 0, 0 }, /* updateEimResult */ { (ASN_TAG_CLASS_CONTEXT | (11 << 2)), 9, 0, 0 }, /* listEimResult */ { (ASN_TAG_CLASS_CONTEXT | (12 << 2)), 10, 0, 0 }, /* rollbackResult */ + { (ASN_TAG_CLASS_CONTEXT | (13 << 2)), 11, 0, 0 }, /* setFallbackAttributeResult */ + { (ASN_TAG_CLASS_CONTEXT | (14 << 2)), 12, 0, 0 }, /* unsetFallbackAttributeResult */ { (ASN_TAG_CLASS_CONTEXT | (45 << 2)), 3, 0, 0 } /* listProfileInfoResult */ }; asn_CHOICE_specifics_t asn_SPC_EuiccResultData_specs_1 = { @@ -147,10 +167,10 @@ offsetof(struct EuiccResultData, present), sizeof(((struct EuiccResultData *)0)->present), asn_MAP_EuiccResultData_tag2el_1, - 12, /* Count of tags in the map */ + 14, /* Count of tags in the map */ asn_MAP_EuiccResultData_to_canonical_1, asn_MAP_EuiccResultData_from_canonical_1, - 12 /* Extensions start */ + 14 /* Extensions start */ }; asn_TYPE_descriptor_t asn_DEF_EuiccResultData = { "EuiccResultData", @@ -162,7 +182,7 @@ 0, /* No tags (count) */ { &asn_OER_type_EuiccResultData_constr_1, &asn_PER_type_EuiccResultData_constr_1, CHOICE_constraint }, asn_MBR_EuiccResultData_1, - 12, /* Elements count */ + 14, /* Elements count */ &asn_SPC_EuiccResultData_specs_1 /* Additional specs */ }; diff --git a/src/ipa/libasn/EuiccResultData.h b/src/ipa/libasn/EuiccResultData.h index 82ee724..79197a6 100644 --- a/src/ipa/libasn/EuiccResultData.h +++ b/src/ipa/libasn/EuiccResultData.h @@ -23,6 +23,8 @@ #include "UpdateEimResult.h" #include "ListEimResult.h" #include "RollbackProfileResult.h" +#include "SetFallbackAttributeResult.h" +#include "UnsetFallbackAttributeResult.h" #include <NativeInteger.h> #include <constr_CHOICE.h> @@ -44,6 +46,8 @@ EuiccResultData_PR_updateEimResult, EuiccResultData_PR_listEimResult, EuiccResultData_PR_rollbackResult, + EuiccResultData_PR_setFallbackAttributeResult, + EuiccResultData_PR_unsetFallbackAttributeResult, EuiccResultData_PR_processingTerminated /* Extensions may appear below */ @@ -70,6 +74,8 @@ UpdateEimResult_t updateEimResult; ListEimResult_t listEimResult; RollbackProfileResult_t rollbackResult; + SetFallbackAttributeResult_t setFallbackAttributeResult; + UnsetFallbackAttributeResult_t unsetFallbackAttributeResult; long processingTerminated; /* * This type is extensible, @@ -84,7 +90,7 @@ /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_EuiccResultData; extern asn_CHOICE_specifics_t asn_SPC_EuiccResultData_specs_1; -extern asn_TYPE_member_t asn_MBR_EuiccResultData_1[12]; +extern asn_TYPE_member_t asn_MBR_EuiccResultData_1[14]; extern asn_per_constraints_t asn_PER_type_EuiccResultData_constr_1; #ifdef __cplusplus diff --git a/src/ipa/libasn/Psmo.c b/src/ipa/libasn/Psmo.c index 6b8d207..144a95a 100644 --- a/src/ipa/libasn/Psmo.c +++ b/src/ipa/libasn/Psmo.c @@ -11,7 +11,7 @@ { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_Psmo_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 5 } /* (0..5,...) */, + { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 7 } /* (0..7,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; @@ -249,6 +249,77 @@ &asn_SPC_configureImmediateEnable_specs_15 /* Additional specs */ }; +static asn_TYPE_member_t asn_MBR_setFallbackAttribute_20[] = { + { ATF_NOFLAGS, 0, offsetof(struct Psmo__setFallbackAttribute, iccid), + (ASN_TAG_CLASS_APPLICATION | (26 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Iccid, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "iccid" + }, +}; +static const ber_tlv_tag_t asn_DEF_setFallbackAttribute_tags_20[] = { + (ASN_TAG_CLASS_CONTEXT | (8 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_setFallbackAttribute_tag2el_20[] = { + { (ASN_TAG_CLASS_APPLICATION | (26 << 2)), 0, 0, 0 } /* iccid */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_setFallbackAttribute_specs_20 = { + sizeof(struct Psmo__setFallbackAttribute), + offsetof(struct Psmo__setFallbackAttribute, _asn_ctx), + asn_MAP_setFallbackAttribute_tag2el_20, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_setFallbackAttribute_20 = { + "setFallbackAttribute", + "setFallbackAttribute", + &asn_OP_SEQUENCE, + asn_DEF_setFallbackAttribute_tags_20, + sizeof(asn_DEF_setFallbackAttribute_tags_20) + /sizeof(asn_DEF_setFallbackAttribute_tags_20[0]) - 1, /* 1 */ + asn_DEF_setFallbackAttribute_tags_20, /* Same as above */ + sizeof(asn_DEF_setFallbackAttribute_tags_20) + /sizeof(asn_DEF_setFallbackAttribute_tags_20[0]), /* 2 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_setFallbackAttribute_20, + 1, /* Elements count */ + &asn_SPC_setFallbackAttribute_specs_20 /* Additional specs */ +}; + +static const ber_tlv_tag_t asn_DEF_unsetFallbackAttribute_tags_23[] = { + (ASN_TAG_CLASS_CONTEXT | (9 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SEQUENCE_specifics_t asn_SPC_unsetFallbackAttribute_specs_23 = { + sizeof(struct Psmo__unsetFallbackAttribute), + offsetof(struct Psmo__unsetFallbackAttribute, _asn_ctx), + 0, /* No top level tags */ + 0, /* No tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_unsetFallbackAttribute_23 = { + "unsetFallbackAttribute", + "unsetFallbackAttribute", + &asn_OP_SEQUENCE, + asn_DEF_unsetFallbackAttribute_tags_23, + sizeof(asn_DEF_unsetFallbackAttribute_tags_23) + /sizeof(asn_DEF_unsetFallbackAttribute_tags_23[0]) - 1, /* 1 */ + asn_DEF_unsetFallbackAttribute_tags_23, /* Same as above */ + sizeof(asn_DEF_unsetFallbackAttribute_tags_23) + /sizeof(asn_DEF_unsetFallbackAttribute_tags_23[0]), /* 2 */ + { 0, 0, SEQUENCE_constraint }, + 0, 0, /* No members */ + &asn_SPC_unsetFallbackAttribute_specs_23 /* Additional specs */ +}; + asn_TYPE_member_t asn_MBR_Psmo_1[] = { { ATF_NOFLAGS, 0, offsetof(struct Psmo, choice.enable), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), @@ -304,15 +375,35 @@ 0, 0, /* No default value */ "configureImmediateEnable" }, + { ATF_NOFLAGS, 0, offsetof(struct Psmo, choice.setFallbackAttribute), + (ASN_TAG_CLASS_CONTEXT | (8 << 2)), + 0, + &asn_DEF_setFallbackAttribute_20, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "setFallbackAttribute" + }, + { ATF_NOFLAGS, 0, offsetof(struct Psmo, choice.unsetFallbackAttribute), + (ASN_TAG_CLASS_CONTEXT | (9 << 2)), + 0, + &asn_DEF_unsetFallbackAttribute_23, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "unsetFallbackAttribute" + }, }; -static const unsigned asn_MAP_Psmo_to_canonical_1[] = { 0, 1, 2, 4, 5, 3 }; -static const unsigned asn_MAP_Psmo_from_canonical_1[] = { 0, 1, 2, 5, 3, 4 }; +static const unsigned asn_MAP_Psmo_to_canonical_1[] = { 0, 1, 2, 4, 5, 6, 7, 3 }; +static const unsigned asn_MAP_Psmo_from_canonical_1[] = { 0, 1, 2, 7, 3, 4, 5, 6 }; static const asn_TYPE_tag2member_t asn_MAP_Psmo_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 0, 0, 0 }, /* enable */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 1, 0, 0 }, /* disable */ { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 2, 0, 0 }, /* delete */ { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 4, 0, 0 }, /* getRAT */ { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 5, 0, 0 }, /* configureImmediateEnable */ + { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 6, 0, 0 }, /* setFallbackAttribute */ + { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 7, 0, 0 }, /* unsetFallbackAttribute */ { (ASN_TAG_CLASS_CONTEXT | (45 << 2)), 3, 0, 0 } /* listProfileInfo */ }; asn_CHOICE_specifics_t asn_SPC_Psmo_specs_1 = { @@ -321,10 +412,10 @@ offsetof(struct Psmo, present), sizeof(((struct Psmo *)0)->present), asn_MAP_Psmo_tag2el_1, - 6, /* Count of tags in the map */ + 8, /* Count of tags in the map */ asn_MAP_Psmo_to_canonical_1, asn_MAP_Psmo_from_canonical_1, - 6 /* Extensions start */ + 8 /* Extensions start */ }; asn_TYPE_descriptor_t asn_DEF_Psmo = { "Psmo", @@ -336,7 +427,7 @@ 0, /* No tags (count) */ { &asn_OER_type_Psmo_constr_1, &asn_PER_type_Psmo_constr_1, CHOICE_constraint }, asn_MBR_Psmo_1, - 6, /* Elements count */ + 8, /* Elements count */ &asn_SPC_Psmo_specs_1 /* Additional specs */ }; diff --git a/src/ipa/libasn/Psmo.h b/src/ipa/libasn/Psmo.h index 9e9c22f..c5e3e10 100644 --- a/src/ipa/libasn/Psmo.h +++ b/src/ipa/libasn/Psmo.h @@ -32,7 +32,9 @@ Psmo_PR_delete, Psmo_PR_listProfileInfo, Psmo_PR_getRAT, - Psmo_PR_configureImmediateEnable + Psmo_PR_configureImmediateEnable, + Psmo_PR_setFallbackAttribute, + Psmo_PR_unsetFallbackAttribute /* Extensions may appear below */ } Psmo_PR; @@ -94,6 +96,25 @@ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } configureImmediateEnable; + struct Psmo__setFallbackAttribute { + Iccid_t iccid; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } setFallbackAttribute; + struct Psmo__unsetFallbackAttribute { + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } unsetFallbackAttribute; /* * This type is extensible, * possible extensions are below. @@ -107,7 +128,7 @@ /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_Psmo; extern asn_CHOICE_specifics_t asn_SPC_Psmo_specs_1; -extern asn_TYPE_member_t asn_MBR_Psmo_1[6]; +extern asn_TYPE_member_t asn_MBR_Psmo_1[8]; extern asn_per_constraints_t asn_PER_type_Psmo_constr_1; #ifdef __cplusplus diff --git a/src/ipa/libasn/SetFallbackAttributeResult.c b/src/ipa/libasn/SetFallbackAttributeResult.c new file mode 100644 index 0000000..8996ca7 --- /dev/null +++ b/src/ipa/libasn/SetFallbackAttributeResult.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 "SetFallbackAttributeResult.h" + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_SetFallbackAttributeResult_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_SetFallbackAttributeResult = { + "SetFallbackAttributeResult", + "SetFallbackAttributeResult", + &asn_OP_NativeInteger, + asn_DEF_SetFallbackAttributeResult_tags_1, + sizeof(asn_DEF_SetFallbackAttributeResult_tags_1) + /sizeof(asn_DEF_SetFallbackAttributeResult_tags_1[0]), /* 1 */ + asn_DEF_SetFallbackAttributeResult_tags_1, /* Same as above */ + sizeof(asn_DEF_SetFallbackAttributeResult_tags_1) + /sizeof(asn_DEF_SetFallbackAttributeResult_tags_1[0]), /* 1 */ + { 0, 0, NativeInteger_constraint }, + 0, 0, /* Defined elsewhere */ + 0 /* No specifics */ +}; + diff --git a/src/ipa/libasn/SetFallbackAttributeResult.h b/src/ipa/libasn/SetFallbackAttributeResult.h new file mode 100644 index 0000000..a8b708e --- /dev/null +++ b/src/ipa/libasn/SetFallbackAttributeResult.h @@ -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` + */ + +#ifndef _SetFallbackAttributeResult_H_ +#define _SetFallbackAttributeResult_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include <NativeInteger.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum SetFallbackAttributeResult { + SetFallbackAttributeResult_ok = 0, + SetFallbackAttributeResult_iccidOrAidNotFound = 1, + SetFallbackAttributeResult_fallbackNotAllowed = 2, + SetFallbackAttributeResult_fallbackProfileEnabled = 3, + SetFallbackAttributeResult_undefinedError = 127 +} e_SetFallbackAttributeResult; + +/* SetFallbackAttributeResult */ +typedef long SetFallbackAttributeResult_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_SetFallbackAttributeResult; +asn_struct_free_f SetFallbackAttributeResult_free; +asn_struct_print_f SetFallbackAttributeResult_print; +asn_constr_check_f SetFallbackAttributeResult_constraint; +ber_type_decoder_f SetFallbackAttributeResult_decode_ber; +der_type_encoder_f SetFallbackAttributeResult_encode_der; +xer_type_decoder_f SetFallbackAttributeResult_decode_xer; +xer_type_encoder_f SetFallbackAttributeResult_encode_xer; +oer_type_decoder_f SetFallbackAttributeResult_decode_oer; +oer_type_encoder_f SetFallbackAttributeResult_encode_oer; +per_type_decoder_f SetFallbackAttributeResult_decode_uper; +per_type_encoder_f SetFallbackAttributeResult_encode_uper; + +#ifdef __cplusplus +} +#endif + +#endif /* _SetFallbackAttributeResult_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libasn/UnsetFallbackAttributeResult.c b/src/ipa/libasn/UnsetFallbackAttributeResult.c new file mode 100644 index 0000000..910a723 --- /dev/null +++ b/src/ipa/libasn/UnsetFallbackAttributeResult.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 "UnsetFallbackAttributeResult.h" + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_UnsetFallbackAttributeResult_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_UnsetFallbackAttributeResult = { + "UnsetFallbackAttributeResult", + "UnsetFallbackAttributeResult", + &asn_OP_NativeInteger, + asn_DEF_UnsetFallbackAttributeResult_tags_1, + sizeof(asn_DEF_UnsetFallbackAttributeResult_tags_1) + /sizeof(asn_DEF_UnsetFallbackAttributeResult_tags_1[0]), /* 1 */ + asn_DEF_UnsetFallbackAttributeResult_tags_1, /* Same as above */ + sizeof(asn_DEF_UnsetFallbackAttributeResult_tags_1) + /sizeof(asn_DEF_UnsetFallbackAttributeResult_tags_1[0]), /* 1 */ + { 0, 0, NativeInteger_constraint }, + 0, 0, /* Defined elsewhere */ + 0 /* No specifics */ +}; + diff --git a/src/ipa/libasn/UnsetFallbackAttributeResult.h b/src/ipa/libasn/UnsetFallbackAttributeResult.h new file mode 100644 index 0000000..6aede02 --- /dev/null +++ b/src/ipa/libasn/UnsetFallbackAttributeResult.h @@ -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` + */ + +#ifndef _UnsetFallbackAttributeResult_H_ +#define _UnsetFallbackAttributeResult_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include <NativeInteger.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum UnsetFallbackAttributeResult { + UnsetFallbackAttributeResult_ok = 0, + UnsetFallbackAttributeResult_noFallbackAttribute = 2, + UnsetFallbackAttributeResult_fallbackProfileEnabled = 3, + UnsetFallbackAttributeResult_commandError = 7, + UnsetFallbackAttributeResult_undefinedError = 127 +} e_UnsetFallbackAttributeResult; + +/* UnsetFallbackAttributeResult */ +typedef long UnsetFallbackAttributeResult_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_UnsetFallbackAttributeResult; +asn_struct_free_f UnsetFallbackAttributeResult_free; +asn_struct_print_f UnsetFallbackAttributeResult_print; +asn_constr_check_f UnsetFallbackAttributeResult_constraint; +ber_type_decoder_f UnsetFallbackAttributeResult_decode_ber; +der_type_encoder_f UnsetFallbackAttributeResult_encode_der; +xer_type_decoder_f UnsetFallbackAttributeResult_decode_xer; +xer_type_encoder_f UnsetFallbackAttributeResult_encode_xer; +oer_type_decoder_f UnsetFallbackAttributeResult_decode_oer; +oer_type_encoder_f UnsetFallbackAttributeResult_encode_oer; +per_type_decoder_f UnsetFallbackAttributeResult_decode_uper; +per_type_encoder_f UnsetFallbackAttributeResult_encode_uper; + +#ifdef __cplusplus +} +#endif + +#endif /* _UnsetFallbackAttributeResult_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libipa/es10b_load_euicc_pkg.c b/src/ipa/libipa/es10b_load_euicc_pkg.c index 03ac65a..cf17513 100644 --- a/src/ipa/libipa/es10b_load_euicc_pkg.c +++ b/src/ipa/libipa/es10b_load_euicc_pkg.c @@ -264,6 +264,34 @@ return euicc_result_data; } +struct EuiccResultData *iot_emo_do_setFallbackAttribute_psmo(struct ipa_context *ctx, + const struct Psmo__setFallbackAttribute *setFallbackAttribute_psmo) +{ + struct EuiccResultData *euicc_result_data = IPA_ALLOC_ZERO(struct EuiccResultData); + + IPA_LOGP_ES10X("LoadEuiccPackage", LINFO, + "IoT eUICC emulation active, setFallbackAttribute not supported by eUICC!\n"); + + euicc_result_data->present = EuiccResultData_PR_processingTerminated; + euicc_result_data->choice.processingTerminated = EuiccResultData__processingTerminated_unknownOrDamagedCommand; + + return euicc_result_data; +} + +struct EuiccResultData *iot_emo_do_unsetFallbackAttribute_psmo(struct ipa_context *ctx, + const struct Psmo__unsetFallbackAttribute *unsetFallbackAttribute_psmo) +{ + struct EuiccResultData *euicc_result_data = IPA_ALLOC_ZERO(struct EuiccResultData); + + IPA_LOGP_ES10X("LoadEuiccPackage", LINFO, + "IoT eUICC emulation active, unsetFallbackAttribute not supported by eUICC!\n"); + + euicc_result_data->present = EuiccResultData_PR_unsetFallbackAttributeResult; + euicc_result_data->choice.setFallbackAttributeResult = UnsetFallbackAttributeResult_noFallbackAttribute; + + return euicc_result_data; +} + struct EuiccResultData *iot_emo_do_addEim_eco(struct ipa_context *ctx, const struct EimConfigurationData *addEim_eco) { struct EuiccResultData *euicc_result_data = IPA_ALLOC_ZERO(struct EuiccResultData); @@ -598,6 +626,12 @@ psmo_result = iot_emo_do_configureImmediateEnable_psmo(ctx, &psmo->choice.configureImmediateEnable); break; + case Psmo_PR_setFallbackAttribute: + psmo_result = iot_emo_do_setFallbackAttribute_psmo(ctx, &psmo->choice.setFallbackAttribute); + break; + case Psmo_PR_unsetFallbackAttribute: + psmo_result = iot_emo_do_unsetFallbackAttribute_psmo(ctx, &psmo->choice.unsetFallbackAttribute); + break; default: IPA_LOGP_ES10X("LoadEuiccPackage", LERROR, "ignoring invalid or unsupported PSMO!\n"); break; -- To view, visit https://gerrit.osmocom.org/c/onomondo-ipa/+/43030?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: I59fba32cb12de22f71b3238adcbab5fc7f66e991 Gerrit-Change-Number: 43030 Gerrit-PatchSet: 3 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 size constraint to EimConfigurationData.eimId
by laforge 05 Aug '26

05 Aug '26
laforge has submitted this change. ( https://gerrit.osmocom.org/c/onomondo-ipa/+/43028?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 size constraint to EimConfigurationData.eimId ...................................................................... V1.2: Add size constraint to EimConfigurationData.eimId The size constraint has no impact on the existing code, because it only reads string data from structure. Reference: SGP.32 Section 2.11.1.1.1 Related: SYS#8101 Change-Id: Iafe940876763215a28b9f9067eda090f25ad836c --- M asn1/SGP32Definitions.asn M src/ipa/libasn/EimConfigurationData.c 2 files changed, 42 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified dexter: Looks good to me, approved diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index dc09a83..a9d18b4 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -46,7 +46,7 @@ -- Section 2.11.1.1.1 -- ASN1START EimConfigurationData ::= SEQUENCE { - eimId [0] UTF8String, -- eimId of eIM + eimId [0] UTF8String (SIZE(1..128)), -- eimId of eIM eimFqdn [1] UTF8String OPTIONAL, -- FQDN of eIM eimIdType [2] EimIdType OPTIONAL, counterValue [3] INTEGER OPTIONAL, -- initial counterValue for the eIM diff --git a/src/ipa/libasn/EimConfigurationData.c b/src/ipa/libasn/EimConfigurationData.c index d01e003..2ca5ed5 100644 --- a/src/ipa/libasn/EimConfigurationData.c +++ b/src/ipa/libasn/EimConfigurationData.c @@ -7,6 +7,38 @@ #include "EimConfigurationData.h" +static int +memb_eimId_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const UTF8String_t *st = (const UTF8String_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = UTF8String_length(st); + if((ssize_t)size < 0) { + ASN__CTFAIL(app_key, td, sptr, + "%s: UTF-8: broken encoding (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((size >= 1 && size <= 128)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + static asn_oer_constraints_t asn_OER_type_eimPublicKeyData_constr_7 CC_NOTUSED = { { 0, 0 }, -1}; @@ -23,6 +55,14 @@ { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; +static asn_oer_constraints_t asn_OER_memb_eimId_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +static asn_per_constraints_t asn_PER_memb_eimId_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; static asn_TYPE_member_t asn_MBR_eimPublicKeyData_7[] = { { ATF_NOFLAGS, 0, offsetof(struct EimConfigurationData__eimPublicKeyData, choice.eimPublicKey), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), @@ -127,7 +167,7 @@ -1, /* IMPLICIT tag at current level */ &asn_DEF_UTF8String, 0, - { 0, 0, 0 }, + { &asn_OER_memb_eimId_constr_2, &asn_PER_memb_eimId_constr_2, memb_eimId_constraint_1 }, 0, 0, /* No default value */ "eimId" }, -- To view, visit https://gerrit.osmocom.org/c/onomondo-ipa/+/43028?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: Iafe940876763215a28b9f9067eda090f25ad836c Gerrit-Change-Number: 43028 Gerrit-PatchSet: 2 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: Add EimConfigurationData.indirectProfileDownload
by laforge 05 Aug '26

05 Aug '26
laforge has submitted this change. ( https://gerrit.osmocom.org/c/onomondo-ipa/+/43029?usp=email ) Change subject: V1.2: Add EimConfigurationData.indirectProfileDownload ...................................................................... V1.2: Add EimConfigurationData.indirectProfileDownload The flag indicates, if eIM supports indirect download. As the current version of IPA only supports indirect download, this flag is checked. If it is not supported, profile download is rejected. get_euicc_ci_pkid() is renamed to get_euicc_ci_pkid_ipd(), to indicate that it also gets this flag. This also requires an update of contrib/sample_eim_cfg.ber, which is a BER encoded EimConfigurationData. Reference: SGP.32 Section 2.11.1.1.1 Related: SYS#8101 Change-Id: Ic40111531e6f35d5ea7f3789de6cae0f1c0d5ba7 --- M asn1/SGP32Definitions.asn M contrib/sample_eim_cfg.ber M src/ipa/libasn/EimConfigurationData.c M src/ipa/libasn/EimConfigurationData.h M src/ipa/libipa/proc_eim_pkg_retr.c 5 files changed, 42 insertions(+), 18 deletions(-) Approvals: dexter: Looks good to me, approved Jenkins Builder: Verified diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index a9d18b4..3b91400 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -60,7 +60,8 @@ trustedCertificateTls Certificate -- either the certificate of eIM, used for (D)TLS, or the certificate of the CA, where the encoding follows X.509 standard } OPTIONAL, eimSupportedProtocol [7] EimSupportedProtocol OPTIONAL, - euiccCiPKId [8] SubjectKeyIdentifier OPTIONAL -- CI Public Key Identifier supported on the eUICC for signature creation + euiccCiPKId [8] SubjectKeyIdentifier OPTIONAL, -- CI Public Key Identifier supported on the eUICC for signature creation + indirectProfileDownload[9] NULL OPTIONAL -- support of Indirect Profile download with indicated EimSupportedProtocol } EimIdType ::= INTEGER { eimIdTypeOid(1), diff --git a/contrib/sample_eim_cfg.ber b/contrib/sample_eim_cfg.ber index ba48514..0c0d00f 100644 --- a/contrib/sample_eim_cfg.ber +++ b/contrib/sample_eim_cfg.ber Binary files differ diff --git a/src/ipa/libasn/EimConfigurationData.c b/src/ipa/libasn/EimConfigurationData.c index 2ca5ed5..90bb101 100644 --- a/src/ipa/libasn/EimConfigurationData.c +++ b/src/ipa/libasn/EimConfigurationData.c @@ -171,7 +171,7 @@ 0, 0, /* No default value */ "eimId" }, - { ATF_POINTER, 8, offsetof(struct EimConfigurationData, eimFqdn), + { ATF_POINTER, 9, offsetof(struct EimConfigurationData, eimFqdn), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_UTF8String, @@ -180,7 +180,7 @@ 0, 0, /* No default value */ "eimFqdn" }, - { ATF_POINTER, 7, offsetof(struct EimConfigurationData, eimIdType), + { ATF_POINTER, 8, offsetof(struct EimConfigurationData, eimIdType), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_EimIdType, @@ -189,7 +189,7 @@ 0, 0, /* No default value */ "eimIdType" }, - { ATF_POINTER, 6, offsetof(struct EimConfigurationData, counterValue), + { ATF_POINTER, 7, offsetof(struct EimConfigurationData, counterValue), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_NativeInteger, @@ -198,7 +198,7 @@ 0, 0, /* No default value */ "counterValue" }, - { ATF_POINTER, 5, offsetof(struct EimConfigurationData, associationToken), + { ATF_POINTER, 6, offsetof(struct EimConfigurationData, associationToken), (ASN_TAG_CLASS_CONTEXT | (4 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_NativeInteger, @@ -207,7 +207,7 @@ 0, 0, /* No default value */ "associationToken" }, - { ATF_POINTER, 4, offsetof(struct EimConfigurationData, eimPublicKeyData), + { ATF_POINTER, 5, offsetof(struct EimConfigurationData, eimPublicKeyData), (ASN_TAG_CLASS_CONTEXT | (5 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_eimPublicKeyData_7, @@ -216,7 +216,7 @@ 0, 0, /* No default value */ "eimPublicKeyData" }, - { ATF_POINTER, 3, offsetof(struct EimConfigurationData, trustedPublicKeyDataTls), + { ATF_POINTER, 4, offsetof(struct EimConfigurationData, trustedPublicKeyDataTls), (ASN_TAG_CLASS_CONTEXT | (6 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_trustedPublicKeyDataTls_11, @@ -225,7 +225,7 @@ 0, 0, /* No default value */ "trustedPublicKeyDataTls" }, - { ATF_POINTER, 2, offsetof(struct EimConfigurationData, eimSupportedProtocol), + { ATF_POINTER, 3, offsetof(struct EimConfigurationData, eimSupportedProtocol), (ASN_TAG_CLASS_CONTEXT | (7 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_EimSupportedProtocol, @@ -234,7 +234,7 @@ 0, 0, /* No default value */ "eimSupportedProtocol" }, - { ATF_POINTER, 1, offsetof(struct EimConfigurationData, euiccCiPKId), + { ATF_POINTER, 2, offsetof(struct EimConfigurationData, euiccCiPKId), (ASN_TAG_CLASS_CONTEXT | (8 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_SubjectKeyIdentifier, @@ -243,8 +243,17 @@ 0, 0, /* No default value */ "euiccCiPKId" }, + { ATF_POINTER, 1, offsetof(struct EimConfigurationData, indirectProfileDownload), + (ASN_TAG_CLASS_CONTEXT | (9 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NULL, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "indirectProfileDownload" + }, }; -static const int asn_MAP_EimConfigurationData_oms_1[] = { 1, 2, 3, 4, 5, 6, 7, 8 }; +static const int asn_MAP_EimConfigurationData_oms_1[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; static const ber_tlv_tag_t asn_DEF_EimConfigurationData_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; @@ -257,16 +266,17 @@ { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* eimPublicKeyData */ { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* trustedPublicKeyDataTls */ { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* eimSupportedProtocol */ - { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 } /* euiccCiPKId */ + { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 }, /* euiccCiPKId */ + { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 9, 0, 0 } /* indirectProfileDownload */ }; asn_SEQUENCE_specifics_t asn_SPC_EimConfigurationData_specs_1 = { sizeof(struct EimConfigurationData), offsetof(struct EimConfigurationData, _asn_ctx), asn_MAP_EimConfigurationData_tag2el_1, - 9, /* Count of tags in the map */ + 10, /* Count of tags in the map */ asn_MAP_EimConfigurationData_oms_1, /* Optional members */ - 8, 0, /* Root/Additions */ - 9, /* First extension addition */ + 9, 0, /* Root/Additions */ + 10, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_EimConfigurationData = { "EimConfigurationData", @@ -280,7 +290,7 @@ /sizeof(asn_DEF_EimConfigurationData_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_EimConfigurationData_1, - 9, /* Elements count */ + 10, /* Elements count */ &asn_SPC_EimConfigurationData_specs_1 /* Additional specs */ }; diff --git a/src/ipa/libasn/EimConfigurationData.h b/src/ipa/libasn/EimConfigurationData.h index a5ffc79..73f7218 100644 --- a/src/ipa/libasn/EimConfigurationData.h +++ b/src/ipa/libasn/EimConfigurationData.h @@ -17,6 +17,7 @@ #include <NativeInteger.h> #include "EimSupportedProtocol.h" #include "SubjectKeyIdentifier.h" +#include <NULL.h> #include "SubjectPublicKeyInfo.h" #include "Certificate.h" #include <constr_CHOICE.h> @@ -79,6 +80,7 @@ } *trustedPublicKeyDataTls; EimSupportedProtocol_t *eimSupportedProtocol /* OPTIONAL */; SubjectKeyIdentifier_t *euiccCiPKId /* OPTIONAL */; + NULL_t *indirectProfileDownload /* OPTIONAL */; /* * This type is extensible, * possible extensions are below. @@ -91,7 +93,7 @@ /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_EimConfigurationData; extern asn_SEQUENCE_specifics_t asn_SPC_EimConfigurationData_specs_1; -extern asn_TYPE_member_t asn_MBR_EimConfigurationData_1[9]; +extern asn_TYPE_member_t asn_MBR_EimConfigurationData_1[10]; #ifdef __cplusplus } diff --git a/src/ipa/libipa/proc_eim_pkg_retr.c b/src/ipa/libipa/proc_eim_pkg_retr.c index 3fe289c..6795cad 100644 --- a/src/ipa/libipa/proc_eim_pkg_retr.c +++ b/src/ipa/libipa/proc_eim_pkg_retr.c @@ -28,7 +28,7 @@ #include "proc_euicc_data_req.h" #include "proc_eim_pkg_retr.h" -static int get_euicc_ci_pkid(struct ipa_context *ctx, struct ipa_buf **pkid) +static int get_euicc_ci_pkid_ipd(struct ipa_context *ctx, struct ipa_buf **pkid, bool *idp) { struct ipa_es10b_eim_cfg_data *eim_cfg_data = NULL; struct EimConfigurationData *eim_cfg_data_item = NULL; @@ -50,6 +50,9 @@ if (eim_cfg_data_item->euiccCiPKId) *pkid = IPA_BUF_FROM_ASN(eim_cfg_data_item->euiccCiPKId); + if (eim_cfg_data_item->indirectProfileDownload) + *idp = true; + ipa_es10b_get_eim_cfg_data_free(eim_cfg_data); return 0; error: @@ -62,6 +65,7 @@ int eim_pkg_exec(struct ipa_context *ctx, const struct ipa_esipa_get_eim_pkg_res *get_eim_pkg_res) { struct ipa_buf *allowed_ca_pkid = NULL; + bool indirect_profile_download = false; int rc; if (get_eim_pkg_res->euicc_package_request) { @@ -107,12 +111,19 @@ goto error; } - rc = get_euicc_ci_pkid(ctx, &allowed_ca_pkid); + rc = get_euicc_ci_pkid_ipd(ctx, &allowed_ca_pkid, &indirect_profile_download); if (rc < 0) { rc = -EINVAL; goto error; } + if (!indirect_profile_download) { + IPA_LOGP(SIPA, LERROR, + "Indirect profile download is not supported by eIM and this IPAd does not support direct profile download, -- cannot continue!\n"); + rc = -ENOTSUP; + goto error; + } + indirect_prfle_dwnlod_pars.allowed_ca = allowed_ca_pkid; indirect_prfle_dwnlod_pars.tac = ctx->cfg->tac; indirect_prfle_dwnlod_pars.ac = -- To view, visit https://gerrit.osmocom.org/c/onomondo-ipa/+/43029?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: Ic40111531e6f35d5ea7f3789de6cae0f1c0d5ba7 Gerrit-Change-Number: 43029 Gerrit-PatchSet: 3 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 profileDownloadErrorReason to ProfileDownloadTriggerResult
by laforge 05 Aug '26

05 Aug '26
laforge has submitted this change. ( https://gerrit.osmocom.org/c/onomondo-ipa/+/43040?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 profileDownloadErrorReason to ProfileDownloadTriggerResult ...................................................................... V1.2: Add profileDownloadErrorReason to ProfileDownloadTriggerResult Reference: SGP.32 Section 2.11.2.3 Related: SYS#8101 Change-Id: Ia5da46a793db54f2e2671be2b50dd1dddc97e318 --- M asn1/SGP32Definitions.asn M src/ipa/libasn/ProfileDownloadTriggerResult.c M src/ipa/libasn/ProfileDownloadTriggerResult.h 3 files changed, 26 insertions(+), 6 deletions(-) Approvals: dexter: Looks good to me, approved Jenkins Builder: Verified diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index 822c454..0c3766f 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -342,6 +342,10 @@ profileDownloadTriggerResultData CHOICE { profileInstallationResult [55] SGP32-ProfileInstallationResult, -- see SGP.22 [4] profileDownloadError SEQUENCE { + profileDownloadErrorReason [0] INTEGER { + ecallActive (104), + undefinedError(127) + }, errorResponse OCTET STRING OPTIONAL } } diff --git a/src/ipa/libasn/ProfileDownloadTriggerResult.c b/src/ipa/libasn/ProfileDownloadTriggerResult.c index f5e7188..faa7065 100644 --- a/src/ipa/libasn/ProfileDownloadTriggerResult.c +++ b/src/ipa/libasn/ProfileDownloadTriggerResult.c @@ -16,9 +16,18 @@ 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_profileDownloadError_5[] = { - { ATF_POINTER, 1, offsetof(struct ProfileDownloadTriggerResult__profileDownloadTriggerResultData__profileDownloadError, errorResponse), + { ATF_NOFLAGS, 0, offsetof(struct ProfileDownloadTriggerResult__profileDownloadTriggerResultData__profileDownloadError, profileDownloadErrorReason), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "profileDownloadErrorReason" + }, + { ATF_POINTER, 1, offsetof(struct ProfileDownloadTriggerResult__profileDownloadTriggerResultData__profileDownloadError, errorResponse), + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, &asn_DEF_OCTET_STRING, 0, { 0, 0, 0 }, @@ -26,21 +35,22 @@ "errorResponse" }, }; -static const int asn_MAP_profileDownloadError_oms_5[] = { 0 }; +static const int asn_MAP_profileDownloadError_oms_5[] = { 1 }; static const ber_tlv_tag_t asn_DEF_profileDownloadError_tags_5[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_profileDownloadError_tag2el_5[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* errorResponse */ + { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, 0, 0 }, /* errorResponse */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* profileDownloadErrorReason */ }; static asn_SEQUENCE_specifics_t asn_SPC_profileDownloadError_specs_5 = { sizeof(struct ProfileDownloadTriggerResult__profileDownloadTriggerResultData__profileDownloadError), offsetof(struct ProfileDownloadTriggerResult__profileDownloadTriggerResultData__profileDownloadError, _asn_ctx), asn_MAP_profileDownloadError_tag2el_5, - 1, /* Count of tags in the map */ + 2, /* Count of tags in the map */ asn_MAP_profileDownloadError_oms_5, /* Optional members */ 1, 0, /* Root/Additions */ - 1, /* First extension addition */ + 2, /* First extension addition */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_profileDownloadError_5 = { @@ -55,7 +65,7 @@ /sizeof(asn_DEF_profileDownloadError_tags_5[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_profileDownloadError_5, - 1, /* Elements count */ + 2, /* Elements count */ &asn_SPC_profileDownloadError_specs_5 /* Additional specs */ }; diff --git a/src/ipa/libasn/ProfileDownloadTriggerResult.h b/src/ipa/libasn/ProfileDownloadTriggerResult.h index 744c8ae..090bcb7 100644 --- a/src/ipa/libasn/ProfileDownloadTriggerResult.h +++ b/src/ipa/libasn/ProfileDownloadTriggerResult.h @@ -14,6 +14,7 @@ /* Including external dependencies */ #include "TransactionId.h" #include "SGP32-ProfileInstallationResult.h" +#include <NativeInteger.h> #include <OCTET_STRING.h> #include <constr_SEQUENCE.h> #include <constr_CHOICE.h> @@ -30,6 +31,10 @@ /* Extensions may appear below */ } ProfileDownloadTriggerResult__profileDownloadTriggerResultData_PR; +typedef enum ProfileDownloadTriggerResult__profileDownloadTriggerResultData__profileDownloadError__profileDownloadErrorReason { + ProfileDownloadTriggerResult__profileDownloadTriggerResultData__profileDownloadError__profileDownloadErrorReason_ecallActive = 104, + ProfileDownloadTriggerResult__profileDownloadTriggerResultData__profileDownloadError__profileDownloadErrorReason_undefinedError = 127 +} e_ProfileDownloadTriggerResult__profileDownloadTriggerResultData__profileDownloadError__profileDownloadErrorReason; /* ProfileDownloadTriggerResult */ typedef struct ProfileDownloadTriggerResult { @@ -39,6 +44,7 @@ union ProfileDownloadTriggerResult__profileDownloadTriggerResultData_u { SGP32_ProfileInstallationResult_t profileInstallationResult; struct ProfileDownloadTriggerResult__profileDownloadTriggerResultData__profileDownloadError { + long profileDownloadErrorReason; OCTET_STRING_t *errorResponse /* OPTIONAL */; /* * This type is extensible, -- To view, visit https://gerrit.osmocom.org/c/onomondo-ipa/+/43040?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: Ia5da46a793db54f2e2671be2b50dd1dddc97e318 Gerrit-Change-Number: 43040 Gerrit-PatchSet: 2 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 new fields to ProfileInfo list
by laforge 05 Aug '26

05 Aug '26
laforge has submitted this change. ( https://gerrit.osmocom.org/c/onomondo-ipa/+/43032?usp=email ) Change subject: V1.2: Add new fields to ProfileInfo list ...................................................................... V1.2: Add new fields to ProfileInfo list Add new tags for ecallIndication, fallbackAttribute and fallbackAllowed. They new are not supported by non IoT eUICC. The IoT eUICC emulation will remove the unsupported tags from the ProfileInfoListRequest and later adds the requested fields to the ProfileInfoListResponse with the value 'false'. Reference SGP.32 Section 2.11.1.1.3 Related: SYS#8101 Change-Id: I6667dba8dd84817cfee69daa1c44b98239fa171c --- M asn1/SGP32Definitions.asn M src/ipa/libasn/CMakeLists.txt A src/ipa/libasn/SGP32-ProfileInfo.c A src/ipa/libasn/SGP32-ProfileInfo.h M src/ipa/libasn/SGP32-ProfileInfoListResponse.c M src/ipa/libasn/SGP32-ProfileInfoListResponse.h M src/ipa/libipa/es10c_get_prfle_info.c M src/ipa/libipa/es10c_get_prfle_info.h 8 files changed, 666 insertions(+), 15 deletions(-) Approvals: Jenkins Builder: Verified dexter: Looks good to me, approved diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index 233f40c..a5ada72 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -225,7 +225,7 @@ undefinedError(127) } SGP32-ProfileInfoListResponse ::= [45] CHOICE { - profileInfoListOk SEQUENCE OF ProfileInfo, -- see SGP.22 + profileInfoListOk SEQUENCE OF SGP32-ProfileInfo, profileInfoListError SGP32-ProfileInfoListError } SGP32-ProfileInfoListError ::= INTEGER { @@ -349,6 +349,30 @@ } -- ASN1STOP +-- Section 4.4 +-- ASN1START +-- Definition of ProfileInfo +SGP32-ProfileInfo ::= [PRIVATE 3] SEQUENCE { -- Tag 'E3' + iccid Iccid OPTIONAL, + isdpAid [APPLICATION 15] OctetTo16 OPTIONAL, -- AID of the ISD-P containing the Profile, tag '4F' + profileState [112] ProfileState OPTIONAL, -- Tag '9F70' + profileNickname [16] UTF8String (SIZE(0..64)) OPTIONAL, -- Tag '90' + serviceProviderName [17] UTF8String (SIZE(0..32)) OPTIONAL, -- Tag '91' + profileName [18] UTF8String (SIZE(0..64)) OPTIONAL, -- Tag '92' + iconType [19] IconType OPTIONAL, -- Tag '93' + icon [20] OCTET STRING (SIZE(0..1024)) OPTIONAL, -- Tag '94', see condition in ES10b:GetProfilesInfo + profileClass [21] ProfileClass OPTIONAL, -- Tag '95' + notificationConfigurationInfo [22] SEQUENCE OF NotificationConfigurationInformation OPTIONAL, -- Tag 'B6' + profileOwner [23] OperatorId OPTIONAL, -- Tag 'B7' + dpProprietaryData [24] DpProprietaryData OPTIONAL, -- Tag 'B8' + profilePolicyRules [25] PprIds OPTIONAL, -- Tag '99' + serviceSpecificDataStoredInEuicc [34] VendorSpecificExtension OPTIONAL, -- Tag 'BF22' + ecallIndication [123] BOOLEAN OPTIONAL, -- Tag '9F7B' + fallbackAttribute [38] BOOLEAN DEFAULT FALSE, -- Tag '9F26', indicates a Fallback Profile if set to TRUE + fallbackAllowed [103] BOOLEAN OPTIONAL -- Tag '9F67', indicates if Fallback is authorized by the Profile Owner +} +-- ASN1STOP + -- Section 5.9.2 -- ASN1START SGP32-EUICCInfo2 ::= [34] SEQUENCE { -- Tag 'BF22' diff --git a/src/ipa/libasn/CMakeLists.txt b/src/ipa/libasn/CMakeLists.txt index bd8ed73..5ca748e 100644 --- a/src/ipa/libasn/CMakeLists.txt +++ b/src/ipa/libasn/CMakeLists.txt @@ -808,6 +808,8 @@ SGP32-PendingNotification.h SGP32-PrepareDownloadResponse.c SGP32-PrepareDownloadResponse.h +SGP32-ProfileInfo.c +SGP32-ProfileInfo.h SGP32-ProfileInfoListError.c SGP32-ProfileInfoListError.h SGP32-ProfileInfoListResponse.c diff --git a/src/ipa/libasn/SGP32-ProfileInfo.c b/src/ipa/libasn/SGP32-ProfileInfo.c new file mode 100644 index 0000000..63e6862 --- /dev/null +++ b/src/ipa/libasn/SGP32-ProfileInfo.c @@ -0,0 +1,427 @@ +/* + * 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 "SGP32-ProfileInfo.h" + +static int +memb_profileNickname_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const UTF8String_t *st = (const UTF8String_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = UTF8String_length(st); + if((ssize_t)size < 0) { + ASN__CTFAIL(app_key, td, sptr, + "%s: UTF-8: broken encoding (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((size <= 64)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_serviceProviderName_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const UTF8String_t *st = (const UTF8String_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = UTF8String_length(st); + if((ssize_t)size < 0) { + ASN__CTFAIL(app_key, td, sptr, + "%s: UTF-8: broken encoding (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((size <= 32)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_profileName_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const UTF8String_t *st = (const UTF8String_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = UTF8String_length(st); + if((ssize_t)size < 0) { + ASN__CTFAIL(app_key, td, sptr, + "%s: UTF-8: broken encoding (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((size <= 64)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_icon_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size <= 1024)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_profileNickname_constr_5 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +static asn_per_constraints_t asn_PER_memb_profileNickname_constr_5 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_serviceProviderName_constr_6 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +static asn_per_constraints_t asn_PER_memb_serviceProviderName_constr_6 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_profileName_constr_7 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +static asn_per_constraints_t asn_PER_memb_profileName_constr_7 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_icon_constr_9 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..1024)) */}; +static asn_per_constraints_t asn_PER_memb_icon_constr_9 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 11, 11, 0, 1024 } /* (SIZE(0..1024)) */, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_notificationConfigurationInfo_11[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_NotificationConfigurationInformation, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_notificationConfigurationInfo_tags_11[] = { + (ASN_TAG_CLASS_CONTEXT | (22 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_notificationConfigurationInfo_specs_11 = { + sizeof(struct SGP32_ProfileInfo__notificationConfigurationInfo), + offsetof(struct SGP32_ProfileInfo__notificationConfigurationInfo, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_notificationConfigurationInfo_11 = { + "notificationConfigurationInfo", + "notificationConfigurationInfo", + &asn_OP_SEQUENCE_OF, + asn_DEF_notificationConfigurationInfo_tags_11, + sizeof(asn_DEF_notificationConfigurationInfo_tags_11) + /sizeof(asn_DEF_notificationConfigurationInfo_tags_11[0]) - 1, /* 1 */ + asn_DEF_notificationConfigurationInfo_tags_11, /* Same as above */ + sizeof(asn_DEF_notificationConfigurationInfo_tags_11) + /sizeof(asn_DEF_notificationConfigurationInfo_tags_11[0]), /* 2 */ + { 0, 0, SEQUENCE_OF_constraint }, + asn_MBR_notificationConfigurationInfo_11, + 1, /* Single element */ + &asn_SPC_notificationConfigurationInfo_specs_11 /* Additional specs */ +}; + +static int asn_DFL_18_cmp_0(const void *sptr) { + const BOOLEAN_t *st = sptr; + + if(!st) { + return -1; /* No value is not a default value */ + } + + /* Test default value 0 */ + return (*st != 0); +} +static int asn_DFL_18_set_0(void **sptr) { + BOOLEAN_t *st = *sptr; + + if(!st) { + st = (*sptr = CALLOC(1, sizeof(*st))); + if(!st) return -1; + } + + /* Install default value 0 */ + *st = 0; + return 0; +} +asn_TYPE_member_t asn_MBR_SGP32_ProfileInfo_1[] = { + { ATF_POINTER, 17, offsetof(struct SGP32_ProfileInfo, iccid), + (ASN_TAG_CLASS_APPLICATION | (26 << 2)), + 0, + &asn_DEF_Iccid, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "iccid" + }, + { ATF_POINTER, 16, offsetof(struct SGP32_ProfileInfo, isdpAid), + (ASN_TAG_CLASS_APPLICATION | (15 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OctetTo16, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "isdpAid" + }, + { ATF_POINTER, 15, offsetof(struct SGP32_ProfileInfo, profileState), + (ASN_TAG_CLASS_CONTEXT | (112 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProfileState, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "profileState" + }, + { ATF_POINTER, 14, offsetof(struct SGP32_ProfileInfo, profileNickname), + (ASN_TAG_CLASS_CONTEXT | (16 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_UTF8String, + 0, + { &asn_OER_memb_profileNickname_constr_5, &asn_PER_memb_profileNickname_constr_5, memb_profileNickname_constraint_1 }, + 0, 0, /* No default value */ + "profileNickname" + }, + { ATF_POINTER, 13, offsetof(struct SGP32_ProfileInfo, serviceProviderName), + (ASN_TAG_CLASS_CONTEXT | (17 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_UTF8String, + 0, + { &asn_OER_memb_serviceProviderName_constr_6, &asn_PER_memb_serviceProviderName_constr_6, memb_serviceProviderName_constraint_1 }, + 0, 0, /* No default value */ + "serviceProviderName" + }, + { ATF_POINTER, 12, offsetof(struct SGP32_ProfileInfo, profileName), + (ASN_TAG_CLASS_CONTEXT | (18 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_UTF8String, + 0, + { &asn_OER_memb_profileName_constr_7, &asn_PER_memb_profileName_constr_7, memb_profileName_constraint_1 }, + 0, 0, /* No default value */ + "profileName" + }, + { ATF_POINTER, 11, offsetof(struct SGP32_ProfileInfo, iconType), + (ASN_TAG_CLASS_CONTEXT | (19 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_IconType, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "iconType" + }, + { ATF_POINTER, 10, offsetof(struct SGP32_ProfileInfo, icon), + (ASN_TAG_CLASS_CONTEXT | (20 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { &asn_OER_memb_icon_constr_9, &asn_PER_memb_icon_constr_9, memb_icon_constraint_1 }, + 0, 0, /* No default value */ + "icon" + }, + { ATF_POINTER, 9, offsetof(struct SGP32_ProfileInfo, profileClass), + (ASN_TAG_CLASS_CONTEXT | (21 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProfileClass, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "profileClass" + }, + { ATF_POINTER, 8, offsetof(struct SGP32_ProfileInfo, notificationConfigurationInfo), + (ASN_TAG_CLASS_CONTEXT | (22 << 2)), + 0, + &asn_DEF_notificationConfigurationInfo_11, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "notificationConfigurationInfo" + }, + { ATF_POINTER, 7, offsetof(struct SGP32_ProfileInfo, profileOwner), + (ASN_TAG_CLASS_CONTEXT | (23 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OperatorId, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "profileOwner" + }, + { ATF_POINTER, 6, offsetof(struct SGP32_ProfileInfo, dpProprietaryData), + (ASN_TAG_CLASS_CONTEXT | (24 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_DpProprietaryData, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "dpProprietaryData" + }, + { ATF_POINTER, 5, offsetof(struct SGP32_ProfileInfo, profilePolicyRules), + (ASN_TAG_CLASS_CONTEXT | (25 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PprIds, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "profilePolicyRules" + }, + { ATF_POINTER, 4, offsetof(struct SGP32_ProfileInfo, serviceSpecificDataStoredInEuicc), + (ASN_TAG_CLASS_CONTEXT | (34 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_VendorSpecificExtension, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "serviceSpecificDataStoredInEuicc" + }, + { ATF_POINTER, 3, offsetof(struct SGP32_ProfileInfo, ecallIndication), + (ASN_TAG_CLASS_CONTEXT | (123 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BOOLEAN, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ecallIndication" + }, + { ATF_NOFLAGS, 2, offsetof(struct SGP32_ProfileInfo, fallbackAttribute), + (ASN_TAG_CLASS_CONTEXT | (38 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BOOLEAN, + 0, + { 0, 0, 0 }, + &asn_DFL_18_cmp_0, /* Compare DEFAULT 0 */ + &asn_DFL_18_set_0, /* Set DEFAULT 0 */ + "fallbackAttribute" + }, + { ATF_POINTER, 1, offsetof(struct SGP32_ProfileInfo, fallbackAllowed), + (ASN_TAG_CLASS_CONTEXT | (103 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BOOLEAN, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "fallbackAllowed" + }, +}; +static const int asn_MAP_SGP32_ProfileInfo_oms_1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }; +static const ber_tlv_tag_t asn_DEF_SGP32_ProfileInfo_tags_1[] = { + (ASN_TAG_CLASS_PRIVATE | (3 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_SGP32_ProfileInfo_tag2el_1[] = { + { (ASN_TAG_CLASS_APPLICATION | (15 << 2)), 1, 0, 0 }, /* isdpAid */ + { (ASN_TAG_CLASS_APPLICATION | (26 << 2)), 0, 0, 0 }, /* iccid */ + { (ASN_TAG_CLASS_CONTEXT | (16 << 2)), 3, 0, 0 }, /* profileNickname */ + { (ASN_TAG_CLASS_CONTEXT | (17 << 2)), 4, 0, 0 }, /* serviceProviderName */ + { (ASN_TAG_CLASS_CONTEXT | (18 << 2)), 5, 0, 0 }, /* profileName */ + { (ASN_TAG_CLASS_CONTEXT | (19 << 2)), 6, 0, 0 }, /* iconType */ + { (ASN_TAG_CLASS_CONTEXT | (20 << 2)), 7, 0, 0 }, /* icon */ + { (ASN_TAG_CLASS_CONTEXT | (21 << 2)), 8, 0, 0 }, /* profileClass */ + { (ASN_TAG_CLASS_CONTEXT | (22 << 2)), 9, 0, 0 }, /* notificationConfigurationInfo */ + { (ASN_TAG_CLASS_CONTEXT | (23 << 2)), 10, 0, 0 }, /* profileOwner */ + { (ASN_TAG_CLASS_CONTEXT | (24 << 2)), 11, 0, 0 }, /* dpProprietaryData */ + { (ASN_TAG_CLASS_CONTEXT | (25 << 2)), 12, 0, 0 }, /* profilePolicyRules */ + { (ASN_TAG_CLASS_CONTEXT | (34 << 2)), 13, 0, 0 }, /* serviceSpecificDataStoredInEuicc */ + { (ASN_TAG_CLASS_CONTEXT | (38 << 2)), 15, 0, 0 }, /* fallbackAttribute */ + { (ASN_TAG_CLASS_CONTEXT | (103 << 2)), 16, 0, 0 }, /* fallbackAllowed */ + { (ASN_TAG_CLASS_CONTEXT | (112 << 2)), 2, 0, 0 }, /* profileState */ + { (ASN_TAG_CLASS_CONTEXT | (123 << 2)), 14, 0, 0 } /* ecallIndication */ +}; +asn_SEQUENCE_specifics_t asn_SPC_SGP32_ProfileInfo_specs_1 = { + sizeof(struct SGP32_ProfileInfo), + offsetof(struct SGP32_ProfileInfo, _asn_ctx), + asn_MAP_SGP32_ProfileInfo_tag2el_1, + 17, /* Count of tags in the map */ + asn_MAP_SGP32_ProfileInfo_oms_1, /* Optional members */ + 17, 0, /* Root/Additions */ + 17, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_SGP32_ProfileInfo = { + "SGP32-ProfileInfo", + "SGP32-ProfileInfo", + &asn_OP_SEQUENCE, + asn_DEF_SGP32_ProfileInfo_tags_1, + sizeof(asn_DEF_SGP32_ProfileInfo_tags_1) + /sizeof(asn_DEF_SGP32_ProfileInfo_tags_1[0]) - 1, /* 1 */ + asn_DEF_SGP32_ProfileInfo_tags_1, /* Same as above */ + sizeof(asn_DEF_SGP32_ProfileInfo_tags_1) + /sizeof(asn_DEF_SGP32_ProfileInfo_tags_1[0]), /* 2 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_SGP32_ProfileInfo_1, + 17, /* Elements count */ + &asn_SPC_SGP32_ProfileInfo_specs_1 /* Additional specs */ +}; + diff --git a/src/ipa/libasn/SGP32-ProfileInfo.h b/src/ipa/libasn/SGP32-ProfileInfo.h new file mode 100644 index 0000000..c9ecd04 --- /dev/null +++ b/src/ipa/libasn/SGP32-ProfileInfo.h @@ -0,0 +1,87 @@ +/* + * 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 _SGP32_ProfileInfo_H_ +#define _SGP32_ProfileInfo_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include "Iccid.h" +#include "OctetTo16.h" +#include "ProfileState.h" +#include <UTF8String.h> +#include "IconType.h" +#include <OCTET_STRING.h> +#include "ProfileClass.h" +#include "PprIds.h" +#include <BOOLEAN.h> +#include <asn_SEQUENCE_OF.h> +#include <constr_SEQUENCE_OF.h> +#include <constr_SEQUENCE.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct OperatorId; +struct DpProprietaryData; +struct VendorSpecificExtension; +struct NotificationConfigurationInformation; + +/* SGP32-ProfileInfo */ +typedef struct SGP32_ProfileInfo { + Iccid_t *iccid /* OPTIONAL */; + OctetTo16_t *isdpAid /* OPTIONAL */; + ProfileState_t *profileState /* OPTIONAL */; + UTF8String_t *profileNickname /* OPTIONAL */; + UTF8String_t *serviceProviderName /* OPTIONAL */; + UTF8String_t *profileName /* OPTIONAL */; + IconType_t *iconType /* OPTIONAL */; + OCTET_STRING_t *icon /* OPTIONAL */; + ProfileClass_t *profileClass /* OPTIONAL */; + struct SGP32_ProfileInfo__notificationConfigurationInfo { + A_SEQUENCE_OF(struct NotificationConfigurationInformation) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } *notificationConfigurationInfo; + struct OperatorId *profileOwner /* OPTIONAL */; + struct DpProprietaryData *dpProprietaryData /* OPTIONAL */; + PprIds_t *profilePolicyRules /* OPTIONAL */; + struct VendorSpecificExtension *serviceSpecificDataStoredInEuicc /* OPTIONAL */; + BOOLEAN_t *ecallIndication /* OPTIONAL */; + BOOLEAN_t fallbackAttribute /* DEFAULT FALSE */; + BOOLEAN_t *fallbackAllowed /* OPTIONAL */; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} SGP32_ProfileInfo_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_SGP32_ProfileInfo; +extern asn_SEQUENCE_specifics_t asn_SPC_SGP32_ProfileInfo_specs_1; +extern asn_TYPE_member_t asn_MBR_SGP32_ProfileInfo_1[17]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "OperatorId.h" +#include "DpProprietaryData.h" +#include "VendorSpecificExtension.h" +#include "NotificationConfigurationInformation.h" + +#endif /* _SGP32_ProfileInfo_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libasn/SGP32-ProfileInfoListResponse.c b/src/ipa/libasn/SGP32-ProfileInfoListResponse.c index 50604b2..5b10232 100644 --- a/src/ipa/libasn/SGP32-ProfileInfoListResponse.c +++ b/src/ipa/libasn/SGP32-ProfileInfoListResponse.c @@ -19,7 +19,7 @@ { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_PRIVATE | (3 << 2)), 0, - &asn_DEF_ProfileInfo, + &asn_DEF_SGP32_ProfileInfo, 0, { 0, 0, 0 }, 0, 0, /* No default value */ diff --git a/src/ipa/libasn/SGP32-ProfileInfoListResponse.h b/src/ipa/libasn/SGP32-ProfileInfoListResponse.h index d00c721..d2fb08e 100644 --- a/src/ipa/libasn/SGP32-ProfileInfoListResponse.h +++ b/src/ipa/libasn/SGP32-ProfileInfoListResponse.h @@ -31,14 +31,14 @@ } SGP32_ProfileInfoListResponse_PR; /* Forward declarations */ -struct ProfileInfo; +struct SGP32_ProfileInfo; /* SGP32-ProfileInfoListResponse */ typedef struct SGP32_ProfileInfoListResponse { SGP32_ProfileInfoListResponse_PR present; union SGP32_ProfileInfoListResponse_u { struct SGP32_ProfileInfoListResponse__profileInfoListOk { - A_SEQUENCE_OF(struct ProfileInfo) list; + A_SEQUENCE_OF(struct SGP32_ProfileInfo) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; @@ -65,7 +65,7 @@ #endif /* Referred external types */ -#include "ProfileInfo.h" +#include "SGP32-ProfileInfo.h" #endif /* _SGP32_ProfileInfoListResponse_H_ */ #include <asn_internal.h> diff --git a/src/ipa/libipa/es10c_get_prfle_info.c b/src/ipa/libipa/es10c_get_prfle_info.c index b45e407..712af08 100644 --- a/src/ipa/libipa/es10c_get_prfle_info.c +++ b/src/ipa/libipa/es10c_get_prfle_info.c @@ -36,10 +36,12 @@ }; /* Convert the response into SGP32 format */ -static struct SGP32_ProfileInfoListResponse *convert_res_to_sgp32(struct ProfileInfoListResponse *res) +static struct SGP32_ProfileInfoListResponse *convert_res_to_sgp32(struct ProfileInfoListResponse *res, + const struct ipa_es10c_get_prfle_info_req *conv_req) { struct SGP32_ProfileInfoListResponse *sgp32_res; struct ProfileInfo *prfle_info_item; + struct SGP32_ProfileInfo *sgp32_prfle_info_item; unsigned int i; if (!res) @@ -51,9 +53,37 @@ switch (res->present) { case ProfileInfoListResponse_PR_profileInfoListOk: for (i = 0; i < res->choice.profileInfoListOk.list.count; i++) { - prfle_info_item = IPA_ALLOC(struct ProfileInfo); - *prfle_info_item = *res->choice.profileInfoListOk.list.array[i]; - ASN_SEQUENCE_ADD(&sgp32_res->choice.profileInfoListOk.list, prfle_info_item); + sgp32_prfle_info_item = IPA_ALLOC_ZERO(struct SGP32_ProfileInfo); + assert(sgp32_prfle_info_item); + prfle_info_item = res->choice.profileInfoListOk.list.array[i]; + sgp32_prfle_info_item->iccid = prfle_info_item->iccid; + sgp32_prfle_info_item->isdpAid = prfle_info_item->isdpAid; + sgp32_prfle_info_item->profileState = prfle_info_item->profileState; + sgp32_prfle_info_item->profileNickname = prfle_info_item->profileNickname; + sgp32_prfle_info_item->serviceProviderName = prfle_info_item->serviceProviderName; + sgp32_prfle_info_item->profileName = prfle_info_item->profileName; + sgp32_prfle_info_item->iconType = prfle_info_item->iconType; + sgp32_prfle_info_item->icon = prfle_info_item->icon; + sgp32_prfle_info_item->profileClass = prfle_info_item->profileClass; + sgp32_prfle_info_item->notificationConfigurationInfo = (void *)prfle_info_item->notificationConfigurationInfo; + sgp32_prfle_info_item->profileOwner = prfle_info_item->profileOwner; + sgp32_prfle_info_item->dpProprietaryData = prfle_info_item->dpProprietaryData; + sgp32_prfle_info_item->profilePolicyRules = prfle_info_item->profilePolicyRules; + sgp32_prfle_info_item->serviceSpecificDataStoredInEuicc = prfle_info_item->serviceSpecificDataStoredInEuicc; + if (conv_req && conv_req->ecall_indication_removed) { + sgp32_prfle_info_item->ecallIndication = IPA_ALLOC_ZERO(BOOLEAN_t); + assert(sgp32_prfle_info_item->ecallIndication); + *sgp32_prfle_info_item->ecallIndication = false; + } + if (conv_req && conv_req->fallback_attribute_removed) + sgp32_prfle_info_item->fallbackAttribute = false; + if (conv_req && conv_req->fallback_allowed_removed) { + sgp32_prfle_info_item->fallbackAllowed = IPA_ALLOC_ZERO(BOOLEAN_t); + assert(sgp32_prfle_info_item->fallbackAllowed); + *sgp32_prfle_info_item->fallbackAllowed = false; + } + + ASN_SEQUENCE_ADD(&sgp32_res->choice.profileInfoListOk.list, sgp32_prfle_info_item); } sgp32_res->present = SGP32_ProfileInfoListResponse_PR_profileInfoListOk; @@ -75,7 +105,72 @@ return sgp32_res; } -static int dec_get_prfle_info_res(struct ipa_es10c_get_prfle_info_res *res, const struct ipa_buf *es10c_res) +struct ipa_es10c_get_prfle_info_req *conv_get_prfle_info_req(const struct ipa_es10c_get_prfle_info_req *req) +{ + uint8_t default_tags[] = { 0x5A, 0x4F, 0x9F, 0x70, 0x91, 0x92, 0x95, 0x9F, 0x7B, 0x9F, 0x26, 0x9F, 0x67 }; + struct ipa_es10c_get_prfle_info_req *conv_req = IPA_ALLOC_ZERO(struct ipa_es10c_get_prfle_info_req); + int i, new_size; + uint8_t *buf; + + assert(conv_req); + memcpy(conv_req, req, sizeof(struct ipa_es10c_get_prfle_info_req)); + conv_req->req.tagList = IPA_ALLOC_ZERO(OCTET_STRING_t); + assert(conv_req->req.tagList); + + if (!req->req.tagList || req->req.tagList->size == 0) { + conv_req->req.tagList->size = sizeof(default_tags); + conv_req->req.tagList->buf = IPA_ALLOC_N(conv_req->req.tagList->size); + assert(conv_req->req.tagList->buf); + memcpy(conv_req->req.tagList->buf, default_tags, conv_req->req.tagList->size); + } else { + conv_req->req.tagList->size = req->req.tagList->size; + conv_req->req.tagList->buf = IPA_ALLOC_N(conv_req->req.tagList->size); + assert(conv_req->req.tagList->buf); + memcpy(conv_req->req.tagList->buf, req->req.tagList->buf, conv_req->req.tagList->size); + } + buf = conv_req->req.tagList->buf; + for (i = 0, new_size = 0; i < conv_req->req.tagList->size;) { + if (i + 1 < conv_req->req.tagList->size && (buf[i] == 0x9F || buf[i] == 0xBF)) { + if (buf[i] == 0x9F && buf[i + 1] == 0x7B) { + conv_req->ecall_indication_removed = true; + i += 2; + continue; + } + if (buf[i] == 0x9F && buf[i + 1] == 0x26) { + conv_req->fallback_attribute_removed = true; + i += 2; + continue; + } + if (buf[i] == 0x9F && buf[i + 1] == 0x67) { + conv_req->fallback_allowed_removed = true; + i += 2; + continue; + } + buf[new_size++] = buf[i++]; + buf[new_size++] = buf[i++]; + } else { + buf[new_size++] = buf[i++]; + } + } + conv_req->req.tagList->size = new_size; + + return conv_req; +} + +void conv_get_prfle_info_req_free(struct ipa_es10c_get_prfle_info_req *req) +{ + if (!req) + return; + + if (req->req.tagList) { + free(req->req.tagList->buf); + free(req->req.tagList); + } + free(req); +} + +static int dec_get_prfle_info_res(struct ipa_es10c_get_prfle_info_res *res, const struct ipa_buf *es10c_res, + const struct ipa_es10c_get_prfle_info_req *conv_req) { struct ProfileInfoListResponse *asn = NULL; @@ -98,7 +193,7 @@ res->prfle_info_list_err = -1; } - res->sgp32_res = convert_res_to_sgp32(asn); + res->sgp32_res = convert_res_to_sgp32(asn, conv_req); res->res = asn; return 0; } @@ -134,7 +229,7 @@ static void find_currently_active_prfle(struct ipa_es10c_get_prfle_info_res *res) { unsigned int i; - struct ProfileInfo *prfle_info; + struct SGP32_ProfileInfo *prfle_info; res->currently_active_prfle = NULL; if (res->sgp32_res->present != SGP32_ProfileInfoListResponse_PR_profileInfoListOk) @@ -163,10 +258,18 @@ struct ipa_es10c_get_prfle_info_res *res = IPA_ALLOC_ZERO(struct ipa_es10c_get_prfle_info_res); int rc; const struct ipa_es10c_get_prfle_info_req req_all = { 0 }; + struct ipa_es10c_get_prfle_info_req *conv_req = NULL; if (!req) req = &req_all; + if (ctx->cfg->iot_euicc_emu_enabled) { + IPA_LOGP_ES10X("GetProfilesInfo", LINFO, + "IoT eUICC emulation active, will convert unsupported tags from ProfileInfoListRequest.\n"); + conv_req = conv_get_prfle_info_req(req); + req = conv_req; + } + es10c_req = ipa_es10x_req_enc(&asn_DEF_ProfileInfoListRequest, &req->req, "GetProfilesInfo"); if (!es10c_req) { IPA_LOGP_ES10X("GetProfilesInfo", LERROR, "unable to encode Es10c request\n"); @@ -182,7 +285,7 @@ if (ctx->cfg->iot_euicc_emu_enabled) { IPA_LOGP_ES10X("GetProfilesInfo", LINFO, "IoT eUICC emulation active, will derive SGP32_ProfileInfoListResponse from (SGP.22) ProfileInfoListResponse.\n"); - rc = dec_get_prfle_info_res(res, es10c_res); + rc = dec_get_prfle_info_res(res, es10c_res, conv_req); } else { rc = dec_get_prfle_info_res_sgp32(res, es10c_res); } @@ -193,10 +296,12 @@ IPA_FREE(es10c_req); IPA_FREE(es10c_res); + conv_get_prfle_info_req_free(conv_req); return res; error: IPA_FREE(es10c_req); IPA_FREE(es10c_res); + conv_get_prfle_info_req_free(conv_req); ipa_es10c_get_prfle_info_res_free(res); return NULL; } @@ -213,8 +318,11 @@ if (res->res) { if (res->sgp32_res) { if (res->sgp32_res->present == SGP32_ProfileInfoListResponse_PR_profileInfoListOk) { - for (i = 0; i < res->sgp32_res->choice.profileInfoListOk.list.count; i++) + for (i = 0; i < res->sgp32_res->choice.profileInfoListOk.list.count; i++) { + IPA_FREE(res->sgp32_res->choice.profileInfoListOk.list.array[i]->ecallIndication); + IPA_FREE(res->sgp32_res->choice.profileInfoListOk.list.array[i]->fallbackAllowed); IPA_FREE(res->sgp32_res->choice.profileInfoListOk.list.array[i]); + } IPA_FREE(res->sgp32_res->choice.profileInfoListOk.list.array); } IPA_FREE(res->sgp32_res); diff --git a/src/ipa/libipa/es10c_get_prfle_info.h b/src/ipa/libipa/es10c_get_prfle_info.h index b8a3464..65ed3d1 100644 --- a/src/ipa/libipa/es10c_get_prfle_info.h +++ b/src/ipa/libipa/es10c_get_prfle_info.h @@ -13,12 +13,15 @@ struct ipa_es10c_get_prfle_info_req { struct ProfileInfoListRequest req; + bool ecall_indication_removed; + bool fallback_attribute_removed; + bool fallback_allowed_removed; }; struct ipa_es10c_get_prfle_info_res { struct ProfileInfoListResponse *res; struct SGP32_ProfileInfoListResponse *sgp32_res; - struct ProfileInfo *currently_active_prfle; + struct SGP32_ProfileInfo *currently_active_prfle; long prfle_info_list_err; /*! When the IoT eUICC emulation is enabled, this function will retrieve the ProfileInfoListResponse -- To view, visit https://gerrit.osmocom.org/c/onomondo-ipa/+/43032?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: I6667dba8dd84817cfee69daa1c44b98239fa171c Gerrit-Change-Number: 43032 Gerrit-PatchSet: 4 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
  • ...
  • 204
  • 205
  • 206
  • 207
  • 208
  • 209
  • 210
  • ...
  • 227
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.