jolly has uploaded this change for review. ( https://gerrit.osmocom.org/c/onomondo-ipa/+/43069?usp=email )
Change subject: V1.2: Rename field in PSMO ......................................................................
V1.2: Rename field in PSMO
Rename two field in PSMO.
Reference: SGP.23 Section 2.11.1.1.3
Related: SYS#8101 Change-Id: I9336f18aaf104629845948877294437188979376 --- M asn1/SGP32Definitions.asn M src/ipa/libasn/Psmo.c M src/ipa/libasn/Psmo.h M src/ipa/libipa/context.h M src/ipa/libipa/es10b_euicc_mem_rst.c M src/ipa/libipa/es10b_immediate_enable.c M src/ipa/libipa/es10b_load_bnd_prfle_pkg.c M src/ipa/libipa/es10b_load_euicc_pkg.c M src/ipa/libipa/ipad.c 9 files changed, 67 insertions(+), 63 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/69/43069/1
diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index 835386c..48db16e 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -100,8 +100,8 @@ getRAT [6] SEQUENCE {}, configureImmediateEnable [7] SEQUENCE { immediateEnableFlag [0] NULL OPTIONAL, - smdpOid [1] OBJECT IDENTIFIER OPTIONAL, - smdpAddress [2] UTF8String OPTIONAL + defaultSmdpOid [1] OBJECT IDENTIFIER OPTIONAL, + defaultSmdpAddress [2] UTF8String OPTIONAL }, setFallbackAttribute [8] SEQUENCE {iccid [APPLICATION 26] Iccid}, unsetFallbackAttribute [9] SEQUENCE {}, diff --git a/src/ipa/libasn/Psmo.c b/src/ipa/libasn/Psmo.c index e6bb849..d3683a9 100644 --- a/src/ipa/libasn/Psmo.c +++ b/src/ipa/libasn/Psmo.c @@ -194,23 +194,23 @@ 0, 0, /* No default value */ "immediateEnableFlag" }, - { ATF_POINTER, 2, offsetof(struct Psmo__configureImmediateEnable, smdpOid), + { ATF_POINTER, 2, offsetof(struct Psmo__configureImmediateEnable, defaultSmdpOid), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_OBJECT_IDENTIFIER, 0, { 0, 0, 0 }, 0, 0, /* No default value */ - "smdpOid" + "defaultSmdpOid" }, - { ATF_POINTER, 1, offsetof(struct Psmo__configureImmediateEnable, smdpAddress), + { ATF_POINTER, 1, offsetof(struct Psmo__configureImmediateEnable, defaultSmdpAddress), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_UTF8String, 0, { 0, 0, 0 }, 0, 0, /* No default value */ - "smdpAddress" + "defaultSmdpAddress" }, }; static const int asn_MAP_configureImmediateEnable_oms_15[] = { 0, 1, 2 }; @@ -220,8 +220,8 @@ }; static const asn_TYPE_tag2member_t asn_MAP_configureImmediateEnable_tag2el_15[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* immediateEnableFlag */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* smdpOid */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* smdpAddress */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* defaultSmdpOid */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* defaultSmdpAddress */ }; static asn_SEQUENCE_specifics_t asn_SPC_configureImmediateEnable_specs_15 = { sizeof(struct Psmo__configureImmediateEnable), diff --git a/src/ipa/libasn/Psmo.h b/src/ipa/libasn/Psmo.h index e00f820..71779fd 100644 --- a/src/ipa/libasn/Psmo.h +++ b/src/ipa/libasn/Psmo.h @@ -88,8 +88,8 @@ } getRAT; struct Psmo__configureImmediateEnable { NULL_t *immediateEnableFlag /* OPTIONAL */; - OBJECT_IDENTIFIER_t *smdpOid /* OPTIONAL */; - UTF8String_t *smdpAddress /* OPTIONAL */; + OBJECT_IDENTIFIER_t *defaultSmdpOid /* OPTIONAL */; + UTF8String_t *defaultSmdpAddress /* OPTIONAL */; /* * This type is extensible, * possible extensions are below. diff --git a/src/ipa/libipa/context.h b/src/ipa/libipa/context.h index e0080d4..bb5472e 100644 --- a/src/ipa/libipa/context.h +++ b/src/ipa/libipa/context.h @@ -30,8 +30,8 @@ /*! Immediate Profile Enabling configuration (set via configureImmidiateEnable PSMO) */ struct { bool flag; - struct ipa_buf *smdp_oid; - struct ipa_buf *smdp_address; + struct ipa_buf *default_smdp_oid; + struct ipa_buf *default_smdp_address; bool refresh; } immediate_enable; } iot_euicc_emu; @@ -61,8 +61,8 @@
/*! cached data to support the emulation of the ES10b function ImmidiateEnable */ struct { - struct ipa_buf *smdp_oid; - struct ipa_buf *smdp_address; + struct ipa_buf *default_smdp_oid; + struct ipa_buf *default_smdp_address; struct ipa_buf *profile_aid; } immediate_enable; } iot_euicc_emu; diff --git a/src/ipa/libipa/es10b_euicc_mem_rst.c b/src/ipa/libipa/es10b_euicc_mem_rst.c index 5c9d6d2..bb30e3a 100644 --- a/src/ipa/libipa/es10b_euicc_mem_rst.c +++ b/src/ipa/libipa/es10b_euicc_mem_rst.c @@ -212,10 +212,10 @@ if (req->immediate_enable_cfg) { IPA_LOGP_ES10X("eUICCMemoryReset", LINFO, "IoT eUICC emulation active, also clearing immediate enable configuration...\n"); - IPA_FREE(ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid); - ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid = NULL; - IPA_FREE(ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address); - ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address = NULL; + IPA_FREE(ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_oid); + ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_oid = NULL; + IPA_FREE(ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_address); + ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_address = NULL; ctx->nvstate.iot_euicc_emu.immediate_enable.flag = false; }
diff --git a/src/ipa/libipa/es10b_immediate_enable.c b/src/ipa/libipa/es10b_immediate_enable.c index a649371..91f3656 100644 --- a/src/ipa/libipa/es10b_immediate_enable.c +++ b/src/ipa/libipa/es10b_immediate_enable.c @@ -99,18 +99,18 @@ }
/* We also need either the smdp_oid or the smdp_address to verify against */ - if (ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid == NULL && - ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address == NULL) { + if (ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_oid == NULL && + ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_address == NULL) { rc = ImmediateEnableResponse__immediateEnableResult_immediateEnableNotAvailable; goto error; }
/* Ensure the session context is present and complete */ - if (ctx->iot_euicc_emu.immediate_enable.smdp_address == NULL) { + if (ctx->iot_euicc_emu.immediate_enable.default_smdp_address == NULL) { rc = ImmediateEnableResponse__immediateEnableResult_noSessionContext; goto error; } - if (ctx->iot_euicc_emu.immediate_enable.smdp_oid == NULL) { + if (ctx->iot_euicc_emu.immediate_enable.default_smdp_oid == NULL) { rc = ImmediateEnableResponse__immediateEnableResult_noSessionContext; goto error; } @@ -120,30 +120,30 @@ }
/* Verify smdp OID (if configured) */ - if (ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid) { - if (ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid->len != - ctx->iot_euicc_emu.immediate_enable.smdp_oid->len) { + if (ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_oid) { + if (ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_oid->len != + ctx->iot_euicc_emu.immediate_enable.default_smdp_oid->len) { rc = ImmediateEnableResponse__immediateEnableResult_immediateEnableNotAvailable; goto error; } - if (memcmp(ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid->data, - ctx->iot_euicc_emu.immediate_enable.smdp_oid->data, - ctx->iot_euicc_emu.immediate_enable.smdp_oid->len)) { + if (memcmp(ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_oid->data, + ctx->iot_euicc_emu.immediate_enable.default_smdp_oid->data, + ctx->iot_euicc_emu.immediate_enable.default_smdp_oid->len)) { rc = ImmediateEnableResponse__immediateEnableResult_immediateEnableNotAvailable; goto error; } }
/* Verify smdp address (if configured) */ - if (ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address) { - if (ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address->len != - ctx->iot_euicc_emu.immediate_enable.smdp_address->len) { + if (ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_address) { + if (ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_address->len != + ctx->iot_euicc_emu.immediate_enable.default_smdp_address->len) { rc = ImmediateEnableResponse__immediateEnableResult_immediateEnableNotAvailable; goto error; } - if (memcmp(ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address->data, - ctx->iot_euicc_emu.immediate_enable.smdp_address->data, - ctx->iot_euicc_emu.immediate_enable.smdp_address->len)) { + if (memcmp(ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_address->data, + ctx->iot_euicc_emu.immediate_enable.default_smdp_address->data, + ctx->iot_euicc_emu.immediate_enable.default_smdp_address->len)) { rc = ImmediateEnableResponse__immediateEnableResult_immediateEnableNotAvailable; goto error; } @@ -174,10 +174,10 @@ }
/* Ensure the auto enable data is cleared after use */ - ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.smdp_oid); - ctx->iot_euicc_emu.immediate_enable.smdp_oid = NULL; - ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.smdp_address); - ctx->iot_euicc_emu.immediate_enable.smdp_address = NULL; + ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.default_smdp_oid); + ctx->iot_euicc_emu.immediate_enable.default_smdp_oid = NULL; + ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.default_smdp_address); + ctx->iot_euicc_emu.immediate_enable.default_smdp_address = NULL; ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.profile_aid); ctx->iot_euicc_emu.immediate_enable.profile_aid = NULL;
diff --git a/src/ipa/libipa/es10b_load_bnd_prfle_pkg.c b/src/ipa/libipa/es10b_load_bnd_prfle_pkg.c index 946ccb2..60a52eb 100644 --- a/src/ipa/libipa/es10b_load_bnd_prfle_pkg.c +++ b/src/ipa/libipa/es10b_load_bnd_prfle_pkg.c @@ -33,8 +33,8 @@ return;
/* Collect smdpOid and smdpAddress so that we can verify later whether the immediate enable is granted or not. */ - ctx->iot_euicc_emu.immediate_enable.smdp_oid = IPA_BUF_FROM_ASN(&prfle_inst_res_data->smdpOid); - ctx->iot_euicc_emu.immediate_enable.smdp_address = + ctx->iot_euicc_emu.immediate_enable.default_smdp_oid = IPA_BUF_FROM_ASN(&prfle_inst_res_data->smdpOid); + ctx->iot_euicc_emu.immediate_enable.default_smdp_address = IPA_BUF_FROM_ASN(&prfle_inst_res_data->notificationMetadata.notificationAddress);
/* Collect AID of the profile so that we later know which profile to enable. */ @@ -69,10 +69,10 @@
/* In case IoT eUICC emulation is active, ensure that the immediate enable data is cleared. (This data has no * relevance in case a real IoT eUICC is used.) */ - ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.smdp_oid); - ctx->iot_euicc_emu.immediate_enable.smdp_oid = NULL; - ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.smdp_address); - ctx->iot_euicc_emu.immediate_enable.smdp_address = NULL; + ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.default_smdp_oid); + ctx->iot_euicc_emu.immediate_enable.default_smdp_oid = NULL; + ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.default_smdp_address); + ctx->iot_euicc_emu.immediate_enable.default_smdp_address = NULL; ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.profile_aid); ctx->iot_euicc_emu.immediate_enable.profile_aid = NULL;
diff --git a/src/ipa/libipa/es10b_load_euicc_pkg.c b/src/ipa/libipa/es10b_load_euicc_pkg.c index d250440..3fbec50 100644 --- a/src/ipa/libipa/es10b_load_euicc_pkg.c +++ b/src/ipa/libipa/es10b_load_euicc_pkg.c @@ -249,18 +249,19 @@ ctx->nvstate.iot_euicc_emu.immediate_enable.flag = false; }
- /* Update smdpOid */ - ipa_buf_free(ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid); - ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid = NULL; - if (configureImmediateEnable_psmo->smdpOid) - ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid = IPA_BUF_FROM_ASN(configureImmediateEnable_psmo->smdpOid); + /* Update defaultSmdpOid */ + ipa_buf_free(ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_oid); + ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_oid = NULL; + if (configureImmediateEnable_psmo->defaultSmdpOid) + ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_oid = + IPA_BUF_FROM_ASN(configureImmediateEnable_psmo->defaultSmdpOid);
- /* Update smdpAddress */ - ipa_buf_free(ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address); - ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address = NULL; - if (configureImmediateEnable_psmo->smdpAddress) - ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address = - IPA_BUF_FROM_ASN(configureImmediateEnable_psmo->smdpAddress); + /* Update defaultSmdpAddress */ + ipa_buf_free(ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_address); + ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_address = NULL; + if (configureImmediateEnable_psmo->defaultSmdpAddress) + ctx->nvstate.iot_euicc_emu.immediate_enable.default_smdp_address = + IPA_BUF_FROM_ASN(configureImmediateEnable_psmo->defaultSmdpAddress);
euicc_result_data->choice.configureImmediateEnableResult = ConfigureImmediateEnableResult_ok;
diff --git a/src/ipa/libipa/ipad.c b/src/ipa/libipa/ipad.c index 83e94a1..402ec0d 100644 --- a/src/ipa/libipa/ipad.c +++ b/src/ipa/libipa/ipad.c @@ -43,8 +43,8 @@ { /* free dynamically allocated struct members (append code for new members here) */ IPA_FREE(nvstate->iot_euicc_emu.eim_cfg_ber); - IPA_FREE(nvstate->iot_euicc_emu.immediate_enable.smdp_oid); - IPA_FREE(nvstate->iot_euicc_emu.immediate_enable.smdp_address); + IPA_FREE(nvstate->iot_euicc_emu.immediate_enable.default_smdp_oid); + IPA_FREE(nvstate->iot_euicc_emu.immediate_enable.default_smdp_address); }
static void nvstate_reset(struct ipa_nvstate *nvstate) @@ -82,8 +82,9 @@
/* serialize dynamically allocated struct members (append code for new members here) */ nvstate_bin = nvstate_serialize_ipa_buf(nvstate_bin, nvstate->iot_euicc_emu.eim_cfg_ber); - nvstate_bin = nvstate_serialize_ipa_buf(nvstate_bin, nvstate->iot_euicc_emu.immediate_enable.smdp_oid); - nvstate_bin = nvstate_serialize_ipa_buf(nvstate_bin, nvstate->iot_euicc_emu.immediate_enable.smdp_address); + nvstate_bin = nvstate_serialize_ipa_buf(nvstate_bin, nvstate->iot_euicc_emu.immediate_enable.default_smdp_oid); + nvstate_bin = nvstate_serialize_ipa_buf(nvstate_bin, + nvstate->iot_euicc_emu.immediate_enable.default_smdp_address); return nvstate_bin; }
@@ -131,8 +132,10 @@
/* deserialize dynamically allocated struct members (append code for new members here) */ nvstate->iot_euicc_emu.eim_cfg_ber = nvstate_deserialize_ipa_buf(&nvstate_data, &nvstate_data_len); - nvstate->iot_euicc_emu.immediate_enable.smdp_oid = nvstate_deserialize_ipa_buf(&nvstate_data, &nvstate_data_len); - nvstate->iot_euicc_emu.immediate_enable.smdp_address = nvstate_deserialize_ipa_buf(&nvstate_data, &nvstate_data_len); + nvstate->iot_euicc_emu.immediate_enable.default_smdp_oid = + nvstate_deserialize_ipa_buf(&nvstate_data, &nvstate_data_len); + nvstate->iot_euicc_emu.immediate_enable.default_smdp_address = + nvstate_deserialize_ipa_buf(&nvstate_data, &nvstate_data_len); }
/*! Read eIM configuration from eUICC and pick a suitable eIM. @@ -486,8 +489,8 @@ nvstate = nvstate_serialize(&ctx->nvstate);
IPA_FREE(ctx->iot_euicc_emu.rollback_iccid); - ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.smdp_oid); - ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.smdp_address); + ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.default_smdp_oid); + ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.default_smdp_address); ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.profile_aid); IPA_FREE(ctx->eim_id); IPA_FREE(ctx->eim_fqdn);