lists.osmocom.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2026
July
June
May
April
March
February
January
2025
December
November
October
September
August
July
June
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
List overview
Download
gerrit-log
July 2026
----- 2026 -----
July 2026
June 2026
May 2026
April 2026
March 2026
February 2026
January 2026
----- 2025 -----
December 2025
November 2025
October 2025
September 2025
August 2025
July 2025
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
gerrit-log@lists.osmocom.org
1 participants
502 discussions
Start a n
N
ew thread
[L] Change in onomondo-ipa[master]: V1.2: Add function ES10b.ExecuteFallbackMechanism
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43041?usp=email
) Change subject: V1.2: Add function ES10b.ExecuteFallbackMechanism ...................................................................... V1.2: Add function ES10b.ExecuteFallbackMechanism Add new library function to enable the fallback profile on IoT eUICC. Also add an option to the command line interface to call the library function. The optional refresh flag may be set via command line option. The function cannot be emulated with non-IoT eUICC. Reference: SGP.32 Section 5.9.20 Related: SYS#8101 Change-Id: Ia751f0888c36f39ddfadf7f8bb923a8ee50178dc --- M asn1/SGP32Definitions.asn M include/onomondo/ipa/ipad.h M src/ipa/libasn/CMakeLists.txt A src/ipa/libasn/ExecuteFallbackMechanismRequest.c A src/ipa/libasn/ExecuteFallbackMechanismRequest.h A src/ipa/libasn/ExecuteFallbackMechanismResponse.c A src/ipa/libasn/ExecuteFallbackMechanismResponse.h M src/ipa/libipa/CMakeLists.txt A src/ipa/libipa/es10b_exec_fallback_mech.c A src/ipa/libipa/es10b_exec_fallback_mech.h M src/ipa/libipa/ipad.c M src/ipa/main.c 12 files changed, 411 insertions(+), 16 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/41/43041/1 diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index 7c5821c..287d4c3 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -592,6 +592,26 @@ } -- ASN1STOP +-- Section 5.9.20 +-- ASN1START +ExecuteFallbackMechanismRequest ::= [93] SEQUENCE { -- Tag ' BF5D' + refreshFlag BOOLEAN -- indicating whether REFRESH is required +} +-- ASN1STOP +-- ASN1START +ExecuteFallbackMechanismResponse ::= [93] SEQUENCE { -- Tag ' BF5D' + executeFallbackMechanismResult [0] INTEGER { + ok(0), + profileNotInDisabledState(2), + catBusy(5), + fallbackNotAvailable(6), -- Fallback Attribute not set + commandError(7), + ecallActive(104), + undefinedError(127) + } +} +-- ASN1STOP + -- Section 5.9.25 -- ASN1START SGP32-SetDefaultDpAddressRequest ::= [101] SEQUENCE { -- Tag 'BF65' diff --git a/include/onomondo/ipa/ipad.h b/include/onomondo/ipa/ipad.h index bb4a05a..2d11d23 100644 --- a/include/onomondo/ipa/ipad.h +++ b/include/onomondo/ipa/ipad.h @@ -94,6 +94,7 @@ int ipa_add_init_eim_cfg(struct ipa_context *ctx, struct ipa_buf *cfg); int ipa_euicc_mem_rst(struct ipa_context *ctx, bool operatnl_profiles, bool test_profiles, bool default_smdp_addr, bool eim_cfg_data, bool immediate_enable_cfg); +int ipa_execute_fallback_mechanism(struct ipa_context *ctx, bool refresh_flag); int ipa_poll(struct ipa_context *ctx); void ipa_close(struct ipa_context *ctx); struct ipa_buf *ipa_free_ctx(struct ipa_context *ctx); diff --git a/src/ipa/libasn/CMakeLists.txt b/src/ipa/libasn/CMakeLists.txt index 3c84951..166d7f2 100644 --- a/src/ipa/libasn/CMakeLists.txt +++ b/src/ipa/libasn/CMakeLists.txt @@ -347,6 +347,10 @@ EuiccSignPIR.h EventEntries.c EventEntries.h +ExecuteFallbackMechanismRequest.c +ExecuteFallbackMechanismRequest.h +ExecuteFallbackMechanismResponse.c +ExecuteFallbackMechanismResponse.h ExpirationDate.c ExpirationDate.h ExtendedNetworkAddress.c diff --git a/src/ipa/libasn/ExecuteFallbackMechanismRequest.c b/src/ipa/libasn/ExecuteFallbackMechanismRequest.c new file mode 100644 index 0000000..2df0b3b --- /dev/null +++ b/src/ipa/libasn/ExecuteFallbackMechanismRequest.c @@ -0,0 +1,51 @@ +/* + * 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 "ExecuteFallbackMechanismRequest.h" + +static asn_TYPE_member_t asn_MBR_ExecuteFallbackMechanismRequest_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct ExecuteFallbackMechanismRequest, refreshFlag), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BOOLEAN, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "refreshFlag" + }, +}; +static const ber_tlv_tag_t asn_DEF_ExecuteFallbackMechanismRequest_tags_1[] = { + (ASN_TAG_CLASS_CONTEXT | (93 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_ExecuteFallbackMechanismRequest_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* refreshFlag */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_ExecuteFallbackMechanismRequest_specs_1 = { + sizeof(struct ExecuteFallbackMechanismRequest), + offsetof(struct ExecuteFallbackMechanismRequest, _asn_ctx), + asn_MAP_ExecuteFallbackMechanismRequest_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_ExecuteFallbackMechanismRequest = { + "ExecuteFallbackMechanismRequest", + "ExecuteFallbackMechanismRequest", + &asn_OP_SEQUENCE, + asn_DEF_ExecuteFallbackMechanismRequest_tags_1, + sizeof(asn_DEF_ExecuteFallbackMechanismRequest_tags_1) + /sizeof(asn_DEF_ExecuteFallbackMechanismRequest_tags_1[0]) - 1, /* 1 */ + asn_DEF_ExecuteFallbackMechanismRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_ExecuteFallbackMechanismRequest_tags_1) + /sizeof(asn_DEF_ExecuteFallbackMechanismRequest_tags_1[0]), /* 2 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_ExecuteFallbackMechanismRequest_1, + 1, /* Elements count */ + &asn_SPC_ExecuteFallbackMechanismRequest_specs_1 /* Additional specs */ +}; + diff --git a/src/ipa/libasn/ExecuteFallbackMechanismRequest.h b/src/ipa/libasn/ExecuteFallbackMechanismRequest.h new file mode 100644 index 0000000..2f122fe --- /dev/null +++ b/src/ipa/libasn/ExecuteFallbackMechanismRequest.h @@ -0,0 +1,42 @@ +/* + * 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 _ExecuteFallbackMechanismRequest_H_ +#define _ExecuteFallbackMechanismRequest_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include <BOOLEAN.h> +#include <constr_SEQUENCE.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* ExecuteFallbackMechanismRequest */ +typedef struct ExecuteFallbackMechanismRequest { + BOOLEAN_t refreshFlag; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ExecuteFallbackMechanismRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ExecuteFallbackMechanismRequest; + +#ifdef __cplusplus +} +#endif + +#endif /* _ExecuteFallbackMechanismRequest_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libasn/ExecuteFallbackMechanismResponse.c b/src/ipa/libasn/ExecuteFallbackMechanismResponse.c new file mode 100644 index 0000000..ba2e27e --- /dev/null +++ b/src/ipa/libasn/ExecuteFallbackMechanismResponse.c @@ -0,0 +1,51 @@ +/* + * 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 "ExecuteFallbackMechanismResponse.h" + +static asn_TYPE_member_t asn_MBR_ExecuteFallbackMechanismResponse_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct ExecuteFallbackMechanismResponse, executeFallbackMechanismResult), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "executeFallbackMechanismResult" + }, +}; +static const ber_tlv_tag_t asn_DEF_ExecuteFallbackMechanismResponse_tags_1[] = { + (ASN_TAG_CLASS_CONTEXT | (93 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_ExecuteFallbackMechanismResponse_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* executeFallbackMechanismResult */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_ExecuteFallbackMechanismResponse_specs_1 = { + sizeof(struct ExecuteFallbackMechanismResponse), + offsetof(struct ExecuteFallbackMechanismResponse, _asn_ctx), + asn_MAP_ExecuteFallbackMechanismResponse_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_ExecuteFallbackMechanismResponse = { + "ExecuteFallbackMechanismResponse", + "ExecuteFallbackMechanismResponse", + &asn_OP_SEQUENCE, + asn_DEF_ExecuteFallbackMechanismResponse_tags_1, + sizeof(asn_DEF_ExecuteFallbackMechanismResponse_tags_1) + /sizeof(asn_DEF_ExecuteFallbackMechanismResponse_tags_1[0]) - 1, /* 1 */ + asn_DEF_ExecuteFallbackMechanismResponse_tags_1, /* Same as above */ + sizeof(asn_DEF_ExecuteFallbackMechanismResponse_tags_1) + /sizeof(asn_DEF_ExecuteFallbackMechanismResponse_tags_1[0]), /* 2 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_ExecuteFallbackMechanismResponse_1, + 1, /* Elements count */ + &asn_SPC_ExecuteFallbackMechanismResponse_specs_1 /* Additional specs */ +}; + diff --git a/src/ipa/libasn/ExecuteFallbackMechanismResponse.h b/src/ipa/libasn/ExecuteFallbackMechanismResponse.h new file mode 100644 index 0000000..823708c --- /dev/null +++ b/src/ipa/libasn/ExecuteFallbackMechanismResponse.h @@ -0,0 +1,53 @@ +/* + * 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 _ExecuteFallbackMechanismResponse_H_ +#define _ExecuteFallbackMechanismResponse_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include <NativeInteger.h> +#include <constr_SEQUENCE.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum ExecuteFallbackMechanismResponse__executeFallbackMechanismResult { + ExecuteFallbackMechanismResponse__executeFallbackMechanismResult_ok = 0, + ExecuteFallbackMechanismResponse__executeFallbackMechanismResult_profileNotInDisabledState = 2, + ExecuteFallbackMechanismResponse__executeFallbackMechanismResult_catBusy = 5, + ExecuteFallbackMechanismResponse__executeFallbackMechanismResult_fallbackNotAvailable = 6, + ExecuteFallbackMechanismResponse__executeFallbackMechanismResult_commandError = 7, + ExecuteFallbackMechanismResponse__executeFallbackMechanismResult_ecallActive = 104, + ExecuteFallbackMechanismResponse__executeFallbackMechanismResult_undefinedError = 127 +} e_ExecuteFallbackMechanismResponse__executeFallbackMechanismResult; + +/* ExecuteFallbackMechanismResponse */ +typedef struct ExecuteFallbackMechanismResponse { + long executeFallbackMechanismResult; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ExecuteFallbackMechanismResponse_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ExecuteFallbackMechanismResponse; + +#ifdef __cplusplus +} +#endif + +#endif /* _ExecuteFallbackMechanismResponse_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libipa/CMakeLists.txt b/src/ipa/libipa/CMakeLists.txt index 7a6ac28..a46e22b 100644 --- a/src/ipa/libipa/CMakeLists.txt +++ b/src/ipa/libipa/CMakeLists.txt @@ -20,6 +20,7 @@ es10b_prfle_rollback.c es10b_retr_notif_from_lst.c es10b_rm_notif_from_lst.c + es10b_exec_fallback_mech.c es10c_delete_prfle.c es10c_disable_prfle.c es10c_enable_prfle.c diff --git a/src/ipa/libipa/es10b_exec_fallback_mech.c b/src/ipa/libipa/es10b_exec_fallback_mech.c new file mode 100644 index 0000000..17609b0 --- /dev/null +++ b/src/ipa/libipa/es10b_exec_fallback_mech.c @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2026 sysmocom - s.f.m.c. GmbH. All rights reserved. + * + * SPDX-License-Identifier: AGPL-3.0-only + * + * Author: Philipp Maier <pmaier(a)sysmocom.de> / sysmocom - s.f.m.c. GmbH + * Andreas Eversberg <pmaier(a)sysmocom.de> / sysmocom - s.f.m.c. GmbH + * + * See also: GSMA SGP.22, 5.9.20: Function (ES10b): ExecuteFallbackMechanism + */ + +#include <stdio.h> +#include <assert.h> +#include <onomondo/ipa/utils.h> +#include "context.h" +#include "utils.h" +#include "euicc.h" +#include "es10x.h" +#include "es10b_exec_fallback_mech.h" + +static const struct num_str_map error_code_strings[] = { + { ExecuteFallbackMechanismResponse__executeFallbackMechanismResult_ok, "ok" }, + { ExecuteFallbackMechanismResponse__executeFallbackMechanismResult_profileNotInDisabledState, "profileNotInDisabledState" }, + { ExecuteFallbackMechanismResponse__executeFallbackMechanismResult_catBusy, "catBusy" }, + { ExecuteFallbackMechanismResponse__executeFallbackMechanismResult_fallbackNotAvailable, "fallbackNotAvailable" }, + { ExecuteFallbackMechanismResponse__executeFallbackMechanismResult_commandError, "commandError" }, + { ExecuteFallbackMechanismResponse__executeFallbackMechanismResult_ecallActive, "ecallActive" }, + { ExecuteFallbackMechanismResponse__executeFallbackMechanismResult_undefinedError, "undefinedError" }, + { 0, NULL } +}; + +static int dec_exec_fallback_mech_res(struct ipa_es10b_exec_fallback_mech_res *res, const struct ipa_buf *es10b_res) +{ + struct ExecuteFallbackMechanismResponse *asn = NULL; + + asn = ipa_es10x_res_dec(&asn_DEF_ExecuteFallbackMechanismResponse, es10b_res, "ExecuteFallbackMechanism"); + if (!asn) + return -EINVAL; + + if (asn->executeFallbackMechanismResult != ExecuteFallbackMechanismResponse__executeFallbackMechanismResult_ok) { + IPA_LOGP_ES10X("ExecuteFallbackMechanism", LERROR, "function failed with error code %ld=%s!\n", + asn->executeFallbackMechanismResult, + ipa_str_from_num(error_code_strings, asn->executeFallbackMechanismResult, "(unknown)")); + } else { + IPA_LOGP_ES10X("ExecuteFallbackMechanism", LERROR, "function succeeded with status code %ld=%s!\n", + asn->executeFallbackMechanismResult, + ipa_str_from_num(error_code_strings, asn->executeFallbackMechanismResult, "(unknown)")); + } + + res->res = asn; + return 0; +} + +/*! Function (Es10b): ExecuteFallbackMechanism. + * \param[inout] ctx pointer to ipa_context. + * \param[in] req pointer to struct that holds the function parameters. + * \returns pointer newly allocated struct with function result, NULL on error. */ +struct ipa_es10b_exec_fallback_mech_res *ipa_es10b_exec_fallback_mech(struct ipa_context *ctx, + const struct ipa_es10b_exec_fallback_mech_req *req) +{ + struct ipa_buf *es10b_req = NULL; + struct ipa_buf *es10b_res = NULL; + struct ipa_es10b_exec_fallback_mech_res *res = IPA_ALLOC_ZERO(struct ipa_es10b_exec_fallback_mech_res); + int rc; + + es10b_req = ipa_es10x_req_enc(&asn_DEF_ExecuteFallbackMechanismRequest, &req->req, "ExecuteFallbackMechanism"); + if (!es10b_req) { + IPA_LOGP_ES10X("ExecuteFallbackMechanism", LERROR, "unable to encode Es10b request\n"); + goto error; + } + + es10b_res = ipa_euicc_transceive_es10x(ctx, es10b_req); + if (!es10b_res) { + IPA_LOGP_ES10X("ExecuteFallbackMechanism", LERROR, "no Es10b response\n"); + goto error; + } + + rc = dec_exec_fallback_mech_res(res, es10b_res); + if (rc < 0) + goto error; + + IPA_FREE(es10b_req); + IPA_FREE(es10b_res); + return res; +error: + IPA_FREE(es10b_req); + IPA_FREE(es10b_res); + ipa_es10b_exec_fallback_mech_res_free(res); + return NULL; +} + +/*! Free results of function (Es10b): ExecuteFallbackMechanism. + * \param[in] res pointer to function result. */ +void ipa_es10b_exec_fallback_mech_res_free(struct ipa_es10b_exec_fallback_mech_res *res) +{ + IPA_ES10X_RES_FREE(asn_DEF_ExecuteFallbackMechanismResponse, res); +} diff --git a/src/ipa/libipa/es10b_exec_fallback_mech.h b/src/ipa/libipa/es10b_exec_fallback_mech.h new file mode 100644 index 0000000..6d33788 --- /dev/null +++ b/src/ipa/libipa/es10b_exec_fallback_mech.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2026 sysmocom - s.f.m.c. GmbH. All rights reserved. + * + * SPDX-License-Identifier: AGPL-3.0-only + */ + +#pragma once + +#include <ExecuteFallbackMechanismRequest.h> +#include <ExecuteFallbackMechanismResponse.h> +struct ipa_context; + +struct ipa_es10b_exec_fallback_mech_req { + struct ExecuteFallbackMechanismRequest req; +}; + +struct ipa_es10b_exec_fallback_mech_res { + struct ExecuteFallbackMechanismResponse *res; +}; + +struct ipa_es10b_exec_fallback_mech_res *ipa_es10b_exec_fallback_mech(struct ipa_context *ctx, + const struct ipa_es10b_exec_fallback_mech_req *req); +void ipa_es10b_exec_fallback_mech_res_free(struct ipa_es10b_exec_fallback_mech_res *res); diff --git a/src/ipa/libipa/ipad.c b/src/ipa/libipa/ipad.c index 5d4c0a9..ae3ca8e 100644 --- a/src/ipa/libipa/ipad.c +++ b/src/ipa/libipa/ipad.c @@ -25,6 +25,7 @@ #include "es10b_add_init_eim.h" #include "es10b_euicc_mem_rst.h" #include "es10b_load_euicc_pkg.h" +#include "es10b_exec_fallback_mech.h" #include "proc_euicc_pkg_dwnld_exec.h" #include "proc_notif_delivery.h" @@ -263,6 +264,32 @@ return ipa_es10b_euicc_mem_rst(ctx, &euicc_mem_rst); } +/*! Trigger return from fallback profile to previous profile. + * \param[inout] ctx pointer to ipa_context. + * \param[in] refresh_flag send a CAT refresh after switchting profile. + * \returns 0 on success, negative on error. */ +int ipa_execute_fallback_mechanism(struct ipa_context *ctx, bool refresh_flag) +{ + struct ipa_es10b_exec_fallback_mech_req exec_fallback_mech = { 0 }; + struct ipa_es10b_exec_fallback_mech_res *res; + int rc = -EINVAL; + + if (ctx->cfg->iot_euicc_emu_enabled) { + IPA_LOGP(SIPA, LERROR, "Unable to emulate switching to fallback profile.\n"); + return -ENOTSUP; + } + + exec_fallback_mech.req.refreshFlag = refresh_flag; + res = ipa_es10b_exec_fallback_mech(ctx, &exec_fallback_mech); + if (!res) + return -EIO; + if (res->res->executeFallbackMechanismResult == ExecuteFallbackMechanismResponse__executeFallbackMechanismResult_ok) + rc = 0; + ipa_es10b_exec_fallback_mech_res_free(res); + + return rc; +} + static int check_canaries(struct ipa_context *ctx) { if (ctx->check_http) diff --git a/src/ipa/main.c b/src/ipa/main.c index d4316f2..5a7c1f5 100644 --- a/src/ipa/main.c +++ b/src/ipa/main.c @@ -42,22 +42,24 @@ static 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(" -n PATH ............. path to nvstate file (default: %s)\n", DEFAULT_NVSTATE_PATH); - printf(" -y NUM .............. number of retries for ESipa requests (default: %u)\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(" --execute-fallback-mechanism Trigger enabling of fallback profile\n"); + printf(" --refresh-flag.............. Make eUICC send a CAT refresh after switchting profile with the triggers above.\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"); + 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"); } struct ipa_buf *load_ber_from_file(char *dir, char *file) @@ -142,10 +144,13 @@ int rc; char *getopt_initial_eim_cfg_file = NULL; bool getopt_euicc_memory_reset = false; + bool getopt_execute_fallback_mechanism = false; + bool getopt_refresh_flag = false; char *getopt_nvstate_path = DEFAULT_NVSTATE_PATH; struct ipa_buf *nvstate_load = NULL; struct ipa_buf *nvstate_save = NULL; bool getopt_one_euicc_pkg_only = false; + int option_index = 0; signal(SIGUSR1, sig_usr1); @@ -157,9 +162,20 @@ ipa_binary_from_hexstr(cfg.tac, sizeof(cfg.tac), DEFAULT_TAC); cfg.esipa_req_retries = DEFAULT_ESIPA_REQ_RETRIES; + enum { + OPT_EXECFALLBACK = 256, + OPT_REFRESHFLAG, + }; + + struct option long_options[] = { + { "execute-fallback-mechanism", no_argument, NULL, OPT_EXECFALLBACK}, + { "refresh-flag", no_argument, NULL, OPT_REFRESHFLAG}, + { NULL, 0, NULL, 0} + }; + /* Overwrite configuration values with user defined parameters */ while (1) { - opt = getopt(argc, argv, "ht:e:r:c:f:mn:C:SIEy:a1"); + opt = getopt_long(argc, argv, "ht:e:r:c:f:mn:C:SIEy:a1", long_options, &option_index); if (opt == -1) break; @@ -186,6 +202,12 @@ case 'm': getopt_euicc_memory_reset = true; break; + case OPT_EXECFALLBACK: + getopt_execute_fallback_mechanism = true; + break; + case OPT_REFRESHFLAG: + getopt_refresh_flag = true; + break; case 'n': getopt_nvstate_path = optarg; break; @@ -267,6 +289,9 @@ } else if (getopt_euicc_memory_reset) { /* Perform an eUICC memory reset */ ipa_euicc_mem_rst(ctx, true, true, true, true, true); + } else if (getopt_execute_fallback_mechanism) { + /* Trigger enabling of fallback profile */ + ipa_execute_fallback_mechanism(ctx, getopt_refresh_flag); } else { IPA_LOGP(SMAIN, LINFO, "-----------------------------8<-----------------------------\n"); rc = eim_init(ctx); -- 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: newchange Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: Ia751f0888c36f39ddfadf7f8bb923a8ee50178dc Gerrit-Change-Number: 43041 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
[L] Change in onomondo-ipa[master]: V1.2: Add function ES10b.ReturnFromFallback
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43042?usp=email
) Change subject: V1.2: Add function ES10b.ReturnFromFallback ...................................................................... V1.2: Add function ES10b.ReturnFromFallback Add new library function to return from fallback profile on IoT eUICC. Also add an option to the command line interface to call the library function. The optional refresh flag may be set via command line option. The function cannot be emulated with non-IoT eUICC. Reference: SGP.32 Section 5.9.21 Related: SYS#8101 Change-Id: Ib49a8ef3a5ea5639d881ca51eaeeea24f083fe0e --- M asn1/SGP32Definitions.asn M include/onomondo/ipa/ipad.h M src/ipa/libasn/CMakeLists.txt A src/ipa/libasn/ReturnFromFallbackRequest.c A src/ipa/libasn/ReturnFromFallbackRequest.h A src/ipa/libasn/ReturnFromFallbackResponse.c A src/ipa/libasn/ReturnFromFallbackResponse.h M src/ipa/libipa/CMakeLists.txt A src/ipa/libipa/es10b_ret_from_fallback.c A src/ipa/libipa/es10b_ret_from_fallback.h M src/ipa/libipa/ipad.c M src/ipa/main.c 12 files changed, 375 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/42/43042/1 diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index 287d4c3..d22a1c9 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -612,6 +612,24 @@ } -- ASN1STOP +-- Section 5.9.21 +-- ASN1START +ReturnFromFallbackRequest ::= [94] SEQUENCE { -- Tag 'BF5E' + refreshFlag BOOLEAN -- indicating whether REFRESH is required +} +-- ASN1STOP +-- ASN1START +ReturnFromFallbackResponse ::= [94] SEQUENCE { -- Tag 'BF5E' + returnFromFallbackResult [0] INTEGER { + ok(0), + catBusy(5), + fallbackNotAvailable(6), -- Fallback Attribute not set + commandError(7), + undefinedError(127) + } +} +-- ASN1STOP + -- Section 5.9.25 -- ASN1START SGP32-SetDefaultDpAddressRequest ::= [101] SEQUENCE { -- Tag 'BF65' diff --git a/include/onomondo/ipa/ipad.h b/include/onomondo/ipa/ipad.h index 2d11d23..d54b09a 100644 --- a/include/onomondo/ipa/ipad.h +++ b/include/onomondo/ipa/ipad.h @@ -95,6 +95,7 @@ int ipa_euicc_mem_rst(struct ipa_context *ctx, bool operatnl_profiles, bool test_profiles, bool default_smdp_addr, bool eim_cfg_data, bool immediate_enable_cfg); int ipa_execute_fallback_mechanism(struct ipa_context *ctx, bool refresh_flag); +int ipa_return_from_fallback(struct ipa_context *ctx, bool refresh_flag); int ipa_poll(struct ipa_context *ctx); void ipa_close(struct ipa_context *ctx); struct ipa_buf *ipa_free_ctx(struct ipa_context *ctx); diff --git a/src/ipa/libasn/CMakeLists.txt b/src/ipa/libasn/CMakeLists.txt index 166d7f2..859578a 100644 --- a/src/ipa/libasn/CMakeLists.txt +++ b/src/ipa/libasn/CMakeLists.txt @@ -780,6 +780,10 @@ RetrieveNotificationsListRequest.h RetrieveNotificationsListResponse.c RetrieveNotificationsListResponse.h +ReturnFromFallbackRequest.c +ReturnFromFallbackRequest.h +ReturnFromFallbackResponse.c +ReturnFromFallbackResponse.h RollbackProfileResult.c RollbackProfileResult.h RspCapability.c diff --git a/src/ipa/libasn/ReturnFromFallbackRequest.c b/src/ipa/libasn/ReturnFromFallbackRequest.c new file mode 100644 index 0000000..69bd3a3 --- /dev/null +++ b/src/ipa/libasn/ReturnFromFallbackRequest.c @@ -0,0 +1,51 @@ +/* + * 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 "ReturnFromFallbackRequest.h" + +static asn_TYPE_member_t asn_MBR_ReturnFromFallbackRequest_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct ReturnFromFallbackRequest, refreshFlag), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BOOLEAN, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "refreshFlag" + }, +}; +static const ber_tlv_tag_t asn_DEF_ReturnFromFallbackRequest_tags_1[] = { + (ASN_TAG_CLASS_CONTEXT | (94 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_ReturnFromFallbackRequest_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* refreshFlag */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_ReturnFromFallbackRequest_specs_1 = { + sizeof(struct ReturnFromFallbackRequest), + offsetof(struct ReturnFromFallbackRequest, _asn_ctx), + asn_MAP_ReturnFromFallbackRequest_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_ReturnFromFallbackRequest = { + "ReturnFromFallbackRequest", + "ReturnFromFallbackRequest", + &asn_OP_SEQUENCE, + asn_DEF_ReturnFromFallbackRequest_tags_1, + sizeof(asn_DEF_ReturnFromFallbackRequest_tags_1) + /sizeof(asn_DEF_ReturnFromFallbackRequest_tags_1[0]) - 1, /* 1 */ + asn_DEF_ReturnFromFallbackRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_ReturnFromFallbackRequest_tags_1) + /sizeof(asn_DEF_ReturnFromFallbackRequest_tags_1[0]), /* 2 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_ReturnFromFallbackRequest_1, + 1, /* Elements count */ + &asn_SPC_ReturnFromFallbackRequest_specs_1 /* Additional specs */ +}; + diff --git a/src/ipa/libasn/ReturnFromFallbackRequest.h b/src/ipa/libasn/ReturnFromFallbackRequest.h new file mode 100644 index 0000000..5a43ff0 --- /dev/null +++ b/src/ipa/libasn/ReturnFromFallbackRequest.h @@ -0,0 +1,42 @@ +/* + * 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 _ReturnFromFallbackRequest_H_ +#define _ReturnFromFallbackRequest_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include <BOOLEAN.h> +#include <constr_SEQUENCE.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* ReturnFromFallbackRequest */ +typedef struct ReturnFromFallbackRequest { + BOOLEAN_t refreshFlag; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ReturnFromFallbackRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ReturnFromFallbackRequest; + +#ifdef __cplusplus +} +#endif + +#endif /* _ReturnFromFallbackRequest_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libasn/ReturnFromFallbackResponse.c b/src/ipa/libasn/ReturnFromFallbackResponse.c new file mode 100644 index 0000000..a1d21ce --- /dev/null +++ b/src/ipa/libasn/ReturnFromFallbackResponse.c @@ -0,0 +1,51 @@ +/* + * 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 "ReturnFromFallbackResponse.h" + +static asn_TYPE_member_t asn_MBR_ReturnFromFallbackResponse_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct ReturnFromFallbackResponse, returnFromFallbackResult), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "returnFromFallbackResult" + }, +}; +static const ber_tlv_tag_t asn_DEF_ReturnFromFallbackResponse_tags_1[] = { + (ASN_TAG_CLASS_CONTEXT | (94 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_ReturnFromFallbackResponse_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* returnFromFallbackResult */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_ReturnFromFallbackResponse_specs_1 = { + sizeof(struct ReturnFromFallbackResponse), + offsetof(struct ReturnFromFallbackResponse, _asn_ctx), + asn_MAP_ReturnFromFallbackResponse_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_ReturnFromFallbackResponse = { + "ReturnFromFallbackResponse", + "ReturnFromFallbackResponse", + &asn_OP_SEQUENCE, + asn_DEF_ReturnFromFallbackResponse_tags_1, + sizeof(asn_DEF_ReturnFromFallbackResponse_tags_1) + /sizeof(asn_DEF_ReturnFromFallbackResponse_tags_1[0]) - 1, /* 1 */ + asn_DEF_ReturnFromFallbackResponse_tags_1, /* Same as above */ + sizeof(asn_DEF_ReturnFromFallbackResponse_tags_1) + /sizeof(asn_DEF_ReturnFromFallbackResponse_tags_1[0]), /* 2 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_ReturnFromFallbackResponse_1, + 1, /* Elements count */ + &asn_SPC_ReturnFromFallbackResponse_specs_1 /* Additional specs */ +}; + diff --git a/src/ipa/libasn/ReturnFromFallbackResponse.h b/src/ipa/libasn/ReturnFromFallbackResponse.h new file mode 100644 index 0000000..c4a7ae0 --- /dev/null +++ b/src/ipa/libasn/ReturnFromFallbackResponse.h @@ -0,0 +1,51 @@ +/* + * 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 _ReturnFromFallbackResponse_H_ +#define _ReturnFromFallbackResponse_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include <NativeInteger.h> +#include <constr_SEQUENCE.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum ReturnFromFallbackResponse__returnFromFallbackResult { + ReturnFromFallbackResponse__returnFromFallbackResult_ok = 0, + ReturnFromFallbackResponse__returnFromFallbackResult_catBusy = 5, + ReturnFromFallbackResponse__returnFromFallbackResult_fallbackNotAvailable = 6, + ReturnFromFallbackResponse__returnFromFallbackResult_commandError = 7, + ReturnFromFallbackResponse__returnFromFallbackResult_undefinedError = 127 +} e_ReturnFromFallbackResponse__returnFromFallbackResult; + +/* ReturnFromFallbackResponse */ +typedef struct ReturnFromFallbackResponse { + long returnFromFallbackResult; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ReturnFromFallbackResponse_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ReturnFromFallbackResponse; + +#ifdef __cplusplus +} +#endif + +#endif /* _ReturnFromFallbackResponse_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libipa/CMakeLists.txt b/src/ipa/libipa/CMakeLists.txt index a46e22b..45d8f4a 100644 --- a/src/ipa/libipa/CMakeLists.txt +++ b/src/ipa/libipa/CMakeLists.txt @@ -21,6 +21,7 @@ es10b_retr_notif_from_lst.c es10b_rm_notif_from_lst.c es10b_exec_fallback_mech.c + es10b_ret_from_fallback.c es10c_delete_prfle.c es10c_disable_prfle.c es10c_enable_prfle.c diff --git a/src/ipa/libipa/es10b_ret_from_fallback.c b/src/ipa/libipa/es10b_ret_from_fallback.c new file mode 100644 index 0000000..1f18e3d --- /dev/null +++ b/src/ipa/libipa/es10b_ret_from_fallback.c @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2026 sysmocom - s.f.m.c. GmbH. All rights reserved. + * + * SPDX-License-Identifier: AGPL-3.0-only + * + * Author: Philipp Maier <pmaier(a)sysmocom.de> / sysmocom - s.f.m.c. GmbH + * Andreas Eversberg <aeversberg(a)sysmocom.de> / sysmocom - s.f.m.c. GmbH + * + * See also: GSMA SGP.22, 5.9.21: Function (ES10b): ReturnFromFallback + */ + +#include <stdio.h> +#include <assert.h> +#include <onomondo/ipa/utils.h> +#include "context.h" +#include "utils.h" +#include "euicc.h" +#include "es10x.h" +#include "es10b_ret_from_fallback.h" + +static const struct num_str_map error_code_strings[] = { + { ReturnFromFallbackResponse__returnFromFallbackResult_ok, "ok" }, + { ReturnFromFallbackResponse__returnFromFallbackResult_catBusy, "catBusy" }, + { ReturnFromFallbackResponse__returnFromFallbackResult_fallbackNotAvailable, "fallbackNotAvailable" }, + { ReturnFromFallbackResponse__returnFromFallbackResult_commandError, "commandError" }, + { ReturnFromFallbackResponse__returnFromFallbackResult_undefinedError, "undefinedError" }, + + { 0, NULL } +}; + +static int dec_ret_from_fallback_res(struct ipa_es10b_ret_from_fallback_res *res, const struct ipa_buf *es10b_res) +{ + struct ReturnFromFallbackResponse *asn = NULL; + + asn = ipa_es10x_res_dec(&asn_DEF_ReturnFromFallbackResponse, es10b_res, "ReturnFromFallback"); + if (!asn) + return -EINVAL; + + if (asn->returnFromFallbackResult != ReturnFromFallbackResponse__returnFromFallbackResult_ok) { + IPA_LOGP_ES10X("ReturnFromFallback", LERROR, "function failed with error code %ld=%s!\n", + asn->returnFromFallbackResult, + ipa_str_from_num(error_code_strings, asn->returnFromFallbackResult, "(unknown)")); + } else { + IPA_LOGP_ES10X("ReturnFromFallback", LERROR, "function succeeded with status code %ld=%s!\n", + asn->returnFromFallbackResult, + ipa_str_from_num(error_code_strings, asn->returnFromFallbackResult, "(unknown)")); + } + + res->res = asn; + return 0; +} + +/*! Function (Es10b): ReturnFromFallback. + * \param[inout] ctx pointer to ipa_context. + * \param[in] req pointer to struct that holds the function parameters. + * \returns pointer newly allocated struct with function result, NULL on error. */ +struct ipa_es10b_ret_from_fallback_res *ipa_es10b_ret_from_fallback(struct ipa_context *ctx, + const struct ipa_es10b_ret_from_fallback_req *req) +{ + struct ipa_buf *es10b_req = NULL; + struct ipa_buf *es10b_res = NULL; + struct ipa_es10b_ret_from_fallback_res *res = IPA_ALLOC_ZERO(struct ipa_es10b_ret_from_fallback_res); + int rc; + + es10b_req = ipa_es10x_req_enc(&asn_DEF_ReturnFromFallbackRequest, &req->req, "ReturnFromFallback"); + if (!es10b_req) { + IPA_LOGP_ES10X("ReturnFromFallback", LERROR, "unable to encode Es10b request\n"); + goto error; + } + + es10b_res = ipa_euicc_transceive_es10x(ctx, es10b_req); + if (!es10b_res) { + IPA_LOGP_ES10X("ReturnFromFallback", LERROR, "no Es10b response\n"); + goto error; + } + + rc = dec_ret_from_fallback_res(res, es10b_res); + if (rc < 0) + goto error; + + IPA_FREE(es10b_req); + IPA_FREE(es10b_res); + return res; +error: + IPA_FREE(es10b_req); + IPA_FREE(es10b_res); + ipa_es10b_ret_from_fallback_res_free(res); + return NULL; +} + +/*! Free results of function (Es10b): ReturnFromFallback. + * \param[in] res pointer to function result. */ +void ipa_es10b_ret_from_fallback_res_free(struct ipa_es10b_ret_from_fallback_res *res) +{ + IPA_ES10X_RES_FREE(asn_DEF_ReturnFromFallbackResponse, res); +} diff --git a/src/ipa/libipa/es10b_ret_from_fallback.h b/src/ipa/libipa/es10b_ret_from_fallback.h new file mode 100644 index 0000000..ba6fd79 --- /dev/null +++ b/src/ipa/libipa/es10b_ret_from_fallback.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2026 sysmocom - s.f.m.c. GmbH. All rights reserved. + * + * SPDX-License-Identifier: AGPL-3.0-only + */ + +#pragma once + +#include <ReturnFromFallbackRequest.h> +#include <ReturnFromFallbackResponse.h> +struct ipa_context; + +struct ipa_es10b_ret_from_fallback_req { + struct ReturnFromFallbackRequest req; +}; + +struct ipa_es10b_ret_from_fallback_res { + struct ReturnFromFallbackResponse *res; +}; + +struct ipa_es10b_ret_from_fallback_res *ipa_es10b_ret_from_fallback(struct ipa_context *ctx, + const struct ipa_es10b_ret_from_fallback_req *req); +void ipa_es10b_ret_from_fallback_res_free(struct ipa_es10b_ret_from_fallback_res *res); diff --git a/src/ipa/libipa/ipad.c b/src/ipa/libipa/ipad.c index ae3ca8e..187b3d1 100644 --- a/src/ipa/libipa/ipad.c +++ b/src/ipa/libipa/ipad.c @@ -26,6 +26,7 @@ #include "es10b_euicc_mem_rst.h" #include "es10b_load_euicc_pkg.h" #include "es10b_exec_fallback_mech.h" +#include "es10b_ret_from_fallback.h" #include "proc_euicc_pkg_dwnld_exec.h" #include "proc_notif_delivery.h" @@ -290,6 +291,32 @@ return rc; } +/*! Trigger enabling of emergency profile. + * \param[inout] ctx pointer to ipa_context. + * \param[in] refresh_flag send a CAT refresh after switchting profile. + * \returns 0 on success, negative on error. */ +int ipa_return_from_fallback(struct ipa_context *ctx, bool refresh_flag) +{ + struct ipa_es10b_ret_from_fallback_req ret_from_fallback = { 0 }; + struct ipa_es10b_ret_from_fallback_res *res; + int rc = -EINVAL; + + if (ctx->cfg->iot_euicc_emu_enabled) { + IPA_LOGP(SIPA, LERROR, "Unable to emulate switching back from fallback profile.\n"); + return -ENOTSUP; + } + + ret_from_fallback.req.refreshFlag = refresh_flag; + res = ipa_es10b_ret_from_fallback(ctx, &ret_from_fallback); + if (!res) + return -EIO; + if (res->res->returnFromFallbackResult == ReturnFromFallbackResponse__returnFromFallbackResult_ok) + rc = 0; + ipa_es10b_ret_from_fallback_res_free(res); + + return rc; +} + static int check_canaries(struct ipa_context *ctx) { if (ctx->check_http) diff --git a/src/ipa/main.c b/src/ipa/main.c index 5a7c1f5..57224dc 100644 --- a/src/ipa/main.c +++ b/src/ipa/main.c @@ -50,6 +50,7 @@ printf(" -f PATH .................... set initial eIM configuration\n"); printf(" -m ......................... reset eUICC memory\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(" --refresh-flag.............. Make eUICC send a CAT refresh after switchting profile with the triggers above.\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", @@ -145,6 +146,7 @@ char *getopt_initial_eim_cfg_file = NULL; bool getopt_euicc_memory_reset = false; bool getopt_execute_fallback_mechanism = false; + bool getopt_return_from_fallback = false; bool getopt_refresh_flag = false; char *getopt_nvstate_path = DEFAULT_NVSTATE_PATH; struct ipa_buf *nvstate_load = NULL; @@ -164,11 +166,13 @@ enum { OPT_EXECFALLBACK = 256, + OPT_RETURNFALLBACK, OPT_REFRESHFLAG, }; struct option long_options[] = { { "execute-fallback-mechanism", no_argument, NULL, OPT_EXECFALLBACK}, + { "return-from-fallback", no_argument, NULL, OPT_RETURNFALLBACK}, { "refresh-flag", no_argument, NULL, OPT_REFRESHFLAG}, { NULL, 0, NULL, 0} }; @@ -205,6 +209,9 @@ case OPT_EXECFALLBACK: getopt_execute_fallback_mechanism = true; break; + case OPT_RETURNFALLBACK: + getopt_return_from_fallback = true; + break; case OPT_REFRESHFLAG: getopt_refresh_flag = true; break; @@ -292,6 +299,9 @@ } else if (getopt_execute_fallback_mechanism) { /* Trigger enabling of fallback profile */ ipa_execute_fallback_mechanism(ctx, getopt_refresh_flag); + } else if (getopt_return_from_fallback) { + /* Trigger return from fallback profile to previous profile */ + ipa_return_from_fallback(ctx, getopt_refresh_flag); } else { IPA_LOGP(SMAIN, LINFO, "-----------------------------8<-----------------------------\n"); rc = eim_init(ctx); -- 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: newchange Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: Ib49a8ef3a5ea5639d881ca51eaeeea24f083fe0e Gerrit-Change-Number: 43042 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
[L] Change in onomondo-ipa[master]: V1.2: Change names and structure in IpaEuiccData
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43039?usp=email
) Change subject: V1.2: Change names and structure in IpaEuiccData ...................................................................... V1.2: Change names and structure in IpaEuiccData The “SEQUENCE OF SGP32-PendingNotification” is now direct member of the IpaEuiccData. The notficationList in IpaEuiccDataResponse is taken from the RetrieveNotificationsListResponse. After the structure change, the ASN.1 compiler creates two equal definitions in the header files. An assignment causes a C compiler error, so that the pointer to the list must be casted to the definition of the response. (See ipa_proc_euicc_data_req().) Reference: SGP.32 Section 2.11.2.2 Related: SYS#8101 Change-Id: I0dc80706bff5b2020cbd31a57c9526aae9d50169 --- M asn1/SGP32Definitions.asn M src/ipa/libasn/CMakeLists.txt A src/ipa/libasn/EuiccPackageResultList.c A src/ipa/libasn/EuiccPackageResultList.h M src/ipa/libasn/IpaEuiccData.c M src/ipa/libasn/IpaEuiccData.h A src/ipa/libasn/PendingNotificationList.c A src/ipa/libasn/PendingNotificationList.h M src/ipa/libipa/proc_euicc_data_req.c 9 files changed, 248 insertions(+), 45 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/39/43039/1 diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index 93fa33f..c380182 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -317,8 +317,12 @@ ipaEuiccData IpaEuiccData, ipaEuiccDataResponseError IpaEuiccDataResponseError } +PendingNotificationList ::= SEQUENCE OF SGP32-PendingNotification +EuiccPackageResultList ::= SEQUENCE OF EuiccPackageResult IpaEuiccData ::= SEQUENCE { - defaultSmdpAddress [0] UTF8String OPTIONAL, -- Tag '80' + notificationsList [0] PendingNotificationList OPTIONAL, -- Tag 'A0' + defaultSmdpAddress [1] UTF8String OPTIONAL, -- Tag '81' + euiccPackageResultList [2] EuiccPackageResultList OPTIONAL, -- Tag 'A2' euiccInfo1 [32] EUICCInfo1 OPTIONAL, -- Tag 'BF20' euiccInfo2 [34] SGP32-EUICCInfo2 OPTIONAL, -- Tag 'BF22' rootSmdsAddress [3] UTF8String OPTIONAL, -- Tag '83' @@ -326,9 +330,8 @@ eumCertificate [5] Certificate OPTIONAL, -- Tag 'A5' euiccCertificate [6] Certificate OPTIONAL, -- Tag 'A6' eimTransactionId [7] TransactionId OPTIONAL, -- Tag '87' - ipaCapabilities [8] IpaCapabilities OPTIONAL, -- Tag '88' - deviceInfo [9] DeviceInfo OPTIONAL, -- Tag 'A9' - notificationsList [43] SGP32-RetrieveNotificationsListResponse OPTIONAL -- Tag 'BF2B'. + ipaCapabilities [8] IpaCapabilities OPTIONAL, -- Tag 'A8' + deviceInfo [9] DeviceInfo OPTIONAL -- Tag 'A9' } -- ASN1STOP diff --git a/src/ipa/libasn/CMakeLists.txt b/src/ipa/libasn/CMakeLists.txt index f9166bd..3c84951 100644 --- a/src/ipa/libasn/CMakeLists.txt +++ b/src/ipa/libasn/CMakeLists.txt @@ -329,6 +329,8 @@ EuiccPackageResultDataSigned.c EuiccPackageResultDataSigned.h EuiccPackageResult.h +EuiccPackageResultList.c +EuiccPackageResultList.h EuiccPackageResultSigned.c EuiccPackageResultSigned.h EuiccPackageSigned.c @@ -626,6 +628,8 @@ PE-MF.h PendingNotification.c PendingNotification.h +PendingNotificationList.c +PendingNotificationList.h PE-NonStandard.c PE-NonStandard.h PE-OPT-CSIM.c diff --git a/src/ipa/libasn/EuiccPackageResultList.c b/src/ipa/libasn/EuiccPackageResultList.c new file mode 100644 index 0000000..f6452c7 --- /dev/null +++ b/src/ipa/libasn/EuiccPackageResultList.c @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#include "EuiccPackageResultList.h" + +asn_TYPE_member_t asn_MBR_EuiccPackageResultList_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_CONTEXT | (81 << 2)), + 0, + &asn_DEF_EuiccPackageResult, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_EuiccPackageResultList_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_EuiccPackageResultList_specs_1 = { + sizeof(struct EuiccPackageResultList), + offsetof(struct EuiccPackageResultList, _asn_ctx), + 2, /* XER encoding is XMLValueList */ +}; +asn_TYPE_descriptor_t asn_DEF_EuiccPackageResultList = { + "EuiccPackageResultList", + "EuiccPackageResultList", + &asn_OP_SEQUENCE_OF, + asn_DEF_EuiccPackageResultList_tags_1, + sizeof(asn_DEF_EuiccPackageResultList_tags_1) + /sizeof(asn_DEF_EuiccPackageResultList_tags_1[0]), /* 1 */ + asn_DEF_EuiccPackageResultList_tags_1, /* Same as above */ + sizeof(asn_DEF_EuiccPackageResultList_tags_1) + /sizeof(asn_DEF_EuiccPackageResultList_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_OF_constraint }, + asn_MBR_EuiccPackageResultList_1, + 1, /* Single element */ + &asn_SPC_EuiccPackageResultList_specs_1 /* Additional specs */ +}; + diff --git a/src/ipa/libasn/EuiccPackageResultList.h b/src/ipa/libasn/EuiccPackageResultList.h new file mode 100644 index 0000000..4fb2dda --- /dev/null +++ b/src/ipa/libasn/EuiccPackageResultList.h @@ -0,0 +1,46 @@ +/* + * 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 _EuiccPackageResultList_H_ +#define _EuiccPackageResultList_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include <asn_SEQUENCE_OF.h> +#include <constr_SEQUENCE_OF.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct EuiccPackageResult; + +/* EuiccPackageResultList */ +typedef struct EuiccPackageResultList { + A_SEQUENCE_OF(struct EuiccPackageResult) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} EuiccPackageResultList_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_EuiccPackageResultList; +extern asn_SET_OF_specifics_t asn_SPC_EuiccPackageResultList_specs_1; +extern asn_TYPE_member_t asn_MBR_EuiccPackageResultList_1[1]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "EuiccPackageResult.h" + +#endif /* _EuiccPackageResultList_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libasn/IpaEuiccData.c b/src/ipa/libasn/IpaEuiccData.c index 3f44929..8633cce 100644 --- a/src/ipa/libasn/IpaEuiccData.c +++ b/src/ipa/libasn/IpaEuiccData.c @@ -8,16 +8,34 @@ #include "IpaEuiccData.h" asn_TYPE_member_t asn_MBR_IpaEuiccData_1[] = { - { ATF_POINTER, 11, offsetof(struct IpaEuiccData, defaultSmdpAddress), + { ATF_POINTER, 12, offsetof(struct IpaEuiccData, notificationsList), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ + &asn_DEF_PendingNotificationList, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "notificationsList" + }, + { ATF_POINTER, 11, offsetof(struct IpaEuiccData, defaultSmdpAddress), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ &asn_DEF_UTF8String, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "defaultSmdpAddress" }, - { ATF_POINTER, 10, offsetof(struct IpaEuiccData, euiccInfo1), + { ATF_POINTER, 10, offsetof(struct IpaEuiccData, euiccPackageResultList), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_EuiccPackageResultList, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "euiccPackageResultList" + }, + { ATF_POINTER, 9, offsetof(struct IpaEuiccData, euiccInfo1), (ASN_TAG_CLASS_CONTEXT | (32 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_EUICCInfo1, @@ -26,7 +44,7 @@ 0, 0, /* No default value */ "euiccInfo1" }, - { ATF_POINTER, 9, offsetof(struct IpaEuiccData, euiccInfo2), + { ATF_POINTER, 8, offsetof(struct IpaEuiccData, euiccInfo2), (ASN_TAG_CLASS_CONTEXT | (34 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_SGP32_EUICCInfo2, @@ -35,7 +53,7 @@ 0, 0, /* No default value */ "euiccInfo2" }, - { ATF_POINTER, 8, offsetof(struct IpaEuiccData, rootSmdsAddress), + { ATF_POINTER, 7, offsetof(struct IpaEuiccData, rootSmdsAddress), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_UTF8String, @@ -44,7 +62,7 @@ 0, 0, /* No default value */ "rootSmdsAddress" }, - { ATF_POINTER, 7, offsetof(struct IpaEuiccData, associationToken), + { ATF_POINTER, 6, offsetof(struct IpaEuiccData, associationToken), (ASN_TAG_CLASS_CONTEXT | (4 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_NativeInteger, @@ -53,7 +71,7 @@ 0, 0, /* No default value */ "associationToken" }, - { ATF_POINTER, 6, offsetof(struct IpaEuiccData, eumCertificate), + { ATF_POINTER, 5, offsetof(struct IpaEuiccData, eumCertificate), (ASN_TAG_CLASS_CONTEXT | (5 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_Certificate, @@ -62,7 +80,7 @@ 0, 0, /* No default value */ "eumCertificate" }, - { ATF_POINTER, 5, offsetof(struct IpaEuiccData, euiccCertificate), + { ATF_POINTER, 4, offsetof(struct IpaEuiccData, euiccCertificate), (ASN_TAG_CLASS_CONTEXT | (6 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_Certificate, @@ -71,7 +89,7 @@ 0, 0, /* No default value */ "euiccCertificate" }, - { ATF_POINTER, 4, offsetof(struct IpaEuiccData, eimTransactionId), + { ATF_POINTER, 3, offsetof(struct IpaEuiccData, eimTransactionId), (ASN_TAG_CLASS_CONTEXT | (7 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_TransactionId, @@ -80,7 +98,7 @@ 0, 0, /* No default value */ "eimTransactionId" }, - { ATF_POINTER, 3, offsetof(struct IpaEuiccData, ipaCapabilities), + { ATF_POINTER, 2, offsetof(struct IpaEuiccData, ipaCapabilities), (ASN_TAG_CLASS_CONTEXT | (8 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_IpaCapabilities, @@ -89,7 +107,7 @@ 0, 0, /* No default value */ "ipaCapabilities" }, - { ATF_POINTER, 2, offsetof(struct IpaEuiccData, deviceInfo), + { ATF_POINTER, 1, offsetof(struct IpaEuiccData, deviceInfo), (ASN_TAG_CLASS_CONTEXT | (9 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_DeviceInfo, @@ -98,41 +116,33 @@ 0, 0, /* No default value */ "deviceInfo" }, - { ATF_POINTER, 1, offsetof(struct IpaEuiccData, notificationsList), - (ASN_TAG_CLASS_CONTEXT | (43 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_SGP32_RetrieveNotificationsListResponse, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "notificationsList" - }, }; -static const int asn_MAP_IpaEuiccData_oms_1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; +static const int asn_MAP_IpaEuiccData_oms_1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; static const ber_tlv_tag_t asn_DEF_IpaEuiccData_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_IpaEuiccData_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* defaultSmdpAddress */ - { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* rootSmdsAddress */ - { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* associationToken */ - { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* eumCertificate */ - { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* euiccCertificate */ - { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* eimTransactionId */ - { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 }, /* ipaCapabilities */ - { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 9, 0, 0 }, /* deviceInfo */ - { (ASN_TAG_CLASS_CONTEXT | (32 << 2)), 1, 0, 0 }, /* euiccInfo1 */ - { (ASN_TAG_CLASS_CONTEXT | (34 << 2)), 2, 0, 0 }, /* euiccInfo2 */ - { (ASN_TAG_CLASS_CONTEXT | (43 << 2)), 10, 0, 0 } /* notificationsList */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* notificationsList */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* defaultSmdpAddress */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* euiccPackageResultList */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 5, 0, 0 }, /* rootSmdsAddress */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 6, 0, 0 }, /* associationToken */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 7, 0, 0 }, /* eumCertificate */ + { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 8, 0, 0 }, /* euiccCertificate */ + { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 9, 0, 0 }, /* eimTransactionId */ + { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 10, 0, 0 }, /* ipaCapabilities */ + { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 11, 0, 0 }, /* deviceInfo */ + { (ASN_TAG_CLASS_CONTEXT | (32 << 2)), 3, 0, 0 }, /* euiccInfo1 */ + { (ASN_TAG_CLASS_CONTEXT | (34 << 2)), 4, 0, 0 } /* euiccInfo2 */ }; asn_SEQUENCE_specifics_t asn_SPC_IpaEuiccData_specs_1 = { sizeof(struct IpaEuiccData), offsetof(struct IpaEuiccData, _asn_ctx), asn_MAP_IpaEuiccData_tag2el_1, - 11, /* Count of tags in the map */ + 12, /* Count of tags in the map */ asn_MAP_IpaEuiccData_oms_1, /* Optional members */ - 11, 0, /* Root/Additions */ - 11, /* First extension addition */ + 12, 0, /* Root/Additions */ + 12, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_IpaEuiccData = { "IpaEuiccData", @@ -146,7 +156,7 @@ /sizeof(asn_DEF_IpaEuiccData_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_IpaEuiccData_1, - 11, /* Elements count */ + 12, /* Elements count */ &asn_SPC_IpaEuiccData_specs_1 /* Additional specs */ }; diff --git a/src/ipa/libasn/IpaEuiccData.h b/src/ipa/libasn/IpaEuiccData.h index bf8dc38..740e655 100644 --- a/src/ipa/libasn/IpaEuiccData.h +++ b/src/ipa/libasn/IpaEuiccData.h @@ -22,16 +22,19 @@ #endif /* Forward declarations */ +struct PendingNotificationList; +struct EuiccPackageResultList; struct EUICCInfo1; struct SGP32_EUICCInfo2; struct Certificate; struct IpaCapabilities; struct DeviceInfo; -struct SGP32_RetrieveNotificationsListResponse; /* IpaEuiccData */ typedef struct IpaEuiccData { + struct PendingNotificationList *notificationsList /* OPTIONAL */; UTF8String_t *defaultSmdpAddress /* OPTIONAL */; + struct EuiccPackageResultList *euiccPackageResultList /* OPTIONAL */; struct EUICCInfo1 *euiccInfo1 /* OPTIONAL */; struct SGP32_EUICCInfo2 *euiccInfo2 /* OPTIONAL */; UTF8String_t *rootSmdsAddress /* OPTIONAL */; @@ -41,7 +44,6 @@ TransactionId_t *eimTransactionId /* OPTIONAL */; struct IpaCapabilities *ipaCapabilities /* OPTIONAL */; struct DeviceInfo *deviceInfo /* OPTIONAL */; - struct SGP32_RetrieveNotificationsListResponse *notificationsList /* OPTIONAL */; /* * This type is extensible, * possible extensions are below. @@ -54,19 +56,20 @@ /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_IpaEuiccData; extern asn_SEQUENCE_specifics_t asn_SPC_IpaEuiccData_specs_1; -extern asn_TYPE_member_t asn_MBR_IpaEuiccData_1[11]; +extern asn_TYPE_member_t asn_MBR_IpaEuiccData_1[12]; #ifdef __cplusplus } #endif /* Referred external types */ +#include "PendingNotificationList.h" +#include "EuiccPackageResultList.h" #include "EUICCInfo1.h" #include "SGP32-EUICCInfo2.h" #include "Certificate.h" #include "IpaCapabilities.h" #include "DeviceInfo.h" -#include "SGP32-RetrieveNotificationsListResponse.h" #endif /* _IpaEuiccData_H_ */ #include <asn_internal.h> diff --git a/src/ipa/libasn/PendingNotificationList.c b/src/ipa/libasn/PendingNotificationList.c new file mode 100644 index 0000000..bbca9a5 --- /dev/null +++ b/src/ipa/libasn/PendingNotificationList.c @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#include "PendingNotificationList.h" + +asn_TYPE_member_t asn_MBR_PendingNotificationList_1[] = { + { ATF_POINTER, 0, 0, + -1 /* Ambiguous tag (CHOICE?) */, + 0, + &asn_DEF_SGP32_PendingNotification, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_PendingNotificationList_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_PendingNotificationList_specs_1 = { + sizeof(struct PendingNotificationList), + offsetof(struct PendingNotificationList, _asn_ctx), + 2, /* XER encoding is XMLValueList */ +}; +asn_TYPE_descriptor_t asn_DEF_PendingNotificationList = { + "PendingNotificationList", + "PendingNotificationList", + &asn_OP_SEQUENCE_OF, + asn_DEF_PendingNotificationList_tags_1, + sizeof(asn_DEF_PendingNotificationList_tags_1) + /sizeof(asn_DEF_PendingNotificationList_tags_1[0]), /* 1 */ + asn_DEF_PendingNotificationList_tags_1, /* Same as above */ + sizeof(asn_DEF_PendingNotificationList_tags_1) + /sizeof(asn_DEF_PendingNotificationList_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_OF_constraint }, + asn_MBR_PendingNotificationList_1, + 1, /* Single element */ + &asn_SPC_PendingNotificationList_specs_1 /* Additional specs */ +}; + diff --git a/src/ipa/libasn/PendingNotificationList.h b/src/ipa/libasn/PendingNotificationList.h new file mode 100644 index 0000000..2a06c0f --- /dev/null +++ b/src/ipa/libasn/PendingNotificationList.h @@ -0,0 +1,46 @@ +/* + * 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 _PendingNotificationList_H_ +#define _PendingNotificationList_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include <asn_SEQUENCE_OF.h> +#include <constr_SEQUENCE_OF.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct SGP32_PendingNotification; + +/* PendingNotificationList */ +typedef struct PendingNotificationList { + A_SEQUENCE_OF(struct SGP32_PendingNotification) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} PendingNotificationList_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_PendingNotificationList; +extern asn_SET_OF_specifics_t asn_SPC_PendingNotificationList_specs_1; +extern asn_TYPE_member_t asn_MBR_PendingNotificationList_1[1]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "SGP32-PendingNotification.h" + +#endif /* _PendingNotificationList_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libipa/proc_euicc_data_req.c b/src/ipa/libipa/proc_euicc_data_req.c index 2db088b..d084ed6 100644 --- a/src/ipa/libipa/proc_euicc_data_req.c +++ b/src/ipa/libipa/proc_euicc_data_req.c @@ -199,8 +199,11 @@ retr_notif_from_lst_req.dr_search_criteria = pars->ipa_euicc_data_request->searchCriteriaNotification; retr_notif_from_lst_res = ipa_es10b_retr_notif_from_lst(ctx, &retr_notif_from_lst_req); - if (retr_notif_from_lst_res && retr_notif_from_lst_res->sgp32_res) - ipa_euicc_data_response.choice.ipaEuiccData.notificationsList = retr_notif_from_lst_res->sgp32_res; + if (retr_notif_from_lst_res && retr_notif_from_lst_res->sgp32_res && + retr_notif_from_lst_res->sgp32_res->present == SGP32_RetrieveNotificationsListResponse_PR_notificationList) { + ipa_euicc_data_response.choice.ipaEuiccData.notificationsList = + (struct PendingNotificationList *)&retr_notif_from_lst_res->sgp32_res->choice.notificationList; + } } ipa_euicc_data_response.present = IpaEuiccDataResponse_PR_ipaEuiccData; -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43039?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: I0dc80706bff5b2020cbd31a57c9526aae9d50169 Gerrit-Change-Number: 43039 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
[S] Change in onomondo-ipa[master]: V1.2: Add profileDownloadErrorReason to ProfileDownloadTriggerResult
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43040?usp=email
) 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(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/40/43040/1 diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index c380182..7c5821c 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: newchange Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: Ia5da46a793db54f2e2671be2b50dd1dddc97e318 Gerrit-Change-Number: 43040 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
[S] Change in onomondo-ipa[master]: V1.2: Add new error codes to EnableProfileResult, DisableProfileResul...
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43038?usp=email
) Change subject: V1.2: Add new error codes to EnableProfileResult, DisableProfileResult, DeleteProfileResult, AddEimResult ...................................................................... V1.2: Add new error codes to EnableProfileResult, DisableProfileResult, DeleteProfileResult, AddEimResult Reference: SGP.32 Section 2.11.2 New error code of AddEimResult is used at IoT eUICC emulation. Related: SYS#8101 Change-Id: Idb023c994770fe4ee048da128026f566bd7fe146 --- M asn1/SGP32Definitions.asn M src/ipa/libasn/AddEimResult.h M src/ipa/libasn/DeleteProfileResult.h M src/ipa/libasn/DisableProfileResult.h M src/ipa/libasn/EnableProfileResult.h M src/ipa/libipa/es10b_load_euicc_pkg.c 6 files changed, 19 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/38/43038/1 diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index bdaedd5..93fa33f 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -211,18 +211,26 @@ ok(0), iccidOrAidNotFound(1), profileNotInDisabledState(2), + disallowedByPolicy(3), + catBusy(5), + rollbackNotAvailable(20), undefinedError(127) } DisableProfileResult ::= INTEGER { ok(0), iccidOrAidNotFound(1), profileNotInEnabledState(2), + disallowedByPolicy(3), + catBusy(5), undefinedError(127) } DeleteProfileResult ::= INTEGER { ok(0), iccidOrAidNotFound(1), profileNotInDisabledState(2), + disallowedByPolicy(3), + rollbackNotAvailable(20), + returnFallbackProfile(21), undefinedError(127) } SGP32-ProfileInfoListResponse ::= [45] CHOICE { @@ -257,6 +265,7 @@ addEimResultCode INTEGER { ok(0), insufficientMemory(1), + associatedEimAlreadyExists(2), ciPKUnknown(3), invalidAssociationToken(5), counterValueOutOfRange(6), diff --git a/src/ipa/libasn/AddEimResult.h b/src/ipa/libasn/AddEimResult.h index ac93610..69aca83 100644 --- a/src/ipa/libasn/AddEimResult.h +++ b/src/ipa/libasn/AddEimResult.h @@ -30,6 +30,7 @@ typedef enum AddEimResult__addEimResultCode { AddEimResult__addEimResultCode_ok = 0, AddEimResult__addEimResultCode_insufficientMemory = 1, + AddEimResult__addEimResultCode_associatedEimAlreadyExists = 2, AddEimResult__addEimResultCode_ciPKUnknown = 3, AddEimResult__addEimResultCode_invalidAssociationToken = 5, AddEimResult__addEimResultCode_counterValueOutOfRange = 6, diff --git a/src/ipa/libasn/DeleteProfileResult.h b/src/ipa/libasn/DeleteProfileResult.h index 20f06a4..8853150 100644 --- a/src/ipa/libasn/DeleteProfileResult.h +++ b/src/ipa/libasn/DeleteProfileResult.h @@ -23,6 +23,9 @@ DeleteProfileResult_ok = 0, DeleteProfileResult_iccidOrAidNotFound = 1, DeleteProfileResult_profileNotInDisabledState = 2, + DeleteProfileResult_disallowedByPolicy = 3, + DeleteProfileResult_rollbackNotAvailable = 20, + DeleteProfileResult_returnFallbackProfile = 21, DeleteProfileResult_undefinedError = 127 } e_DeleteProfileResult; diff --git a/src/ipa/libasn/DisableProfileResult.h b/src/ipa/libasn/DisableProfileResult.h index f563caa..71528f5 100644 --- a/src/ipa/libasn/DisableProfileResult.h +++ b/src/ipa/libasn/DisableProfileResult.h @@ -23,6 +23,8 @@ DisableProfileResult_ok = 0, DisableProfileResult_iccidOrAidNotFound = 1, DisableProfileResult_profileNotInEnabledState = 2, + DisableProfileResult_disallowedByPolicy = 3, + DisableProfileResult_catBusy = 5, DisableProfileResult_undefinedError = 127 } e_DisableProfileResult; diff --git a/src/ipa/libasn/EnableProfileResult.h b/src/ipa/libasn/EnableProfileResult.h index a86a8f8..17559b3 100644 --- a/src/ipa/libasn/EnableProfileResult.h +++ b/src/ipa/libasn/EnableProfileResult.h @@ -23,6 +23,9 @@ EnableProfileResult_ok = 0, EnableProfileResult_iccidOrAidNotFound = 1, EnableProfileResult_profileNotInDisabledState = 2, + EnableProfileResult_disallowedByPolicy = 3, + EnableProfileResult_catBusy = 5, + EnableProfileResult_rollbackNotAvailable = 20, EnableProfileResult_undefinedError = 127 } e_EnableProfileResult; diff --git a/src/ipa/libipa/es10b_load_euicc_pkg.c b/src/ipa/libipa/es10b_load_euicc_pkg.c index d328bd4..abed9f6 100644 --- a/src/ipa/libipa/es10b_load_euicc_pkg.c +++ b/src/ipa/libipa/es10b_load_euicc_pkg.c @@ -347,7 +347,7 @@ "IoT eUICC emulation active, addEim eCO failed, eIM with specified eimId already exists!\n"); euicc_result_data->choice.addEimResult.present = AddEimResult_PR_addEimResultCode; euicc_result_data->choice.addEimResult.choice.addEimResultCode = - AddEimResult__addEimResultCode_commandError; + AddEimResult__addEimResultCode_associatedEimAlreadyExists; goto error; } } -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43038?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: Idb023c994770fe4ee048da128026f566bd7fe146 Gerrit-Change-Number: 43038 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
[L] Change in onomondo-ipa[master]: V1.2: Add eimTransactionId to IpaEuiccDataRequest and IpaEuiccDataRes...
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43035?usp=email
) Change subject: V1.2: Add eimTransactionId to IpaEuiccDataRequest and IpaEuiccDataResponse ...................................................................... V1.2: Add eimTransactionId to IpaEuiccDataRequest and IpaEuiccDataResponse Add eimTransactionId to IpaEuiccDataRequest and to IpaEuiccDataResponseError or IpaEuiccData of IpaEuiccDataResponse. The IPA takes the transaction ID from the request, if exists, and sets it in the response. The eIM can use it to match the request with the successful or unsuccessful outcome. Reference: SGP.32 Section 2.11.1.2 Related: SYS#8101 Change-Id: I34db78c4eb8461c154459204ec13a2184085e96a --- M asn1/SGP32Definitions.asn M src/ipa/libasn/CMakeLists.txt M src/ipa/libasn/IpaEuiccData.c M src/ipa/libasn/IpaEuiccData.h A src/ipa/libasn/IpaEuiccDataErrorCode.c A src/ipa/libasn/IpaEuiccDataErrorCode.h M src/ipa/libasn/IpaEuiccDataRequest.c M src/ipa/libasn/IpaEuiccDataRequest.h M src/ipa/libasn/IpaEuiccDataResponse.c M src/ipa/libasn/IpaEuiccDataResponse.h A src/ipa/libasn/IpaEuiccDataResponseError.c A src/ipa/libasn/IpaEuiccDataResponseError.h M src/ipa/libipa/proc_euicc_data_req.c 13 files changed, 269 insertions(+), 45 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/35/43035/1 diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index 69175e1..efe2e18 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -119,7 +119,8 @@ seqNumber [0] INTEGER, profileManagementOperation [1] NotificationEvent, euiccPackageResults [2] NULL - } OPTIONAL + } OPTIONAL, + eimTransactionId [3] TransactionId OPTIONAL -- Tag '83' } -- ASN1STOP @@ -293,13 +294,19 @@ -- Section 2.11.2.2 -- ASN1START +IpaEuiccDataErrorCode ::= INTEGER { + incorrectTagList (1), + euiccCiPKIdNotFound(5), + ecallActive(104), + undefinedError(127) +} +IpaEuiccDataResponseError ::= SEQUENCE { + eimTransactionId [0] TransactionId OPTIONAL, + ipaEuiccDataErrorCode IpaEuiccDataErrorCode +} IpaEuiccDataResponse ::= [82] CHOICE { -- Tag 'BF52' ipaEuiccData IpaEuiccData, - ipaEuiccDataError INTEGER { - incorrectTagList (1), - euiccCiPKIdNotFound(5), - undefinedError(127) - } + ipaEuiccDataResponseError IpaEuiccDataResponseError } IpaEuiccData ::= SEQUENCE { defaultSmdpAddress [0] UTF8String OPTIONAL, -- Tag '80' @@ -309,6 +316,7 @@ associationToken [4] INTEGER OPTIONAL, -- Tag '84' eumCertificate [5] Certificate OPTIONAL, -- Tag 'A5' euiccCertificate [6] Certificate OPTIONAL, -- Tag 'A6' + eimTransactionId [7] TransactionId OPTIONAL, -- Tag '87' ipaCapabilities [8] IpaCapabilities OPTIONAL, -- Tag '88' deviceInfo [9] DeviceInfo OPTIONAL, -- Tag 'A9' notificationsList [43] SGP32-RetrieveNotificationsListResponse OPTIONAL -- Tag 'BF2B'. diff --git a/src/ipa/libasn/CMakeLists.txt b/src/ipa/libasn/CMakeLists.txt index 5ca748e..f9166bd 100644 --- a/src/ipa/libasn/CMakeLists.txt +++ b/src/ipa/libasn/CMakeLists.txt @@ -465,10 +465,14 @@ IpaCapabilities.c IpaCapabilities.h IpaEuiccData.c +IpaEuiccDataErrorCode.c +IpaEuiccDataErrorCode.h IpaEuiccData.h IpaEuiccDataRequest.c IpaEuiccDataRequest.h IpaEuiccDataResponse.c +IpaEuiccDataResponseError.c +IpaEuiccDataResponseError.h IpaEuiccDataResponse.h IpaMode.c IpaMode.h diff --git a/src/ipa/libasn/IpaEuiccData.c b/src/ipa/libasn/IpaEuiccData.c index 0b7d59c..3f44929 100644 --- a/src/ipa/libasn/IpaEuiccData.c +++ b/src/ipa/libasn/IpaEuiccData.c @@ -8,7 +8,7 @@ #include "IpaEuiccData.h" asn_TYPE_member_t asn_MBR_IpaEuiccData_1[] = { - { ATF_POINTER, 10, offsetof(struct IpaEuiccData, defaultSmdpAddress), + { ATF_POINTER, 11, offsetof(struct IpaEuiccData, defaultSmdpAddress), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_UTF8String, @@ -17,7 +17,7 @@ 0, 0, /* No default value */ "defaultSmdpAddress" }, - { ATF_POINTER, 9, offsetof(struct IpaEuiccData, euiccInfo1), + { ATF_POINTER, 10, offsetof(struct IpaEuiccData, euiccInfo1), (ASN_TAG_CLASS_CONTEXT | (32 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_EUICCInfo1, @@ -26,7 +26,7 @@ 0, 0, /* No default value */ "euiccInfo1" }, - { ATF_POINTER, 8, offsetof(struct IpaEuiccData, euiccInfo2), + { ATF_POINTER, 9, offsetof(struct IpaEuiccData, euiccInfo2), (ASN_TAG_CLASS_CONTEXT | (34 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_SGP32_EUICCInfo2, @@ -35,7 +35,7 @@ 0, 0, /* No default value */ "euiccInfo2" }, - { ATF_POINTER, 7, offsetof(struct IpaEuiccData, rootSmdsAddress), + { ATF_POINTER, 8, offsetof(struct IpaEuiccData, rootSmdsAddress), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_UTF8String, @@ -44,7 +44,7 @@ 0, 0, /* No default value */ "rootSmdsAddress" }, - { ATF_POINTER, 6, offsetof(struct IpaEuiccData, associationToken), + { ATF_POINTER, 7, offsetof(struct IpaEuiccData, associationToken), (ASN_TAG_CLASS_CONTEXT | (4 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_NativeInteger, @@ -53,7 +53,7 @@ 0, 0, /* No default value */ "associationToken" }, - { ATF_POINTER, 5, offsetof(struct IpaEuiccData, eumCertificate), + { ATF_POINTER, 6, offsetof(struct IpaEuiccData, eumCertificate), (ASN_TAG_CLASS_CONTEXT | (5 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_Certificate, @@ -62,7 +62,7 @@ 0, 0, /* No default value */ "eumCertificate" }, - { ATF_POINTER, 4, offsetof(struct IpaEuiccData, euiccCertificate), + { ATF_POINTER, 5, offsetof(struct IpaEuiccData, euiccCertificate), (ASN_TAG_CLASS_CONTEXT | (6 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_Certificate, @@ -71,6 +71,15 @@ 0, 0, /* No default value */ "euiccCertificate" }, + { ATF_POINTER, 4, offsetof(struct IpaEuiccData, eimTransactionId), + (ASN_TAG_CLASS_CONTEXT | (7 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_TransactionId, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eimTransactionId" + }, { ATF_POINTER, 3, offsetof(struct IpaEuiccData, ipaCapabilities), (ASN_TAG_CLASS_CONTEXT | (8 << 2)), -1, /* IMPLICIT tag at current level */ @@ -99,7 +108,7 @@ "notificationsList" }, }; -static const int asn_MAP_IpaEuiccData_oms_1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; +static const int asn_MAP_IpaEuiccData_oms_1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; static const ber_tlv_tag_t asn_DEF_IpaEuiccData_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; @@ -109,20 +118,21 @@ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* associationToken */ { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* eumCertificate */ { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* euiccCertificate */ - { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 7, 0, 0 }, /* ipaCapabilities */ - { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 8, 0, 0 }, /* deviceInfo */ + { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* eimTransactionId */ + { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 }, /* ipaCapabilities */ + { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 9, 0, 0 }, /* deviceInfo */ { (ASN_TAG_CLASS_CONTEXT | (32 << 2)), 1, 0, 0 }, /* euiccInfo1 */ { (ASN_TAG_CLASS_CONTEXT | (34 << 2)), 2, 0, 0 }, /* euiccInfo2 */ - { (ASN_TAG_CLASS_CONTEXT | (43 << 2)), 9, 0, 0 } /* notificationsList */ + { (ASN_TAG_CLASS_CONTEXT | (43 << 2)), 10, 0, 0 } /* notificationsList */ }; asn_SEQUENCE_specifics_t asn_SPC_IpaEuiccData_specs_1 = { sizeof(struct IpaEuiccData), offsetof(struct IpaEuiccData, _asn_ctx), asn_MAP_IpaEuiccData_tag2el_1, - 10, /* Count of tags in the map */ + 11, /* Count of tags in the map */ asn_MAP_IpaEuiccData_oms_1, /* Optional members */ - 10, 0, /* Root/Additions */ - 10, /* First extension addition */ + 11, 0, /* Root/Additions */ + 11, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_IpaEuiccData = { "IpaEuiccData", @@ -136,7 +146,7 @@ /sizeof(asn_DEF_IpaEuiccData_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_IpaEuiccData_1, - 10, /* Elements count */ + 11, /* Elements count */ &asn_SPC_IpaEuiccData_specs_1 /* Additional specs */ }; diff --git a/src/ipa/libasn/IpaEuiccData.h b/src/ipa/libasn/IpaEuiccData.h index 755e6de..bf8dc38 100644 --- a/src/ipa/libasn/IpaEuiccData.h +++ b/src/ipa/libasn/IpaEuiccData.h @@ -14,6 +14,7 @@ /* Including external dependencies */ #include <UTF8String.h> #include <NativeInteger.h> +#include "TransactionId.h" #include <constr_SEQUENCE.h> #ifdef __cplusplus @@ -37,6 +38,7 @@ long *associationToken /* OPTIONAL */; struct Certificate *eumCertificate /* OPTIONAL */; struct Certificate *euiccCertificate /* OPTIONAL */; + TransactionId_t *eimTransactionId /* OPTIONAL */; struct IpaCapabilities *ipaCapabilities /* OPTIONAL */; struct DeviceInfo *deviceInfo /* OPTIONAL */; struct SGP32_RetrieveNotificationsListResponse *notificationsList /* OPTIONAL */; @@ -52,7 +54,7 @@ /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_IpaEuiccData; extern asn_SEQUENCE_specifics_t asn_SPC_IpaEuiccData_specs_1; -extern asn_TYPE_member_t asn_MBR_IpaEuiccData_1[10]; +extern asn_TYPE_member_t asn_MBR_IpaEuiccData_1[11]; #ifdef __cplusplus } diff --git a/src/ipa/libasn/IpaEuiccDataErrorCode.c b/src/ipa/libasn/IpaEuiccDataErrorCode.c new file mode 100644 index 0000000..731ed27 --- /dev/null +++ b/src/ipa/libasn/IpaEuiccDataErrorCode.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 "IpaEuiccDataErrorCode.h" + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_IpaEuiccDataErrorCode_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_IpaEuiccDataErrorCode = { + "IpaEuiccDataErrorCode", + "IpaEuiccDataErrorCode", + &asn_OP_NativeInteger, + asn_DEF_IpaEuiccDataErrorCode_tags_1, + sizeof(asn_DEF_IpaEuiccDataErrorCode_tags_1) + /sizeof(asn_DEF_IpaEuiccDataErrorCode_tags_1[0]), /* 1 */ + asn_DEF_IpaEuiccDataErrorCode_tags_1, /* Same as above */ + sizeof(asn_DEF_IpaEuiccDataErrorCode_tags_1) + /sizeof(asn_DEF_IpaEuiccDataErrorCode_tags_1[0]), /* 1 */ + { 0, 0, NativeInteger_constraint }, + 0, 0, /* Defined elsewhere */ + 0 /* No specifics */ +}; + diff --git a/src/ipa/libasn/IpaEuiccDataErrorCode.h b/src/ipa/libasn/IpaEuiccDataErrorCode.h new file mode 100644 index 0000000..78aa1e2 --- /dev/null +++ b/src/ipa/libasn/IpaEuiccDataErrorCode.h @@ -0,0 +1,51 @@ +/* + * 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 _IpaEuiccDataErrorCode_H_ +#define _IpaEuiccDataErrorCode_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include <NativeInteger.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum IpaEuiccDataErrorCode { + IpaEuiccDataErrorCode_incorrectTagList = 1, + IpaEuiccDataErrorCode_euiccCiPKIdNotFound = 5, + IpaEuiccDataErrorCode_ecallActive = 104, + IpaEuiccDataErrorCode_undefinedError = 127 +} e_IpaEuiccDataErrorCode; + +/* IpaEuiccDataErrorCode */ +typedef long IpaEuiccDataErrorCode_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_IpaEuiccDataErrorCode; +asn_struct_free_f IpaEuiccDataErrorCode_free; +asn_struct_print_f IpaEuiccDataErrorCode_print; +asn_constr_check_f IpaEuiccDataErrorCode_constraint; +ber_type_decoder_f IpaEuiccDataErrorCode_decode_ber; +der_type_encoder_f IpaEuiccDataErrorCode_encode_der; +xer_type_decoder_f IpaEuiccDataErrorCode_decode_xer; +xer_type_encoder_f IpaEuiccDataErrorCode_encode_xer; +oer_type_decoder_f IpaEuiccDataErrorCode_decode_oer; +oer_type_encoder_f IpaEuiccDataErrorCode_encode_oer; +per_type_decoder_f IpaEuiccDataErrorCode_decode_uper; +per_type_encoder_f IpaEuiccDataErrorCode_encode_uper; + +#ifdef __cplusplus +} +#endif + +#endif /* _IpaEuiccDataErrorCode_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libasn/IpaEuiccDataRequest.c b/src/ipa/libasn/IpaEuiccDataRequest.c index a790d61..fa1924d 100644 --- a/src/ipa/libasn/IpaEuiccDataRequest.c +++ b/src/ipa/libasn/IpaEuiccDataRequest.c @@ -84,7 +84,7 @@ 0, 0, /* No default value */ "tagList" }, - { ATF_POINTER, 2, offsetof(struct IpaEuiccDataRequest, euiccCiPKIdentifierToBeUsed), + { ATF_POINTER, 3, offsetof(struct IpaEuiccDataRequest, euiccCiPKIdentifierToBeUsed), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_OCTET_STRING, @@ -93,7 +93,7 @@ 0, 0, /* No default value */ "euiccCiPKIdentifierToBeUsed" }, - { ATF_POINTER, 1, offsetof(struct IpaEuiccDataRequest, searchCriteriaNotification), + { ATF_POINTER, 2, offsetof(struct IpaEuiccDataRequest, searchCriteriaNotification), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_searchCriteriaNotification_4, @@ -102,8 +102,17 @@ 0, 0, /* No default value */ "searchCriteriaNotification" }, + { ATF_POINTER, 1, offsetof(struct IpaEuiccDataRequest, eimTransactionId), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_TransactionId, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eimTransactionId" + }, }; -static const int asn_MAP_IpaEuiccDataRequest_oms_1[] = { 1, 2 }; +static const int asn_MAP_IpaEuiccDataRequest_oms_1[] = { 1, 2, 3 }; static const ber_tlv_tag_t asn_DEF_IpaEuiccDataRequest_tags_1[] = { (ASN_TAG_CLASS_CONTEXT | (82 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) @@ -111,16 +120,17 @@ static const asn_TYPE_tag2member_t asn_MAP_IpaEuiccDataRequest_tag2el_1[] = { { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, 0, 0 }, /* euiccCiPKIdentifierToBeUsed */ { (ASN_TAG_CLASS_APPLICATION | (28 << 2)), 0, 0, 0 }, /* tagList */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 } /* searchCriteriaNotification */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 }, /* searchCriteriaNotification */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* eimTransactionId */ }; asn_SEQUENCE_specifics_t asn_SPC_IpaEuiccDataRequest_specs_1 = { sizeof(struct IpaEuiccDataRequest), offsetof(struct IpaEuiccDataRequest, _asn_ctx), asn_MAP_IpaEuiccDataRequest_tag2el_1, - 3, /* Count of tags in the map */ + 4, /* Count of tags in the map */ asn_MAP_IpaEuiccDataRequest_oms_1, /* Optional members */ - 2, 0, /* Root/Additions */ - 3, /* First extension addition */ + 3, 0, /* Root/Additions */ + 4, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_IpaEuiccDataRequest = { "IpaEuiccDataRequest", @@ -134,7 +144,7 @@ /sizeof(asn_DEF_IpaEuiccDataRequest_tags_1[0]), /* 2 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_IpaEuiccDataRequest_1, - 3, /* Elements count */ + 4, /* Elements count */ &asn_SPC_IpaEuiccDataRequest_specs_1 /* Additional specs */ }; diff --git a/src/ipa/libasn/IpaEuiccDataRequest.h b/src/ipa/libasn/IpaEuiccDataRequest.h index d40dfaf..c4f0a87 100644 --- a/src/ipa/libasn/IpaEuiccDataRequest.h +++ b/src/ipa/libasn/IpaEuiccDataRequest.h @@ -13,6 +13,7 @@ /* Including external dependencies */ #include <OCTET_STRING.h> +#include "TransactionId.h" #include <NativeInteger.h> #include "NotificationEvent.h" #include <NULL.h> @@ -52,6 +53,7 @@ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } *searchCriteriaNotification; + TransactionId_t *eimTransactionId /* OPTIONAL */; /* * This type is extensible, * possible extensions are below. @@ -64,7 +66,7 @@ /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_IpaEuiccDataRequest; extern asn_SEQUENCE_specifics_t asn_SPC_IpaEuiccDataRequest_specs_1; -extern asn_TYPE_member_t asn_MBR_IpaEuiccDataRequest_1[3]; +extern asn_TYPE_member_t asn_MBR_IpaEuiccDataRequest_1[4]; #ifdef __cplusplus } diff --git a/src/ipa/libasn/IpaEuiccDataResponse.c b/src/ipa/libasn/IpaEuiccDataResponse.c index ae935e7..8b0f8c7 100644 --- a/src/ipa/libasn/IpaEuiccDataResponse.c +++ b/src/ipa/libasn/IpaEuiccDataResponse.c @@ -25,14 +25,14 @@ 0, 0, /* No default value */ "ipaEuiccData" }, - { ATF_NOFLAGS, 0, offsetof(struct IpaEuiccDataResponse, choice.ipaEuiccDataError), + { ATF_NOFLAGS, 0, offsetof(struct IpaEuiccDataResponse, choice.ipaEuiccDataResponseError), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ - &asn_DEF_NativeInteger, + &asn_DEF_IpaEuiccDataResponseError, 0, { 0, 0, 0 }, 0, 0, /* No default value */ - "ipaEuiccDataError" + "ipaEuiccDataResponseError" }, }; static const ber_tlv_tag_t asn_DEF_IpaEuiccDataResponse_tags_1[] = { @@ -40,7 +40,7 @@ }; static const asn_TYPE_tag2member_t asn_MAP_IpaEuiccDataResponse_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ipaEuiccData */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ipaEuiccDataError */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ipaEuiccDataResponseError */ }; asn_CHOICE_specifics_t asn_SPC_IpaEuiccDataResponse_specs_1 = { sizeof(struct IpaEuiccDataResponse), diff --git a/src/ipa/libasn/IpaEuiccDataResponse.h b/src/ipa/libasn/IpaEuiccDataResponse.h index 0e1ae58..b0f1143 100644 --- a/src/ipa/libasn/IpaEuiccDataResponse.h +++ b/src/ipa/libasn/IpaEuiccDataResponse.h @@ -13,7 +13,7 @@ /* Including external dependencies */ #include "IpaEuiccData.h" -#include <NativeInteger.h> +#include "IpaEuiccDataResponseError.h" #include <constr_CHOICE.h> #ifdef __cplusplus @@ -24,22 +24,17 @@ typedef enum IpaEuiccDataResponse_PR { IpaEuiccDataResponse_PR_NOTHING, /* No components present */ IpaEuiccDataResponse_PR_ipaEuiccData, - IpaEuiccDataResponse_PR_ipaEuiccDataError + IpaEuiccDataResponse_PR_ipaEuiccDataResponseError /* Extensions may appear below */ } IpaEuiccDataResponse_PR; -typedef enum IpaEuiccDataResponse__ipaEuiccDataError { - IpaEuiccDataResponse__ipaEuiccDataError_incorrectTagList = 1, - IpaEuiccDataResponse__ipaEuiccDataError_euiccCiPKIdNotFound = 5, - IpaEuiccDataResponse__ipaEuiccDataError_undefinedError = 127 -} e_IpaEuiccDataResponse__ipaEuiccDataError; /* IpaEuiccDataResponse */ typedef struct IpaEuiccDataResponse { IpaEuiccDataResponse_PR present; union IpaEuiccDataResponse_u { IpaEuiccData_t ipaEuiccData; - long ipaEuiccDataError; + IpaEuiccDataResponseError_t ipaEuiccDataResponseError; /* * This type is extensible, * possible extensions are below. diff --git a/src/ipa/libasn/IpaEuiccDataResponseError.c b/src/ipa/libasn/IpaEuiccDataResponseError.c new file mode 100644 index 0000000..045bed2 --- /dev/null +++ b/src/ipa/libasn/IpaEuiccDataResponseError.c @@ -0,0 +1,62 @@ +/* + * 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 "IpaEuiccDataResponseError.h" + +asn_TYPE_member_t asn_MBR_IpaEuiccDataResponseError_1[] = { + { ATF_POINTER, 1, offsetof(struct IpaEuiccDataResponseError, eimTransactionId), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_TransactionId, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eimTransactionId" + }, + { ATF_NOFLAGS, 0, offsetof(struct IpaEuiccDataResponseError, ipaEuiccDataErrorCode), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_IpaEuiccDataErrorCode, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ipaEuiccDataErrorCode" + }, +}; +static const int asn_MAP_IpaEuiccDataResponseError_oms_1[] = { 0 }; +static const ber_tlv_tag_t asn_DEF_IpaEuiccDataResponseError_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_IpaEuiccDataResponseError_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* ipaEuiccDataErrorCode */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* eimTransactionId */ +}; +asn_SEQUENCE_specifics_t asn_SPC_IpaEuiccDataResponseError_specs_1 = { + sizeof(struct IpaEuiccDataResponseError), + offsetof(struct IpaEuiccDataResponseError, _asn_ctx), + asn_MAP_IpaEuiccDataResponseError_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_IpaEuiccDataResponseError_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_IpaEuiccDataResponseError = { + "IpaEuiccDataResponseError", + "IpaEuiccDataResponseError", + &asn_OP_SEQUENCE, + asn_DEF_IpaEuiccDataResponseError_tags_1, + sizeof(asn_DEF_IpaEuiccDataResponseError_tags_1) + /sizeof(asn_DEF_IpaEuiccDataResponseError_tags_1[0]), /* 1 */ + asn_DEF_IpaEuiccDataResponseError_tags_1, /* Same as above */ + sizeof(asn_DEF_IpaEuiccDataResponseError_tags_1) + /sizeof(asn_DEF_IpaEuiccDataResponseError_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_IpaEuiccDataResponseError_1, + 2, /* Elements count */ + &asn_SPC_IpaEuiccDataResponseError_specs_1 /* Additional specs */ +}; + diff --git a/src/ipa/libasn/IpaEuiccDataResponseError.h b/src/ipa/libasn/IpaEuiccDataResponseError.h new file mode 100644 index 0000000..0069679 --- /dev/null +++ b/src/ipa/libasn/IpaEuiccDataResponseError.h @@ -0,0 +1,46 @@ +/* + * 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 _IpaEuiccDataResponseError_H_ +#define _IpaEuiccDataResponseError_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include "TransactionId.h" +#include "IpaEuiccDataErrorCode.h" +#include <constr_SEQUENCE.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* IpaEuiccDataResponseError */ +typedef struct IpaEuiccDataResponseError { + TransactionId_t *eimTransactionId /* OPTIONAL */; + IpaEuiccDataErrorCode_t ipaEuiccDataErrorCode; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} IpaEuiccDataResponseError_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_IpaEuiccDataResponseError; +extern asn_SEQUENCE_specifics_t asn_SPC_IpaEuiccDataResponseError_specs_1; +extern asn_TYPE_member_t asn_MBR_IpaEuiccDataResponseError_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _IpaEuiccDataResponseError_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libipa/proc_euicc_data_req.c b/src/ipa/libipa/proc_euicc_data_req.c index ebfbf1d..2db088b 100644 --- a/src/ipa/libipa/proc_euicc_data_req.c +++ b/src/ipa/libipa/proc_euicc_data_req.c @@ -209,10 +209,13 @@ if (!prvde_eim_pkg_rslt_res) goto error; - if (ipa_euicc_data_response.present == IpaEuiccDataResponse_PR_ipaEuiccDataError) + if (ipa_euicc_data_response.present == IpaEuiccDataResponse_PR_ipaEuiccDataResponseError) { IPA_LOGP(SIPA, LINFO, "IPA get EUICC data failed, eIM is informed about the failure!\n"); - else + ipa_euicc_data_response.choice.ipaEuiccDataResponseError.eimTransactionId = pars->ipa_euicc_data_request->eimTransactionId; + } else { IPA_LOGP(SIPA, LINFO, "IPA get EUICC data succeeded!\n"); + ipa_euicc_data_response.choice.ipaEuiccData.eimTransactionId = pars->ipa_euicc_data_request->eimTransactionId; + } IPA_FREE(tag_list); ipa_es10a_get_euicc_cfg_addr_free(euicc_cfg_addr); -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43035?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: I34db78c4eb8461c154459204ec13a2184085e96a Gerrit-Change-Number: 43035 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
[M] Change in onomondo-ipa[master]: V1.2: Add size constraints to eimId
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43037?usp=email
) Change subject: V1.2: Add size constraints to eimId ...................................................................... V1.2: Add size constraints to eimId The remaining eimId in EuiccPackageResultDataSigned, EuiccPackageErrorDataSigned, EuiccPackageErrorUnsigned and EimIdInfo are now limited to 128 characters. The limit has no impact on the process. Assignments are made from other eimID of other structures that are also limited to 128. At some location the eimId is set from 'eim_id' of context structure, which is received by EimConfigurationData which is also limited to 128. Reference: SGP.32 Section 2.11.2 Related: SYS#8101 Change-Id: I5a0f52c0aa4851e802909f98d5a5677e596c4d7f --- M asn1/SGP32Definitions.asn M src/ipa/libasn/EimIdInfo.c M src/ipa/libasn/EuiccPackageErrorDataSigned.c M src/ipa/libasn/EuiccPackageErrorUnsigned.c M src/ipa/libasn/EuiccPackageResultDataSigned.c 5 files changed, 168 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/37/43037/1 diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index e97b418..bdaedd5 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -158,7 +158,7 @@ euiccSignEPR [APPLICATION 55] OCTET STRING -- Tag '5F37' } EuiccPackageResultDataSigned ::= SEQUENCE { -- #SupportedForPsmoV1.0.0# - eimId [0] UTF8String, + eimId [0] UTF8String (SIZE(1..128)), counterValue [1] INTEGER, eimTransactionId[2] TransactionId OPTIONAL, seqNumber [3] INTEGER, @@ -191,14 +191,14 @@ euiccSignEPE [APPLICATION 55] OCTET STRING -- Tag '5F37' } EuiccPackageErrorDataSigned ::= SEQUENCE { - eimId [0] UTF8String, + eimId [0] UTF8String (SIZE(1..128)), counterValue [1] INTEGER, transactionId [2] TransactionId OPTIONAL, euiccPackageErrorCode EuiccPackageErrorCode } EuiccPackageErrorCode ::= INTEGER { invalidEid(3), replayError(4), counterValueOutOfRange(6), sizeOverflow(15), undefinedError(127)} EuiccPackageErrorUnsigned ::= SEQUENCE { - eimId [0] UTF8String, + eimId [0] UTF8String (SIZE(1..128)), associationToken [4] INTEGER OPTIONAL } ConfigureImmediateEnableResult ::= INTEGER { @@ -287,7 +287,7 @@ } } EimIdInfo ::= SEQUENCE { - eimId [0] UTF8String, + eimId [0] UTF8String (SIZE(1..128)), eimIdType [4] EimIdType OPTIONAL -- present in case of eimIdTypeOid and eimIdTypeFqdn } -- ASN1STOP diff --git a/src/ipa/libasn/EimIdInfo.c b/src/ipa/libasn/EimIdInfo.c index d914e95..9dc4d68 100644 --- a/src/ipa/libasn/EimIdInfo.c +++ b/src/ipa/libasn/EimIdInfo.c @@ -7,13 +7,53 @@ #include "EimIdInfo.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_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 */ +}; asn_TYPE_member_t asn_MBR_EimIdInfo_1[] = { { ATF_NOFLAGS, 0, offsetof(struct EimIdInfo, eimId), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -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" }, diff --git a/src/ipa/libasn/EuiccPackageErrorDataSigned.c b/src/ipa/libasn/EuiccPackageErrorDataSigned.c index 6f69d84..59a6925 100644 --- a/src/ipa/libasn/EuiccPackageErrorDataSigned.c +++ b/src/ipa/libasn/EuiccPackageErrorDataSigned.c @@ -7,13 +7,53 @@ #include "EuiccPackageErrorDataSigned.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_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 */ +}; asn_TYPE_member_t asn_MBR_EuiccPackageErrorDataSigned_1[] = { { ATF_NOFLAGS, 0, offsetof(struct EuiccPackageErrorDataSigned, eimId), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -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" }, diff --git a/src/ipa/libasn/EuiccPackageErrorUnsigned.c b/src/ipa/libasn/EuiccPackageErrorUnsigned.c index e42a5cf..bf168e3 100644 --- a/src/ipa/libasn/EuiccPackageErrorUnsigned.c +++ b/src/ipa/libasn/EuiccPackageErrorUnsigned.c @@ -7,13 +7,53 @@ #include "EuiccPackageErrorUnsigned.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_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 */ +}; asn_TYPE_member_t asn_MBR_EuiccPackageErrorUnsigned_1[] = { { ATF_NOFLAGS, 0, offsetof(struct EuiccPackageErrorUnsigned, eimId), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -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" }, diff --git a/src/ipa/libasn/EuiccPackageResultDataSigned.c b/src/ipa/libasn/EuiccPackageResultDataSigned.c index f1e6b3a..b155424 100644 --- a/src/ipa/libasn/EuiccPackageResultDataSigned.c +++ b/src/ipa/libasn/EuiccPackageResultDataSigned.c @@ -7,6 +7,46 @@ #include "EuiccPackageResultDataSigned.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_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_euiccResult_6[] = { { ATF_POINTER, 0, 0, -1 /* Ambiguous tag (CHOICE?) */, @@ -49,7 +89,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/+/43037?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: I5a0f52c0aa4851e802909f98d5a5677e596c4d7f Gerrit-Change-Number: 43037 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
[S] Change in onomondo-ipa[master]: V1.2: Rename TransactionId in EuiccPackageResultDataSigned
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43036?usp=email
) Change subject: V1.2: Rename TransactionId in EuiccPackageResultDataSigned ...................................................................... V1.2: Rename TransactionId in EuiccPackageResultDataSigned Reference: SGP.32 Section 2.11.2 Related: SYS#8101 Change-Id: I5515bfbff91c1fb4ecd90bb151b499b223f7d673 --- M asn1/SGP32Definitions.asn M src/ipa/libasn/EuiccPackageResultDataSigned.c M src/ipa/libasn/EuiccPackageResultDataSigned.h M src/ipa/libipa/es10b_load_euicc_pkg.c 4 files changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/36/43036/1 diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index efe2e18..e97b418 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -160,7 +160,7 @@ EuiccPackageResultDataSigned ::= SEQUENCE { -- #SupportedForPsmoV1.0.0# eimId [0] UTF8String, counterValue [1] INTEGER, - transactionId[2] TransactionId OPTIONAL, + eimTransactionId[2] TransactionId OPTIONAL, seqNumber [3] INTEGER, euiccResult SEQUENCE OF EuiccResultData } diff --git a/src/ipa/libasn/EuiccPackageResultDataSigned.c b/src/ipa/libasn/EuiccPackageResultDataSigned.c index b8ef57a..f1e6b3a 100644 --- a/src/ipa/libasn/EuiccPackageResultDataSigned.c +++ b/src/ipa/libasn/EuiccPackageResultDataSigned.c @@ -62,14 +62,14 @@ 0, 0, /* No default value */ "counterValue" }, - { ATF_POINTER, 1, offsetof(struct EuiccPackageResultDataSigned, transactionId), + { ATF_POINTER, 1, offsetof(struct EuiccPackageResultDataSigned, eimTransactionId), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_TransactionId, 0, { 0, 0, 0 }, 0, 0, /* No default value */ - "transactionId" + "eimTransactionId" }, { ATF_NOFLAGS, 0, offsetof(struct EuiccPackageResultDataSigned, seqNumber), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), @@ -98,7 +98,7 @@ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, 0, 0 }, /* euiccResult */ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* eimId */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* counterValue */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* transactionId */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* eimTransactionId */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* seqNumber */ }; asn_SEQUENCE_specifics_t asn_SPC_EuiccPackageResultDataSigned_specs_1 = { diff --git a/src/ipa/libasn/EuiccPackageResultDataSigned.h b/src/ipa/libasn/EuiccPackageResultDataSigned.h index 63a4593..32616a5 100644 --- a/src/ipa/libasn/EuiccPackageResultDataSigned.h +++ b/src/ipa/libasn/EuiccPackageResultDataSigned.h @@ -30,7 +30,7 @@ typedef struct EuiccPackageResultDataSigned { UTF8String_t eimId; long counterValue; - TransactionId_t *transactionId /* OPTIONAL */; + TransactionId_t *eimTransactionId /* OPTIONAL */; long seqNumber; struct EuiccPackageResultDataSigned__euiccResult { A_SEQUENCE_OF(struct EuiccResultData) list; diff --git a/src/ipa/libipa/es10b_load_euicc_pkg.c b/src/ipa/libipa/es10b_load_euicc_pkg.c index ff1fc01..d328bd4 100644 --- a/src/ipa/libipa/es10b_load_euicc_pkg.c +++ b/src/ipa/libipa/es10b_load_euicc_pkg.c @@ -618,7 +618,7 @@ asn->choice.euiccPackageResultSigned.euiccPackageResultDataSigned.counterValue = req->req.euiccPackageSigned.counterValue; if (req->req.euiccPackageSigned.eimTransactionId) { - asn->choice.euiccPackageResultSigned.euiccPackageResultDataSigned.transactionId = + asn->choice.euiccPackageResultSigned.euiccPackageResultDataSigned.eimTransactionId = ipa_asn1c_dup(&asn_DEF_TransactionId, req->req.euiccPackageSigned.eimTransactionId); } asn->choice.euiccPackageResultSigned.euiccPackageResultDataSigned.seqNumber = 0; -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43036?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: I5515bfbff91c1fb4ecd90bb151b499b223f7d673 Gerrit-Change-Number: 43036 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
[L] Change in onomondo-ipa[master]: V1.2: Add new fields to ProfileInfo list
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
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(-) 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
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: newchange Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: I6667dba8dd84817cfee69daa1c44b98239fa171c Gerrit-Change-Number: 43032 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
[M] Change in onomondo-ipa[master]: V1.2: Rename searchCriteria of IpaEuiccDataRequest to searchCriteriaN...
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43034?usp=email
) Change subject: V1.2: Rename searchCriteria of IpaEuiccDataRequest to searchCriteriaNotification ...................................................................... V1.2: Rename searchCriteria of IpaEuiccDataRequest to searchCriteriaNotification Reference: SGP.32 Section 2.11.1.2 Related: SYS#8101 Change-Id: I245c2c1c1c5cdd2be387d515d1bf51d0bf82ef41 --- M asn1/SGP32Definitions.asn M src/ipa/libasn/IpaEuiccDataRequest.c M src/ipa/libasn/IpaEuiccDataRequest.h M src/ipa/libipa/es10b_retr_notif_from_lst.c M src/ipa/libipa/es10b_retr_notif_from_lst.h M src/ipa/libipa/proc_euicc_data_req.c 6 files changed, 42 insertions(+), 42 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/34/43034/1 diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index 8529f46..69175e1 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -115,7 +115,7 @@ IpaEuiccDataRequest ::= [82] SEQUENCE { -- Tag BF52 tagList [APPLICATION 28] OCTET STRING, -- Tag '5C' euiccCiPKIdentifierToBeUsed OCTET STRING OPTIONAL, -- CI Public Key Identifier (possibly truncated) supported on the eUICC for signature creation - searchCriteria [1] CHOICE { + searchCriteriaNotification [1] CHOICE { seqNumber [0] INTEGER, profileManagementOperation [1] NotificationEvent, euiccPackageResults [2] NULL diff --git a/src/ipa/libasn/IpaEuiccDataRequest.c b/src/ipa/libasn/IpaEuiccDataRequest.c index e382a58..a790d61 100644 --- a/src/ipa/libasn/IpaEuiccDataRequest.c +++ b/src/ipa/libasn/IpaEuiccDataRequest.c @@ -7,16 +7,16 @@ #include "IpaEuiccDataRequest.h" -static asn_oer_constraints_t asn_OER_type_searchCriteria_constr_4 CC_NOTUSED = { +static asn_oer_constraints_t asn_OER_type_searchCriteriaNotification_constr_4 CC_NOTUSED = { { 0, 0 }, -1}; -static asn_per_constraints_t asn_PER_type_searchCriteria_constr_4 CC_NOTUSED = { +static asn_per_constraints_t asn_PER_type_searchCriteriaNotification_constr_4 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; -static asn_TYPE_member_t asn_MBR_searchCriteria_4[] = { - { ATF_NOFLAGS, 0, offsetof(struct IpaEuiccDataRequest__searchCriteria, choice.seqNumber), +static asn_TYPE_member_t asn_MBR_searchCriteriaNotification_4[] = { + { ATF_NOFLAGS, 0, offsetof(struct IpaEuiccDataRequest__searchCriteriaNotification, choice.seqNumber), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_NativeInteger, @@ -25,7 +25,7 @@ 0, 0, /* No default value */ "seqNumber" }, - { ATF_NOFLAGS, 0, offsetof(struct IpaEuiccDataRequest__searchCriteria, choice.profileManagementOperation), + { ATF_NOFLAGS, 0, offsetof(struct IpaEuiccDataRequest__searchCriteriaNotification, choice.profileManagementOperation), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_NotificationEvent, @@ -34,7 +34,7 @@ 0, 0, /* No default value */ "profileManagementOperation" }, - { ATF_NOFLAGS, 0, offsetof(struct IpaEuiccDataRequest__searchCriteria, choice.euiccPackageResults), + { ATF_NOFLAGS, 0, offsetof(struct IpaEuiccDataRequest__searchCriteriaNotification, choice.euiccPackageResults), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_NULL, @@ -44,34 +44,34 @@ "euiccPackageResults" }, }; -static const asn_TYPE_tag2member_t asn_MAP_searchCriteria_tag2el_4[] = { +static const asn_TYPE_tag2member_t asn_MAP_searchCriteriaNotification_tag2el_4[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* seqNumber */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* profileManagementOperation */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* euiccPackageResults */ }; -static asn_CHOICE_specifics_t asn_SPC_searchCriteria_specs_4 = { - sizeof(struct IpaEuiccDataRequest__searchCriteria), - offsetof(struct IpaEuiccDataRequest__searchCriteria, _asn_ctx), - offsetof(struct IpaEuiccDataRequest__searchCriteria, present), - sizeof(((struct IpaEuiccDataRequest__searchCriteria *)0)->present), - asn_MAP_searchCriteria_tag2el_4, +static asn_CHOICE_specifics_t asn_SPC_searchCriteriaNotification_specs_4 = { + sizeof(struct IpaEuiccDataRequest__searchCriteriaNotification), + offsetof(struct IpaEuiccDataRequest__searchCriteriaNotification, _asn_ctx), + offsetof(struct IpaEuiccDataRequest__searchCriteriaNotification, present), + sizeof(((struct IpaEuiccDataRequest__searchCriteriaNotification *)0)->present), + asn_MAP_searchCriteriaNotification_tag2el_4, 3, /* Count of tags in the map */ 0, 0, 3 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_searchCriteria_4 = { - "searchCriteria", - "searchCriteria", +asn_TYPE_descriptor_t asn_DEF_searchCriteriaNotification_4 = { + "searchCriteriaNotification", + "searchCriteriaNotification", &asn_OP_CHOICE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ - { &asn_OER_type_searchCriteria_constr_4, &asn_PER_type_searchCriteria_constr_4, CHOICE_constraint }, - asn_MBR_searchCriteria_4, + { &asn_OER_type_searchCriteriaNotification_constr_4, &asn_PER_type_searchCriteriaNotification_constr_4, CHOICE_constraint }, + asn_MBR_searchCriteriaNotification_4, 3, /* Elements count */ - &asn_SPC_searchCriteria_specs_4 /* Additional specs */ + &asn_SPC_searchCriteriaNotification_specs_4 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_IpaEuiccDataRequest_1[] = { @@ -93,14 +93,14 @@ 0, 0, /* No default value */ "euiccCiPKIdentifierToBeUsed" }, - { ATF_POINTER, 1, offsetof(struct IpaEuiccDataRequest, searchCriteria), + { ATF_POINTER, 1, offsetof(struct IpaEuiccDataRequest, searchCriteriaNotification), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), +1, /* EXPLICIT tag at current level */ - &asn_DEF_searchCriteria_4, + &asn_DEF_searchCriteriaNotification_4, 0, { 0, 0, 0 }, 0, 0, /* No default value */ - "searchCriteria" + "searchCriteriaNotification" }, }; static const int asn_MAP_IpaEuiccDataRequest_oms_1[] = { 1, 2 }; @@ -111,7 +111,7 @@ static const asn_TYPE_tag2member_t asn_MAP_IpaEuiccDataRequest_tag2el_1[] = { { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, 0, 0 }, /* euiccCiPKIdentifierToBeUsed */ { (ASN_TAG_CLASS_APPLICATION | (28 << 2)), 0, 0, 0 }, /* tagList */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 } /* searchCriteria */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 } /* searchCriteriaNotification */ }; asn_SEQUENCE_specifics_t asn_SPC_IpaEuiccDataRequest_specs_1 = { sizeof(struct IpaEuiccDataRequest), diff --git a/src/ipa/libasn/IpaEuiccDataRequest.h b/src/ipa/libasn/IpaEuiccDataRequest.h index b2deef4..d40dfaf 100644 --- a/src/ipa/libasn/IpaEuiccDataRequest.h +++ b/src/ipa/libasn/IpaEuiccDataRequest.h @@ -24,22 +24,22 @@ #endif /* Dependencies */ -typedef enum IpaEuiccDataRequest__searchCriteria_PR { - IpaEuiccDataRequest__searchCriteria_PR_NOTHING, /* No components present */ - IpaEuiccDataRequest__searchCriteria_PR_seqNumber, - IpaEuiccDataRequest__searchCriteria_PR_profileManagementOperation, - IpaEuiccDataRequest__searchCriteria_PR_euiccPackageResults +typedef enum IpaEuiccDataRequest__searchCriteriaNotification_PR { + IpaEuiccDataRequest__searchCriteriaNotification_PR_NOTHING, /* No components present */ + IpaEuiccDataRequest__searchCriteriaNotification_PR_seqNumber, + IpaEuiccDataRequest__searchCriteriaNotification_PR_profileManagementOperation, + IpaEuiccDataRequest__searchCriteriaNotification_PR_euiccPackageResults /* Extensions may appear below */ -} IpaEuiccDataRequest__searchCriteria_PR; +} IpaEuiccDataRequest__searchCriteriaNotification_PR; /* IpaEuiccDataRequest */ typedef struct IpaEuiccDataRequest { OCTET_STRING_t tagList; OCTET_STRING_t *euiccCiPKIdentifierToBeUsed /* OPTIONAL */; - struct IpaEuiccDataRequest__searchCriteria { - IpaEuiccDataRequest__searchCriteria_PR present; - union IpaEuiccDataRequest__searchCriteria_u { + struct IpaEuiccDataRequest__searchCriteriaNotification { + IpaEuiccDataRequest__searchCriteriaNotification_PR present; + union IpaEuiccDataRequest__searchCriteriaNotification_u { long seqNumber; NotificationEvent_t profileManagementOperation; NULL_t euiccPackageResults; @@ -51,7 +51,7 @@ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; - } *searchCriteria; + } *searchCriteriaNotification; /* * This type is extensible, * possible extensions are below. diff --git a/src/ipa/libipa/es10b_retr_notif_from_lst.c b/src/ipa/libipa/es10b_retr_notif_from_lst.c index e8b444e..170f59a 100644 --- a/src/ipa/libipa/es10b_retr_notif_from_lst.c +++ b/src/ipa/libipa/es10b_retr_notif_from_lst.c @@ -159,17 +159,17 @@ if (req->dr_search_criteria) { /* Convert from foreigen searchCriteria (see comment in header file) */ switch (req->dr_search_criteria->present) { - case IpaEuiccDataRequest__searchCriteria_PR_seqNumber: + case IpaEuiccDataRequest__searchCriteriaNotification_PR_seqNumber: search_criteria.present = RetrieveNotificationsListRequest__searchCriteria_PR_seqNumber; search_criteria.choice.seqNumber = req->dr_search_criteria->choice.seqNumber; break; - case IpaEuiccDataRequest__searchCriteria_PR_profileManagementOperation: + case IpaEuiccDataRequest__searchCriteriaNotification_PR_profileManagementOperation: search_criteria.present = RetrieveNotificationsListRequest__searchCriteria_PR_profileManagementOperation; search_criteria.choice.profileManagementOperation = req->dr_search_criteria->choice.profileManagementOperation; break; - case IpaEuiccDataRequest__searchCriteria_PR_euiccPackageResults: + case IpaEuiccDataRequest__searchCriteriaNotification_PR_euiccPackageResults: IPA_LOGP_ES10X("RetrieveNotificationsList", LERROR, "unsupported euiccPackageResults searchCriteria in IpaEuiccDataRequest!\n"); search_criteria.present = RetrieveNotificationsListRequest__searchCriteria_PR_NOTHING; @@ -219,17 +219,17 @@ if (req->dr_search_criteria) { /* Convert from foreigen searchCriteria (see comment in header file) */ switch (req->dr_search_criteria->present) { - case IpaEuiccDataRequest__searchCriteria_PR_seqNumber: + case IpaEuiccDataRequest__searchCriteriaNotification_PR_seqNumber: search_criteria.present = SGP32_RetrieveNotificationsListRequest__searchCriteria_PR_seqNumber; search_criteria.choice.seqNumber = req->dr_search_criteria->choice.seqNumber; break; - case IpaEuiccDataRequest__searchCriteria_PR_profileManagementOperation: + case IpaEuiccDataRequest__searchCriteriaNotification_PR_profileManagementOperation: search_criteria.present = SGP32_RetrieveNotificationsListRequest__searchCriteria_PR_profileManagementOperation; search_criteria.choice.profileManagementOperation = req->dr_search_criteria->choice.profileManagementOperation; break; - case IpaEuiccDataRequest__searchCriteria_PR_euiccPackageResults: + case IpaEuiccDataRequest__searchCriteriaNotification_PR_euiccPackageResults: search_criteria.present = SGP32_RetrieveNotificationsListRequest__searchCriteria_PR_euiccPackageResults; search_criteria.choice.euiccPackageResults = diff --git a/src/ipa/libipa/es10b_retr_notif_from_lst.h b/src/ipa/libipa/es10b_retr_notif_from_lst.h index 84f3706..2773356 100644 --- a/src/ipa/libipa/es10b_retr_notif_from_lst.h +++ b/src/ipa/libipa/es10b_retr_notif_from_lst.h @@ -19,7 +19,7 @@ /* When the caller has access to a search searchCriteria that originates from an IpaEuiccDataRequest, the * pointer to it may be passed here. The function will then atomatically convert the searchCriteria into * the native RetrieveNotificationsListRequest format. */ - const struct IpaEuiccDataRequest__searchCriteria *dr_search_criteria; + const struct IpaEuiccDataRequest__searchCriteriaNotification *dr_search_criteria; }; struct ipa_es10b_retr_notif_from_lst_res { diff --git a/src/ipa/libipa/proc_euicc_data_req.c b/src/ipa/libipa/proc_euicc_data_req.c index 2e2ebc1..ebfbf1d 100644 --- a/src/ipa/libipa/proc_euicc_data_req.c +++ b/src/ipa/libipa/proc_euicc_data_req.c @@ -197,7 +197,7 @@ if (ipa_tag_in_taglist(0xBF2B, tag_list)) { IPA_LOGP(SIPA, LINFO, "eIM asks for List of Notifications and/or eUICC Package Results\n"); - retr_notif_from_lst_req.dr_search_criteria = pars->ipa_euicc_data_request->searchCriteria; + retr_notif_from_lst_req.dr_search_criteria = pars->ipa_euicc_data_request->searchCriteriaNotification; retr_notif_from_lst_res = ipa_es10b_retr_notif_from_lst(ctx, &retr_notif_from_lst_req); if (retr_notif_from_lst_res && retr_notif_from_lst_res->sgp32_res) ipa_euicc_data_response.choice.ipaEuiccData.notificationsList = retr_notif_from_lst_res->sgp32_res; -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43034?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: I245c2c1c1c5cdd2be387d515d1bf51d0bf82ef41 Gerrit-Change-Number: 43034 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
← Newer
1
...
9
10
11
12
13
14
15
...
51
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Results per page:
10
25
50
100
200