jolly has uploaded this change for review.
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(-)
git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/32/43032/1
diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn
index 0e3723c..ce0a5a3 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..76417c8 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,38 @@
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 +106,71 @@
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(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(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 change 43032. To unsubscribe, or for help writing mail filters, visit settings.