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
September
August
July
June
May
April
March
February
January
2025
December
November
October
September
August
July
June
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
List overview
Download
gerrit-log
July 2026
----- 2026 -----
September 2026
August 2026
July 2026
June 2026
May 2026
April 2026
March 2026
February 2026
January 2026
----- 2025 -----
December 2025
November 2025
October 2025
September 2025
August 2025
July 2025
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
gerrit-log@lists.osmocom.org
1 participants
869 discussions
Start a n
N
ew thread
[L] Change in onomondo-ipa[master]: V1.2: Add new fields to EUICCInfo2
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43051?usp=email
) Change subject: V1.2: Add new fields to EUICCInfo2 ...................................................................... V1.2: Add new fields to EUICCInfo2 Add fields euiccCiPKIdListForSigningV3, additionalEuiccInfo and highestSvn to EUICCInfo2. Also add fields to SGP.22 version of EUICCInfo2. The IoT eUICC emulation converts the fields that are now supported in both versions. These fields are only available if eUICC supports SGP.22 V3.0. Reference: SGP.32 Section 5.9.2 Related: SYS#8101 Change-Id: I808139f1b2bfde5fba5320bf7582afa5d8fe6019 --- M asn1/RSPDefinitions.asn M asn1/SGP32Definitions.asn M src/ipa/libasn/CMakeLists.txt M src/ipa/libasn/EUICCInfo2.c M src/ipa/libasn/EUICCInfo2.h A src/ipa/libasn/LpaMode.c A src/ipa/libasn/LpaMode.h M src/ipa/libasn/SGP32-EUICCInfo2.c M src/ipa/libasn/SGP32-EUICCInfo2.h M src/ipa/libipa/es10b_get_euicc_info.c 10 files changed, 269 insertions(+), 49 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/51/43051/1 diff --git a/asn1/RSPDefinitions.asn b/asn1/RSPDefinitions.asn index 5427515..2245831 100644 --- a/asn1/RSPDefinitions.asn +++ b/asn1/RSPDefinitions.asn @@ -70,7 +70,11 @@ usesRemoteMemory(2) -- refers to the usage of remote memory protected by the Remote Memory Protection Function described in SGP.21 [4] } OPTIONAL, treProductReference [14] UTF8String OPTIONAL, -- Platform_Label as defined in GlobalPlatform DLOA specification [57] - additionalEuiccProfilePackageVersions [15] SEQUENCE OF VersionType OPTIONAL + additionalEuiccProfilePackageVersions [15] SEQUENCE OF VersionType OPTIONAL, + lpaMode [16] LpaMode OPTIONAL, -- #MandatoryFromV3.0.0# active LPA + euiccCiPKIdListForSigningV3 [17] SEQUENCE OF SubjectKeyIdentifier OPTIONAL, -- #SupportedFromV3.0.0# List of eSIM CA RootCA Public Key Identifiers supported on the eUICC for signature creation that can be verified by a certificate chain different from Variant O. + additionalEuiccInfo [18] OCTET STRING (SIZE(0..32)) OPTIONAL, -- #SupportedFromV3.0.0# EUM specific eUICC information + highestSvn [19] VersionType OPTIONAL -- #SupportedFromV3.0.0# } -- Definition of RspCapability @@ -83,6 +87,12 @@ serviceSpecificDataSupport (5) -- support for Service Specific Data in the Profile Metadata } +-- Definition of LpaMode +LpaMode ::= INTEGER { + lpad (0), -- LPAd is active + lpae (1) -- LPAe is active +} + -- Definition of CertificationDataObject CertificationDataObject ::= SEQUENCE { platformLabel UTF8String, -- Platform_Label as defined in GlobalPlatform DLOA specification [57] diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index e4e193c..ee6478e 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -486,10 +486,9 @@ treProductReference [14] UTF8String OPTIONAL, -- Platform_Label as defined in GlobalPlatform DLOA specification [57] additionalEuiccProfilePackageVersions [15] SEQUENCE OF VersionType OPTIONAL, ipaMode [16] IpaMode OPTIONAL, -- active IPA, mandatory within SGP.32 - rfu2 [17] SEQUENCE OF SubjectKeyIdentifier OPTIONAL, -- not used by this version of SGP.32. - rfu3 [18] OCTET STRING (SIZE(0..32)) OPTIONAL, - -- not used by this version of SGP.32 - rfu4 [19] VersionType OPTIONAL, -- not used by this version of SGP.32 + euiccCiPKIdListForSigningV3 [17] SEQUENCE OF SubjectKeyIdentifier OPTIONAL, -- not used by this version of SGP.32. + additionalEuiccInfo [18] OCTET STRING (SIZE(0..32)) OPTIONAL, -- not used by this version of SGP.32 + highestSvn [19] VersionType OPTIONAL, -- not used by this version of SGP.32 iotSpecificInfo [20] IoTSpecificInfo OPTIONAL -- mandatory within SGP.32 } -- Definition of IoTSpecificInfo diff --git a/src/ipa/libasn/CMakeLists.txt b/src/ipa/libasn/CMakeLists.txt index 5a3dad1..82328de 100644 --- a/src/ipa/libasn/CMakeLists.txt +++ b/src/ipa/libasn/CMakeLists.txt @@ -530,6 +530,8 @@ LpaeActivationRequest.h LpaeActivationResponse.c LpaeActivationResponse.h +LpaMode.c +LpaMode.h MappingParameter.c MappingParameter.h Name.c diff --git a/src/ipa/libasn/EUICCInfo2.c b/src/ipa/libasn/EUICCInfo2.c index 298a973..76bb23a 100644 --- a/src/ipa/libasn/EUICCInfo2.c +++ b/src/ipa/libasn/EUICCInfo2.c @@ -39,6 +39,32 @@ } } +static int +memb_additionalEuiccInfo_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 <= 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 asn_oer_constraints_t asn_OER_memb_sasAcreditationNumber_constr_21 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..MAX)) */}; @@ -47,6 +73,14 @@ { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; +static asn_oer_constraints_t asn_OER_memb_additionalEuiccInfo_constr_33 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..32)) */}; +static asn_per_constraints_t asn_PER_memb_additionalEuiccInfo_constr_33 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 0, 32 } /* (SIZE(0..32)) */, + 0, 0 /* No PER value map */ +}; static asn_TYPE_member_t asn_MBR_euiccCiPKIdListForVerification_10[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), @@ -158,6 +192,43 @@ &asn_SPC_additionalEuiccProfilePackageVersions_specs_28 /* Additional specs */ }; +static asn_TYPE_member_t asn_MBR_euiccCiPKIdListForSigningV3_31[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, + &asn_DEF_SubjectKeyIdentifier, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_euiccCiPKIdListForSigningV3_tags_31[] = { + (ASN_TAG_CLASS_CONTEXT | (17 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_euiccCiPKIdListForSigningV3_specs_31 = { + sizeof(struct EUICCInfo2__euiccCiPKIdListForSigningV3), + offsetof(struct EUICCInfo2__euiccCiPKIdListForSigningV3, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_euiccCiPKIdListForSigningV3_31 = { + "euiccCiPKIdListForSigningV3", + "euiccCiPKIdListForSigningV3", + &asn_OP_SEQUENCE_OF, + asn_DEF_euiccCiPKIdListForSigningV3_tags_31, + sizeof(asn_DEF_euiccCiPKIdListForSigningV3_tags_31) + /sizeof(asn_DEF_euiccCiPKIdListForSigningV3_tags_31[0]) - 1, /* 1 */ + asn_DEF_euiccCiPKIdListForSigningV3_tags_31, /* Same as above */ + sizeof(asn_DEF_euiccCiPKIdListForSigningV3_tags_31) + /sizeof(asn_DEF_euiccCiPKIdListForSigningV3_tags_31[0]), /* 2 */ + { 0, 0, SEQUENCE_OF_constraint }, + asn_MBR_euiccCiPKIdListForSigningV3_31, + 1, /* Single element */ + &asn_SPC_euiccCiPKIdListForSigningV3_specs_31 /* Additional specs */ +}; + asn_TYPE_member_t asn_MBR_EUICCInfo2_1[] = { { ATF_NOFLAGS, 0, offsetof(struct EUICCInfo2, profileVersion), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), @@ -285,7 +356,7 @@ 0, 0, /* No default value */ "sasAcreditationNumber" }, - { ATF_POINTER, 4, offsetof(struct EUICCInfo2, certificationDataObject), + { ATF_POINTER, 8, offsetof(struct EUICCInfo2, certificationDataObject), (ASN_TAG_CLASS_CONTEXT | (12 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_CertificationDataObject, @@ -294,7 +365,7 @@ 0, 0, /* No default value */ "certificationDataObject" }, - { ATF_POINTER, 3, offsetof(struct EUICCInfo2, treProperties), + { ATF_POINTER, 7, offsetof(struct EUICCInfo2, treProperties), (ASN_TAG_CLASS_CONTEXT | (13 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_BIT_STRING, @@ -303,7 +374,7 @@ 0, 0, /* No default value */ "treProperties" }, - { ATF_POINTER, 2, offsetof(struct EUICCInfo2, treProductReference), + { ATF_POINTER, 6, offsetof(struct EUICCInfo2, treProductReference), (ASN_TAG_CLASS_CONTEXT | (14 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_UTF8String, @@ -312,7 +383,7 @@ 0, 0, /* No default value */ "treProductReference" }, - { ATF_POINTER, 1, offsetof(struct EUICCInfo2, additionalEuiccProfilePackageVersions), + { ATF_POINTER, 5, offsetof(struct EUICCInfo2, additionalEuiccProfilePackageVersions), (ASN_TAG_CLASS_CONTEXT | (15 << 2)), 0, &asn_DEF_additionalEuiccProfilePackageVersions_28, @@ -321,8 +392,44 @@ 0, 0, /* No default value */ "additionalEuiccProfilePackageVersions" }, + { ATF_POINTER, 4, offsetof(struct EUICCInfo2, lpaMode), + (ASN_TAG_CLASS_CONTEXT | (16 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_LpaMode, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "lpaMode" + }, + { ATF_POINTER, 3, offsetof(struct EUICCInfo2, euiccCiPKIdListForSigningV3), + (ASN_TAG_CLASS_CONTEXT | (17 << 2)), + 0, + &asn_DEF_euiccCiPKIdListForSigningV3_31, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "euiccCiPKIdListForSigningV3" + }, + { ATF_POINTER, 2, offsetof(struct EUICCInfo2, additionalEuiccInfo), + (ASN_TAG_CLASS_CONTEXT | (18 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { &asn_OER_memb_additionalEuiccInfo_constr_33, &asn_PER_memb_additionalEuiccInfo_constr_33, memb_additionalEuiccInfo_constraint_1 }, + 0, 0, /* No default value */ + "additionalEuiccInfo" + }, + { ATF_POINTER, 1, offsetof(struct EUICCInfo2, highestSvn), + (ASN_TAG_CLASS_CONTEXT | (19 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_VersionType, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "highestSvn" + }, }; -static const int asn_MAP_EUICCInfo2_oms_1[] = { 5, 6, 10, 11, 14, 15, 16, 17 }; +static const int asn_MAP_EUICCInfo2_oms_1[] = { 5, 6, 10, 11, 14, 15, 16, 17, 18, 19, 20, 21 }; static const ber_tlv_tag_t asn_DEF_EUICCInfo2_tags_1[] = { (ASN_TAG_CLASS_CONTEXT | (34 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) @@ -345,16 +452,20 @@ { (ASN_TAG_CLASS_CONTEXT | (13 << 2)), 15, 0, 0 }, /* treProperties */ { (ASN_TAG_CLASS_CONTEXT | (14 << 2)), 16, 0, 0 }, /* treProductReference */ { (ASN_TAG_CLASS_CONTEXT | (15 << 2)), 17, 0, 0 }, /* additionalEuiccProfilePackageVersions */ + { (ASN_TAG_CLASS_CONTEXT | (16 << 2)), 18, 0, 0 }, /* lpaMode */ + { (ASN_TAG_CLASS_CONTEXT | (17 << 2)), 19, 0, 0 }, /* euiccCiPKIdListForSigningV3 */ + { (ASN_TAG_CLASS_CONTEXT | (18 << 2)), 20, 0, 0 }, /* additionalEuiccInfo */ + { (ASN_TAG_CLASS_CONTEXT | (19 << 2)), 21, 0, 0 }, /* highestSvn */ { (ASN_TAG_CLASS_CONTEXT | (25 << 2)), 11, 0, 0 } /* forbiddenProfilePolicyRules */ }; asn_SEQUENCE_specifics_t asn_SPC_EUICCInfo2_specs_1 = { sizeof(struct EUICCInfo2), offsetof(struct EUICCInfo2, _asn_ctx), asn_MAP_EUICCInfo2_tag2el_1, - 18, /* Count of tags in the map */ + 22, /* Count of tags in the map */ asn_MAP_EUICCInfo2_oms_1, /* Optional members */ - 8, 0, /* Root/Additions */ - 18, /* First extension addition */ + 12, 0, /* Root/Additions */ + 22, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_EUICCInfo2 = { "EUICCInfo2", @@ -368,7 +479,7 @@ /sizeof(asn_DEF_EUICCInfo2_tags_1[0]), /* 2 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_EUICCInfo2_1, - 18, /* Elements count */ + 22, /* Elements count */ &asn_SPC_EUICCInfo2_specs_1 /* Additional specs */ }; diff --git a/src/ipa/libasn/EUICCInfo2.h b/src/ipa/libasn/EUICCInfo2.h index 79f1f07..0a0e801 100644 --- a/src/ipa/libasn/EUICCInfo2.h +++ b/src/ipa/libasn/EUICCInfo2.h @@ -20,6 +20,7 @@ #include "PprIds.h" #include <UTF8String.h> #include <BIT_STRING.h> +#include "LpaMode.h" #include "SubjectKeyIdentifier.h" #include <asn_SEQUENCE_OF.h> #include <constr_SEQUENCE_OF.h> @@ -80,6 +81,15 @@ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } *additionalEuiccProfilePackageVersions; + LpaMode_t *lpaMode /* OPTIONAL */; + struct EUICCInfo2__euiccCiPKIdListForSigningV3 { + A_SEQUENCE_OF(SubjectKeyIdentifier_t) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } *euiccCiPKIdListForSigningV3; + OCTET_STRING_t *additionalEuiccInfo /* OPTIONAL */; + VersionType_t *highestSvn /* OPTIONAL */; /* * This type is extensible, * possible extensions are below. @@ -92,7 +102,7 @@ /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_EUICCInfo2; extern asn_SEQUENCE_specifics_t asn_SPC_EUICCInfo2_specs_1; -extern asn_TYPE_member_t asn_MBR_EUICCInfo2_1[18]; +extern asn_TYPE_member_t asn_MBR_EUICCInfo2_1[22]; #ifdef __cplusplus } diff --git a/src/ipa/libasn/LpaMode.c b/src/ipa/libasn/LpaMode.c new file mode 100644 index 0000000..56ec505 --- /dev/null +++ b/src/ipa/libasn/LpaMode.c @@ -0,0 +1,31 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "RSPDefinitions" + * found in "../../../asn1/RSPDefinitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#include "LpaMode.h" + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_LpaMode_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_LpaMode = { + "LpaMode", + "LpaMode", + &asn_OP_NativeInteger, + asn_DEF_LpaMode_tags_1, + sizeof(asn_DEF_LpaMode_tags_1) + /sizeof(asn_DEF_LpaMode_tags_1[0]), /* 1 */ + asn_DEF_LpaMode_tags_1, /* Same as above */ + sizeof(asn_DEF_LpaMode_tags_1) + /sizeof(asn_DEF_LpaMode_tags_1[0]), /* 1 */ + { 0, 0, NativeInteger_constraint }, + 0, 0, /* Defined elsewhere */ + 0 /* No specifics */ +}; + diff --git a/src/ipa/libasn/LpaMode.h b/src/ipa/libasn/LpaMode.h new file mode 100644 index 0000000..ade9101 --- /dev/null +++ b/src/ipa/libasn/LpaMode.h @@ -0,0 +1,49 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "RSPDefinitions" + * found in "../../../asn1/RSPDefinitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#ifndef _LpaMode_H_ +#define _LpaMode_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include <NativeInteger.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum LpaMode { + LpaMode_lpad = 0, + LpaMode_lpae = 1 +} e_LpaMode; + +/* LpaMode */ +typedef long LpaMode_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_LpaMode; +asn_struct_free_f LpaMode_free; +asn_struct_print_f LpaMode_print; +asn_constr_check_f LpaMode_constraint; +ber_type_decoder_f LpaMode_decode_ber; +der_type_encoder_f LpaMode_encode_der; +xer_type_decoder_f LpaMode_decode_xer; +xer_type_encoder_f LpaMode_encode_xer; +oer_type_decoder_f LpaMode_decode_oer; +oer_type_encoder_f LpaMode_encode_oer; +per_type_decoder_f LpaMode_decode_uper; +per_type_encoder_f LpaMode_encode_uper; + +#ifdef __cplusplus +} +#endif + +#endif /* _LpaMode_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libasn/SGP32-EUICCInfo2.c b/src/ipa/libasn/SGP32-EUICCInfo2.c index cc5a6e4..d0b896b 100644 --- a/src/ipa/libasn/SGP32-EUICCInfo2.c +++ b/src/ipa/libasn/SGP32-EUICCInfo2.c @@ -40,7 +40,7 @@ } static int -memb_rfu3_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, +memb_additionalEuiccInfo_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; @@ -73,10 +73,10 @@ { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; -static asn_oer_constraints_t asn_OER_memb_rfu3_constr_33 CC_NOTUSED = { +static asn_oer_constraints_t asn_OER_memb_additionalEuiccInfo_constr_33 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..32)) */}; -static asn_per_constraints_t asn_PER_memb_rfu3_constr_33 CC_NOTUSED = { +static asn_per_constraints_t asn_PER_memb_additionalEuiccInfo_constr_33 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 6, 6, 0, 32 } /* (SIZE(0..32)) */, 0, 0 /* No PER value map */ @@ -192,7 +192,7 @@ &asn_SPC_additionalEuiccProfilePackageVersions_specs_28 /* Additional specs */ }; -static asn_TYPE_member_t asn_MBR_rfu2_31[] = { +static asn_TYPE_member_t asn_MBR_euiccCiPKIdListForSigningV3_31[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, @@ -203,30 +203,30 @@ "" }, }; -static const ber_tlv_tag_t asn_DEF_rfu2_tags_31[] = { +static const ber_tlv_tag_t asn_DEF_euiccCiPKIdListForSigningV3_tags_31[] = { (ASN_TAG_CLASS_CONTEXT | (17 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static asn_SET_OF_specifics_t asn_SPC_rfu2_specs_31 = { - sizeof(struct SGP32_EUICCInfo2__rfu2), - offsetof(struct SGP32_EUICCInfo2__rfu2, _asn_ctx), +static asn_SET_OF_specifics_t asn_SPC_euiccCiPKIdListForSigningV3_specs_31 = { + sizeof(struct SGP32_EUICCInfo2__euiccCiPKIdListForSigningV3), + offsetof(struct SGP32_EUICCInfo2__euiccCiPKIdListForSigningV3, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_rfu2_31 = { - "rfu2", - "rfu2", +asn_TYPE_descriptor_t asn_DEF_euiccCiPKIdListForSigningV3_31 = { + "euiccCiPKIdListForSigningV3", + "euiccCiPKIdListForSigningV3", &asn_OP_SEQUENCE_OF, - asn_DEF_rfu2_tags_31, - sizeof(asn_DEF_rfu2_tags_31) - /sizeof(asn_DEF_rfu2_tags_31[0]) - 1, /* 1 */ - asn_DEF_rfu2_tags_31, /* Same as above */ - sizeof(asn_DEF_rfu2_tags_31) - /sizeof(asn_DEF_rfu2_tags_31[0]), /* 2 */ + asn_DEF_euiccCiPKIdListForSigningV3_tags_31, + sizeof(asn_DEF_euiccCiPKIdListForSigningV3_tags_31) + /sizeof(asn_DEF_euiccCiPKIdListForSigningV3_tags_31[0]) - 1, /* 1 */ + asn_DEF_euiccCiPKIdListForSigningV3_tags_31, /* Same as above */ + sizeof(asn_DEF_euiccCiPKIdListForSigningV3_tags_31) + /sizeof(asn_DEF_euiccCiPKIdListForSigningV3_tags_31[0]), /* 2 */ { 0, 0, SEQUENCE_OF_constraint }, - asn_MBR_rfu2_31, + asn_MBR_euiccCiPKIdListForSigningV3_31, 1, /* Single element */ - &asn_SPC_rfu2_specs_31 /* Additional specs */ + &asn_SPC_euiccCiPKIdListForSigningV3_specs_31 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_SGP32_EUICCInfo2_1[] = { @@ -401,32 +401,32 @@ 0, 0, /* No default value */ "ipaMode" }, - { ATF_POINTER, 4, offsetof(struct SGP32_EUICCInfo2, rfu2), + { ATF_POINTER, 4, offsetof(struct SGP32_EUICCInfo2, euiccCiPKIdListForSigningV3), (ASN_TAG_CLASS_CONTEXT | (17 << 2)), 0, - &asn_DEF_rfu2_31, + &asn_DEF_euiccCiPKIdListForSigningV3_31, 0, { 0, 0, 0 }, 0, 0, /* No default value */ - "rfu2" + "euiccCiPKIdListForSigningV3" }, - { ATF_POINTER, 3, offsetof(struct SGP32_EUICCInfo2, rfu3), + { ATF_POINTER, 3, offsetof(struct SGP32_EUICCInfo2, additionalEuiccInfo), (ASN_TAG_CLASS_CONTEXT | (18 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_OCTET_STRING, 0, - { &asn_OER_memb_rfu3_constr_33, &asn_PER_memb_rfu3_constr_33, memb_rfu3_constraint_1 }, + { &asn_OER_memb_additionalEuiccInfo_constr_33, &asn_PER_memb_additionalEuiccInfo_constr_33, memb_additionalEuiccInfo_constraint_1 }, 0, 0, /* No default value */ - "rfu3" + "additionalEuiccInfo" }, - { ATF_POINTER, 2, offsetof(struct SGP32_EUICCInfo2, rfu4), + { ATF_POINTER, 2, offsetof(struct SGP32_EUICCInfo2, highestSvn), (ASN_TAG_CLASS_CONTEXT | (19 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_VersionType, 0, { 0, 0, 0 }, 0, 0, /* No default value */ - "rfu4" + "highestSvn" }, { ATF_POINTER, 1, offsetof(struct SGP32_EUICCInfo2, iotSpecificInfo), (ASN_TAG_CLASS_CONTEXT | (20 << 2)), @@ -462,9 +462,9 @@ { (ASN_TAG_CLASS_CONTEXT | (14 << 2)), 16, 0, 0 }, /* treProductReference */ { (ASN_TAG_CLASS_CONTEXT | (15 << 2)), 17, 0, 0 }, /* additionalEuiccProfilePackageVersions */ { (ASN_TAG_CLASS_CONTEXT | (16 << 2)), 18, 0, 0 }, /* ipaMode */ - { (ASN_TAG_CLASS_CONTEXT | (17 << 2)), 19, 0, 0 }, /* rfu2 */ - { (ASN_TAG_CLASS_CONTEXT | (18 << 2)), 20, 0, 0 }, /* rfu3 */ - { (ASN_TAG_CLASS_CONTEXT | (19 << 2)), 21, 0, 0 }, /* rfu4 */ + { (ASN_TAG_CLASS_CONTEXT | (17 << 2)), 19, 0, 0 }, /* euiccCiPKIdListForSigningV3 */ + { (ASN_TAG_CLASS_CONTEXT | (18 << 2)), 20, 0, 0 }, /* additionalEuiccInfo */ + { (ASN_TAG_CLASS_CONTEXT | (19 << 2)), 21, 0, 0 }, /* highestSvn */ { (ASN_TAG_CLASS_CONTEXT | (20 << 2)), 22, 0, 0 }, /* iotSpecificInfo */ { (ASN_TAG_CLASS_CONTEXT | (25 << 2)), 11, 0, 0 } /* forbiddenProfilePolicyRules */ }; diff --git a/src/ipa/libasn/SGP32-EUICCInfo2.h b/src/ipa/libasn/SGP32-EUICCInfo2.h index 55ff927..6c7c9d4 100644 --- a/src/ipa/libasn/SGP32-EUICCInfo2.h +++ b/src/ipa/libasn/SGP32-EUICCInfo2.h @@ -83,14 +83,14 @@ asn_struct_ctx_t _asn_ctx; } *additionalEuiccProfilePackageVersions; IpaMode_t *ipaMode /* OPTIONAL */; - struct SGP32_EUICCInfo2__rfu2 { + struct SGP32_EUICCInfo2__euiccCiPKIdListForSigningV3 { A_SEQUENCE_OF(SubjectKeyIdentifier_t) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; - } *rfu2; - OCTET_STRING_t *rfu3 /* OPTIONAL */; - VersionType_t *rfu4 /* OPTIONAL */; + } *euiccCiPKIdListForSigningV3; + OCTET_STRING_t *additionalEuiccInfo /* OPTIONAL */; + VersionType_t *highestSvn /* OPTIONAL */; struct IoTSpecificInfo *iotSpecificInfo /* OPTIONAL */; /* * This type is extensible, diff --git a/src/ipa/libipa/es10b_get_euicc_info.c b/src/ipa/libipa/es10b_get_euicc_info.c index db9c541..c795b6c 100644 --- a/src/ipa/libipa/es10b_get_euicc_info.c +++ b/src/ipa/libipa/es10b_get_euicc_info.c @@ -95,6 +95,14 @@ euicc_info_out->ppVersion = euicc_info_in->ppVersion; euicc_info_out->sasAcreditationNumber = euicc_info_in->sasAcreditationNumber; euicc_info_out->certificationDataObject = euicc_info_in->certificationDataObject; + euicc_info_out->treProperties = euicc_info_in->treProperties; + euicc_info_out->treProductReference = euicc_info_in->treProductReference; + euicc_info_out->additionalEuiccProfilePackageVersions = + (void *)euicc_info_in->additionalEuiccProfilePackageVersions; + euicc_info_out->ipaMode = euicc_info_in->lpaMode; + euicc_info_out->euiccCiPKIdListForSigningV3 = (void *)euicc_info_in->euiccCiPKIdListForSigningV3; + euicc_info_out->additionalEuiccInfo = euicc_info_in->additionalEuiccInfo; + euicc_info_out->highestSvn = euicc_info_in->highestSvn; } static int dec_get_euicc_info2(struct ipa_es10b_euicc_info *euicc_info, const struct ipa_buf *es10b_res) -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43051?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: I808139f1b2bfde5fba5320bf7582afa5d8fe6019 Gerrit-Change-Number: 43051 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
[L] Change in onomondo-ipa[master]: V1.2: Change fields in RetrieveNotificationsListResponse
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43053?usp=email
) Change subject: V1.2: Change fields in RetrieveNotificationsListResponse ...................................................................... V1.2: Change fields in RetrieveNotificationsListResponse Remove notificationAndEprList and restructure definitions in RetrieveNotificationsListResponse. This requires name changes in IPA process. The notificationAndEprList case is removed. Reference: SGP.32 Section 5.9.11 Related: SYS#8101 Change-Id: I757586e92c5eb1ca54ddf8ab6f71eb418de20f6e --- M asn1/SGP32Definitions.asn M src/ipa/libasn/SGP32-RetrieveNotificationsListResponse.c M src/ipa/libasn/SGP32-RetrieveNotificationsListResponse.h M src/ipa/libipa/es10b_retr_notif_from_lst.c 4 files changed, 20 insertions(+), 277 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/53/43053/1 diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index 8537460..09fda46 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -577,13 +577,9 @@ -- ASN1START SGP32-RetrieveNotificationsListResponse ::= [43] CHOICE { -- Tag 'BF2B' - notificationList SEQUENCE OF SGP32-PendingNotification, - notificationsListResultError INTEGER { undefinedError(127)}, - euiccPackageResultList SEQUENCE OF EuiccPackageResult, - notificationAndEprList SEQUENCE { - notificationList SEQUENCE OF SGP32-PendingNotification, - euiccPackageResultList SEQUENCE OF EuiccPackageResult - } + notificationList PendingNotificationList, -- Tag 'A0' + notificationsListResultError INTEGER { undefinedError(127)}, -- Tag '81' + euiccPackageResultList EuiccPackageResultList -- Tag 'A2' } -- ASN1STOP diff --git a/src/ipa/libasn/SGP32-RetrieveNotificationsListResponse.c b/src/ipa/libasn/SGP32-RetrieveNotificationsListResponse.c index 13b4b61..29fb7c0 100644 --- a/src/ipa/libasn/SGP32-RetrieveNotificationsListResponse.c +++ b/src/ipa/libasn/SGP32-RetrieveNotificationsListResponse.c @@ -11,216 +11,15 @@ { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_SGP32_RetrieveNotificationsListResponse_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 3 } /* (0..3,...) */, + { 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_notificationList_2[] = { - { 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_notificationList_tags_2[] = { - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static asn_SET_OF_specifics_t asn_SPC_notificationList_specs_2 = { - sizeof(struct SGP32_RetrieveNotificationsListResponse__notificationList), - offsetof(struct SGP32_RetrieveNotificationsListResponse__notificationList, _asn_ctx), - 2, /* XER encoding is XMLValueList */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_notificationList_2 = { - "notificationList", - "notificationList", - &asn_OP_SEQUENCE_OF, - asn_DEF_notificationList_tags_2, - sizeof(asn_DEF_notificationList_tags_2) - /sizeof(asn_DEF_notificationList_tags_2[0]) - 1, /* 1 */ - asn_DEF_notificationList_tags_2, /* Same as above */ - sizeof(asn_DEF_notificationList_tags_2) - /sizeof(asn_DEF_notificationList_tags_2[0]), /* 2 */ - { 0, 0, SEQUENCE_OF_constraint }, - asn_MBR_notificationList_2, - 1, /* Single element */ - &asn_SPC_notificationList_specs_2 /* Additional specs */ -}; - -static asn_TYPE_member_t asn_MBR_euiccPackageResultList_6[] = { - { 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_6[] = { - (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static asn_SET_OF_specifics_t asn_SPC_euiccPackageResultList_specs_6 = { - sizeof(struct SGP32_RetrieveNotificationsListResponse__euiccPackageResultList), - offsetof(struct SGP32_RetrieveNotificationsListResponse__euiccPackageResultList, _asn_ctx), - 2, /* XER encoding is XMLValueList */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_euiccPackageResultList_6 = { - "euiccPackageResultList", - "euiccPackageResultList", - &asn_OP_SEQUENCE_OF, - asn_DEF_euiccPackageResultList_tags_6, - sizeof(asn_DEF_euiccPackageResultList_tags_6) - /sizeof(asn_DEF_euiccPackageResultList_tags_6[0]) - 1, /* 1 */ - asn_DEF_euiccPackageResultList_tags_6, /* Same as above */ - sizeof(asn_DEF_euiccPackageResultList_tags_6) - /sizeof(asn_DEF_euiccPackageResultList_tags_6[0]), /* 2 */ - { 0, 0, SEQUENCE_OF_constraint }, - asn_MBR_euiccPackageResultList_6, - 1, /* Single element */ - &asn_SPC_euiccPackageResultList_specs_6 /* Additional specs */ -}; - -static asn_TYPE_member_t asn_MBR_notificationList_9[] = { - { 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_notificationList_tags_9[] = { - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static asn_SET_OF_specifics_t asn_SPC_notificationList_specs_9 = { - sizeof(struct SGP32_RetrieveNotificationsListResponse__notificationAndEprList__notificationList), - offsetof(struct SGP32_RetrieveNotificationsListResponse__notificationAndEprList__notificationList, _asn_ctx), - 2, /* XER encoding is XMLValueList */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_notificationList_9 = { - "notificationList", - "notificationList", - &asn_OP_SEQUENCE_OF, - asn_DEF_notificationList_tags_9, - sizeof(asn_DEF_notificationList_tags_9) - /sizeof(asn_DEF_notificationList_tags_9[0]) - 1, /* 1 */ - asn_DEF_notificationList_tags_9, /* Same as above */ - sizeof(asn_DEF_notificationList_tags_9) - /sizeof(asn_DEF_notificationList_tags_9[0]), /* 2 */ - { 0, 0, SEQUENCE_OF_constraint }, - asn_MBR_notificationList_9, - 1, /* Single element */ - &asn_SPC_notificationList_specs_9 /* Additional specs */ -}; - -static asn_TYPE_member_t asn_MBR_euiccPackageResultList_11[] = { - { 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_11[] = { - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static asn_SET_OF_specifics_t asn_SPC_euiccPackageResultList_specs_11 = { - sizeof(struct SGP32_RetrieveNotificationsListResponse__notificationAndEprList__euiccPackageResultList), - offsetof(struct SGP32_RetrieveNotificationsListResponse__notificationAndEprList__euiccPackageResultList, _asn_ctx), - 2, /* XER encoding is XMLValueList */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_euiccPackageResultList_11 = { - "euiccPackageResultList", - "euiccPackageResultList", - &asn_OP_SEQUENCE_OF, - asn_DEF_euiccPackageResultList_tags_11, - sizeof(asn_DEF_euiccPackageResultList_tags_11) - /sizeof(asn_DEF_euiccPackageResultList_tags_11[0]) - 1, /* 1 */ - asn_DEF_euiccPackageResultList_tags_11, /* Same as above */ - sizeof(asn_DEF_euiccPackageResultList_tags_11) - /sizeof(asn_DEF_euiccPackageResultList_tags_11[0]), /* 2 */ - { 0, 0, SEQUENCE_OF_constraint }, - asn_MBR_euiccPackageResultList_11, - 1, /* Single element */ - &asn_SPC_euiccPackageResultList_specs_11 /* Additional specs */ -}; - -static asn_TYPE_member_t asn_MBR_notificationAndEprList_8[] = { - { ATF_NOFLAGS, 0, offsetof(struct SGP32_RetrieveNotificationsListResponse__notificationAndEprList, notificationList), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - 0, - &asn_DEF_notificationList_9, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "notificationList" - }, - { ATF_NOFLAGS, 0, offsetof(struct SGP32_RetrieveNotificationsListResponse__notificationAndEprList, euiccPackageResultList), - (ASN_TAG_CLASS_CONTEXT | (1 << 2)), - 0, - &asn_DEF_euiccPackageResultList_11, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "euiccPackageResultList" - }, -}; -static const ber_tlv_tag_t asn_DEF_notificationAndEprList_tags_8[] = { - (ASN_TAG_CLASS_CONTEXT | (3 << 2)), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_notificationAndEprList_tag2el_8[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* notificationList */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* euiccPackageResultList */ -}; -static asn_SEQUENCE_specifics_t asn_SPC_notificationAndEprList_specs_8 = { - sizeof(struct SGP32_RetrieveNotificationsListResponse__notificationAndEprList), - offsetof(struct SGP32_RetrieveNotificationsListResponse__notificationAndEprList, _asn_ctx), - asn_MAP_notificationAndEprList_tag2el_8, - 2, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 2, /* First extension addition */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_notificationAndEprList_8 = { - "notificationAndEprList", - "notificationAndEprList", - &asn_OP_SEQUENCE, - asn_DEF_notificationAndEprList_tags_8, - sizeof(asn_DEF_notificationAndEprList_tags_8) - /sizeof(asn_DEF_notificationAndEprList_tags_8[0]) - 1, /* 1 */ - asn_DEF_notificationAndEprList_tags_8, /* Same as above */ - sizeof(asn_DEF_notificationAndEprList_tags_8) - /sizeof(asn_DEF_notificationAndEprList_tags_8[0]), /* 2 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_notificationAndEprList_8, - 2, /* Elements count */ - &asn_SPC_notificationAndEprList_specs_8 /* Additional specs */ -}; - asn_TYPE_member_t asn_MBR_SGP32_RetrieveNotificationsListResponse_1[] = { { ATF_NOFLAGS, 0, offsetof(struct SGP32_RetrieveNotificationsListResponse, choice.notificationList), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - 0, - &asn_DEF_notificationList_2, + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PendingNotificationList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ @@ -237,22 +36,13 @@ }, { ATF_NOFLAGS, 0, offsetof(struct SGP32_RetrieveNotificationsListResponse, choice.euiccPackageResultList), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), - 0, - &asn_DEF_euiccPackageResultList_6, + -1, /* IMPLICIT tag at current level */ + &asn_DEF_EuiccPackageResultList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "euiccPackageResultList" }, - { ATF_NOFLAGS, 0, offsetof(struct SGP32_RetrieveNotificationsListResponse, choice.notificationAndEprList), - (ASN_TAG_CLASS_CONTEXT | (3 << 2)), - 0, - &asn_DEF_notificationAndEprList_8, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "notificationAndEprList" - }, }; static const ber_tlv_tag_t asn_DEF_SGP32_RetrieveNotificationsListResponse_tags_1[] = { (ASN_TAG_CLASS_CONTEXT | (43 << 2)) @@ -260,8 +50,7 @@ static const asn_TYPE_tag2member_t asn_MAP_SGP32_RetrieveNotificationsListResponse_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* notificationList */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* notificationsListResultError */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* euiccPackageResultList */ - { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* notificationAndEprList */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* euiccPackageResultList */ }; asn_CHOICE_specifics_t asn_SPC_SGP32_RetrieveNotificationsListResponse_specs_1 = { sizeof(struct SGP32_RetrieveNotificationsListResponse), @@ -269,9 +58,9 @@ offsetof(struct SGP32_RetrieveNotificationsListResponse, present), sizeof(((struct SGP32_RetrieveNotificationsListResponse *)0)->present), asn_MAP_SGP32_RetrieveNotificationsListResponse_tag2el_1, - 4, /* Count of tags in the map */ + 3, /* Count of tags in the map */ 0, 0, - 4 /* Extensions start */ + 3 /* Extensions start */ }; asn_TYPE_descriptor_t asn_DEF_SGP32_RetrieveNotificationsListResponse = { "SGP32-RetrieveNotificationsListResponse", @@ -285,7 +74,7 @@ /sizeof(asn_DEF_SGP32_RetrieveNotificationsListResponse_tags_1[0]), /* 1 */ { &asn_OER_type_SGP32_RetrieveNotificationsListResponse_constr_1, &asn_PER_type_SGP32_RetrieveNotificationsListResponse_constr_1, CHOICE_constraint }, asn_MBR_SGP32_RetrieveNotificationsListResponse_1, - 4, /* Elements count */ + 3, /* Elements count */ &asn_SPC_SGP32_RetrieveNotificationsListResponse_specs_1 /* Additional specs */ }; diff --git a/src/ipa/libasn/SGP32-RetrieveNotificationsListResponse.h b/src/ipa/libasn/SGP32-RetrieveNotificationsListResponse.h index 4315f7e..380cffe 100644 --- a/src/ipa/libasn/SGP32-RetrieveNotificationsListResponse.h +++ b/src/ipa/libasn/SGP32-RetrieveNotificationsListResponse.h @@ -12,10 +12,9 @@ #include <asn_application.h> /* Including external dependencies */ +#include "PendingNotificationList.h" #include <NativeInteger.h> -#include <asn_SEQUENCE_OF.h> -#include <constr_SEQUENCE_OF.h> -#include <constr_SEQUENCE.h> +#include "EuiccPackageResultList.h" #include <constr_CHOICE.h> #ifdef __cplusplus @@ -27,8 +26,7 @@ SGP32_RetrieveNotificationsListResponse_PR_NOTHING, /* No components present */ SGP32_RetrieveNotificationsListResponse_PR_notificationList, SGP32_RetrieveNotificationsListResponse_PR_notificationsListResultError, - SGP32_RetrieveNotificationsListResponse_PR_euiccPackageResultList, - SGP32_RetrieveNotificationsListResponse_PR_notificationAndEprList + SGP32_RetrieveNotificationsListResponse_PR_euiccPackageResultList /* Extensions may appear below */ } SGP32_RetrieveNotificationsListResponse_PR; @@ -36,48 +34,13 @@ SGP32_RetrieveNotificationsListResponse__notificationsListResultError_undefinedError = 127 } e_SGP32_RetrieveNotificationsListResponse__notificationsListResultError; -/* Forward declarations */ -struct SGP32_PendingNotification; -struct EuiccPackageResult; - /* SGP32-RetrieveNotificationsListResponse */ typedef struct SGP32_RetrieveNotificationsListResponse { SGP32_RetrieveNotificationsListResponse_PR present; union SGP32_RetrieveNotificationsListResponse_u { - struct SGP32_RetrieveNotificationsListResponse__notificationList { - A_SEQUENCE_OF(struct SGP32_PendingNotification) list; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } notificationList; + PendingNotificationList_t notificationList; long notificationsListResultError; - struct SGP32_RetrieveNotificationsListResponse__euiccPackageResultList { - A_SEQUENCE_OF(struct EuiccPackageResult) list; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } euiccPackageResultList; - struct SGP32_RetrieveNotificationsListResponse__notificationAndEprList { - struct SGP32_RetrieveNotificationsListResponse__notificationAndEprList__notificationList { - A_SEQUENCE_OF(struct SGP32_PendingNotification) list; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } notificationList; - struct SGP32_RetrieveNotificationsListResponse__notificationAndEprList__euiccPackageResultList { - A_SEQUENCE_OF(struct EuiccPackageResult) list; - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } euiccPackageResultList; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } notificationAndEprList; + EuiccPackageResultList_t euiccPackageResultList; /* * This type is extensible, * possible extensions are below. @@ -91,16 +54,12 @@ /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_SGP32_RetrieveNotificationsListResponse; extern asn_CHOICE_specifics_t asn_SPC_SGP32_RetrieveNotificationsListResponse_specs_1; -extern asn_TYPE_member_t asn_MBR_SGP32_RetrieveNotificationsListResponse_1[4]; +extern asn_TYPE_member_t asn_MBR_SGP32_RetrieveNotificationsListResponse_1[3]; extern asn_per_constraints_t asn_PER_type_SGP32_RetrieveNotificationsListResponse_constr_1; #ifdef __cplusplus } #endif -/* Referred external types */ -#include "SGP32-PendingNotification.h" -#include "EuiccPackageResult.h" - #endif /* _SGP32_RetrieveNotificationsListResponse_H_ */ #include <asn_internal.h> diff --git a/src/ipa/libipa/es10b_retr_notif_from_lst.c b/src/ipa/libipa/es10b_retr_notif_from_lst.c index 170f59a..bd90b3a 100644 --- a/src/ipa/libipa/es10b_retr_notif_from_lst.c +++ b/src/ipa/libipa/es10b_retr_notif_from_lst.c @@ -24,7 +24,7 @@ #include "es10b_retr_notif_from_lst.h" /* Convert a notificationList (RetrieveNotificationsListResponse) from RSP to SGP32 format. */ -void convert_notification_list(struct SGP32_RetrieveNotificationsListResponse__notificationList *lst_out, +void convert_notification_list(PendingNotificationList_t *lst_out, const struct RetrieveNotificationsListResponse__notificationList *lst_in) { unsigned int i; @@ -67,7 +67,7 @@ } /*! Free a converted notificationList (RetrieveNotificationsListResponse). */ -void free_converted_notification_list(struct SGP32_RetrieveNotificationsListResponse__notificationList *lst) +void free_converted_notification_list(PendingNotificationList_t *lst) { int i; if (!lst) @@ -138,7 +138,6 @@ res->notif_lst_result_err, "(unknown)")); case SGP32_RetrieveNotificationsListResponse_PR_notificationList: case SGP32_RetrieveNotificationsListResponse_PR_euiccPackageResultList: - case SGP32_RetrieveNotificationsListResponse_PR_notificationAndEprList: /* Nothing to do */ break; default: -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43053?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: I757586e92c5eb1ca54ddf8ab6f71eb418de20f6e Gerrit-Change-Number: 43053 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.GetConnectivityParameters
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43054?usp=email
) Change subject: V1.2: Add function ES10b.GetConnectivityParameters ...................................................................... V1.2: Add function ES10b.GetConnectivityParameters Add new library function to get connectivity parameters from IoT eUICC. Also add an option to the command line interface to call the library function. The function cannot be emulated with non-IoT eUICC. Reference: SGP.32 Section 5.9.24 Related: SYS#8101 Change-Id: I075590e095dbbe05fa6cdb0a96d5b38c7a17ff78 --- M asn1/SGP32Definitions.asn M include/onomondo/ipa/ipad.h M src/ipa/libasn/CMakeLists.txt A src/ipa/libasn/ConnectivityParameters.c A src/ipa/libasn/ConnectivityParameters.h A src/ipa/libasn/ConnectivityParametersError.c A src/ipa/libasn/ConnectivityParametersError.h A src/ipa/libasn/GetConnectivityParametersRequest.c A src/ipa/libasn/GetConnectivityParametersRequest.h A src/ipa/libasn/GetConnectivityParametersResponse.c A src/ipa/libasn/GetConnectivityParametersResponse.h M src/ipa/libipa/CMakeLists.txt A src/ipa/libipa/es10b_get_conn_params.c A src/ipa/libipa/es10b_get_conn_params.h M src/ipa/libipa/ipad.c M src/ipa/main.c 16 files changed, 564 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/54/43054/1 diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index 09fda46..1f0edb7 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -723,6 +723,25 @@ } -- ASN1STOP +-- Section 5.9.24 +-- ASN1START +GetConnectivityParametersRequest ::= [95] SEQUENCE { -- Tag 'BF5F' +} +-- ASN1STOP +-- ASN1START +GetConnectivityParametersResponse ::= [95] CHOICE { -- Tag 'BF5F' + connectivityParameters ConnectivityParameters, + connectivityParametersError ConnectivityParametersError +} +ConnectivityParameters ::= SEQUENCE { + httpParams [1] OCTET STRING OPTIONAL -- Also used for CoAP +} +ConnectivityParametersError ::= INTEGER { + parametersNotAvailable(1), + undefinedError(127) +} +-- ASN1STOP + -- Section 5.9.25 -- ASN1START SGP32-SetDefaultDpAddressRequest ::= [101] SEQUENCE { -- Tag 'BF65' diff --git a/include/onomondo/ipa/ipad.h b/include/onomondo/ipa/ipad.h index defa530..ff3bd68 100644 --- a/include/onomondo/ipa/ipad.h +++ b/include/onomondo/ipa/ipad.h @@ -98,6 +98,7 @@ int ipa_return_from_fallback(struct ipa_context *ctx, bool refresh_flag); int ipa_enable_emergency_profile(struct ipa_context *ctx, bool refresh_flag); int ipa_disable_emergency_profile(struct ipa_context *ctx, bool refresh_flag); +int ipa_get_connnectivity_parameters(struct ipa_context *ctx, struct ipa_buf **http_params); int ipa_poll(struct ipa_context *ctx); void ipa_close(struct ipa_context *ctx); struct ipa_buf *ipa_free_ctx(struct ipa_context *ctx); diff --git a/src/ipa/libasn/CMakeLists.txt b/src/ipa/libasn/CMakeLists.txt index 82328de..b1f9d8a 100644 --- a/src/ipa/libasn/CMakeLists.txt +++ b/src/ipa/libasn/CMakeLists.txt @@ -194,6 +194,10 @@ ConfigureImmediateProfileEnablingResponse.h ConfigureISDPRequest.c ConfigureISDPRequest.h +ConnectivityParameters.c +ConnectivityParametersError.c +ConnectivityParametersError.h +ConnectivityParameters.h constraints.c constraints.h constr_CHOICE.c @@ -411,6 +415,10 @@ GetCertsRequest.h GetCertsResponse.c GetCertsResponse.h +GetConnectivityParametersRequest.c +GetConnectivityParametersRequest.h +GetConnectivityParametersResponse.c +GetConnectivityParametersResponse.h GetEimConfigurationDataRequest.c GetEimConfigurationDataRequest.h GetEimConfigurationDataResponse.c diff --git a/src/ipa/libasn/ConnectivityParameters.c b/src/ipa/libasn/ConnectivityParameters.c new file mode 100644 index 0000000..37c2e43 --- /dev/null +++ b/src/ipa/libasn/ConnectivityParameters.c @@ -0,0 +1,52 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#include "ConnectivityParameters.h" + +asn_TYPE_member_t asn_MBR_ConnectivityParameters_1[] = { + { ATF_POINTER, 1, offsetof(struct ConnectivityParameters, httpParams), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "httpParams" + }, +}; +static const int asn_MAP_ConnectivityParameters_oms_1[] = { 0 }; +static const ber_tlv_tag_t asn_DEF_ConnectivityParameters_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_ConnectivityParameters_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 } /* httpParams */ +}; +asn_SEQUENCE_specifics_t asn_SPC_ConnectivityParameters_specs_1 = { + sizeof(struct ConnectivityParameters), + offsetof(struct ConnectivityParameters, _asn_ctx), + asn_MAP_ConnectivityParameters_tag2el_1, + 1, /* Count of tags in the map */ + asn_MAP_ConnectivityParameters_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_ConnectivityParameters = { + "ConnectivityParameters", + "ConnectivityParameters", + &asn_OP_SEQUENCE, + asn_DEF_ConnectivityParameters_tags_1, + sizeof(asn_DEF_ConnectivityParameters_tags_1) + /sizeof(asn_DEF_ConnectivityParameters_tags_1[0]), /* 1 */ + asn_DEF_ConnectivityParameters_tags_1, /* Same as above */ + sizeof(asn_DEF_ConnectivityParameters_tags_1) + /sizeof(asn_DEF_ConnectivityParameters_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_ConnectivityParameters_1, + 1, /* Elements count */ + &asn_SPC_ConnectivityParameters_specs_1 /* Additional specs */ +}; + diff --git a/src/ipa/libasn/ConnectivityParameters.h b/src/ipa/libasn/ConnectivityParameters.h new file mode 100644 index 0000000..7174cea --- /dev/null +++ b/src/ipa/libasn/ConnectivityParameters.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#ifndef _ConnectivityParameters_H_ +#define _ConnectivityParameters_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include <OCTET_STRING.h> +#include <constr_SEQUENCE.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* ConnectivityParameters */ +typedef struct ConnectivityParameters { + OCTET_STRING_t *httpParams /* OPTIONAL */; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ConnectivityParameters_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ConnectivityParameters; +extern asn_SEQUENCE_specifics_t asn_SPC_ConnectivityParameters_specs_1; +extern asn_TYPE_member_t asn_MBR_ConnectivityParameters_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _ConnectivityParameters_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libasn/ConnectivityParametersError.c b/src/ipa/libasn/ConnectivityParametersError.c new file mode 100644 index 0000000..c42280c --- /dev/null +++ b/src/ipa/libasn/ConnectivityParametersError.c @@ -0,0 +1,31 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#include "ConnectivityParametersError.h" + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_ConnectivityParametersError_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_ConnectivityParametersError = { + "ConnectivityParametersError", + "ConnectivityParametersError", + &asn_OP_NativeInteger, + asn_DEF_ConnectivityParametersError_tags_1, + sizeof(asn_DEF_ConnectivityParametersError_tags_1) + /sizeof(asn_DEF_ConnectivityParametersError_tags_1[0]), /* 1 */ + asn_DEF_ConnectivityParametersError_tags_1, /* Same as above */ + sizeof(asn_DEF_ConnectivityParametersError_tags_1) + /sizeof(asn_DEF_ConnectivityParametersError_tags_1[0]), /* 1 */ + { 0, 0, NativeInteger_constraint }, + 0, 0, /* Defined elsewhere */ + 0 /* No specifics */ +}; + diff --git a/src/ipa/libasn/ConnectivityParametersError.h b/src/ipa/libasn/ConnectivityParametersError.h new file mode 100644 index 0000000..92f24b5 --- /dev/null +++ b/src/ipa/libasn/ConnectivityParametersError.h @@ -0,0 +1,49 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#ifndef _ConnectivityParametersError_H_ +#define _ConnectivityParametersError_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include <NativeInteger.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum ConnectivityParametersError { + ConnectivityParametersError_parametersNotAvailable = 1, + ConnectivityParametersError_undefinedError = 127 +} e_ConnectivityParametersError; + +/* ConnectivityParametersError */ +typedef long ConnectivityParametersError_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ConnectivityParametersError; +asn_struct_free_f ConnectivityParametersError_free; +asn_struct_print_f ConnectivityParametersError_print; +asn_constr_check_f ConnectivityParametersError_constraint; +ber_type_decoder_f ConnectivityParametersError_decode_ber; +der_type_encoder_f ConnectivityParametersError_encode_der; +xer_type_decoder_f ConnectivityParametersError_decode_xer; +xer_type_encoder_f ConnectivityParametersError_encode_xer; +oer_type_decoder_f ConnectivityParametersError_decode_oer; +oer_type_encoder_f ConnectivityParametersError_encode_oer; +per_type_decoder_f ConnectivityParametersError_decode_uper; +per_type_encoder_f ConnectivityParametersError_encode_uper; + +#ifdef __cplusplus +} +#endif + +#endif /* _ConnectivityParametersError_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libasn/GetConnectivityParametersRequest.c b/src/ipa/libasn/GetConnectivityParametersRequest.c new file mode 100644 index 0000000..2abebd7 --- /dev/null +++ b/src/ipa/libasn/GetConnectivityParametersRequest.c @@ -0,0 +1,36 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#include "GetConnectivityParametersRequest.h" + +static const ber_tlv_tag_t asn_DEF_GetConnectivityParametersRequest_tags_1[] = { + (ASN_TAG_CLASS_CONTEXT | (95 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SEQUENCE_specifics_t asn_SPC_GetConnectivityParametersRequest_specs_1 = { + sizeof(struct GetConnectivityParametersRequest), + offsetof(struct GetConnectivityParametersRequest, _asn_ctx), + 0, /* No top level tags */ + 0, /* No tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_GetConnectivityParametersRequest = { + "GetConnectivityParametersRequest", + "GetConnectivityParametersRequest", + &asn_OP_SEQUENCE, + asn_DEF_GetConnectivityParametersRequest_tags_1, + sizeof(asn_DEF_GetConnectivityParametersRequest_tags_1) + /sizeof(asn_DEF_GetConnectivityParametersRequest_tags_1[0]) - 1, /* 1 */ + asn_DEF_GetConnectivityParametersRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_GetConnectivityParametersRequest_tags_1) + /sizeof(asn_DEF_GetConnectivityParametersRequest_tags_1[0]), /* 2 */ + { 0, 0, SEQUENCE_constraint }, + 0, 0, /* No members */ + &asn_SPC_GetConnectivityParametersRequest_specs_1 /* Additional specs */ +}; + diff --git a/src/ipa/libasn/GetConnectivityParametersRequest.h b/src/ipa/libasn/GetConnectivityParametersRequest.h new file mode 100644 index 0000000..70c4c8f --- /dev/null +++ b/src/ipa/libasn/GetConnectivityParametersRequest.h @@ -0,0 +1,40 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#ifndef _GetConnectivityParametersRequest_H_ +#define _GetConnectivityParametersRequest_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include <constr_SEQUENCE.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* GetConnectivityParametersRequest */ +typedef struct GetConnectivityParametersRequest { + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GetConnectivityParametersRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GetConnectivityParametersRequest; + +#ifdef __cplusplus +} +#endif + +#endif /* _GetConnectivityParametersRequest_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libasn/GetConnectivityParametersResponse.c b/src/ipa/libasn/GetConnectivityParametersResponse.c new file mode 100644 index 0000000..a7b547a --- /dev/null +++ b/src/ipa/libasn/GetConnectivityParametersResponse.c @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#include "GetConnectivityParametersResponse.h" + +static asn_oer_constraints_t asn_OER_type_GetConnectivityParametersResponse_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_GetConnectivityParametersResponse_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_GetConnectivityParametersResponse_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct GetConnectivityParametersResponse, choice.connectivityParameters), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ConnectivityParameters, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "connectivityParameters" + }, + { ATF_NOFLAGS, 0, offsetof(struct GetConnectivityParametersResponse, choice.connectivityParametersError), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ConnectivityParametersError, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "connectivityParametersError" + }, +}; +static const ber_tlv_tag_t asn_DEF_GetConnectivityParametersResponse_tags_1[] = { + (ASN_TAG_CLASS_CONTEXT | (95 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_GetConnectivityParametersResponse_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* connectivityParameters */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* connectivityParametersError */ +}; +static asn_CHOICE_specifics_t asn_SPC_GetConnectivityParametersResponse_specs_1 = { + sizeof(struct GetConnectivityParametersResponse), + offsetof(struct GetConnectivityParametersResponse, _asn_ctx), + offsetof(struct GetConnectivityParametersResponse, present), + sizeof(((struct GetConnectivityParametersResponse *)0)->present), + asn_MAP_GetConnectivityParametersResponse_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_GetConnectivityParametersResponse = { + "GetConnectivityParametersResponse", + "GetConnectivityParametersResponse", + &asn_OP_CHOICE, + asn_DEF_GetConnectivityParametersResponse_tags_1, + sizeof(asn_DEF_GetConnectivityParametersResponse_tags_1) + /sizeof(asn_DEF_GetConnectivityParametersResponse_tags_1[0]), /* 1 */ + asn_DEF_GetConnectivityParametersResponse_tags_1, /* Same as above */ + sizeof(asn_DEF_GetConnectivityParametersResponse_tags_1) + /sizeof(asn_DEF_GetConnectivityParametersResponse_tags_1[0]), /* 1 */ + { &asn_OER_type_GetConnectivityParametersResponse_constr_1, &asn_PER_type_GetConnectivityParametersResponse_constr_1, CHOICE_constraint }, + asn_MBR_GetConnectivityParametersResponse_1, + 2, /* Elements count */ + &asn_SPC_GetConnectivityParametersResponse_specs_1 /* Additional specs */ +}; + diff --git a/src/ipa/libasn/GetConnectivityParametersResponse.h b/src/ipa/libasn/GetConnectivityParametersResponse.h new file mode 100644 index 0000000..940a2bc --- /dev/null +++ b/src/ipa/libasn/GetConnectivityParametersResponse.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#ifndef _GetConnectivityParametersResponse_H_ +#define _GetConnectivityParametersResponse_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include "ConnectivityParameters.h" +#include "ConnectivityParametersError.h" +#include <constr_CHOICE.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum GetConnectivityParametersResponse_PR { + GetConnectivityParametersResponse_PR_NOTHING, /* No components present */ + GetConnectivityParametersResponse_PR_connectivityParameters, + GetConnectivityParametersResponse_PR_connectivityParametersError + /* Extensions may appear below */ + +} GetConnectivityParametersResponse_PR; + +/* GetConnectivityParametersResponse */ +typedef struct GetConnectivityParametersResponse { + GetConnectivityParametersResponse_PR present; + union GetConnectivityParametersResponse_u { + ConnectivityParameters_t connectivityParameters; + ConnectivityParametersError_t connectivityParametersError; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} GetConnectivityParametersResponse_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_GetConnectivityParametersResponse; + +#ifdef __cplusplus +} +#endif + +#endif /* _GetConnectivityParametersResponse_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libipa/CMakeLists.txt b/src/ipa/libipa/CMakeLists.txt index d25b35b..e85d128 100644 --- a/src/ipa/libipa/CMakeLists.txt +++ b/src/ipa/libipa/CMakeLists.txt @@ -24,6 +24,7 @@ es10b_ret_from_fallback.c es10b_en_emerg_prfle.c es10b_dis_emerg_prfle.c + es10b_get_conn_params.c es10c_delete_prfle.c es10c_disable_prfle.c es10c_enable_prfle.c diff --git a/src/ipa/libipa/es10b_get_conn_params.c b/src/ipa/libipa/es10b_get_conn_params.c new file mode 100644 index 0000000..074c8b4 --- /dev/null +++ b/src/ipa/libipa/es10b_get_conn_params.c @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2026 sysmocom - s.f.m.c. GmbH. All rights reserved. + * + * SPDX-License-Identifier: AGPL-3.0-only + * + * Author: Philipp Maier <pmaier(a)sysmocom.de> / sysmocom - s.f.m.c. GmbH + * Andreas Eversberg <aeversberg(a)sysmocom.de> / sysmocom - s.f.m.c. GmbH + * + * See also: GSMA SGP.22, 5.9.20: Function (ES10b): ExecuteFallbackMechanism + */ + +#include <stdio.h> +#include <assert.h> +#include <onomondo/ipa/utils.h> +#include "context.h" +#include "utils.h" +#include "euicc.h" +#include "es10x.h" +#include "es10b_get_conn_params.h" +#include <GetConnectivityParametersRequest.h> + +static const struct num_str_map error_code_strings[] = { + { ConnectivityParametersError_parametersNotAvailable, "parametersNotAvailable" }, + { ConnectivityParametersError_undefinedError, "undefinedError" }, + { 0, NULL } +}; + +static int dec_get_conn_params_res(struct ipa_es10b_get_conn_params_res *res, const struct ipa_buf *es10b_res) +{ + struct GetConnectivityParametersResponse *asn = NULL; + + asn = ipa_es10x_res_dec(&asn_DEF_GetConnectivityParametersResponse, es10b_res, "GetConnectivityParameters"); + if (!asn) + return -EINVAL; + + switch (asn->present) { + case GetConnectivityParametersResponse_PR_connectivityParameters: + IPA_LOGP_ES10X("GetConnectivityParametersResponse", LERROR, "function succeeded!\n"); + break; + case GetConnectivityParametersResponse_PR_connectivityParametersError: + IPA_LOGP_ES10X("GetConnectivityParametersResponse", LERROR, "function failed with error code %ld=%s!\n", + asn->choice.connectivityParametersError, + ipa_str_from_num(error_code_strings, asn->choice.connectivityParametersError, "(unknown)")); + break; + default: + break; + } + + res->res = asn; + return 0; +} + +/*! Function (Es10b): GetConnectivityParameters. + * \param[inout] ctx pointer to ipa_context. + * \returns pointer newly allocated struct with function result, NULL on error. */ +struct ipa_es10b_get_conn_params_res *ipa_es10b_get_conn_params(struct ipa_context *ctx) +{ + struct ipa_buf *es10b_req = NULL; + struct ipa_buf *es10b_res = NULL; + struct GetConnectivityParametersRequest req = { 0 }; + struct ipa_es10b_get_conn_params_res *res = IPA_ALLOC_ZERO(struct ipa_es10b_get_conn_params_res); + int rc; + + es10b_req = ipa_es10x_req_enc(&asn_DEF_GetConnectivityParametersRequest, &req, "GetConnectivityParameters"); + if (!es10b_req) { + IPA_LOGP_ES10X("GetConnectivityParametersRequest", LERROR, "unable to encode Es10b request\n"); + goto error; + } + + es10b_res = ipa_euicc_transceive_es10x(ctx, es10b_req); + if (!es10b_res) { + IPA_LOGP_ES10X("GetConnectivityParametersRequest", LERROR, "no Es10b response\n"); + goto error; + } + + rc = dec_get_conn_params_res(res, es10b_res); + if (rc < 0) + goto error; + + IPA_FREE(es10b_req); + IPA_FREE(es10b_res); + return res; +error: + IPA_FREE(es10b_req); + IPA_FREE(es10b_res); + ipa_es10b_get_conn_params_res_free(res); + return NULL; +} + +/*! Free results of function (Es10b): GetConnectivityParameters. + * \param[in] res pointer to function result. */ +void ipa_es10b_get_conn_params_res_free(struct ipa_es10b_get_conn_params_res *res) +{ + IPA_ES10X_RES_FREE(asn_DEF_GetConnectivityParametersResponse, res); +} diff --git a/src/ipa/libipa/es10b_get_conn_params.h b/src/ipa/libipa/es10b_get_conn_params.h new file mode 100644 index 0000000..75feeca --- /dev/null +++ b/src/ipa/libipa/es10b_get_conn_params.h @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2026 sysmocom - s.f.m.c. GmbH. All rights reserved. + * + * SPDX-License-Identifier: AGPL-3.0-only + */ + +#pragma once + +#include <GetConnectivityParametersResponse.h> +struct ipa_context; + +struct ipa_es10b_get_conn_params_res { + struct GetConnectivityParametersResponse *res; +}; + +struct ipa_es10b_get_conn_params_res *ipa_es10b_get_conn_params(struct ipa_context *ctx); +void ipa_es10b_get_conn_params_res_free(struct ipa_es10b_get_conn_params_res *res); diff --git a/src/ipa/libipa/ipad.c b/src/ipa/libipa/ipad.c index 00ab37d..83e94a1 100644 --- a/src/ipa/libipa/ipad.c +++ b/src/ipa/libipa/ipad.c @@ -29,6 +29,7 @@ #include "es10b_ret_from_fallback.h" #include "es10b_en_emerg_prfle.h" #include "es10b_dis_emerg_prfle.h" +#include "es10b_get_conn_params.h" #include "proc_euicc_pkg_dwnld_exec.h" #include "proc_notif_delivery.h" @@ -373,6 +374,35 @@ return rc; } +/*! Get connectivity parameters from active profile. + * \param[inout] ctx pointer to ipa_context. + * \param[out] http_params pointer to the HTTP parameters pointer to be returned. + * \returns 0 on success, negative on error. */ +int ipa_get_connnectivity_parameters(struct ipa_context *ctx, struct ipa_buf **http_params) +{ + struct ipa_es10b_get_conn_params_res *res; + + *http_params = NULL; + + if (ctx->cfg->iot_euicc_emu_enabled) { + IPA_LOGP(SIPA, LERROR, "Unable to emulate retrieval of connectivity patameters.\n"); + return -ENOTSUP; + } + + res = ipa_es10b_get_conn_params(ctx); + if (!res) + return -EIO; + if (res->res->present == GetConnectivityParametersResponse_PR_connectivityParameters) { + if (res->res->choice.connectivityParameters.httpParams) { + ipa_buf_alloc_data(res->res->choice.connectivityParameters.httpParams->size, + res->res->choice.connectivityParameters.httpParams->buf); + } + } + ipa_es10b_get_conn_params_res_free(res); + + return 0; +} + 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 4352ee6..3e7b7a7 100644 --- a/src/ipa/main.c +++ b/src/ipa/main.c @@ -54,6 +54,7 @@ printf(" --enable-emergency-profile.. Trigger enabling of emergency profile\n"); printf(" --disable-emergency-profile. Trigger return from emergency profile to previous profile\n"); printf(" --refresh-flag.............. Make eUICC send a CAT refresh after switchting profile with the triggers above.\n"); + printf(" --getopt-get-conn-params.... Get connectivity parameters from acurrently active profile\n"); printf(" -n PATH .................... path to nvstate file (default: %s)\n", DEFAULT_NVSTATE_PATH); printf(" -y NUM ..................... number of retries for ESipa requests (default: %u)\n", DEFAULT_ESIPA_REQ_RETRIES); @@ -152,6 +153,7 @@ bool getopt_enable_emergency_profile = false; bool getopt_disable_emergency_profile = false; bool getopt_refresh_flag = false; + bool getopt_get_connectivity_params = false; char *getopt_nvstate_path = DEFAULT_NVSTATE_PATH; struct ipa_buf *nvstate_load = NULL; struct ipa_buf *nvstate_save = NULL; @@ -174,6 +176,7 @@ OPT_ENABLEEMGERGENCY, OPT_DISABLEEMGERGENCY, OPT_REFRESHFLAG, + OPT_GETCONNPARAMS, }; struct option long_options[] = { @@ -182,6 +185,7 @@ { "enable-emergency-profile", no_argument, NULL, OPT_ENABLEEMGERGENCY}, { "disable-emergency-profile", no_argument, NULL, OPT_DISABLEEMGERGENCY}, { "refresh-flag", no_argument, NULL, OPT_REFRESHFLAG}, + { "get-conn-params", no_argument, NULL, OPT_GETCONNPARAMS}, { NULL, 0, NULL, 0} }; @@ -229,6 +233,9 @@ case OPT_REFRESHFLAG: getopt_refresh_flag = true; break; + case OPT_GETCONNPARAMS: + getopt_get_connectivity_params = true; + break; case 'n': getopt_nvstate_path = optarg; break; @@ -322,6 +329,14 @@ } else if (getopt_disable_emergency_profile) { /* Trigger return from emergency profile to previous profile */ ipa_disable_emergency_profile(ctx, getopt_refresh_flag); + } else if (getopt_get_connectivity_params) { + struct ipa_buf *http_params; + /* Trigger return from emergency profile to previous profile */ + rc = ipa_get_connnectivity_parameters(ctx, &http_params); + if (rc < 0) + goto leave; + IPA_LOGP(SMAIN, LINFO, "HTTP paramms: %s\n", ipa_buf_hexdump(http_params)); + ipa_buf_free(http_params); } else { IPA_LOGP(SMAIN, LINFO, "-----------------------------8<-----------------------------\n"); rc = eim_init(ctx); -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43054?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: I075590e095dbbe05fa6cdb0a96d5b38c7a17ff78 Gerrit-Change-Number: 43054 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
[S] Change in onomondo-ipa[master]: V1.2: Add eimTransactionId to InitiateAuthenticationRequestEsipa
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43056?usp=email
) Change subject: V1.2: Add eimTransactionId to InitiateAuthenticationRequestEsipa ...................................................................... V1.2: Add eimTransactionId to InitiateAuthenticationRequestEsipa Add new eimTransactionId field to InitiateAuthenticationRequestEsipa. The eimTransactionId walks through the IPA process like this: * The eimTransactionId is retrieved from ProfileDownloadTriggerRequest at proc_eim_pkg_retr.c. * Then it is handed to the Common Mutual Authentication Procedure at proc_indirect_prfle_dwnld.c. * There it is handed to the InitiateAuthentication function at proc_cmn_mtl_auth.c. * There it is stored in initiateAuthenticationRequestEsipa at esipa_init_auth.c. Reference: SGP.32 Section 5.14.1 Related: SYS#8101 Change-Id: I1c8ef6fc0a3f7ab5735e401597fc8c6b2021fc09 --- M asn1/SGP32Definitions.asn M src/ipa/libasn/InitiateAuthenticationRequestEsipa.c M src/ipa/libasn/InitiateAuthenticationRequestEsipa.h M src/ipa/libipa/esipa_init_auth.c M src/ipa/libipa/esipa_init_auth.h M src/ipa/libipa/proc_cmn_mtl_auth.c M src/ipa/libipa/proc_cmn_mtl_auth.h M src/ipa/libipa/proc_eim_pkg_retr.c M src/ipa/libipa/proc_indirect_prfle_dwnld.c M src/ipa/libipa/proc_indirect_prfle_dwnld.h 10 files changed, 31 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/56/43056/1 diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index 14ee3cb..b99168b 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -870,7 +870,8 @@ InitiateAuthenticationRequestEsipa ::= [57] SEQUENCE { -- Tag 'BF39' euiccChallenge [1] Octet16, -- random eUICC challenge smdpAddress [3] UTF8String OPTIONAL, - euiccInfo1 EUICCInfo1 OPTIONAL + euiccInfo1 EUICCInfo1 OPTIONAL, + eimTransactionId [2] TransactionId OPTIONAL } InitiateAuthenticationResponseEsipa ::= [57] CHOICE { -- Tag 'BF39' initiateAuthenticationOkEsipa InitiateAuthenticationOkEsipa, diff --git a/src/ipa/libasn/InitiateAuthenticationRequestEsipa.c b/src/ipa/libasn/InitiateAuthenticationRequestEsipa.c index 1366a8d..f148fca 100644 --- a/src/ipa/libasn/InitiateAuthenticationRequestEsipa.c +++ b/src/ipa/libasn/InitiateAuthenticationRequestEsipa.c @@ -17,7 +17,7 @@ 0, 0, /* No default value */ "euiccChallenge" }, - { ATF_POINTER, 2, offsetof(struct InitiateAuthenticationRequestEsipa, smdpAddress), + { ATF_POINTER, 3, offsetof(struct InitiateAuthenticationRequestEsipa, smdpAddress), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_UTF8String, @@ -26,7 +26,7 @@ 0, 0, /* No default value */ "smdpAddress" }, - { ATF_POINTER, 1, offsetof(struct InitiateAuthenticationRequestEsipa, euiccInfo1), + { ATF_POINTER, 2, offsetof(struct InitiateAuthenticationRequestEsipa, euiccInfo1), (ASN_TAG_CLASS_CONTEXT | (32 << 2)), 0, &asn_DEF_EUICCInfo1, @@ -35,14 +35,24 @@ 0, 0, /* No default value */ "euiccInfo1" }, + { ATF_POINTER, 1, offsetof(struct InitiateAuthenticationRequestEsipa, eimTransactionId), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_TransactionId, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eimTransactionId" + }, }; -static const int asn_MAP_InitiateAuthenticationRequestEsipa_oms_1[] = { 1, 2 }; +static const int asn_MAP_InitiateAuthenticationRequestEsipa_oms_1[] = { 1, 2, 3 }; static const ber_tlv_tag_t asn_DEF_InitiateAuthenticationRequestEsipa_tags_1[] = { (ASN_TAG_CLASS_CONTEXT | (57 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_InitiateAuthenticationRequestEsipa_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* euiccChallenge */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 3, 0, 0 }, /* eimTransactionId */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 1, 0, 0 }, /* smdpAddress */ { (ASN_TAG_CLASS_CONTEXT | (32 << 2)), 2, 0, 0 } /* euiccInfo1 */ }; @@ -50,10 +60,10 @@ sizeof(struct InitiateAuthenticationRequestEsipa), offsetof(struct InitiateAuthenticationRequestEsipa, _asn_ctx), asn_MAP_InitiateAuthenticationRequestEsipa_tag2el_1, - 3, /* Count of tags in the map */ + 4, /* Count of tags in the map */ asn_MAP_InitiateAuthenticationRequestEsipa_oms_1, /* Optional members */ - 2, 0, /* Root/Additions */ - 3, /* First extension addition */ + 3, 0, /* Root/Additions */ + 4, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_InitiateAuthenticationRequestEsipa = { "InitiateAuthenticationRequestEsipa", @@ -67,7 +77,7 @@ /sizeof(asn_DEF_InitiateAuthenticationRequestEsipa_tags_1[0]), /* 2 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_InitiateAuthenticationRequestEsipa_1, - 3, /* Elements count */ + 4, /* Elements count */ &asn_SPC_InitiateAuthenticationRequestEsipa_specs_1 /* Additional specs */ }; diff --git a/src/ipa/libasn/InitiateAuthenticationRequestEsipa.h b/src/ipa/libasn/InitiateAuthenticationRequestEsipa.h index e043267..886081a 100644 --- a/src/ipa/libasn/InitiateAuthenticationRequestEsipa.h +++ b/src/ipa/libasn/InitiateAuthenticationRequestEsipa.h @@ -14,6 +14,7 @@ /* Including external dependencies */ #include "Octet16.h" #include <UTF8String.h> +#include "TransactionId.h" #include <constr_SEQUENCE.h> #ifdef __cplusplus @@ -28,6 +29,7 @@ Octet16_t euiccChallenge; UTF8String_t *smdpAddress /* OPTIONAL */; struct EUICCInfo1 *euiccInfo1 /* OPTIONAL */; + TransactionId_t *eimTransactionId /* OPTIONAL */; /* * This type is extensible, * possible extensions are below. @@ -40,7 +42,7 @@ /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_InitiateAuthenticationRequestEsipa; extern asn_SEQUENCE_specifics_t asn_SPC_InitiateAuthenticationRequestEsipa_specs_1; -extern asn_TYPE_member_t asn_MBR_InitiateAuthenticationRequestEsipa_1[3]; +extern asn_TYPE_member_t asn_MBR_InitiateAuthenticationRequestEsipa_1[4]; #ifdef __cplusplus } diff --git a/src/ipa/libipa/esipa_init_auth.c b/src/ipa/libipa/esipa_init_auth.c index 89a3e58..2e8532c 100644 --- a/src/ipa/libipa/esipa_init_auth.c +++ b/src/ipa/libipa/esipa_init_auth.c @@ -55,6 +55,9 @@ /* eUICC info */ msg_to_eim.choice.initiateAuthenticationRequestEsipa.euiccInfo1 = (EUICCInfo1_t *) req->euicc_info_1; + /* eIM transaction ID */ + msg_to_eim.choice.initiateAuthenticationRequestEsipa.eimTransactionId = req->eim_transaction_id; + /* Encode */ return ipa_esipa_msg_to_eim_enc(&msg_to_eim, "InitiateAuthentication"); } diff --git a/src/ipa/libipa/esipa_init_auth.h b/src/ipa/libipa/esipa_init_auth.h index 1f91c1c..06147bf 100644 --- a/src/ipa/libipa/esipa_init_auth.h +++ b/src/ipa/libipa/esipa_init_auth.h @@ -16,6 +16,7 @@ const uint8_t *euicc_challenge; const char *smdp_addr; const EUICCInfo1_t *euicc_info_1; + TransactionId_t *eim_transaction_id; }; struct ipa_esipa_init_auth_res { diff --git a/src/ipa/libipa/proc_cmn_mtl_auth.c b/src/ipa/libipa/proc_cmn_mtl_auth.c index df9fcc9..a8670ae 100644 --- a/src/ipa/libipa/proc_cmn_mtl_auth.c +++ b/src/ipa/libipa/proc_cmn_mtl_auth.c @@ -176,6 +176,7 @@ init_auth_req.euicc_challenge = euicc_challenge; init_auth_req.smdp_addr = (char *)pars->smdp_addr; init_auth_req.euicc_info_1 = euicc_info->euicc_info_1; + init_auth_req.eim_transaction_id = pars->eim_transaction_id; init_auth_res = ipa_esipa_init_auth(ctx, &init_auth_req); if (!init_auth_res) goto error; diff --git a/src/ipa/libipa/proc_cmn_mtl_auth.h b/src/ipa/libipa/proc_cmn_mtl_auth.h index a74fb69..a806735 100644 --- a/src/ipa/libipa/proc_cmn_mtl_auth.h +++ b/src/ipa/libipa/proc_cmn_mtl_auth.h @@ -16,6 +16,7 @@ const struct ipa_buf *allowed_ca; const char *smdp_addr; const char *ac_token; + TransactionId_t *eim_transaction_id; }; struct ipa_esipa_auth_clnt_res *ipa_proc_cmn_mtl_auth(struct ipa_context *ctx, diff --git a/src/ipa/libipa/proc_eim_pkg_retr.c b/src/ipa/libipa/proc_eim_pkg_retr.c index 59b6f99..b95eb4e 100644 --- a/src/ipa/libipa/proc_eim_pkg_retr.c +++ b/src/ipa/libipa/proc_eim_pkg_retr.c @@ -129,6 +129,7 @@ indirect_prfle_dwnlod_pars.ac = IPA_STR_FROM_ASN(&get_eim_pkg_res->dwnld_trigger_request->profileDownloadData-> choice.activationCode); + indirect_prfle_dwnlod_pars.eim_transaction_id = get_eim_pkg_res->dwnld_trigger_request->eimTransactionId; rc = ipa_proc_indirect_prfle_dwnlod(ctx, &indirect_prfle_dwnlod_pars); IPA_FREE((void *)indirect_prfle_dwnlod_pars.ac); if (rc < 0) diff --git a/src/ipa/libipa/proc_indirect_prfle_dwnld.c b/src/ipa/libipa/proc_indirect_prfle_dwnld.c index 045796a..9bc1467 100644 --- a/src/ipa/libipa/proc_indirect_prfle_dwnld.c +++ b/src/ipa/libipa/proc_indirect_prfle_dwnld.c @@ -55,6 +55,7 @@ cmn_mtl_auth_pars.allowed_ca = pars->allowed_ca; cmn_mtl_auth_pars.smdp_addr = activation_code->sm_dp_plus_address; cmn_mtl_auth_pars.ac_token = activation_code->ac_token; + cmn_mtl_auth_pars.eim_transaction_id = pars->eim_transaction_id; auth_clnt_res = ipa_proc_cmn_mtl_auth(ctx, &cmn_mtl_auth_pars); if (!auth_clnt_res) { IPA_LOGP(SIPA, LERROR, "cannot continue, mutual authentication failed!\n"); diff --git a/src/ipa/libipa/proc_indirect_prfle_dwnld.h b/src/ipa/libipa/proc_indirect_prfle_dwnld.h index a856b3d..15fb91c 100644 --- a/src/ipa/libipa/proc_indirect_prfle_dwnld.h +++ b/src/ipa/libipa/proc_indirect_prfle_dwnld.h @@ -15,6 +15,7 @@ const char *ac; const uint8_t *tac; const struct ipa_buf *allowed_ca; + TransactionId_t *eim_transaction_id; }; int ipa_proc_indirect_prfle_dwnlod(struct ipa_context *ctx, const struct ipa_proc_indirect_prfle_dwnlod_pars *pars); -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43056?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: I1c8ef6fc0a3f7ab5735e401597fc8c6b2021fc09 Gerrit-Change-Number: 43056 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
[L] Change in onomondo-ipa[master]: V1.2: Change fields in ProvideEimPackage(Result)
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43055?usp=email
) Change subject: V1.2: Change fields in ProvideEimPackage(Result) ...................................................................... V1.2: Change fields in ProvideEimPackage(Result) Change parameters in ProvideEimPackage and ProvideEimPackageResult. The structure is changed in IPA too. The new field eimTransactionId of EimPackageResultResponseError is filled with the eimTransactionId of IpaEuiccDataRequest, if exists. Reference: SGP.32 Section 5.14.6 Related: SYS#8101 Change-Id: I24baab4f9351aec27c58403b94974cba4b274c34 --- M asn1/SGP32Definitions.asn M src/ipa/libasn/CMakeLists.txt A src/ipa/libasn/EimPackageResult.c A src/ipa/libasn/EimPackageResult.h A src/ipa/libasn/EimPackageResultErrorCode.c A src/ipa/libasn/EimPackageResultErrorCode.h A src/ipa/libasn/EimPackageResultResponseError.c A src/ipa/libasn/EimPackageResultResponseError.h M src/ipa/libasn/ProvideEimPackageResult.c M src/ipa/libasn/ProvideEimPackageResult.h M src/ipa/libasn/ProvideEimPackageResultResponse.c M src/ipa/libasn/ProvideEimPackageResultResponse.h M src/ipa/libipa/esipa_prvde_eim_pkg_rslt.c M src/ipa/libipa/esipa_prvde_eim_pkg_rslt.h M src/ipa/libipa/proc_euicc_data_req.c M src/ipa/libipa/proc_euicc_pkg_dwnld_exec.c 16 files changed, 625 insertions(+), 220 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/55/43055/1 diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index 1f0edb7..14ee3cb 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -1006,23 +1006,39 @@ -- Section 6.3.2.7 -- ASN1START -ProvideEimPackageResult ::= [80] CHOICE { -- Tag 'BF50' +EimPackageResultErrorCode ::= INTEGER { + invalidPackageFormat(1), + unknownPackage(2), + undefinedError(127) +} +EimPackageResultResponseError ::= SEQUENCE { + eimTransactionId [0] TransactionId OPTIONAL, + eimPackageResultErrorCode EimPackageResultErrorCode +} +EimPackageResult ::= CHOICE { euiccPackageResult [81] EuiccPackageResult, -- Tag 'BF51' ePRAndNotifications SEQUENCE { euiccPackageResult [81] EuiccPackageResult, -- Tag 'BF51' - notificationList [43] SGP32-RetrieveNotificationsListResponse -- Tag 'BF2B' + notificationList [0] PendingNotificationList -- Tag 'A0' }, ipaEuiccDataResponse [82] IpaEuiccDataResponse, -- Tag 'BF52' profileDownloadTriggerResult [84] ProfileDownloadTriggerResult, -- Tag 'BF54' - eimPackageError INTEGER { - invalidPackageFormat(1), - unknownPackage(2), + eimPackageResultResponseError [0] EimPackageResultResponseError +} +ProvideEimPackageResult ::= [80] SEQUENCE { -- Tag 'BF50' + eidValue [APPLICATION 26] Octet16 OPTIONAL, -- Tag '5A' + eimPackageResult EimPackageResult +} +ProvideEimPackageResultResponse ::= [80] CHOICE { -- Tag 'BF50' + eimAcknowledgements [83] EimAcknowledgements, -- Tag 'BF53' + emptyResponse SEQUENCE {}, -- because EimAcknowledgements was OPTIONAL + provideEimPackageResultError INTEGER { + eidNotFound(2), + invalidEid(3), + missingEid(4), undefinedError(127) } } -ProvideEimPackageResultResponse ::= [80] SEQUENCE { -- Tag 'BF50' - eimAcknowledgements [83] EimAcknowledgements OPTIONAL -- Tag 'BF53' -} -- ASN1STOP -- Section 6.3.3.1 diff --git a/src/ipa/libasn/CMakeLists.txt b/src/ipa/libasn/CMakeLists.txt index b1f9d8a..3d5d649 100644 --- a/src/ipa/libasn/CMakeLists.txt +++ b/src/ipa/libasn/CMakeLists.txt @@ -287,6 +287,12 @@ EimIdInfo.h EimIdType.c EimIdType.h +EimPackageResult.c +EimPackageResultErrorCode.c +EimPackageResultErrorCode.h +EimPackageResult.h +EimPackageResultResponseError.c +EimPackageResultResponseError.h EimSupportedProtocol.c EimSupportedProtocol.h EmailAddress.c diff --git a/src/ipa/libasn/EimPackageResult.c b/src/ipa/libasn/EimPackageResult.c new file mode 100644 index 0000000..8963e6a --- /dev/null +++ b/src/ipa/libasn/EimPackageResult.c @@ -0,0 +1,150 @@ +/* + * 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 "EimPackageResult.h" + +static asn_oer_constraints_t asn_OER_type_EimPackageResult_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_EimPackageResult_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 4 } /* (0..4,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_ePRAndNotifications_3[] = { + { ATF_NOFLAGS, 0, offsetof(struct EimPackageResult__ePRAndNotifications, euiccPackageResult), + (ASN_TAG_CLASS_CONTEXT | (81 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_EuiccPackageResult, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "euiccPackageResult" + }, + { ATF_NOFLAGS, 0, offsetof(struct EimPackageResult__ePRAndNotifications, notificationList), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PendingNotificationList, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "notificationList" + }, +}; +static const ber_tlv_tag_t asn_DEF_ePRAndNotifications_tags_3[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_ePRAndNotifications_tag2el_3[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* notificationList */ + { (ASN_TAG_CLASS_CONTEXT | (81 << 2)), 0, 0, 0 } /* euiccPackageResult */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_ePRAndNotifications_specs_3 = { + sizeof(struct EimPackageResult__ePRAndNotifications), + offsetof(struct EimPackageResult__ePRAndNotifications, _asn_ctx), + asn_MAP_ePRAndNotifications_tag2el_3, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_ePRAndNotifications_3 = { + "ePRAndNotifications", + "ePRAndNotifications", + &asn_OP_SEQUENCE, + asn_DEF_ePRAndNotifications_tags_3, + sizeof(asn_DEF_ePRAndNotifications_tags_3) + /sizeof(asn_DEF_ePRAndNotifications_tags_3[0]), /* 1 */ + asn_DEF_ePRAndNotifications_tags_3, /* Same as above */ + sizeof(asn_DEF_ePRAndNotifications_tags_3) + /sizeof(asn_DEF_ePRAndNotifications_tags_3[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_ePRAndNotifications_3, + 2, /* Elements count */ + &asn_SPC_ePRAndNotifications_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_EimPackageResult_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct EimPackageResult, choice.euiccPackageResult), + (ASN_TAG_CLASS_CONTEXT | (81 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_EuiccPackageResult, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "euiccPackageResult" + }, + { ATF_NOFLAGS, 0, offsetof(struct EimPackageResult, choice.ePRAndNotifications), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_ePRAndNotifications_3, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ePRAndNotifications" + }, + { ATF_NOFLAGS, 0, offsetof(struct EimPackageResult, choice.ipaEuiccDataResponse), + (ASN_TAG_CLASS_CONTEXT | (82 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_IpaEuiccDataResponse, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ipaEuiccDataResponse" + }, + { ATF_NOFLAGS, 0, offsetof(struct EimPackageResult, choice.profileDownloadTriggerResult), + (ASN_TAG_CLASS_CONTEXT | (84 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProfileDownloadTriggerResult, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "profileDownloadTriggerResult" + }, + { ATF_NOFLAGS, 0, offsetof(struct EimPackageResult, choice.eimPackageResultResponseError), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_EimPackageResultResponseError, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eimPackageResultResponseError" + }, +}; +static const unsigned asn_MAP_EimPackageResult_to_canonical_1[] = { 1, 4, 0, 2, 3 }; +static const unsigned asn_MAP_EimPackageResult_from_canonical_1[] = { 2, 0, 3, 4, 1 }; +static const asn_TYPE_tag2member_t asn_MAP_EimPackageResult_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* ePRAndNotifications */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 4, 0, 0 }, /* eimPackageResultResponseError */ + { (ASN_TAG_CLASS_CONTEXT | (81 << 2)), 0, 0, 0 }, /* euiccPackageResult */ + { (ASN_TAG_CLASS_CONTEXT | (82 << 2)), 2, 0, 0 }, /* ipaEuiccDataResponse */ + { (ASN_TAG_CLASS_CONTEXT | (84 << 2)), 3, 0, 0 } /* profileDownloadTriggerResult */ +}; +asn_CHOICE_specifics_t asn_SPC_EimPackageResult_specs_1 = { + sizeof(struct EimPackageResult), + offsetof(struct EimPackageResult, _asn_ctx), + offsetof(struct EimPackageResult, present), + sizeof(((struct EimPackageResult *)0)->present), + asn_MAP_EimPackageResult_tag2el_1, + 5, /* Count of tags in the map */ + asn_MAP_EimPackageResult_to_canonical_1, + asn_MAP_EimPackageResult_from_canonical_1, + 5 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_EimPackageResult = { + "EimPackageResult", + "EimPackageResult", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_EimPackageResult_constr_1, &asn_PER_type_EimPackageResult_constr_1, CHOICE_constraint }, + asn_MBR_EimPackageResult_1, + 5, /* Elements count */ + &asn_SPC_EimPackageResult_specs_1 /* Additional specs */ +}; + diff --git a/src/ipa/libasn/EimPackageResult.h b/src/ipa/libasn/EimPackageResult.h new file mode 100644 index 0000000..5ece031 --- /dev/null +++ b/src/ipa/libasn/EimPackageResult.h @@ -0,0 +1,79 @@ +/* + * 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 _EimPackageResult_H_ +#define _EimPackageResult_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include "EuiccPackageResult.h" +#include "IpaEuiccDataResponse.h" +#include "ProfileDownloadTriggerResult.h" +#include "EimPackageResultResponseError.h" +#include "PendingNotificationList.h" +#include <constr_SEQUENCE.h> +#include <constr_CHOICE.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum EimPackageResult_PR { + EimPackageResult_PR_NOTHING, /* No components present */ + EimPackageResult_PR_euiccPackageResult, + EimPackageResult_PR_ePRAndNotifications, + EimPackageResult_PR_ipaEuiccDataResponse, + EimPackageResult_PR_profileDownloadTriggerResult, + EimPackageResult_PR_eimPackageResultResponseError + /* Extensions may appear below */ + +} EimPackageResult_PR; + +/* EimPackageResult */ +typedef struct EimPackageResult { + EimPackageResult_PR present; + union EimPackageResult_u { + EuiccPackageResult_t euiccPackageResult; + struct EimPackageResult__ePRAndNotifications { + EuiccPackageResult_t euiccPackageResult; + PendingNotificationList_t notificationList; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ePRAndNotifications; + IpaEuiccDataResponse_t ipaEuiccDataResponse; + ProfileDownloadTriggerResult_t profileDownloadTriggerResult; + EimPackageResultResponseError_t eimPackageResultResponseError; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} EimPackageResult_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_EimPackageResult; +extern asn_CHOICE_specifics_t asn_SPC_EimPackageResult_specs_1; +extern asn_TYPE_member_t asn_MBR_EimPackageResult_1[5]; +extern asn_per_constraints_t asn_PER_type_EimPackageResult_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _EimPackageResult_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libasn/EimPackageResultErrorCode.c b/src/ipa/libasn/EimPackageResultErrorCode.c new file mode 100644 index 0000000..5261785 --- /dev/null +++ b/src/ipa/libasn/EimPackageResultErrorCode.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 "EimPackageResultErrorCode.h" + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_EimPackageResultErrorCode_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_EimPackageResultErrorCode = { + "EimPackageResultErrorCode", + "EimPackageResultErrorCode", + &asn_OP_NativeInteger, + asn_DEF_EimPackageResultErrorCode_tags_1, + sizeof(asn_DEF_EimPackageResultErrorCode_tags_1) + /sizeof(asn_DEF_EimPackageResultErrorCode_tags_1[0]), /* 1 */ + asn_DEF_EimPackageResultErrorCode_tags_1, /* Same as above */ + sizeof(asn_DEF_EimPackageResultErrorCode_tags_1) + /sizeof(asn_DEF_EimPackageResultErrorCode_tags_1[0]), /* 1 */ + { 0, 0, NativeInteger_constraint }, + 0, 0, /* Defined elsewhere */ + 0 /* No specifics */ +}; + diff --git a/src/ipa/libasn/EimPackageResultErrorCode.h b/src/ipa/libasn/EimPackageResultErrorCode.h new file mode 100644 index 0000000..f98ff33 --- /dev/null +++ b/src/ipa/libasn/EimPackageResultErrorCode.h @@ -0,0 +1,50 @@ +/* + * 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 _EimPackageResultErrorCode_H_ +#define _EimPackageResultErrorCode_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include <NativeInteger.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum EimPackageResultErrorCode { + EimPackageResultErrorCode_invalidPackageFormat = 1, + EimPackageResultErrorCode_unknownPackage = 2, + EimPackageResultErrorCode_undefinedError = 127 +} e_EimPackageResultErrorCode; + +/* EimPackageResultErrorCode */ +typedef long EimPackageResultErrorCode_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_EimPackageResultErrorCode; +asn_struct_free_f EimPackageResultErrorCode_free; +asn_struct_print_f EimPackageResultErrorCode_print; +asn_constr_check_f EimPackageResultErrorCode_constraint; +ber_type_decoder_f EimPackageResultErrorCode_decode_ber; +der_type_encoder_f EimPackageResultErrorCode_encode_der; +xer_type_decoder_f EimPackageResultErrorCode_decode_xer; +xer_type_encoder_f EimPackageResultErrorCode_encode_xer; +oer_type_decoder_f EimPackageResultErrorCode_decode_oer; +oer_type_encoder_f EimPackageResultErrorCode_encode_oer; +per_type_decoder_f EimPackageResultErrorCode_decode_uper; +per_type_encoder_f EimPackageResultErrorCode_encode_uper; + +#ifdef __cplusplus +} +#endif + +#endif /* _EimPackageResultErrorCode_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libasn/EimPackageResultResponseError.c b/src/ipa/libasn/EimPackageResultResponseError.c new file mode 100644 index 0000000..ee2ecae --- /dev/null +++ b/src/ipa/libasn/EimPackageResultResponseError.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 "EimPackageResultResponseError.h" + +asn_TYPE_member_t asn_MBR_EimPackageResultResponseError_1[] = { + { ATF_POINTER, 1, offsetof(struct EimPackageResultResponseError, 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 EimPackageResultResponseError, eimPackageResultErrorCode), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_EimPackageResultErrorCode, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eimPackageResultErrorCode" + }, +}; +static const int asn_MAP_EimPackageResultResponseError_oms_1[] = { 0 }; +static const ber_tlv_tag_t asn_DEF_EimPackageResultResponseError_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_EimPackageResultResponseError_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* eimPackageResultErrorCode */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* eimTransactionId */ +}; +asn_SEQUENCE_specifics_t asn_SPC_EimPackageResultResponseError_specs_1 = { + sizeof(struct EimPackageResultResponseError), + offsetof(struct EimPackageResultResponseError, _asn_ctx), + asn_MAP_EimPackageResultResponseError_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_EimPackageResultResponseError_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_EimPackageResultResponseError = { + "EimPackageResultResponseError", + "EimPackageResultResponseError", + &asn_OP_SEQUENCE, + asn_DEF_EimPackageResultResponseError_tags_1, + sizeof(asn_DEF_EimPackageResultResponseError_tags_1) + /sizeof(asn_DEF_EimPackageResultResponseError_tags_1[0]), /* 1 */ + asn_DEF_EimPackageResultResponseError_tags_1, /* Same as above */ + sizeof(asn_DEF_EimPackageResultResponseError_tags_1) + /sizeof(asn_DEF_EimPackageResultResponseError_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_EimPackageResultResponseError_1, + 2, /* Elements count */ + &asn_SPC_EimPackageResultResponseError_specs_1 /* Additional specs */ +}; + diff --git a/src/ipa/libasn/EimPackageResultResponseError.h b/src/ipa/libasn/EimPackageResultResponseError.h new file mode 100644 index 0000000..e68419a --- /dev/null +++ b/src/ipa/libasn/EimPackageResultResponseError.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 _EimPackageResultResponseError_H_ +#define _EimPackageResultResponseError_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include "TransactionId.h" +#include "EimPackageResultErrorCode.h" +#include <constr_SEQUENCE.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* EimPackageResultResponseError */ +typedef struct EimPackageResultResponseError { + TransactionId_t *eimTransactionId /* OPTIONAL */; + EimPackageResultErrorCode_t eimPackageResultErrorCode; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} EimPackageResultResponseError_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_EimPackageResultResponseError; +extern asn_SEQUENCE_specifics_t asn_SPC_EimPackageResultResponseError_specs_1; +extern asn_TYPE_member_t asn_MBR_EimPackageResultResponseError_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _EimPackageResultResponseError_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libasn/ProvideEimPackageResult.c b/src/ipa/libasn/ProvideEimPackageResult.c index 2e82ac6..2176d1b 100644 --- a/src/ipa/libasn/ProvideEimPackageResult.c +++ b/src/ipa/libasn/ProvideEimPackageResult.c @@ -7,149 +7,61 @@ #include "ProvideEimPackageResult.h" -static asn_oer_constraints_t asn_OER_type_ProvideEimPackageResult_constr_1 CC_NOTUSED = { - { 0, 0 }, - -1}; -asn_per_constraints_t asn_PER_type_ProvideEimPackageResult_constr_1 CC_NOTUSED = { - { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 4 } /* (0..4,...) */, - { APC_UNCONSTRAINED, -1, -1, 0, 0 }, - 0, 0 /* No PER value map */ -}; -static asn_TYPE_member_t asn_MBR_ePRAndNotifications_3[] = { - { ATF_NOFLAGS, 0, offsetof(struct ProvideEimPackageResult__ePRAndNotifications, euiccPackageResult), - (ASN_TAG_CLASS_CONTEXT | (81 << 2)), +asn_TYPE_member_t asn_MBR_ProvideEimPackageResult_1[] = { + { ATF_POINTER, 1, offsetof(struct ProvideEimPackageResult, eidValue), + (ASN_TAG_CLASS_APPLICATION | (26 << 2)), -1, /* IMPLICIT tag at current level */ - &asn_DEF_EuiccPackageResult, + &asn_DEF_Octet16, 0, { 0, 0, 0 }, 0, 0, /* No default value */ - "euiccPackageResult" + "eidValue" }, - { ATF_NOFLAGS, 0, offsetof(struct ProvideEimPackageResult__ePRAndNotifications, notificationList), - (ASN_TAG_CLASS_CONTEXT | (43 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_SGP32_RetrieveNotificationsListResponse, + { ATF_NOFLAGS, 0, offsetof(struct ProvideEimPackageResult, eimPackageResult), + -1 /* Ambiguous tag (CHOICE?) */, + 0, + &asn_DEF_EimPackageResult, 0, { 0, 0, 0 }, 0, 0, /* No default value */ - "notificationList" + "eimPackageResult" }, }; -static const ber_tlv_tag_t asn_DEF_ePRAndNotifications_tags_3[] = { +static const int asn_MAP_ProvideEimPackageResult_oms_1[] = { 0 }; +static const ber_tlv_tag_t asn_DEF_ProvideEimPackageResult_tags_1[] = { + (ASN_TAG_CLASS_CONTEXT | (80 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; -static const asn_TYPE_tag2member_t asn_MAP_ePRAndNotifications_tag2el_3[] = { - { (ASN_TAG_CLASS_CONTEXT | (43 << 2)), 1, 0, 0 }, /* notificationList */ - { (ASN_TAG_CLASS_CONTEXT | (81 << 2)), 0, 0, 0 } /* euiccPackageResult */ -}; -static asn_SEQUENCE_specifics_t asn_SPC_ePRAndNotifications_specs_3 = { - sizeof(struct ProvideEimPackageResult__ePRAndNotifications), - offsetof(struct ProvideEimPackageResult__ePRAndNotifications, _asn_ctx), - asn_MAP_ePRAndNotifications_tag2el_3, - 2, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 2, /* First extension addition */ -}; -static /* Use -fall-defs-global to expose */ -asn_TYPE_descriptor_t asn_DEF_ePRAndNotifications_3 = { - "ePRAndNotifications", - "ePRAndNotifications", - &asn_OP_SEQUENCE, - asn_DEF_ePRAndNotifications_tags_3, - sizeof(asn_DEF_ePRAndNotifications_tags_3) - /sizeof(asn_DEF_ePRAndNotifications_tags_3[0]), /* 1 */ - asn_DEF_ePRAndNotifications_tags_3, /* Same as above */ - sizeof(asn_DEF_ePRAndNotifications_tags_3) - /sizeof(asn_DEF_ePRAndNotifications_tags_3[0]), /* 1 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_ePRAndNotifications_3, - 2, /* Elements count */ - &asn_SPC_ePRAndNotifications_specs_3 /* Additional specs */ -}; - -asn_TYPE_member_t asn_MBR_ProvideEimPackageResult_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct ProvideEimPackageResult, choice.euiccPackageResult), - (ASN_TAG_CLASS_CONTEXT | (81 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_EuiccPackageResult, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "euiccPackageResult" - }, - { ATF_NOFLAGS, 0, offsetof(struct ProvideEimPackageResult, choice.ePRAndNotifications), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), - 0, - &asn_DEF_ePRAndNotifications_3, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "ePRAndNotifications" - }, - { ATF_NOFLAGS, 0, offsetof(struct ProvideEimPackageResult, choice.ipaEuiccDataResponse), - (ASN_TAG_CLASS_CONTEXT | (82 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_IpaEuiccDataResponse, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "ipaEuiccDataResponse" - }, - { ATF_NOFLAGS, 0, offsetof(struct ProvideEimPackageResult, choice.profileDownloadTriggerResult), - (ASN_TAG_CLASS_CONTEXT | (84 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_ProfileDownloadTriggerResult, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "profileDownloadTriggerResult" - }, - { ATF_NOFLAGS, 0, offsetof(struct ProvideEimPackageResult, choice.eimPackageError), - (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), - 0, - &asn_DEF_NativeInteger, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "eimPackageError" - }, -}; -static const unsigned asn_MAP_ProvideEimPackageResult_to_canonical_1[] = { 4, 1, 0, 2, 3 }; -static const unsigned asn_MAP_ProvideEimPackageResult_from_canonical_1[] = { 2, 1, 3, 4, 0 }; -static const ber_tlv_tag_t asn_DEF_ProvideEimPackageResult_tags_1[] = { - (ASN_TAG_CLASS_CONTEXT | (80 << 2)) -}; static const asn_TYPE_tag2member_t asn_MAP_ProvideEimPackageResult_tag2el_1[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 4, 0, 0 }, /* eimPackageError */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* ePRAndNotifications */ - { (ASN_TAG_CLASS_CONTEXT | (81 << 2)), 0, 0, 0 }, /* euiccPackageResult */ - { (ASN_TAG_CLASS_CONTEXT | (82 << 2)), 2, 0, 0 }, /* ipaEuiccDataResponse */ - { (ASN_TAG_CLASS_CONTEXT | (84 << 2)), 3, 0, 0 } /* profileDownloadTriggerResult */ + { (ASN_TAG_CLASS_APPLICATION | (26 << 2)), 0, 0, 0 }, /* eidValue */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* eimPackageResultResponseError */ + { (ASN_TAG_CLASS_CONTEXT | (81 << 2)), 1, 0, 0 }, /* euiccPackageResult */ + { (ASN_TAG_CLASS_CONTEXT | (82 << 2)), 1, 0, 0 }, /* ipaEuiccDataResponse */ + { (ASN_TAG_CLASS_CONTEXT | (84 << 2)), 1, 0, 0 } /* profileDownloadTriggerResult */ }; -asn_CHOICE_specifics_t asn_SPC_ProvideEimPackageResult_specs_1 = { +asn_SEQUENCE_specifics_t asn_SPC_ProvideEimPackageResult_specs_1 = { sizeof(struct ProvideEimPackageResult), offsetof(struct ProvideEimPackageResult, _asn_ctx), - offsetof(struct ProvideEimPackageResult, present), - sizeof(((struct ProvideEimPackageResult *)0)->present), asn_MAP_ProvideEimPackageResult_tag2el_1, - 5, /* Count of tags in the map */ - asn_MAP_ProvideEimPackageResult_to_canonical_1, - asn_MAP_ProvideEimPackageResult_from_canonical_1, - 5 /* Extensions start */ + 6, /* Count of tags in the map */ + asn_MAP_ProvideEimPackageResult_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 2, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_ProvideEimPackageResult = { "ProvideEimPackageResult", "ProvideEimPackageResult", - &asn_OP_CHOICE, + &asn_OP_SEQUENCE, asn_DEF_ProvideEimPackageResult_tags_1, sizeof(asn_DEF_ProvideEimPackageResult_tags_1) - /sizeof(asn_DEF_ProvideEimPackageResult_tags_1[0]), /* 1 */ + /sizeof(asn_DEF_ProvideEimPackageResult_tags_1[0]) - 1, /* 1 */ asn_DEF_ProvideEimPackageResult_tags_1, /* Same as above */ sizeof(asn_DEF_ProvideEimPackageResult_tags_1) - /sizeof(asn_DEF_ProvideEimPackageResult_tags_1[0]), /* 1 */ - { &asn_OER_type_ProvideEimPackageResult_constr_1, &asn_PER_type_ProvideEimPackageResult_constr_1, CHOICE_constraint }, + /sizeof(asn_DEF_ProvideEimPackageResult_tags_1[0]), /* 2 */ + { 0, 0, SEQUENCE_constraint }, asn_MBR_ProvideEimPackageResult_1, - 5, /* Elements count */ + 2, /* Elements count */ &asn_SPC_ProvideEimPackageResult_specs_1 /* Additional specs */ }; diff --git a/src/ipa/libasn/ProvideEimPackageResult.h b/src/ipa/libasn/ProvideEimPackageResult.h index 2b7fd91..e2f7a3f 100644 --- a/src/ipa/libasn/ProvideEimPackageResult.h +++ b/src/ipa/libasn/ProvideEimPackageResult.h @@ -12,59 +12,22 @@ #include <asn_application.h> /* Including external dependencies */ -#include "EuiccPackageResult.h" -#include "IpaEuiccDataResponse.h" -#include "ProfileDownloadTriggerResult.h" -#include <NativeInteger.h> -#include "SGP32-RetrieveNotificationsListResponse.h" +#include "Octet16.h" +#include "EimPackageResult.h" #include <constr_SEQUENCE.h> -#include <constr_CHOICE.h> #ifdef __cplusplus extern "C" { #endif -/* Dependencies */ -typedef enum ProvideEimPackageResult_PR { - ProvideEimPackageResult_PR_NOTHING, /* No components present */ - ProvideEimPackageResult_PR_euiccPackageResult, - ProvideEimPackageResult_PR_ePRAndNotifications, - ProvideEimPackageResult_PR_ipaEuiccDataResponse, - ProvideEimPackageResult_PR_profileDownloadTriggerResult, - ProvideEimPackageResult_PR_eimPackageError - /* Extensions may appear below */ - -} ProvideEimPackageResult_PR; -typedef enum ProvideEimPackageResult__eimPackageError { - ProvideEimPackageResult__eimPackageError_invalidPackageFormat = 1, - ProvideEimPackageResult__eimPackageError_unknownPackage = 2, - ProvideEimPackageResult__eimPackageError_undefinedError = 127 -} e_ProvideEimPackageResult__eimPackageError; - /* ProvideEimPackageResult */ typedef struct ProvideEimPackageResult { - ProvideEimPackageResult_PR present; - union ProvideEimPackageResult_u { - EuiccPackageResult_t euiccPackageResult; - struct ProvideEimPackageResult__ePRAndNotifications { - EuiccPackageResult_t euiccPackageResult; - SGP32_RetrieveNotificationsListResponse_t notificationList; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; - } ePRAndNotifications; - IpaEuiccDataResponse_t ipaEuiccDataResponse; - ProfileDownloadTriggerResult_t profileDownloadTriggerResult; - long eimPackageError; - /* - * This type is extensible, - * possible extensions are below. - */ - } choice; + Octet16_t *eidValue /* OPTIONAL */; + EimPackageResult_t eimPackageResult; + /* + * This type is extensible, + * possible extensions are below. + */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; @@ -72,9 +35,8 @@ /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_ProvideEimPackageResult; -extern asn_CHOICE_specifics_t asn_SPC_ProvideEimPackageResult_specs_1; -extern asn_TYPE_member_t asn_MBR_ProvideEimPackageResult_1[5]; -extern asn_per_constraints_t asn_PER_type_ProvideEimPackageResult_constr_1; +extern asn_SEQUENCE_specifics_t asn_SPC_ProvideEimPackageResult_specs_1; +extern asn_TYPE_member_t asn_MBR_ProvideEimPackageResult_1[2]; #ifdef __cplusplus } diff --git a/src/ipa/libasn/ProvideEimPackageResultResponse.c b/src/ipa/libasn/ProvideEimPackageResultResponse.c index ddc8964..f7eb2dc 100644 --- a/src/ipa/libasn/ProvideEimPackageResultResponse.c +++ b/src/ipa/libasn/ProvideEimPackageResultResponse.c @@ -7,8 +7,43 @@ #include "ProvideEimPackageResultResponse.h" +static asn_oer_constraints_t asn_OER_type_ProvideEimPackageResultResponse_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +asn_per_constraints_t asn_PER_type_ProvideEimPackageResultResponse_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static const ber_tlv_tag_t asn_DEF_emptyResponse_tags_3[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SEQUENCE_specifics_t asn_SPC_emptyResponse_specs_3 = { + sizeof(struct ProvideEimPackageResultResponse__emptyResponse), + offsetof(struct ProvideEimPackageResultResponse__emptyResponse, _asn_ctx), + 0, /* No top level tags */ + 0, /* No tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_emptyResponse_3 = { + "emptyResponse", + "emptyResponse", + &asn_OP_SEQUENCE, + asn_DEF_emptyResponse_tags_3, + sizeof(asn_DEF_emptyResponse_tags_3) + /sizeof(asn_DEF_emptyResponse_tags_3[0]), /* 1 */ + asn_DEF_emptyResponse_tags_3, /* Same as above */ + sizeof(asn_DEF_emptyResponse_tags_3) + /sizeof(asn_DEF_emptyResponse_tags_3[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + 0, 0, /* No members */ + &asn_SPC_emptyResponse_specs_3 /* Additional specs */ +}; + asn_TYPE_member_t asn_MBR_ProvideEimPackageResultResponse_1[] = { - { ATF_POINTER, 1, offsetof(struct ProvideEimPackageResultResponse, eimAcknowledgements), + { ATF_NOFLAGS, 0, offsetof(struct ProvideEimPackageResultResponse, choice.eimAcknowledgements), (ASN_TAG_CLASS_CONTEXT | (83 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_EimAcknowledgements, @@ -17,37 +52,59 @@ 0, 0, /* No default value */ "eimAcknowledgements" }, + { ATF_NOFLAGS, 0, offsetof(struct ProvideEimPackageResultResponse, choice.emptyResponse), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_emptyResponse_3, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "emptyResponse" + }, + { ATF_NOFLAGS, 0, offsetof(struct ProvideEimPackageResultResponse, choice.provideEimPackageResultError), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_NativeInteger, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "provideEimPackageResultError" + }, }; -static const int asn_MAP_ProvideEimPackageResultResponse_oms_1[] = { 0 }; +static const unsigned asn_MAP_ProvideEimPackageResultResponse_to_canonical_1[] = { 2, 1, 0 }; +static const unsigned asn_MAP_ProvideEimPackageResultResponse_from_canonical_1[] = { 2, 1, 0 }; static const ber_tlv_tag_t asn_DEF_ProvideEimPackageResultResponse_tags_1[] = { - (ASN_TAG_CLASS_CONTEXT | (80 << 2)), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) + (ASN_TAG_CLASS_CONTEXT | (80 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_ProvideEimPackageResultResponse_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, 0, 0 }, /* provideEimPackageResultError */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* emptyResponse */ { (ASN_TAG_CLASS_CONTEXT | (83 << 2)), 0, 0, 0 } /* eimAcknowledgements */ }; -asn_SEQUENCE_specifics_t asn_SPC_ProvideEimPackageResultResponse_specs_1 = { +asn_CHOICE_specifics_t asn_SPC_ProvideEimPackageResultResponse_specs_1 = { sizeof(struct ProvideEimPackageResultResponse), offsetof(struct ProvideEimPackageResultResponse, _asn_ctx), + offsetof(struct ProvideEimPackageResultResponse, present), + sizeof(((struct ProvideEimPackageResultResponse *)0)->present), asn_MAP_ProvideEimPackageResultResponse_tag2el_1, - 1, /* Count of tags in the map */ - asn_MAP_ProvideEimPackageResultResponse_oms_1, /* Optional members */ - 1, 0, /* Root/Additions */ - 1, /* First extension addition */ + 3, /* Count of tags in the map */ + asn_MAP_ProvideEimPackageResultResponse_to_canonical_1, + asn_MAP_ProvideEimPackageResultResponse_from_canonical_1, + 3 /* Extensions start */ }; asn_TYPE_descriptor_t asn_DEF_ProvideEimPackageResultResponse = { "ProvideEimPackageResultResponse", "ProvideEimPackageResultResponse", - &asn_OP_SEQUENCE, + &asn_OP_CHOICE, asn_DEF_ProvideEimPackageResultResponse_tags_1, sizeof(asn_DEF_ProvideEimPackageResultResponse_tags_1) - /sizeof(asn_DEF_ProvideEimPackageResultResponse_tags_1[0]) - 1, /* 1 */ + /sizeof(asn_DEF_ProvideEimPackageResultResponse_tags_1[0]), /* 1 */ asn_DEF_ProvideEimPackageResultResponse_tags_1, /* Same as above */ sizeof(asn_DEF_ProvideEimPackageResultResponse_tags_1) - /sizeof(asn_DEF_ProvideEimPackageResultResponse_tags_1[0]), /* 2 */ - { 0, 0, SEQUENCE_constraint }, + /sizeof(asn_DEF_ProvideEimPackageResultResponse_tags_1[0]), /* 1 */ + { &asn_OER_type_ProvideEimPackageResultResponse_constr_1, &asn_PER_type_ProvideEimPackageResultResponse_constr_1, CHOICE_constraint }, asn_MBR_ProvideEimPackageResultResponse_1, - 1, /* Elements count */ + 3, /* Elements count */ &asn_SPC_ProvideEimPackageResultResponse_specs_1 /* Additional specs */ }; diff --git a/src/ipa/libasn/ProvideEimPackageResultResponse.h b/src/ipa/libasn/ProvideEimPackageResultResponse.h index 071c82d..a71703b 100644 --- a/src/ipa/libasn/ProvideEimPackageResultResponse.h +++ b/src/ipa/libasn/ProvideEimPackageResultResponse.h @@ -12,22 +12,51 @@ #include <asn_application.h> /* Including external dependencies */ +#include "EimAcknowledgements.h" +#include <NativeInteger.h> #include <constr_SEQUENCE.h> +#include <constr_CHOICE.h> #ifdef __cplusplus extern "C" { #endif -/* Forward declarations */ -struct EimAcknowledgements; +/* Dependencies */ +typedef enum ProvideEimPackageResultResponse_PR { + ProvideEimPackageResultResponse_PR_NOTHING, /* No components present */ + ProvideEimPackageResultResponse_PR_eimAcknowledgements, + ProvideEimPackageResultResponse_PR_emptyResponse, + ProvideEimPackageResultResponse_PR_provideEimPackageResultError + /* Extensions may appear below */ + +} ProvideEimPackageResultResponse_PR; +typedef enum ProvideEimPackageResultResponse__provideEimPackageResultError { + ProvideEimPackageResultResponse__provideEimPackageResultError_eidNotFound = 2, + ProvideEimPackageResultResponse__provideEimPackageResultError_invalidEid = 3, + ProvideEimPackageResultResponse__provideEimPackageResultError_missingEid = 4, + ProvideEimPackageResultResponse__provideEimPackageResultError_undefinedError = 127 +} e_ProvideEimPackageResultResponse__provideEimPackageResultError; /* ProvideEimPackageResultResponse */ typedef struct ProvideEimPackageResultResponse { - struct EimAcknowledgements *eimAcknowledgements /* OPTIONAL */; - /* - * This type is extensible, - * possible extensions are below. - */ + ProvideEimPackageResultResponse_PR present; + union ProvideEimPackageResultResponse_u { + EimAcknowledgements_t eimAcknowledgements; + struct ProvideEimPackageResultResponse__emptyResponse { + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } emptyResponse; + long provideEimPackageResultError; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; @@ -35,15 +64,13 @@ /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_ProvideEimPackageResultResponse; -extern asn_SEQUENCE_specifics_t asn_SPC_ProvideEimPackageResultResponse_specs_1; -extern asn_TYPE_member_t asn_MBR_ProvideEimPackageResultResponse_1[1]; +extern asn_CHOICE_specifics_t asn_SPC_ProvideEimPackageResultResponse_specs_1; +extern asn_TYPE_member_t asn_MBR_ProvideEimPackageResultResponse_1[3]; +extern asn_per_constraints_t asn_PER_type_ProvideEimPackageResultResponse_constr_1; #ifdef __cplusplus } #endif -/* Referred external types */ -#include "EimAcknowledgements.h" - #endif /* _ProvideEimPackageResultResponse_H_ */ #include <asn_internal.h> diff --git a/src/ipa/libipa/esipa_prvde_eim_pkg_rslt.c b/src/ipa/libipa/esipa_prvde_eim_pkg_rslt.c index 2d5a31b..a94690e 100644 --- a/src/ipa/libipa/esipa_prvde_eim_pkg_rslt.c +++ b/src/ipa/libipa/esipa_prvde_eim_pkg_rslt.c @@ -14,7 +14,7 @@ #include <onomondo/ipa/ipad.h> #include <EsipaMessageFromIpaToEim.h> #include <ProvideEimPackageResult.h> -#include <SGP32-RetrieveNotificationsListResponse.h> +#include <PendingNotificationList.h> #include "utils.h" #include "length.h" #include "context.h" @@ -29,24 +29,27 @@ msg_to_eim.present = EsipaMessageFromIpaToEim_PR_provideEimPackageResult; if (req->eim_pkg_err != 0) { - msg_to_eim.choice.provideEimPackageResult.present = ProvideEimPackageResult_PR_eimPackageError; - msg_to_eim.choice.provideEimPackageResult.choice.eimPackageError = req->eim_pkg_err; - } else if (req->euicc_package_result && req->sgp32_notification_list) { - msg_to_eim.choice.provideEimPackageResult.present = ProvideEimPackageResult_PR_ePRAndNotifications; - msg_to_eim.choice.provideEimPackageResult.choice.ePRAndNotifications.euiccPackageResult = + msg_to_eim.choice.provideEimPackageResult.eimPackageResult.present = EimPackageResult_PR_eimPackageResultResponseError; + msg_to_eim.choice.provideEimPackageResult.eimPackageResult.choice.eimPackageResultResponseError.eimPackageResultErrorCode = + req->eim_pkg_err; + msg_to_eim.choice.provideEimPackageResult.eimPackageResult.choice.eimPackageResultResponseError.eimTransactionId = + req->eim_trans_id; + } else if (req->euicc_package_result && req->pending_notification_list) { + msg_to_eim.choice.provideEimPackageResult.eimPackageResult.present = EimPackageResult_PR_ePRAndNotifications; + msg_to_eim.choice.provideEimPackageResult.eimPackageResult.choice.ePRAndNotifications.euiccPackageResult = *req->euicc_package_result; - msg_to_eim.choice.provideEimPackageResult.choice.ePRAndNotifications.notificationList = - *req->sgp32_notification_list; + msg_to_eim.choice.provideEimPackageResult.eimPackageResult.choice.ePRAndNotifications.notificationList = + *req->pending_notification_list; } else if (req->euicc_package_result) { - msg_to_eim.choice.provideEimPackageResult.present = ProvideEimPackageResult_PR_euiccPackageResult; - msg_to_eim.choice.provideEimPackageResult.choice.euiccPackageResult = *req->euicc_package_result; + msg_to_eim.choice.provideEimPackageResult.eimPackageResult.present = EimPackageResult_PR_euiccPackageResult; + msg_to_eim.choice.provideEimPackageResult.eimPackageResult.choice.euiccPackageResult = *req->euicc_package_result; } else if (req->ipa_euicc_data_resp) { - msg_to_eim.choice.provideEimPackageResult.present = ProvideEimPackageResult_PR_ipaEuiccDataResponse; - msg_to_eim.choice.provideEimPackageResult.choice.ipaEuiccDataResponse = *req->ipa_euicc_data_resp; + msg_to_eim.choice.provideEimPackageResult.eimPackageResult.present = EimPackageResult_PR_ipaEuiccDataResponse; + msg_to_eim.choice.provideEimPackageResult.eimPackageResult.choice.ipaEuiccDataResponse = *req->ipa_euicc_data_resp; } else if (req->prfle_dwnld_trig_req_rslt) { - msg_to_eim.choice.provideEimPackageResult.present = - ProvideEimPackageResult_PR_profileDownloadTriggerResult; - msg_to_eim.choice.provideEimPackageResult.choice.profileDownloadTriggerResult = + msg_to_eim.choice.provideEimPackageResult.eimPackageResult.present = + EimPackageResult_PR_profileDownloadTriggerResult; + msg_to_eim.choice.provideEimPackageResult.eimPackageResult.choice.profileDownloadTriggerResult = *req->prfle_dwnld_trig_req_rslt; } else { /* The struct should at least contain one of the above information element. In case the caller fails @@ -54,9 +57,9 @@ * tell the eIM that something is wrong. */ IPA_LOGP_ESIPA("ProvideEimPackageResult", LERROR, "empty provideEimPackageResult request, setting eimPackageError to undefined\n"); - msg_to_eim.choice.provideEimPackageResult.present = ProvideEimPackageResult_PR_eimPackageError; - msg_to_eim.choice.provideEimPackageResult.choice.eimPackageError = - ProvideEimPackageResult__eimPackageError_undefinedError; + msg_to_eim.choice.provideEimPackageResult.eimPackageResult.present = EimPackageResult_PR_eimPackageResultResponseError; + msg_to_eim.choice.provideEimPackageResult.eimPackageResult.choice.eimPackageResultResponseError.eimPackageResultErrorCode = + EimPackageResultErrorCode_undefinedError; } enc = ipa_esipa_msg_to_eim_enc(&msg_to_eim, "ProvideEimPackageResult"); @@ -78,8 +81,9 @@ res = IPA_ALLOC_ZERO(struct ipa_esipa_prvde_eim_pkg_rslt_res); res->msg_to_ipa = msg_to_ipa; - /* Optional, may be NULL */ - res->eim_acknowledgements = msg_to_ipa->choice.provideEimPackageResultResponse.eimAcknowledgements; + /* Optional, may be an "emptyResponse" */ + if (msg_to_ipa->choice.provideEimPackageResultResponse.present == ProvideEimPackageResultResponse_PR_eimAcknowledgements) + res->eim_acknowledgements = &msg_to_ipa->choice.provideEimPackageResultResponse.choice.eimAcknowledgements; return res; } diff --git a/src/ipa/libipa/esipa_prvde_eim_pkg_rslt.h b/src/ipa/libipa/esipa_prvde_eim_pkg_rslt.h index e1bf87a..3d0cce6 100644 --- a/src/ipa/libipa/esipa_prvde_eim_pkg_rslt.h +++ b/src/ipa/libipa/esipa_prvde_eim_pkg_rslt.h @@ -17,8 +17,9 @@ struct ipa_esipa_prvde_eim_pkg_rslt_req { long eim_pkg_err; + struct OCTET_STRING *eim_trans_id; const struct EuiccPackageResult *euicc_package_result; - struct SGP32_RetrieveNotificationsListResponse *sgp32_notification_list; + struct PendingNotificationList *pending_notification_list; const struct IpaEuiccDataResponse *ipa_euicc_data_resp; const struct ProfileDownloadTriggerResult *prfle_dwnld_trig_req_rslt; }; diff --git a/src/ipa/libipa/proc_euicc_data_req.c b/src/ipa/libipa/proc_euicc_data_req.c index d084ed6..0fa8ad0 100644 --- a/src/ipa/libipa/proc_euicc_data_req.c +++ b/src/ipa/libipa/proc_euicc_data_req.c @@ -208,6 +208,7 @@ ipa_euicc_data_response.present = IpaEuiccDataResponse_PR_ipaEuiccData; prvde_eim_pkg_rslt_req.ipa_euicc_data_resp = &ipa_euicc_data_response; + prvde_eim_pkg_rslt_req.eim_trans_id = pars->ipa_euicc_data_request->eimTransactionId; prvde_eim_pkg_rslt_res = ipa_esipa_prvde_eim_pkg_rslt(ctx, &prvde_eim_pkg_rslt_req); if (!prvde_eim_pkg_rslt_res) goto error; diff --git a/src/ipa/libipa/proc_euicc_pkg_dwnld_exec.c b/src/ipa/libipa/proc_euicc_pkg_dwnld_exec.c index b05b944..3ae2f15 100644 --- a/src/ipa/libipa/proc_euicc_pkg_dwnld_exec.c +++ b/src/ipa/libipa/proc_euicc_pkg_dwnld_exec.c @@ -87,7 +87,8 @@ prvde_eim_pkg_rslt_req.euicc_package_result = res->prfle_rollback_res->res->eUICCPackageResult; else prvde_eim_pkg_rslt_req.euicc_package_result = res->load_euicc_pkg_res->res; - prvde_eim_pkg_rslt_req.sgp32_notification_list = retr_notif_from_lst_res->sgp32_res; + if (retr_notif_from_lst_res->sgp32_res->present == SGP32_RetrieveNotificationsListResponse_PR_notificationList) + prvde_eim_pkg_rslt_req.pending_notification_list = &retr_notif_from_lst_res->sgp32_res->choice.notificationList; prvde_eim_pkg_rslt_res = ipa_esipa_prvde_eim_pkg_rslt(ctx, &prvde_eim_pkg_rslt_req); if (!prvde_eim_pkg_rslt_res) { -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43055?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: I24baab4f9351aec27c58403b94974cba4b274c34 Gerrit-Change-Number: 43055 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
[S] Change in onomondo-ipa[master]: V1.2: Update imported ASN.1 definitions
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43022?usp=email
) Change subject: V1.2: Update imported ASN.1 definitions ...................................................................... V1.2: Update imported ASN.1 definitions Define what ASN.1 defintions are inported from RSPDefinitions by SGP32Definitions. Related: SYS#8101 Change-Id: Id86c682e5c9fee43b6af6ec011b91565b82fa776 --- M asn1/SGP32Definitions.asn 1 file changed, 9 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/22/43022/1 diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index a492f92..b953420 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -10,17 +10,16 @@ FROM PKIX1Explicit88 {iso(1) identified-organization(3) dod(6) internet(1) security(5) mechanisms(5) pkix(7) id-mod(0) id-pkix1-explicit(18)} SubjectKeyIdentifier FROM PKIX1Implicit88 {iso(1) identified-organization(3) dod(6) internet(1) security(5) mechanisms(5) pkix(7) id-mod(0) id-pkix1-implicit(19)} -ProfileInfo, EuiccSigned1, CancelSessionReason, RetrieveNotificationsListResponse, -ServerSigned1, RspCapability, Iccid, TransactionId, ProfileInfoListRequest, -ProfileInfoListResponse, RulesAuthorisationTable, EUICCInfo1, DeviceInfo, -VersionType, UICCCapability, PprIds, -CertificationDataObject, Octet1, Octet16, Octet32, PrepareDownloadResponse, -PrepareDownloadResponseOk, PrepareDownloadResponseError, -AuthenticateServerResponse, AuthenticateResponseOk, AuthenticateResponseError, -CtxParams1, ProfileInstallationResult, ProfileInstallationResultData, +CancelSessionReason, ServerSigned1, RspCapability, Iccid, TransactionId, +ProfileInfoListRequest, RulesAuthorisationTable, EUICCInfo1, DeviceInfo, +VersionType, UICCCapability, PprIds, CertificationDataObject, Octet1, Octet16, +Octet32, PrepareDownloadResponseOk, PrepareDownloadResponseError, +AuthenticateResponseError, CtxParams1, ProfileInstallationResultData, OtherSignedNotification, EuiccSignPIR, ErrorResult, NotificationMetadata, -CancelSessionResponse, CancelSessionResponseOk, -StoreMetadataRequest, SmdpSigned2, BoundProfilePackage, NotificationEvent +CancelSessionResponseOk, SmdpSigned2, BoundProfilePackage, NotificationEvent, +VendorSpecificExtension, DpProprietaryData, OperatorId, +NotificationConfigurationInformation, ProfileClass, IconType, ProfileState, +OctetTo16 FROM RSPDefinitions {joint-iso-itu-t(2) international-organizations(23) gsma(146) rsp(1) asn1modules(1) sgp22v2(2)}; -- ASN1STOP -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43022?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: Id86c682e5c9fee43b6af6ec011b91565b82fa776 Gerrit-Change-Number: 43022 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
[S] Change in onomondo-ipa[master]: Generate ASN.1 code with recent master branch of asn1c
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43021?usp=email
) Change subject: Generate ASN.1 code with recent master branch of asn1c ...................................................................... Generate ASN.1 code with recent master branch of asn1c Commit-Hash of asn1c using from now on: 2f7f40dab3973f707d66f4a67cae0cc1bc8e62b5 Related: SYS#8101 Change-Id: I1ac4cf8980af501bb119208213242468ee4f3c06 --- M src/ipa/libasn/asn_internal.c M src/ipa/libasn/asn_internal.h M src/ipa/libasn/constr_CHOICE.c 3 files changed, 32 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/21/43021/1 diff --git a/src/ipa/libasn/asn_internal.c b/src/ipa/libasn/asn_internal.c index 91e537c..3b8a2d5 100644 --- a/src/ipa/libasn/asn_internal.c +++ b/src/ipa/libasn/asn_internal.c @@ -1,5 +1,13 @@ #include <asn_internal.h> +#ifdef ASN__DEBUG_INDENT_NEEDS_DEFINITION +/* + * The single definition of the debugging indentation level, + * shared by all units which refer to it via "extern" in asn_internal.h. + */ +int asn_debug_indent; +#endif + ssize_t asn__format_to_callback(int (*cb)(const void *, size_t, void *key), void *key, const char *fmt, ...) { diff --git a/src/ipa/libasn/asn_internal.h b/src/ipa/libasn/asn_internal.h index 76dac64..0dffd35 100644 --- a/src/ipa/libasn/asn_internal.h +++ b/src/ipa/libasn/asn_internal.h @@ -21,7 +21,7 @@ #endif /* Environment version might be used to avoid running with the old library */ -#define ASN1C_ENVIRONMENT_VERSION 923 /* Compile-time version */ +#define ASN1C_ENVIRONMENT_VERSION 929 /* Compile-time version */ int get_asn1c_environment_version(void); /* Run-time version */ #include <onomondo/ipa/mem.h> @@ -51,7 +51,8 @@ #else /* !ASN_THREAD_SAFE */ #undef ASN_DEBUG_INDENT_ADD #undef asn_debug_indent -int asn_debug_indent; +extern int asn_debug_indent; /* A single definition is in asn_internal.c */ +#define ASN__DEBUG_INDENT_NEEDS_DEFINITION 1 #define ASN_DEBUG_INDENT_ADD(i) do { asn_debug_indent += i; } while(0) #endif /* ASN_THREAD_SAFE */ #define ASN_DEBUG(fmt, args...) do { \ @@ -126,8 +127,25 @@ /* * Check stack against overflow, if limit is set. + * ASan inflates stack frames by ~30x (red zones per variable), making the + * distance-based check fire false positives at normal call depth. Disable + * when building under ASan — ASan itself catches real stack overflows. + * GCC and MSVC define __SANITIZE_ADDRESS__; Clang only exposes + * __has_feature(address_sanitizer). */ +#if defined(__SANITIZE_ADDRESS__) +#define ASN__ASAN_ENABLED 1 +#elif defined(__has_feature) +#if __has_feature(address_sanitizer) +#define ASN__ASAN_ENABLED 1 +#endif +#endif + +#ifdef ASN__ASAN_ENABLED +#define ASN__DEFAULT_STACK_MAX (0) +#else #define ASN__DEFAULT_STACK_MAX (30000) +#endif static int CC_NOTUSED ASN__STACK_OVERFLOW_CHECK(const asn_codec_ctx_t *ctx) { if(ctx && ctx->max_stack_size) { diff --git a/src/ipa/libasn/constr_CHOICE.c b/src/ipa/libasn/constr_CHOICE.c index 628979e..6d26dd1 100644 --- a/src/ipa/libasn/constr_CHOICE.c +++ b/src/ipa/libasn/constr_CHOICE.c @@ -340,6 +340,10 @@ ADVANCE(2); ctx->left++; continue; + } else { + ASN_DEBUG("Unexpected continuation in %s", + td->name); + RETURN(RC_FAIL); } } else { ASN_DEBUG("Unexpected continuation in %s", -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43021?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: I1ac4cf8980af501bb119208213242468ee4f3c06 Gerrit-Change-Number: 43021 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
[XS] Change in onomondo-ipa[master]: Minor fix of compiler warning in esipa.c
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43020?usp=email
) Change subject: Minor fix of compiler warning in esipa.c ...................................................................... Minor fix of compiler warning in esipa.c Related: SYS#8101 Change-Id: Ied72573a5fd4486f59e0fe71ae678374cafd6b19 --- M src/ipa/libipa/esipa.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/20/43020/1 diff --git a/src/ipa/libipa/esipa.c b/src/ipa/libipa/esipa.c index a0ec4de..d88da5d 100644 --- a/src/ipa/libipa/esipa.c +++ b/src/ipa/libipa/esipa.c @@ -126,7 +126,7 @@ rc = der_encode(&asn_DEF_EsipaMessageFromIpaToEim, msg_to_eim, ipa_asn1c_consume_bytes_cb, &buf_encoded); if (rc.encoded <= 0) { - IPA_LOGP_ESIPA(function_name, LERROR, "cannot encode eIM request! rc = %d\n", rc.encoded); + IPA_LOGP_ESIPA(function_name, LERROR, "cannot encode eIM request! rc = %zd\n", rc.encoded); IPA_FREE(buf_encoded); return NULL; } -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43020?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: Ied72573a5fd4486f59e0fe71ae678374cafd6b19 Gerrit-Change-Number: 43020 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
[M] Change in onomondo-ipa[master]: V1.2: Rename internal structure names from "auto" to "immediate"
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43024?usp=email
) Change subject: V1.2: Rename internal structure names from "auto" to "immediate" ...................................................................... V1.2: Rename internal structure names from "auto" to "immediate" Rename all occurrences of "auto" or similar to "immediate" or similar respectively. Reference: SGP.32 Section 2.9.2 Related: SYS#8101 Change-Id: Iad212f9b3e4430d4eaa6d4afdac0e73009275dfb --- M include/onomondo/ipa/ipad.h M src/ipa/libipa/context.h M src/ipa/libipa/es10b_enable_using_dd.c M src/ipa/libipa/es10b_euicc_mem_rst.c M src/ipa/libipa/es10b_euicc_mem_rst.h M src/ipa/libipa/es10b_load_bnd_prfle_pkg.c M src/ipa/libipa/es10b_load_euicc_pkg.c M src/ipa/libipa/ipad.c 8 files changed, 75 insertions(+), 75 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/24/43024/1 diff --git a/include/onomondo/ipa/ipad.h b/include/onomondo/ipa/ipad.h index c2ce394..bb4a05a 100644 --- a/include/onomondo/ipa/ipad.h +++ b/include/onomondo/ipa/ipad.h @@ -93,7 +93,7 @@ int eim_init(struct ipa_context *ctx); 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 auto_enable_cfg); + bool eim_cfg_data, bool immediate_enable_cfg); 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/libipa/context.h b/src/ipa/libipa/context.h index 067daff..5065286 100644 --- a/src/ipa/libipa/context.h +++ b/src/ipa/libipa/context.h @@ -27,12 +27,12 @@ int association_token_counter; struct ipa_buf *eim_cfg_ber; - /*! Automatic Profile Enabling configuration (set via configureAutoEnable PSMO) */ + /*! Immediate Profile Enabling configuration (set via configureImmidiateEnable PSMO) */ struct { bool flag; struct ipa_buf *smdp_oid; struct ipa_buf *smdp_address; - } auto_enable; + } immediate_enable; } iot_euicc_emu; } __attribute__((packed)); @@ -58,12 +58,12 @@ * ipa_proc_eucc_pkg_dwnld_exec is called. */ struct ipa_buf *rollback_iccid; - /*! cached data to support the emulation of the ES10b function EnableUsingDD */ + /*! cached data to support the emulation of the ES10b function ImmidiateEnable */ struct { struct ipa_buf *smdp_oid; struct ipa_buf *smdp_address; struct ipa_buf *profile_aid; - } auto_enable; + } immediate_enable; } iot_euicc_emu; /*! cached eimId (read from eUICC when ipa_init is called) */ diff --git a/src/ipa/libipa/es10b_enable_using_dd.c b/src/ipa/libipa/es10b_enable_using_dd.c index 61ba9bb..87e731d 100644 --- a/src/ipa/libipa/es10b_enable_using_dd.c +++ b/src/ipa/libipa/es10b_enable_using_dd.c @@ -93,57 +93,57 @@ int rc = EnableUsingDDResponse__enableUsingDDResult_undefinedError; /* Auto enable must be active */ - if (ctx->nvstate.iot_euicc_emu.auto_enable.flag == false) { + if (ctx->nvstate.iot_euicc_emu.immediate_enable.flag == false) { rc = EnableUsingDDResponse__enableUsingDDResult_immediateEnableNotAvailable; goto error; } /* We also need either the smdp_oid or the smdp_address to verify against */ - if (ctx->nvstate.iot_euicc_emu.auto_enable.smdp_oid == NULL && - ctx->nvstate.iot_euicc_emu.auto_enable.smdp_address == NULL) { + if (ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid == NULL && + ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address == NULL) { rc = EnableUsingDDResponse__enableUsingDDResult_immediateEnableNotAvailable; goto error; } /* Ensure the session context is present and complete */ - if (ctx->iot_euicc_emu.auto_enable.smdp_address == NULL) { + if (ctx->iot_euicc_emu.immediate_enable.smdp_address == NULL) { rc = EnableUsingDDResponse__enableUsingDDResult_noSessionContext; goto error; } - if (ctx->iot_euicc_emu.auto_enable.smdp_oid == NULL) { + if (ctx->iot_euicc_emu.immediate_enable.smdp_oid == NULL) { rc = EnableUsingDDResponse__enableUsingDDResult_noSessionContext; goto error; } - if (ctx->iot_euicc_emu.auto_enable.profile_aid == NULL) { + if (ctx->iot_euicc_emu.immediate_enable.profile_aid == NULL) { rc = EnableUsingDDResponse__enableUsingDDResult_noSessionContext; goto error; } /* Verify smdp OID (if configured) */ - if (ctx->nvstate.iot_euicc_emu.auto_enable.smdp_oid) { - if (ctx->nvstate.iot_euicc_emu.auto_enable.smdp_oid->len != - ctx->iot_euicc_emu.auto_enable.smdp_oid->len) { + if (ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid) { + if (ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid->len != + ctx->iot_euicc_emu.immediate_enable.smdp_oid->len) { rc = EnableUsingDDResponse__enableUsingDDResult_immediateEnableNotAvailable; goto error; } - if (memcmp(ctx->nvstate.iot_euicc_emu.auto_enable.smdp_oid->data, - ctx->iot_euicc_emu.auto_enable.smdp_oid->data, - ctx->iot_euicc_emu.auto_enable.smdp_oid->len)) { + if (memcmp(ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid->data, + ctx->iot_euicc_emu.immediate_enable.smdp_oid->data, + ctx->iot_euicc_emu.immediate_enable.smdp_oid->len)) { rc = EnableUsingDDResponse__enableUsingDDResult_immediateEnableNotAvailable; goto error; } } /* Verify smdp address (if configured) */ - if (ctx->nvstate.iot_euicc_emu.auto_enable.smdp_address) { - if (ctx->nvstate.iot_euicc_emu.auto_enable.smdp_address->len != - ctx->iot_euicc_emu.auto_enable.smdp_address->len) { + if (ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address) { + if (ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address->len != + ctx->iot_euicc_emu.immediate_enable.smdp_address->len) { rc = EnableUsingDDResponse__enableUsingDDResult_immediateEnableNotAvailable; goto error; } - if (memcmp(ctx->nvstate.iot_euicc_emu.auto_enable.smdp_address->data, - ctx->iot_euicc_emu.auto_enable.smdp_address->data, - ctx->iot_euicc_emu.auto_enable.smdp_address->len)) { + if (memcmp(ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address->data, + ctx->iot_euicc_emu.immediate_enable.smdp_address->data, + ctx->iot_euicc_emu.immediate_enable.smdp_address->len)) { rc = EnableUsingDDResponse__enableUsingDDResult_immediateEnableNotAvailable; goto error; } @@ -152,8 +152,8 @@ /* Enable profile */ enable_prfle_req.req.profileIdentifier.present = EnableProfileRequest__profileIdentifier_PR_isdpAid; IPA_ASSIGN_BUF_TO_ASN(enable_prfle_req.req.profileIdentifier.choice.isdpAid, - ctx->iot_euicc_emu.auto_enable.profile_aid->data, - ctx->iot_euicc_emu.auto_enable.profile_aid->len); + ctx->iot_euicc_emu.immediate_enable.profile_aid->data, + ctx->iot_euicc_emu.immediate_enable.profile_aid->len); enable_prfle_res = ipa_es10c_enable_prfle(ctx, &enable_prfle_req); if (enable_prfle_res && enable_prfle_res->res->enableResult == EnableProfileResponse__enableResult_ok) @@ -173,12 +173,12 @@ } /* Ensure the auto enable data is cleared after use */ - ipa_buf_free(ctx->iot_euicc_emu.auto_enable.smdp_oid); - ctx->iot_euicc_emu.auto_enable.smdp_oid = NULL; - ipa_buf_free(ctx->iot_euicc_emu.auto_enable.smdp_address); - ctx->iot_euicc_emu.auto_enable.smdp_address = NULL; - ipa_buf_free(ctx->iot_euicc_emu.auto_enable.profile_aid); - ctx->iot_euicc_emu.auto_enable.profile_aid = NULL; + ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.smdp_oid); + ctx->iot_euicc_emu.immediate_enable.smdp_oid = NULL; + ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.smdp_address); + ctx->iot_euicc_emu.immediate_enable.smdp_address = NULL; + ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.profile_aid); + ctx->iot_euicc_emu.immediate_enable.profile_aid = NULL; ipa_es10c_enable_prfle_res_free(enable_prfle_res); return rc; diff --git a/src/ipa/libipa/es10b_euicc_mem_rst.c b/src/ipa/libipa/es10b_euicc_mem_rst.c index f57eb8e..5b2040f 100644 --- a/src/ipa/libipa/es10b_euicc_mem_rst.c +++ b/src/ipa/libipa/es10b_euicc_mem_rst.c @@ -150,7 +150,7 @@ rst_opt[0] |= (1 << (7 - SGP32_EuiccMemoryResetRequest__resetOptions_resetDefaultSmdpAddress)); if (req->eim_cfg_data) rst_opt[0] |= (1 << (7 - SGP32_EuiccMemoryResetRequest__resetOptions_resetEimConfigData)); - if (req->auto_enable_cfg) + if (req->immediate_enable_cfg) rst_opt[0] |= (1 << (7 - SGP32_EuiccMemoryResetRequest__resetOptions_resetImmediateEnableConfig)); es10b_req = ipa_es10x_req_enc(&asn_DEF_SGP32_EuiccMemoryResetRequest, &mem_rst_req, "eUICCMemoryReset"); @@ -200,14 +200,14 @@ IPA_FREE(ctx->nvstate.iot_euicc_emu.eim_cfg_ber); ctx->nvstate.iot_euicc_emu.eim_cfg_ber = NULL; } - if (req->auto_enable_cfg) { + if (req->immediate_enable_cfg) { IPA_LOGP_ES10X("eUICCMemoryReset", LINFO, - "IoT eUICC emulation active, also clearing auto enable configuration...\n"); - IPA_FREE(ctx->nvstate.iot_euicc_emu.auto_enable.smdp_oid); - ctx->nvstate.iot_euicc_emu.auto_enable.smdp_oid = NULL; - IPA_FREE(ctx->nvstate.iot_euicc_emu.auto_enable.smdp_address); - ctx->nvstate.iot_euicc_emu.auto_enable.smdp_address = NULL; - ctx->nvstate.iot_euicc_emu.auto_enable.flag = false; + "IoT eUICC emulation active, also clearing immediate enable configuration...\n"); + IPA_FREE(ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid); + ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid = NULL; + IPA_FREE(ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address); + ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address = NULL; + ctx->nvstate.iot_euicc_emu.immediate_enable.flag = false; } es10b_req = ipa_es10x_req_enc(&asn_DEF_EuiccMemoryResetRequest, &mem_rst_req, "eUICCMemoryReset"); diff --git a/src/ipa/libipa/es10b_euicc_mem_rst.h b/src/ipa/libipa/es10b_euicc_mem_rst.h index 81c9c01..8f4d304 100644 --- a/src/ipa/libipa/es10b_euicc_mem_rst.h +++ b/src/ipa/libipa/es10b_euicc_mem_rst.h @@ -15,7 +15,7 @@ bool test_profiles; bool default_smdp_addr; bool eim_cfg_data; - bool auto_enable_cfg; + bool immediate_enable_cfg; }; int ipa_es10b_euicc_mem_rst(struct ipa_context *ctx, const struct ipa_es10b_euicc_mem_rst *req); diff --git a/src/ipa/libipa/es10b_load_bnd_prfle_pkg.c b/src/ipa/libipa/es10b_load_bnd_prfle_pkg.c index 52b70dc..d11eb7d 100644 --- a/src/ipa/libipa/es10b_load_bnd_prfle_pkg.c +++ b/src/ipa/libipa/es10b_load_bnd_prfle_pkg.c @@ -23,22 +23,22 @@ #include "es10x.h" #include "es10b_load_bnd_prfle_pkg.h" -static void collect_auto_enable_data_from_prfle_inst_rslt(struct ipa_context *ctx, - struct ProfileInstallationResult *prfle_inst_rslt) +static void collect_immediate_enable_data_from_prfle_inst_rslt(struct ipa_context *ctx, + struct ProfileInstallationResult *prfle_inst_rslt) { struct ProfileInstallationResultData *prfle_inst_res_data = &prfle_inst_rslt->profileInstallationResultData; - /* When the profile was not successfully installed, then there is no point in collecting any auto enable data. */ + /* When the profile was not successfully installed, then there is no point in collecting any immediate enable data. */ if (prfle_inst_res_data->finalResult.present != ProfileInstallationResultData__finalResult_PR_successResult) return; - /* Collect smdpOid and smdpAddress so that we can verify later whether the auto enable is granted or not. */ - ctx->iot_euicc_emu.auto_enable.smdp_oid = IPA_BUF_FROM_ASN(&prfle_inst_res_data->smdpOid); - ctx->iot_euicc_emu.auto_enable.smdp_address = + /* Collect smdpOid and smdpAddress so that we can verify later whether the immediate enable is granted or not. */ + ctx->iot_euicc_emu.immediate_enable.smdp_oid = IPA_BUF_FROM_ASN(&prfle_inst_res_data->smdpOid); + ctx->iot_euicc_emu.immediate_enable.smdp_address = IPA_BUF_FROM_ASN(&prfle_inst_res_data->notificationMetadata.notificationAddress); /* Collect AID of the profile so that we later know which profile to enable. */ - ctx->iot_euicc_emu.auto_enable.profile_aid = + ctx->iot_euicc_emu.immediate_enable.profile_aid = IPA_BUF_FROM_ASN(&prfle_inst_res_data->finalResult.choice.successResult.aid); } @@ -67,14 +67,14 @@ struct ipa_es10b_load_bnd_prfle_pkg_res *res = IPA_ALLOC_ZERO(struct ipa_es10b_load_bnd_prfle_pkg_res); int rc; - /* In case IoT eUICC emulation is active, ensure that the auto enable data is cleared. (This data has no + /* In case IoT eUICC emulation is active, ensure that the immediate enable data is cleared. (This data has no * relevance in case a real IoT eUICC is used.) */ - ipa_buf_free(ctx->iot_euicc_emu.auto_enable.smdp_oid); - ctx->iot_euicc_emu.auto_enable.smdp_oid = NULL; - ipa_buf_free(ctx->iot_euicc_emu.auto_enable.smdp_address); - ctx->iot_euicc_emu.auto_enable.smdp_address = NULL; - ipa_buf_free(ctx->iot_euicc_emu.auto_enable.profile_aid); - ctx->iot_euicc_emu.auto_enable.profile_aid = NULL; + ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.smdp_oid); + ctx->iot_euicc_emu.immediate_enable.smdp_oid = NULL; + ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.smdp_address); + ctx->iot_euicc_emu.immediate_enable.smdp_address = NULL; + ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.profile_aid); + ctx->iot_euicc_emu.immediate_enable.profile_aid = NULL; /* The ES10b LoadBoundProfilePackage function is a pseudo function that only exists as a placeholder in the * specification. In practice it is just a STORE DATA command that carries a profile segment without any @@ -94,10 +94,10 @@ if (rc < 0) goto error; - /* In case IoT eUICC emulation is active, collect auto enable data to support the emulation of + /* In case IoT eUICC emulation is active, collect immediate enable data to support the emulation of * the ES10b function EnableUsingDD. */ if (ctx->cfg->iot_euicc_emu_enabled) - collect_auto_enable_data_from_prfle_inst_rslt(ctx, res->res); + collect_immediate_enable_data_from_prfle_inst_rslt(ctx, res->res); } IPA_FREE(es10b_res); diff --git a/src/ipa/libipa/es10b_load_euicc_pkg.c b/src/ipa/libipa/es10b_load_euicc_pkg.c index c25ebc9..fd3f1df 100644 --- a/src/ipa/libipa/es10b_load_euicc_pkg.c +++ b/src/ipa/libipa/es10b_load_euicc_pkg.c @@ -242,21 +242,21 @@ /* Update immediateEnableFlag */ if (configureImmediateEnable_psmo->immediateEnableFlag) - ctx->nvstate.iot_euicc_emu.auto_enable.flag = true; + ctx->nvstate.iot_euicc_emu.immediate_enable.flag = true; else - ctx->nvstate.iot_euicc_emu.auto_enable.flag = false; + ctx->nvstate.iot_euicc_emu.immediate_enable.flag = false; /* Update smdpOid */ - ipa_buf_free(ctx->nvstate.iot_euicc_emu.auto_enable.smdp_oid); - ctx->nvstate.iot_euicc_emu.auto_enable.smdp_oid = NULL; + ipa_buf_free(ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid); + ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid = NULL; if (configureImmediateEnable_psmo->smdpOid) - ctx->nvstate.iot_euicc_emu.auto_enable.smdp_oid = IPA_BUF_FROM_ASN(configureImmediateEnable_psmo->smdpOid); + ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid = IPA_BUF_FROM_ASN(configureImmediateEnable_psmo->smdpOid); /* Update smdpAddress */ - ipa_buf_free(ctx->nvstate.iot_euicc_emu.auto_enable.smdp_address); - ctx->nvstate.iot_euicc_emu.auto_enable.smdp_address = NULL; + ipa_buf_free(ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address); + ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address = NULL; if (configureImmediateEnable_psmo->smdpAddress) - ctx->nvstate.iot_euicc_emu.auto_enable.smdp_address = + ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address = IPA_BUF_FROM_ASN(configureImmediateEnable_psmo->smdpAddress); euicc_result_data->choice.configureImmediateEnableResult = ConfigureImmediateEnableResult_ok; diff --git a/src/ipa/libipa/ipad.c b/src/ipa/libipa/ipad.c index fa1fb21..5d4c0a9 100644 --- a/src/ipa/libipa/ipad.c +++ b/src/ipa/libipa/ipad.c @@ -38,8 +38,8 @@ { /* free dynamically allocated struct members (append code for new members here) */ IPA_FREE(nvstate->iot_euicc_emu.eim_cfg_ber); - IPA_FREE(nvstate->iot_euicc_emu.auto_enable.smdp_oid); - IPA_FREE(nvstate->iot_euicc_emu.auto_enable.smdp_address); + IPA_FREE(nvstate->iot_euicc_emu.immediate_enable.smdp_oid); + IPA_FREE(nvstate->iot_euicc_emu.immediate_enable.smdp_address); } static void nvstate_reset(struct ipa_nvstate *nvstate) @@ -77,8 +77,8 @@ /* serialize dynamically allocated struct members (append code for new members here) */ nvstate_bin = nvstate_serialize_ipa_buf(nvstate_bin, nvstate->iot_euicc_emu.eim_cfg_ber); - nvstate_bin = nvstate_serialize_ipa_buf(nvstate_bin, nvstate->iot_euicc_emu.auto_enable.smdp_oid); - nvstate_bin = nvstate_serialize_ipa_buf(nvstate_bin, nvstate->iot_euicc_emu.auto_enable.smdp_address); + nvstate_bin = nvstate_serialize_ipa_buf(nvstate_bin, nvstate->iot_euicc_emu.immediate_enable.smdp_oid); + nvstate_bin = nvstate_serialize_ipa_buf(nvstate_bin, nvstate->iot_euicc_emu.immediate_enable.smdp_address); return nvstate_bin; } @@ -126,8 +126,8 @@ /* deserialize dynamically allocated struct members (append code for new members here) */ nvstate->iot_euicc_emu.eim_cfg_ber = nvstate_deserialize_ipa_buf(&nvstate_data, &nvstate_data_len); - nvstate->iot_euicc_emu.auto_enable.smdp_oid = nvstate_deserialize_ipa_buf(&nvstate_data, &nvstate_data_len); - nvstate->iot_euicc_emu.auto_enable.smdp_address = nvstate_deserialize_ipa_buf(&nvstate_data, &nvstate_data_len); + nvstate->iot_euicc_emu.immediate_enable.smdp_oid = nvstate_deserialize_ipa_buf(&nvstate_data, &nvstate_data_len); + nvstate->iot_euicc_emu.immediate_enable.smdp_address = nvstate_deserialize_ipa_buf(&nvstate_data, &nvstate_data_len); } /*! Read eIM configuration from eUICC and pick a suitable eIM. @@ -252,14 +252,14 @@ * \param[inout] default_smdp_addr apply reset option "resetDefaultSmdpAddress". * \returns 0 on success, negative on error. */ int ipa_euicc_mem_rst(struct ipa_context *ctx, bool operatnl_profiles, bool test_profiles, bool default_smdp_addr, - bool eim_cfg_data, bool auto_enable_cfg) + bool eim_cfg_data, bool immediate_enable_cfg) { struct ipa_es10b_euicc_mem_rst euicc_mem_rst = { 0 }; euicc_mem_rst.operatnl_profiles = operatnl_profiles; euicc_mem_rst.test_profiles = test_profiles; euicc_mem_rst.default_smdp_addr = default_smdp_addr; euicc_mem_rst.eim_cfg_data = eim_cfg_data; - euicc_mem_rst.auto_enable_cfg = auto_enable_cfg; + euicc_mem_rst.immediate_enable_cfg = immediate_enable_cfg; return ipa_es10b_euicc_mem_rst(ctx, &euicc_mem_rst); } @@ -346,9 +346,9 @@ nvstate = nvstate_serialize(&ctx->nvstate); IPA_FREE(ctx->iot_euicc_emu.rollback_iccid); - ipa_buf_free(ctx->iot_euicc_emu.auto_enable.smdp_oid); - ipa_buf_free(ctx->iot_euicc_emu.auto_enable.smdp_address); - ipa_buf_free(ctx->iot_euicc_emu.auto_enable.profile_aid); + ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.smdp_oid); + ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.smdp_address); + ipa_buf_free(ctx->iot_euicc_emu.immediate_enable.profile_aid); IPA_FREE(ctx->eim_id); IPA_FREE(ctx->eim_fqdn); ipa_proc_eucc_pkg_dwnld_exec_res_free(ctx->proc_eucc_pkg_dwnld_exec_res); -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43024?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: Iad212f9b3e4430d4eaa6d4afdac0e73009275dfb Gerrit-Change-Number: 43024 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
[L] Change in onomondo-ipa[master]: V1.2: Update from "EnableUsingDD" to "ImmediateEnable" function
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43025?usp=email
) Change subject: V1.2: Update from "EnableUsingDD" to "ImmediateEnable" function ...................................................................... V1.2: Update from "EnableUsingDD" to "ImmediateEnable" function Work on 5.9.15 -> Renamed things and added ASN.1 fields, but no processing of these fields yet. Reference: SGP.32 Section 5.9.15 Related: SYS#8101 Change-Id: Id750b2f5ca6c08a013aa30f876aa37e6291a30d5 --- M asn1/SGP32Definitions.asn M src/ipa/libasn/CMakeLists.txt D src/ipa/libasn/EnableUsingDDRequest.c D src/ipa/libasn/EnableUsingDDResponse.c D src/ipa/libasn/EnableUsingDDResponse.h A src/ipa/libasn/ImmediateEnableRequest.c R src/ipa/libasn/ImmediateEnableRequest.h A src/ipa/libasn/ImmediateEnableResponse.c A src/ipa/libasn/ImmediateEnableResponse.h M src/ipa/libipa/CMakeLists.txt R src/ipa/libipa/es10b_immediate_enable.c R src/ipa/libipa/es10b_immediate_enable.h M src/ipa/libipa/es10b_load_bnd_prfle_pkg.c M src/ipa/libipa/proc_prfle_inst.c 14 files changed, 218 insertions(+), 198 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/25/43025/1 diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index bc4fdad..9b5da2f 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -458,15 +458,17 @@ -- Section 5.9.15 -- ASN1START -EnableUsingDDRequest ::= [90] SEQUENCE { -- Tag 'BF5A' +ImmediateEnableRequest ::= [90] SEQUENCE { -- Tag 'BF5A' + refreshFlag BOOLEAN -- indicating whether REFRESH is required } -- ASN1STOP -- ASN1START -EnableUsingDDResponse ::= [90] SEQUENCE { -- Tag 'BF5A' - enableUsingDDResult [0] INTEGER { +ImmediateEnableResponse ::= [90] SEQUENCE { -- Tag 'BF5A' + immediateEnableResult [0] INTEGER { ok(0), immediateEnableNotAvailable(1), noSessionContext(4), + catBusy(5), undefinedError(127) } } diff --git a/src/ipa/libasn/CMakeLists.txt b/src/ipa/libasn/CMakeLists.txt index 8efadc9..90d7b42 100644 --- a/src/ipa/libasn/CMakeLists.txt +++ b/src/ipa/libasn/CMakeLists.txt @@ -289,10 +289,6 @@ EnableProfileResponse.h EnableProfileResult.c EnableProfileResult.h -EnableUsingDDRequest.c -EnableUsingDDRequest.h -EnableUsingDDResponse.c -EnableUsingDDResponse.h ErrorReason.c ErrorReason.h ErrorResult.c @@ -437,6 +433,10 @@ Iccid.h IconType.c IconType.h +ImmediateEnableRequest.c +ImmediateEnableRequest.h +ImmediateEnableResponse.c +ImmediateEnableResponse.h InhibitAnyPolicy.c InhibitAnyPolicy.h InitialiseSecureChannelRequest.c diff --git a/src/ipa/libasn/EnableUsingDDRequest.c b/src/ipa/libasn/EnableUsingDDRequest.c deleted file mode 100644 index c37fbfe..0000000 --- a/src/ipa/libasn/EnableUsingDDRequest.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 "EnableUsingDDRequest.h" - -static const ber_tlv_tag_t asn_DEF_EnableUsingDDRequest_tags_1[] = { - (ASN_TAG_CLASS_CONTEXT | (90 << 2)), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static asn_SEQUENCE_specifics_t asn_SPC_EnableUsingDDRequest_specs_1 = { - sizeof(struct EnableUsingDDRequest), - offsetof(struct EnableUsingDDRequest, _asn_ctx), - 0, /* No top level tags */ - 0, /* No tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - -1, /* First extension addition */ -}; -asn_TYPE_descriptor_t asn_DEF_EnableUsingDDRequest = { - "EnableUsingDDRequest", - "EnableUsingDDRequest", - &asn_OP_SEQUENCE, - asn_DEF_EnableUsingDDRequest_tags_1, - sizeof(asn_DEF_EnableUsingDDRequest_tags_1) - /sizeof(asn_DEF_EnableUsingDDRequest_tags_1[0]) - 1, /* 1 */ - asn_DEF_EnableUsingDDRequest_tags_1, /* Same as above */ - sizeof(asn_DEF_EnableUsingDDRequest_tags_1) - /sizeof(asn_DEF_EnableUsingDDRequest_tags_1[0]), /* 2 */ - { 0, 0, SEQUENCE_constraint }, - 0, 0, /* No members */ - &asn_SPC_EnableUsingDDRequest_specs_1 /* Additional specs */ -}; - diff --git a/src/ipa/libasn/EnableUsingDDResponse.c b/src/ipa/libasn/EnableUsingDDResponse.c deleted file mode 100644 index af30721..0000000 --- a/src/ipa/libasn/EnableUsingDDResponse.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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 "EnableUsingDDResponse.h" - -static asn_TYPE_member_t asn_MBR_EnableUsingDDResponse_1[] = { - { ATF_NOFLAGS, 0, offsetof(struct EnableUsingDDResponse, enableUsingDDResult), - (ASN_TAG_CLASS_CONTEXT | (0 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_NativeInteger, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "enableUsingDDResult" - }, -}; -static const ber_tlv_tag_t asn_DEF_EnableUsingDDResponse_tags_1[] = { - (ASN_TAG_CLASS_CONTEXT | (90 << 2)), - (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) -}; -static const asn_TYPE_tag2member_t asn_MAP_EnableUsingDDResponse_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* enableUsingDDResult */ -}; -static asn_SEQUENCE_specifics_t asn_SPC_EnableUsingDDResponse_specs_1 = { - sizeof(struct EnableUsingDDResponse), - offsetof(struct EnableUsingDDResponse, _asn_ctx), - asn_MAP_EnableUsingDDResponse_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_EnableUsingDDResponse = { - "EnableUsingDDResponse", - "EnableUsingDDResponse", - &asn_OP_SEQUENCE, - asn_DEF_EnableUsingDDResponse_tags_1, - sizeof(asn_DEF_EnableUsingDDResponse_tags_1) - /sizeof(asn_DEF_EnableUsingDDResponse_tags_1[0]) - 1, /* 1 */ - asn_DEF_EnableUsingDDResponse_tags_1, /* Same as above */ - sizeof(asn_DEF_EnableUsingDDResponse_tags_1) - /sizeof(asn_DEF_EnableUsingDDResponse_tags_1[0]), /* 2 */ - { 0, 0, SEQUENCE_constraint }, - asn_MBR_EnableUsingDDResponse_1, - 1, /* Elements count */ - &asn_SPC_EnableUsingDDResponse_specs_1 /* Additional specs */ -}; - diff --git a/src/ipa/libasn/EnableUsingDDResponse.h b/src/ipa/libasn/EnableUsingDDResponse.h deleted file mode 100644 index faa2c26..0000000 --- a/src/ipa/libasn/EnableUsingDDResponse.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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 _EnableUsingDDResponse_H_ -#define _EnableUsingDDResponse_H_ - - -#include <asn_application.h> - -/* Including external dependencies */ -#include <NativeInteger.h> -#include <constr_SEQUENCE.h> - -#ifdef __cplusplus -extern "C" { -#endif - -/* Dependencies */ -typedef enum EnableUsingDDResponse__enableUsingDDResult { - EnableUsingDDResponse__enableUsingDDResult_ok = 0, - EnableUsingDDResponse__enableUsingDDResult_immediateEnableNotAvailable = 1, - EnableUsingDDResponse__enableUsingDDResult_noSessionContext = 4, - EnableUsingDDResponse__enableUsingDDResult_undefinedError = 127 -} e_EnableUsingDDResponse__enableUsingDDResult; - -/* EnableUsingDDResponse */ -typedef struct EnableUsingDDResponse { - long enableUsingDDResult; - /* - * This type is extensible, - * possible extensions are below. - */ - - /* Context for parsing across buffer boundaries */ - asn_struct_ctx_t _asn_ctx; -} EnableUsingDDResponse_t; - -/* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_EnableUsingDDResponse; - -#ifdef __cplusplus -} -#endif - -#endif /* _EnableUsingDDResponse_H_ */ -#include <asn_internal.h> diff --git a/src/ipa/libasn/ImmediateEnableRequest.c b/src/ipa/libasn/ImmediateEnableRequest.c new file mode 100644 index 0000000..e08fe51 --- /dev/null +++ b/src/ipa/libasn/ImmediateEnableRequest.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 "ImmediateEnableRequest.h" + +static asn_TYPE_member_t asn_MBR_ImmediateEnableRequest_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct ImmediateEnableRequest, 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_ImmediateEnableRequest_tags_1[] = { + (ASN_TAG_CLASS_CONTEXT | (90 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_ImmediateEnableRequest_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* refreshFlag */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_ImmediateEnableRequest_specs_1 = { + sizeof(struct ImmediateEnableRequest), + offsetof(struct ImmediateEnableRequest, _asn_ctx), + asn_MAP_ImmediateEnableRequest_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_ImmediateEnableRequest = { + "ImmediateEnableRequest", + "ImmediateEnableRequest", + &asn_OP_SEQUENCE, + asn_DEF_ImmediateEnableRequest_tags_1, + sizeof(asn_DEF_ImmediateEnableRequest_tags_1) + /sizeof(asn_DEF_ImmediateEnableRequest_tags_1[0]) - 1, /* 1 */ + asn_DEF_ImmediateEnableRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_ImmediateEnableRequest_tags_1) + /sizeof(asn_DEF_ImmediateEnableRequest_tags_1[0]), /* 2 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_ImmediateEnableRequest_1, + 1, /* Elements count */ + &asn_SPC_ImmediateEnableRequest_specs_1 /* Additional specs */ +}; + diff --git a/src/ipa/libasn/EnableUsingDDRequest.h b/src/ipa/libasn/ImmediateEnableRequest.h similarity index 64% rename from src/ipa/libasn/EnableUsingDDRequest.h rename to src/ipa/libasn/ImmediateEnableRequest.h index ab1573b..0def067 100644 --- a/src/ipa/libasn/EnableUsingDDRequest.h +++ b/src/ipa/libasn/ImmediateEnableRequest.h @@ -5,21 +5,23 @@ * `asn1c -fcompound-names -no-gen-example` */ -#ifndef _EnableUsingDDRequest_H_ -#define _EnableUsingDDRequest_H_ +#ifndef _ImmediateEnableRequest_H_ +#define _ImmediateEnableRequest_H_ #include <asn_application.h> /* Including external dependencies */ +#include <BOOLEAN.h> #include <constr_SEQUENCE.h> #ifdef __cplusplus extern "C" { #endif -/* EnableUsingDDRequest */ -typedef struct EnableUsingDDRequest { +/* ImmediateEnableRequest */ +typedef struct ImmediateEnableRequest { + BOOLEAN_t refreshFlag; /* * This type is extensible, * possible extensions are below. @@ -27,14 +29,14 @@ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; -} EnableUsingDDRequest_t; +} ImmediateEnableRequest_t; /* Implementation */ -extern asn_TYPE_descriptor_t asn_DEF_EnableUsingDDRequest; +extern asn_TYPE_descriptor_t asn_DEF_ImmediateEnableRequest; #ifdef __cplusplus } #endif -#endif /* _EnableUsingDDRequest_H_ */ +#endif /* _ImmediateEnableRequest_H_ */ #include <asn_internal.h> diff --git a/src/ipa/libasn/ImmediateEnableResponse.c b/src/ipa/libasn/ImmediateEnableResponse.c new file mode 100644 index 0000000..e6197b1 --- /dev/null +++ b/src/ipa/libasn/ImmediateEnableResponse.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 "ImmediateEnableResponse.h" + +static asn_TYPE_member_t asn_MBR_ImmediateEnableResponse_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct ImmediateEnableResponse, immediateEnableResult), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "immediateEnableResult" + }, +}; +static const ber_tlv_tag_t asn_DEF_ImmediateEnableResponse_tags_1[] = { + (ASN_TAG_CLASS_CONTEXT | (90 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_ImmediateEnableResponse_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* immediateEnableResult */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_ImmediateEnableResponse_specs_1 = { + sizeof(struct ImmediateEnableResponse), + offsetof(struct ImmediateEnableResponse, _asn_ctx), + asn_MAP_ImmediateEnableResponse_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_ImmediateEnableResponse = { + "ImmediateEnableResponse", + "ImmediateEnableResponse", + &asn_OP_SEQUENCE, + asn_DEF_ImmediateEnableResponse_tags_1, + sizeof(asn_DEF_ImmediateEnableResponse_tags_1) + /sizeof(asn_DEF_ImmediateEnableResponse_tags_1[0]) - 1, /* 1 */ + asn_DEF_ImmediateEnableResponse_tags_1, /* Same as above */ + sizeof(asn_DEF_ImmediateEnableResponse_tags_1) + /sizeof(asn_DEF_ImmediateEnableResponse_tags_1[0]), /* 2 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_ImmediateEnableResponse_1, + 1, /* Elements count */ + &asn_SPC_ImmediateEnableResponse_specs_1 /* Additional specs */ +}; + diff --git a/src/ipa/libasn/ImmediateEnableResponse.h b/src/ipa/libasn/ImmediateEnableResponse.h new file mode 100644 index 0000000..f4c4445 --- /dev/null +++ b/src/ipa/libasn/ImmediateEnableResponse.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 _ImmediateEnableResponse_H_ +#define _ImmediateEnableResponse_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include <NativeInteger.h> +#include <constr_SEQUENCE.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum ImmediateEnableResponse__immediateEnableResult { + ImmediateEnableResponse__immediateEnableResult_ok = 0, + ImmediateEnableResponse__immediateEnableResult_immediateEnableNotAvailable = 1, + ImmediateEnableResponse__immediateEnableResult_noSessionContext = 4, + ImmediateEnableResponse__immediateEnableResult_catBusy = 5, + ImmediateEnableResponse__immediateEnableResult_undefinedError = 127 +} e_ImmediateEnableResponse__immediateEnableResult; + +/* ImmediateEnableResponse */ +typedef struct ImmediateEnableResponse { + long immediateEnableResult; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ImmediateEnableResponse_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ImmediateEnableResponse; + +#ifdef __cplusplus +} +#endif + +#endif /* _ImmediateEnableResponse_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libipa/CMakeLists.txt b/src/ipa/libipa/CMakeLists.txt index 49a2c14..e6bed87 100644 --- a/src/ipa/libipa/CMakeLists.txt +++ b/src/ipa/libipa/CMakeLists.txt @@ -23,7 +23,7 @@ es10c_delete_prfle.c es10c_disable_prfle.c es10c_enable_prfle.c - es10b_enable_using_dd.c + es10b_immediate_enable.c es10c_get_eid.c es10c_get_prfle_info.c es10x.c diff --git a/src/ipa/libipa/es10b_enable_using_dd.c b/src/ipa/libipa/es10b_immediate_enable.c similarity index 61% rename from src/ipa/libipa/es10b_enable_using_dd.c rename to src/ipa/libipa/es10b_immediate_enable.c index 87e731d..1d0b942 100644 --- a/src/ipa/libipa/es10b_enable_using_dd.c +++ b/src/ipa/libipa/es10b_immediate_enable.c @@ -5,7 +5,7 @@ * * Author: Philipp Maier <pmaier(a)sysmocom.de> / sysmocom - s.f.m.c. GmbH * - * See also: GSMA SGP.23, 5.9.15: Function (ES10b): EnableUsingDD + * See also: GSMA SGP.23, 5.9.15: Function (ES10b): ImmediateEnable */ #include <stdio.h> @@ -16,67 +16,67 @@ #include <onomondo/ipa/utils.h> #include <onomondo/ipa/scard.h> #include <onomondo/ipa/log.h> -#include <EnableUsingDDRequest.h> -#include <EnableUsingDDResponse.h> +#include <ImmediateEnableRequest.h> +#include <ImmediateEnableResponse.h> #include "context.h" #include "length.h" #include "utils.h" #include "euicc.h" #include "es10x.h" -#include "es10b_enable_using_dd.h" +#include "es10b_immediate_enable.h" #include "es10c_enable_prfle.h" static const struct num_str_map error_code_strings[] = { - { EnableUsingDDResponse__enableUsingDDResult_ok, "ok" }, - { EnableUsingDDResponse__enableUsingDDResult_immediateEnableNotAvailable, "immediateEnableNotAvailable" }, - { EnableUsingDDResponse__enableUsingDDResult_noSessionContext, "noSessionContext" }, - { EnableUsingDDResponse__enableUsingDDResult_undefinedError, "undefinedError" }, + { ImmediateEnableResponse__immediateEnableResult_ok, "ok" }, + { ImmediateEnableResponse__immediateEnableResult_immediateEnableNotAvailable, "immediateEnableNotAvailable" }, + { ImmediateEnableResponse__immediateEnableResult_noSessionContext, "noSessionContext" }, + { ImmediateEnableResponse__immediateEnableResult_undefinedError, "undefinedError" }, { 0, NULL } }; -static int dec_enable_using_dd_res(const struct ipa_buf *es10b_res) +static int dec_immediate_enable_res(const struct ipa_buf *es10b_res) { - struct EnableUsingDDResponse *asn = NULL; + struct ImmediateEnableResponse *asn = NULL; int rc; - asn = ipa_es10x_res_dec(&asn_DEF_EnableUsingDDResponse, es10b_res, "EnableUsingDD"); + asn = ipa_es10x_res_dec(&asn_DEF_ImmediateEnableResponse, es10b_res, "ImmediateEnable"); if (!asn) return -EINVAL; - rc = asn->enableUsingDDResult; + rc = asn->immediateEnableResult; - if (rc == EnableUsingDDResponse__enableUsingDDResult_ok) { - IPA_LOGP_ES10X("EnableUsingDD", LERROR, "function succeeded with status code %d=%s!\n", + if (rc == ImmediateEnableResponse__immediateEnableResult_ok) { + IPA_LOGP_ES10X("ImmediateEnable", LERROR, "function succeeded with status code %d=%s!\n", rc, ipa_str_from_num(error_code_strings, rc, "(unknown)")); } else { - IPA_LOGP_ES10X("EnableUsingDD", LERROR, "function failed with error code %d=%s!\n", + IPA_LOGP_ES10X("ImmediateEnable", LERROR, "function failed with error code %d=%s!\n", rc, ipa_str_from_num(error_code_strings, rc, "(unknown)")); } - ASN_STRUCT_FREE(asn_DEF_EnableUsingDDResponse, asn); + ASN_STRUCT_FREE(asn_DEF_ImmediateEnableResponse, asn); return rc; } -int enable_using_dd(struct ipa_context *ctx) +int immediate_enable(struct ipa_context *ctx) { struct ipa_buf *es10b_req = NULL; struct ipa_buf *es10b_res = NULL; - struct EnableUsingDDRequest enable_using_dd_req = { 0 }; + struct ImmediateEnableRequest immediate_enable_req = { 0 }; int rc = -EINVAL; - es10b_req = ipa_es10x_req_enc(&asn_DEF_EnableUsingDDRequest, &enable_using_dd_req, "EnableUsingDD"); + es10b_req = ipa_es10x_req_enc(&asn_DEF_ImmediateEnableRequest, &immediate_enable_req, "ImmediateEnable"); if (!es10b_req) { - IPA_LOGP_ES10X("EnableUsingDD", LERROR, "unable to encode ES10b request\n"); + IPA_LOGP_ES10X("ImmediateEnable", LERROR, "unable to encode ES10b request\n"); goto error; } es10b_res = ipa_euicc_transceive_es10x(ctx, es10b_req); if (!es10b_res) { - IPA_LOGP_ES10X("EnableUsingDD", LERROR, "no ES10b response\n"); + IPA_LOGP_ES10X("ImmediateEnable", LERROR, "no ES10b response\n"); goto error; } - rc = dec_enable_using_dd_res(es10b_res); + rc = dec_immediate_enable_res(es10b_res); if (rc < 0) goto error; @@ -86,36 +86,36 @@ return rc; } -int enable_using_dd_emu(struct ipa_context *ctx) +int immediate_enable_emu(struct ipa_context *ctx) { struct ipa_es10c_enable_prfle_req enable_prfle_req = { 0 }; struct ipa_es10c_enable_prfle_res *enable_prfle_res = NULL; - int rc = EnableUsingDDResponse__enableUsingDDResult_undefinedError; + int rc = ImmediateEnableResponse__immediateEnableResult_undefinedError; /* Auto enable must be active */ if (ctx->nvstate.iot_euicc_emu.immediate_enable.flag == false) { - rc = EnableUsingDDResponse__enableUsingDDResult_immediateEnableNotAvailable; + rc = ImmediateEnableResponse__immediateEnableResult_immediateEnableNotAvailable; goto error; } /* We also need either the smdp_oid or the smdp_address to verify against */ if (ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid == NULL && ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address == NULL) { - rc = EnableUsingDDResponse__enableUsingDDResult_immediateEnableNotAvailable; + rc = ImmediateEnableResponse__immediateEnableResult_immediateEnableNotAvailable; goto error; } /* Ensure the session context is present and complete */ if (ctx->iot_euicc_emu.immediate_enable.smdp_address == NULL) { - rc = EnableUsingDDResponse__enableUsingDDResult_noSessionContext; + rc = ImmediateEnableResponse__immediateEnableResult_noSessionContext; goto error; } if (ctx->iot_euicc_emu.immediate_enable.smdp_oid == NULL) { - rc = EnableUsingDDResponse__enableUsingDDResult_noSessionContext; + rc = ImmediateEnableResponse__immediateEnableResult_noSessionContext; goto error; } if (ctx->iot_euicc_emu.immediate_enable.profile_aid == NULL) { - rc = EnableUsingDDResponse__enableUsingDDResult_noSessionContext; + rc = ImmediateEnableResponse__immediateEnableResult_noSessionContext; goto error; } @@ -123,13 +123,13 @@ if (ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid) { if (ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid->len != ctx->iot_euicc_emu.immediate_enable.smdp_oid->len) { - rc = EnableUsingDDResponse__enableUsingDDResult_immediateEnableNotAvailable; + rc = ImmediateEnableResponse__immediateEnableResult_immediateEnableNotAvailable; goto error; } if (memcmp(ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_oid->data, ctx->iot_euicc_emu.immediate_enable.smdp_oid->data, ctx->iot_euicc_emu.immediate_enable.smdp_oid->len)) { - rc = EnableUsingDDResponse__enableUsingDDResult_immediateEnableNotAvailable; + rc = ImmediateEnableResponse__immediateEnableResult_immediateEnableNotAvailable; goto error; } } @@ -138,13 +138,13 @@ if (ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address) { if (ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address->len != ctx->iot_euicc_emu.immediate_enable.smdp_address->len) { - rc = EnableUsingDDResponse__enableUsingDDResult_immediateEnableNotAvailable; + rc = ImmediateEnableResponse__immediateEnableResult_immediateEnableNotAvailable; goto error; } if (memcmp(ctx->nvstate.iot_euicc_emu.immediate_enable.smdp_address->data, ctx->iot_euicc_emu.immediate_enable.smdp_address->data, ctx->iot_euicc_emu.immediate_enable.smdp_address->len)) { - rc = EnableUsingDDResponse__enableUsingDDResult_immediateEnableNotAvailable; + rc = ImmediateEnableResponse__immediateEnableResult_immediateEnableNotAvailable; goto error; } } @@ -157,17 +157,17 @@ enable_prfle_res = ipa_es10c_enable_prfle(ctx, &enable_prfle_req); if (enable_prfle_res && enable_prfle_res->res->enableResult == EnableProfileResponse__enableResult_ok) - rc = EnableUsingDDResponse__enableUsingDDResult_ok; + rc = ImmediateEnableResponse__immediateEnableResult_ok; else - rc = EnableUsingDDResponse__enableUsingDDResult_undefinedError; + rc = ImmediateEnableResponse__immediateEnableResult_undefinedError; error: - if (rc == EnableUsingDDResponse__enableUsingDDResult_ok) { - IPA_LOGP_ES10X("EnableUsingDD", LERROR, + if (rc == ImmediateEnableResponse__immediateEnableResult_ok) { + IPA_LOGP_ES10X("ImmediateEnable", LERROR, "IoT eUICC emulation active, function succeeded with status code %d=%s!\n", rc, ipa_str_from_num(error_code_strings, rc, "(unknown)")); } else { - IPA_LOGP_ES10X("EnableUsingDD", LERROR, + IPA_LOGP_ES10X("ImmediateEnable", LERROR, "IoT eUICC emulation active, function failed with error code %d=%s!\n", rc, ipa_str_from_num(error_code_strings, rc, "(unknown)")); } @@ -184,13 +184,13 @@ return rc; } -/*! Function (ES10b): EnableUsingDD. +/*! Function (ES10b): ImmediateEnable. * \param[inout] ctx pointer to ipa_context. * \returns positive status code on success, negative on error. */ -int ipa_es10b_enable_using_dd(struct ipa_context *ctx) +int ipa_es10b_immediate_enable(struct ipa_context *ctx) { if (ctx->cfg->iot_euicc_emu_enabled) - return enable_using_dd_emu(ctx); + return immediate_enable_emu(ctx); else - return enable_using_dd(ctx); + return immediate_enable(ctx); } diff --git a/src/ipa/libipa/es10b_enable_using_dd.h b/src/ipa/libipa/es10b_immediate_enable.h similarity index 74% rename from src/ipa/libipa/es10b_enable_using_dd.h rename to src/ipa/libipa/es10b_immediate_enable.h index b73c541..7e3f0af 100644 --- a/src/ipa/libipa/es10b_enable_using_dd.h +++ b/src/ipa/libipa/es10b_immediate_enable.h @@ -8,4 +8,4 @@ struct ipa_context; -int ipa_es10b_enable_using_dd(struct ipa_context *ctx); +int ipa_es10b_immediate_enable(struct ipa_context *ctx); diff --git a/src/ipa/libipa/es10b_load_bnd_prfle_pkg.c b/src/ipa/libipa/es10b_load_bnd_prfle_pkg.c index d11eb7d..946ccb2 100644 --- a/src/ipa/libipa/es10b_load_bnd_prfle_pkg.c +++ b/src/ipa/libipa/es10b_load_bnd_prfle_pkg.c @@ -95,7 +95,7 @@ goto error; /* In case IoT eUICC emulation is active, collect immediate enable data to support the emulation of - * the ES10b function EnableUsingDD. */ + * the ES10b function ImmediateEnable. */ if (ctx->cfg->iot_euicc_emu_enabled) collect_immediate_enable_data_from_prfle_inst_rslt(ctx, res->res); } diff --git a/src/ipa/libipa/proc_prfle_inst.c b/src/ipa/libipa/proc_prfle_inst.c index 1d08910..264e095 100644 --- a/src/ipa/libipa/proc_prfle_inst.c +++ b/src/ipa/libipa/proc_prfle_inst.c @@ -21,7 +21,7 @@ #include "es10b_load_bnd_prfle_pkg.h" #include "esipa_handle_notif.h" #include "es10b_rm_notif_from_lst.h" -#include "es10b_enable_using_dd.h" +#include "es10b_immediate_enable.h" #include "bpp_segments.h" #include "proc_prfle_inst.h" @@ -42,7 +42,7 @@ } /* Instruct the eUICC to enable the newly installed profile (if configured and granted) */ - ipa_es10b_enable_using_dd(ctx); + ipa_es10b_immediate_enable(ctx); /* A response is present, this is either the normal ending of the installation sequence or the eUICC has aborted * the installation. In both situations we forward the ProfileInstallationResult to the eIM. */ -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43025?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: Id750b2f5ca6c08a013aa30f876aa37e6291a30d5 Gerrit-Change-Number: 43025 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
← Newer
1
...
46
47
48
49
50
51
52
...
87
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
Results per page:
10
25
50
100
200