lists.osmocom.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2026
July
June
May
April
March
February
January
2025
December
November
October
September
August
July
June
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
List overview
Download
gerrit-log
July 2026
----- 2026 -----
July 2026
June 2026
May 2026
April 2026
March 2026
February 2026
January 2026
----- 2025 -----
December 2025
November 2025
October 2025
September 2025
August 2025
July 2025
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
gerrit-log@lists.osmocom.org
1 participants
502 discussions
Start a n
N
ew thread
[L] Change in onomondo-ipa[master]: V1.2: Add 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
[S] Change in onomondo-ipa[master]: V1.2: Add new fields to IoTSpecificInfo
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43052?usp=email
) Change subject: V1.2: Add new fields to IoTSpecificInfo ...................................................................... V1.2: Add new fields to IoTSpecificInfo Add ecallSupported and fallbackSupported to IoTSpecificInfo, There is no impact on IPA process, because it is not used. Reference: SGP.32 Section 5.9.2 Related: SYS#8101 Change-Id: Iba95ac8dd059ee48d46f2ace54ece7a3338ae79f --- M asn1/SGP32Definitions.asn M src/ipa/libasn/IoTSpecificInfo.c M src/ipa/libasn/IoTSpecificInfo.h 3 files changed, 34 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/52/43052/1 diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index ee6478e..8537460 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -493,7 +493,9 @@ } -- Definition of IoTSpecificInfo IoTSpecificInfo ::= SEQUENCE { -iotVersion [0] SEQUENCE OF VersionType -- SGP.32 version(s) supported by the eUICC, at least one must be present + iotVersion [0] SEQUENCE OF VersionType, -- SGP.32 version(s) supported by the eUICC, at least one must be present + ecallSupported [1] NULL OPTIONAL, -- if present, eUICC supports the Emergency Mechanism + fallbackSupported [2] NULL OPTIONAL -- if present, eUICC supports the Fallback Mechanism } -- Definition of IpaMode IpaMode ::= INTEGER { diff --git a/src/ipa/libasn/IoTSpecificInfo.c b/src/ipa/libasn/IoTSpecificInfo.c index 6b0e5b0..c8f66ab 100644 --- a/src/ipa/libasn/IoTSpecificInfo.c +++ b/src/ipa/libasn/IoTSpecificInfo.c @@ -54,20 +54,42 @@ 0, 0, /* No default value */ "iotVersion" }, + { ATF_POINTER, 2, offsetof(struct IoTSpecificInfo, ecallSupported), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NULL, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ecallSupported" + }, + { ATF_POINTER, 1, offsetof(struct IoTSpecificInfo, fallbackSupported), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NULL, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "fallbackSupported" + }, }; +static const int asn_MAP_IoTSpecificInfo_oms_1[] = { 1, 2 }; static const ber_tlv_tag_t asn_DEF_IoTSpecificInfo_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_IoTSpecificInfo_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* iotVersion */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* iotVersion */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ecallSupported */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* fallbackSupported */ }; asn_SEQUENCE_specifics_t asn_SPC_IoTSpecificInfo_specs_1 = { sizeof(struct IoTSpecificInfo), offsetof(struct IoTSpecificInfo, _asn_ctx), asn_MAP_IoTSpecificInfo_tag2el_1, - 1, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 1, /* First extension addition */ + 3, /* Count of tags in the map */ + asn_MAP_IoTSpecificInfo_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_IoTSpecificInfo = { "IoTSpecificInfo", @@ -81,7 +103,7 @@ /sizeof(asn_DEF_IoTSpecificInfo_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_IoTSpecificInfo_1, - 1, /* Elements count */ + 3, /* Elements count */ &asn_SPC_IoTSpecificInfo_specs_1 /* Additional specs */ }; diff --git a/src/ipa/libasn/IoTSpecificInfo.h b/src/ipa/libasn/IoTSpecificInfo.h index fd8b958..fe6c22a 100644 --- a/src/ipa/libasn/IoTSpecificInfo.h +++ b/src/ipa/libasn/IoTSpecificInfo.h @@ -12,6 +12,7 @@ #include <asn_application.h> /* Including external dependencies */ +#include <NULL.h> #include "VersionType.h" #include <asn_SEQUENCE_OF.h> #include <constr_SEQUENCE_OF.h> @@ -29,6 +30,8 @@ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } iotVersion; + NULL_t *ecallSupported /* OPTIONAL */; + NULL_t *fallbackSupported /* OPTIONAL */; /* * This type is extensible, * possible extensions are below. @@ -41,7 +44,7 @@ /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_IoTSpecificInfo; extern asn_SEQUENCE_specifics_t asn_SPC_IoTSpecificInfo_specs_1; -extern asn_TYPE_member_t asn_MBR_IoTSpecificInfo_1[1]; +extern asn_TYPE_member_t asn_MBR_IoTSpecificInfo_1[3]; #ifdef __cplusplus } -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43052?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: Iba95ac8dd059ee48d46f2ace54ece7a3338ae79f Gerrit-Change-Number: 43052 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
[L] Change in onomondo-ipa[master]: V1.2: Add SGP.32-custom StoreMetadata
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43049?usp=email
) Change subject: V1.2: Add SGP.32-custom StoreMetadata ...................................................................... V1.2: Add SGP.32-custom StoreMetadata Add new StoreMetadata, which overrides and expands StoreMetadata from SGP.22. There is no impact on IPA process, because it is optional and not used. Reference: SGP.32 Section 5.5 Related: SYS#8101 Change-Id: Icfbc141dda82f091bcc9a1d7177e9fdb5b424750 --- M asn1/SGP32Definitions.asn M src/ipa/libasn/AuthenticateClientOkDPEsipa.c M src/ipa/libasn/AuthenticateClientOkDPEsipa.h M src/ipa/libasn/CMakeLists.txt A src/ipa/libasn/SGP32-StoreMetadataRequest.c A src/ipa/libasn/SGP32-StoreMetadataRequest.h 6 files changed, 452 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/49/43049/1 diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index e9e9c46..aea5a52 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -419,6 +419,25 @@ } -- ASN1STOP +-- Section 5.5 +-- ASN1START +SGP32-StoreMetadataRequest ::= [37] SEQUENCE { -- Tag 'BF25' + iccid Iccid, + serviceProviderName [17] UTF8String (SIZE(0..32)), -- Tag '91' + profileName [18] UTF8String (SIZE(0..64)), -- Tag '92' (corresponds to 'Short Description' defined in SGP.21 [2]) + iconType [19] IconType OPTIONAL, -- Tag '93' (JPG or PNG) + icon [20] OCTET STRING (SIZE(0..1024)) OPTIONAL, -- Tag '94' (Data of the icon. Size 64 x 64 pixel. This field SHALL only be present if iconType is present) + profileClass [21] ProfileClass DEFAULT operational, -- Tag '95' + notificationConfigurationInfo [22] SEQUENCE OF NotificationConfigurationInformation OPTIONAL, + profileOwner [23] OperatorId OPTIONAL, -- Tag 'B7' + profilePolicyRules [25] PprIds OPTIONAL, -- Tag '99' + serviceSpecificDataStoredInEuicc [34] VendorSpecificExtension OPTIONAL, -- Tag 'BF22' + serviceSpecificDataNotStoredInEuicc [35] VendorSpecificExtension OPTIONAL, -- Tag ‘BF23’ + ecallIndication [123] BOOLEAN OPTIONAL, -- Tag '9F7B' + fallbackAllowed [103] BOOLEAN OPTIONAL -- Tag '9F67' +} +-- ASN1STOP + -- Section 5.9.2 -- ASN1START SGP32-EUICCInfo2 ::= [34] SEQUENCE { -- Tag 'BF22' @@ -869,7 +888,7 @@ } AuthenticateClientOkDPEsipa ::= SEQUENCE { transactionId [0] TransactionId OPTIONAL, - profileMetaData [37] StoreMetadataRequest OPTIONAL, + profileMetaData [37] SGP32-StoreMetadataRequest OPTIONAL, smdpSigned2 SmdpSigned2, -- Signed information smdpSignature2 [APPLICATION 55] OCTET STRING, -- Tag '5F37' smdpCertificate Certificate, -- CERT.DPpb.ECDSA diff --git a/src/ipa/libasn/AuthenticateClientOkDPEsipa.c b/src/ipa/libasn/AuthenticateClientOkDPEsipa.c index 9ec34be..0b9b281 100644 --- a/src/ipa/libasn/AuthenticateClientOkDPEsipa.c +++ b/src/ipa/libasn/AuthenticateClientOkDPEsipa.c @@ -20,7 +20,7 @@ { ATF_POINTER, 1, offsetof(struct AuthenticateClientOkDPEsipa, profileMetaData), (ASN_TAG_CLASS_CONTEXT | (37 << 2)), -1, /* IMPLICIT tag at current level */ - &asn_DEF_StoreMetadataRequest, + &asn_DEF_SGP32_StoreMetadataRequest, 0, { 0, 0, 0 }, 0, 0, /* No default value */ diff --git a/src/ipa/libasn/AuthenticateClientOkDPEsipa.h b/src/ipa/libasn/AuthenticateClientOkDPEsipa.h index 3094af8..5d8e656 100644 --- a/src/ipa/libasn/AuthenticateClientOkDPEsipa.h +++ b/src/ipa/libasn/AuthenticateClientOkDPEsipa.h @@ -24,12 +24,12 @@ #endif /* Forward declarations */ -struct StoreMetadataRequest; +struct SGP32_StoreMetadataRequest; /* AuthenticateClientOkDPEsipa */ typedef struct AuthenticateClientOkDPEsipa { TransactionId_t *transactionId /* OPTIONAL */; - struct StoreMetadataRequest *profileMetaData /* OPTIONAL */; + struct SGP32_StoreMetadataRequest *profileMetaData /* OPTIONAL */; SmdpSigned2_t smdpSigned2; OCTET_STRING_t smdpSignature2; Certificate_t smdpCertificate; @@ -53,7 +53,7 @@ #endif /* Referred external types */ -#include "StoreMetadataRequest.h" +#include "SGP32-StoreMetadataRequest.h" #endif /* _AuthenticateClientOkDPEsipa_H_ */ #include <asn_internal.h> diff --git a/src/ipa/libasn/CMakeLists.txt b/src/ipa/libasn/CMakeLists.txt index 0eb5264..cb1999c 100644 --- a/src/ipa/libasn/CMakeLists.txt +++ b/src/ipa/libasn/CMakeLists.txt @@ -854,6 +854,8 @@ SGP32-SetDefaultDpAddressRequest.h SGP32-SetDefaultDpAddressResponse.c SGP32-SetDefaultDpAddressResponse.h +SGP32-StoreMetadataRequest.c +SGP32-StoreMetadataRequest.h SkipCerts.c SkipCerts.h SmdpSigned2.c diff --git a/src/ipa/libasn/SGP32-StoreMetadataRequest.c b/src/ipa/libasn/SGP32-StoreMetadataRequest.c new file mode 100644 index 0000000..e42d4a8 --- /dev/null +++ b/src/ipa/libasn/SGP32-StoreMetadataRequest.c @@ -0,0 +1,347 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#include "SGP32-StoreMetadataRequest.h" + +static int +memb_serviceProviderName_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const UTF8String_t *st = (const UTF8String_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = UTF8String_length(st); + if((ssize_t)size < 0) { + ASN__CTFAIL(app_key, td, sptr, + "%s: UTF-8: broken encoding (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((size <= 32)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_profileName_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const UTF8String_t *st = (const UTF8String_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = UTF8String_length(st); + if((ssize_t)size < 0) { + ASN__CTFAIL(app_key, td, sptr, + "%s: UTF-8: broken encoding (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((size <= 64)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_icon_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = st->size; + + if((size <= 1024)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_serviceProviderName_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +static asn_per_constraints_t asn_PER_memb_serviceProviderName_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_profileName_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +static asn_per_constraints_t asn_PER_memb_profileName_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_oer_constraints_t asn_OER_memb_icon_constr_6 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..1024)) */}; +static asn_per_constraints_t asn_PER_memb_icon_constr_6 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 11, 11, 0, 1024 } /* (SIZE(0..1024)) */, + 0, 0 /* No PER value map */ +}; +static int asn_DFL_7_cmp_2(const void *sptr) { + const ProfileClass_t *st = sptr; + + if(!st) { + return -1; /* No value is not a default value */ + } + + /* Test default value 2 */ + return (*st != 2); +} +static int asn_DFL_7_set_2(void **sptr) { + ProfileClass_t *st = *sptr; + + if(!st) { + st = (*sptr = CALLOC(1, sizeof(*st))); + if(!st) return -1; + } + + /* Install default value 2 */ + *st = 2; + return 0; +} +static asn_TYPE_member_t asn_MBR_notificationConfigurationInfo_8[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_NotificationConfigurationInformation, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_notificationConfigurationInfo_tags_8[] = { + (ASN_TAG_CLASS_CONTEXT | (22 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_notificationConfigurationInfo_specs_8 = { + sizeof(struct SGP32_StoreMetadataRequest__notificationConfigurationInfo), + offsetof(struct SGP32_StoreMetadataRequest__notificationConfigurationInfo, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_notificationConfigurationInfo_8 = { + "notificationConfigurationInfo", + "notificationConfigurationInfo", + &asn_OP_SEQUENCE_OF, + asn_DEF_notificationConfigurationInfo_tags_8, + sizeof(asn_DEF_notificationConfigurationInfo_tags_8) + /sizeof(asn_DEF_notificationConfigurationInfo_tags_8[0]) - 1, /* 1 */ + asn_DEF_notificationConfigurationInfo_tags_8, /* Same as above */ + sizeof(asn_DEF_notificationConfigurationInfo_tags_8) + /sizeof(asn_DEF_notificationConfigurationInfo_tags_8[0]), /* 2 */ + { 0, 0, SEQUENCE_OF_constraint }, + asn_MBR_notificationConfigurationInfo_8, + 1, /* Single element */ + &asn_SPC_notificationConfigurationInfo_specs_8 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_SGP32_StoreMetadataRequest_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct SGP32_StoreMetadataRequest, iccid), + (ASN_TAG_CLASS_APPLICATION | (26 << 2)), + 0, + &asn_DEF_Iccid, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "iccid" + }, + { ATF_NOFLAGS, 0, offsetof(struct SGP32_StoreMetadataRequest, serviceProviderName), + (ASN_TAG_CLASS_CONTEXT | (17 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_UTF8String, + 0, + { &asn_OER_memb_serviceProviderName_constr_3, &asn_PER_memb_serviceProviderName_constr_3, memb_serviceProviderName_constraint_1 }, + 0, 0, /* No default value */ + "serviceProviderName" + }, + { ATF_NOFLAGS, 0, offsetof(struct SGP32_StoreMetadataRequest, profileName), + (ASN_TAG_CLASS_CONTEXT | (18 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_UTF8String, + 0, + { &asn_OER_memb_profileName_constr_4, &asn_PER_memb_profileName_constr_4, memb_profileName_constraint_1 }, + 0, 0, /* No default value */ + "profileName" + }, + { ATF_POINTER, 10, offsetof(struct SGP32_StoreMetadataRequest, iconType), + (ASN_TAG_CLASS_CONTEXT | (19 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_IconType, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "iconType" + }, + { ATF_POINTER, 9, offsetof(struct SGP32_StoreMetadataRequest, icon), + (ASN_TAG_CLASS_CONTEXT | (20 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { &asn_OER_memb_icon_constr_6, &asn_PER_memb_icon_constr_6, memb_icon_constraint_1 }, + 0, 0, /* No default value */ + "icon" + }, + { ATF_POINTER, 8, offsetof(struct SGP32_StoreMetadataRequest, profileClass), + (ASN_TAG_CLASS_CONTEXT | (21 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_ProfileClass, + 0, + { 0, 0, 0 }, + &asn_DFL_7_cmp_2, /* Compare DEFAULT 2 */ + &asn_DFL_7_set_2, /* Set DEFAULT 2 */ + "profileClass" + }, + { ATF_POINTER, 7, offsetof(struct SGP32_StoreMetadataRequest, notificationConfigurationInfo), + (ASN_TAG_CLASS_CONTEXT | (22 << 2)), + 0, + &asn_DEF_notificationConfigurationInfo_8, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "notificationConfigurationInfo" + }, + { ATF_POINTER, 6, offsetof(struct SGP32_StoreMetadataRequest, profileOwner), + (ASN_TAG_CLASS_CONTEXT | (23 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OperatorId, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "profileOwner" + }, + { ATF_POINTER, 5, offsetof(struct SGP32_StoreMetadataRequest, profilePolicyRules), + (ASN_TAG_CLASS_CONTEXT | (25 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_PprIds, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "profilePolicyRules" + }, + { ATF_POINTER, 4, offsetof(struct SGP32_StoreMetadataRequest, serviceSpecificDataStoredInEuicc), + (ASN_TAG_CLASS_CONTEXT | (34 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_VendorSpecificExtension, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "serviceSpecificDataStoredInEuicc" + }, + { ATF_POINTER, 3, offsetof(struct SGP32_StoreMetadataRequest, serviceSpecificDataNotStoredInEuicc), + (ASN_TAG_CLASS_CONTEXT | (35 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_VendorSpecificExtension, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "serviceSpecificDataNotStoredInEuicc" + }, + { ATF_POINTER, 2, offsetof(struct SGP32_StoreMetadataRequest, ecallIndication), + (ASN_TAG_CLASS_CONTEXT | (123 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BOOLEAN, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ecallIndication" + }, + { ATF_POINTER, 1, offsetof(struct SGP32_StoreMetadataRequest, fallbackAllowed), + (ASN_TAG_CLASS_CONTEXT | (103 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BOOLEAN, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "fallbackAllowed" + }, +}; +static const int asn_MAP_SGP32_StoreMetadataRequest_oms_1[] = { 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; +static const ber_tlv_tag_t asn_DEF_SGP32_StoreMetadataRequest_tags_1[] = { + (ASN_TAG_CLASS_CONTEXT | (37 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_SGP32_StoreMetadataRequest_tag2el_1[] = { + { (ASN_TAG_CLASS_APPLICATION | (26 << 2)), 0, 0, 0 }, /* iccid */ + { (ASN_TAG_CLASS_CONTEXT | (17 << 2)), 1, 0, 0 }, /* serviceProviderName */ + { (ASN_TAG_CLASS_CONTEXT | (18 << 2)), 2, 0, 0 }, /* profileName */ + { (ASN_TAG_CLASS_CONTEXT | (19 << 2)), 3, 0, 0 }, /* iconType */ + { (ASN_TAG_CLASS_CONTEXT | (20 << 2)), 4, 0, 0 }, /* icon */ + { (ASN_TAG_CLASS_CONTEXT | (21 << 2)), 5, 0, 0 }, /* profileClass */ + { (ASN_TAG_CLASS_CONTEXT | (22 << 2)), 6, 0, 0 }, /* notificationConfigurationInfo */ + { (ASN_TAG_CLASS_CONTEXT | (23 << 2)), 7, 0, 0 }, /* profileOwner */ + { (ASN_TAG_CLASS_CONTEXT | (25 << 2)), 8, 0, 0 }, /* profilePolicyRules */ + { (ASN_TAG_CLASS_CONTEXT | (34 << 2)), 9, 0, 0 }, /* serviceSpecificDataStoredInEuicc */ + { (ASN_TAG_CLASS_CONTEXT | (35 << 2)), 10, 0, 0 }, /* serviceSpecificDataNotStoredInEuicc */ + { (ASN_TAG_CLASS_CONTEXT | (103 << 2)), 12, 0, 0 }, /* fallbackAllowed */ + { (ASN_TAG_CLASS_CONTEXT | (123 << 2)), 11, 0, 0 } /* ecallIndication */ +}; +asn_SEQUENCE_specifics_t asn_SPC_SGP32_StoreMetadataRequest_specs_1 = { + sizeof(struct SGP32_StoreMetadataRequest), + offsetof(struct SGP32_StoreMetadataRequest, _asn_ctx), + asn_MAP_SGP32_StoreMetadataRequest_tag2el_1, + 13, /* Count of tags in the map */ + asn_MAP_SGP32_StoreMetadataRequest_oms_1, /* Optional members */ + 10, 0, /* Root/Additions */ + 13, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_SGP32_StoreMetadataRequest = { + "SGP32-StoreMetadataRequest", + "SGP32-StoreMetadataRequest", + &asn_OP_SEQUENCE, + asn_DEF_SGP32_StoreMetadataRequest_tags_1, + sizeof(asn_DEF_SGP32_StoreMetadataRequest_tags_1) + /sizeof(asn_DEF_SGP32_StoreMetadataRequest_tags_1[0]) - 1, /* 1 */ + asn_DEF_SGP32_StoreMetadataRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_SGP32_StoreMetadataRequest_tags_1) + /sizeof(asn_DEF_SGP32_StoreMetadataRequest_tags_1[0]), /* 2 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_SGP32_StoreMetadataRequest_1, + 13, /* Elements count */ + &asn_SPC_SGP32_StoreMetadataRequest_specs_1 /* Additional specs */ +}; + diff --git a/src/ipa/libasn/SGP32-StoreMetadataRequest.h b/src/ipa/libasn/SGP32-StoreMetadataRequest.h new file mode 100644 index 0000000..8f4e536 --- /dev/null +++ b/src/ipa/libasn/SGP32-StoreMetadataRequest.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 _SGP32_StoreMetadataRequest_H_ +#define _SGP32_StoreMetadataRequest_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include "Iccid.h" +#include <UTF8String.h> +#include "IconType.h" +#include <OCTET_STRING.h> +#include "ProfileClass.h" +#include "PprIds.h" +#include <BOOLEAN.h> +#include <asn_SEQUENCE_OF.h> +#include <constr_SEQUENCE_OF.h> +#include <constr_SEQUENCE.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct OperatorId; +struct VendorSpecificExtension; +struct NotificationConfigurationInformation; + +/* SGP32-StoreMetadataRequest */ +typedef struct SGP32_StoreMetadataRequest { + Iccid_t iccid; + UTF8String_t serviceProviderName; + UTF8String_t profileName; + IconType_t *iconType /* OPTIONAL */; + OCTET_STRING_t *icon /* OPTIONAL */; + ProfileClass_t *profileClass /* DEFAULT 2 */; + struct SGP32_StoreMetadataRequest__notificationConfigurationInfo { + A_SEQUENCE_OF(struct NotificationConfigurationInformation) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } *notificationConfigurationInfo; + struct OperatorId *profileOwner /* OPTIONAL */; + PprIds_t *profilePolicyRules /* OPTIONAL */; + struct VendorSpecificExtension *serviceSpecificDataStoredInEuicc /* OPTIONAL */; + struct VendorSpecificExtension *serviceSpecificDataNotStoredInEuicc /* OPTIONAL */; + BOOLEAN_t *ecallIndication /* OPTIONAL */; + BOOLEAN_t *fallbackAllowed /* OPTIONAL */; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} SGP32_StoreMetadataRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_SGP32_StoreMetadataRequest; +extern asn_SEQUENCE_specifics_t asn_SPC_SGP32_StoreMetadataRequest_specs_1; +extern asn_TYPE_member_t asn_MBR_SGP32_StoreMetadataRequest_1[13]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "OperatorId.h" +#include "VendorSpecificExtension.h" +#include "NotificationConfigurationInformation.h" + +#endif /* _SGP32_StoreMetadataRequest_H_ */ +#include <asn_internal.h> -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43049?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: Icfbc141dda82f091bcc9a1d7177e9fdb5b424750 Gerrit-Change-Number: 43049 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
[L] Change in onomondo-ipa[master]: V1.2: Add SGP.32-custom AuthenticateClientRequest
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43050?usp=email
) Change subject: V1.2: Add SGP.32-custom AuthenticateClientRequest ...................................................................... V1.2: Add SGP.32-custom AuthenticateClientRequest Add new AuthenticateClientRequest, which overrides and expands AuthenticateClientRequest from SGP.22. There is no impact on IPA process, because it is not used. Reference: SGP.32 Section 5.6.1 Related: SYS#8101 Change-Id: I0003994fb82f8bbccb4de19946bbba975c98ef04 --- M asn1/SGP32Definitions.asn M src/ipa/libasn/CMakeLists.txt A src/ipa/libasn/SGP32-AuthenticateClientRequest.c A src/ipa/libasn/SGP32-AuthenticateClientRequest.h A src/ipa/libasn/SGP32-RemoteProfileProvisioningRequest.c A src/ipa/libasn/SGP32-RemoteProfileProvisioningRequest.h 6 files changed, 296 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/50/43050/1 diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index aea5a52..e4e193c 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -438,6 +438,23 @@ } -- ASN1STOP +-- Because AuthenticateClientRequest has changed in SGP.32, we need to change this too. +SGP32-RemoteProfileProvisioningRequest ::= [2] CHOICE { -- Tag 'A2' + initiateAuthenticationRequest [57] InitiateAuthenticationRequest, -- Tag 'BF39' + authenticateClientRequest [59] SGP32-AuthenticateClientRequest, -- Tag 'BF3B' + getBoundProfilePackageRequest [58] GetBoundProfilePackageRequest, -- Tag 'BF3A' + cancelSessionRequestEs9 [65] CancelSessionRequestEs9, -- Tag 'BF41' + handleNotification [61] HandleNotification -- tag 'BF3D' +} + +-- Section 5.6.1 +-- ASN1START +SGP32-AuthenticateClientRequest ::= [59] SEQUENCE { -- Tag 'BF3B' + transactionId [0] TransactionId, + authenticateServerResponse [56] AuthenticateServerResponse -- This is the response from ES10b.AuthenticateServer +} +-- ASN1STOP + -- Section 5.9.2 -- ASN1START SGP32-EUICCInfo2 ::= [34] SEQUENCE { -- Tag 'BF22' diff --git a/src/ipa/libasn/CMakeLists.txt b/src/ipa/libasn/CMakeLists.txt index cb1999c..5a3dad1 100644 --- a/src/ipa/libasn/CMakeLists.txt +++ b/src/ipa/libasn/CMakeLists.txt @@ -822,6 +822,8 @@ SetNicknameRequest.h SetNicknameResponse.c SetNicknameResponse.h +SGP32-AuthenticateClientRequest.c +SGP32-AuthenticateClientRequest.h SGP32-AuthenticateServerResponse.c SGP32-AuthenticateServerResponse.h SGP32-CancelSessionOk.c @@ -846,6 +848,8 @@ SGP32-ProfileInfoListResponse.h SGP32-ProfileInstallationResult.c SGP32-ProfileInstallationResult.h +SGP32-RemoteProfileProvisioningRequest.c +SGP32-RemoteProfileProvisioningRequest.h SGP32-RetrieveNotificationsListRequest.c SGP32-RetrieveNotificationsListRequest.h SGP32-RetrieveNotificationsListResponse.c diff --git a/src/ipa/libasn/SGP32-AuthenticateClientRequest.c b/src/ipa/libasn/SGP32-AuthenticateClientRequest.c new file mode 100644 index 0000000..d408f76 --- /dev/null +++ b/src/ipa/libasn/SGP32-AuthenticateClientRequest.c @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#include "SGP32-AuthenticateClientRequest.h" + +asn_TYPE_member_t asn_MBR_SGP32_AuthenticateClientRequest_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct SGP32_AuthenticateClientRequest, transactionId), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_TransactionId, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "transactionId" + }, + { ATF_NOFLAGS, 0, offsetof(struct SGP32_AuthenticateClientRequest, authenticateServerResponse), + (ASN_TAG_CLASS_CONTEXT | (56 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_AuthenticateServerResponse, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "authenticateServerResponse" + }, +}; +static const ber_tlv_tag_t asn_DEF_SGP32_AuthenticateClientRequest_tags_1[] = { + (ASN_TAG_CLASS_CONTEXT | (59 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_SGP32_AuthenticateClientRequest_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* transactionId */ + { (ASN_TAG_CLASS_CONTEXT | (56 << 2)), 1, 0, 0 } /* authenticateServerResponse */ +}; +asn_SEQUENCE_specifics_t asn_SPC_SGP32_AuthenticateClientRequest_specs_1 = { + sizeof(struct SGP32_AuthenticateClientRequest), + offsetof(struct SGP32_AuthenticateClientRequest, _asn_ctx), + asn_MAP_SGP32_AuthenticateClientRequest_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_SGP32_AuthenticateClientRequest = { + "SGP32-AuthenticateClientRequest", + "SGP32-AuthenticateClientRequest", + &asn_OP_SEQUENCE, + asn_DEF_SGP32_AuthenticateClientRequest_tags_1, + sizeof(asn_DEF_SGP32_AuthenticateClientRequest_tags_1) + /sizeof(asn_DEF_SGP32_AuthenticateClientRequest_tags_1[0]) - 1, /* 1 */ + asn_DEF_SGP32_AuthenticateClientRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_SGP32_AuthenticateClientRequest_tags_1) + /sizeof(asn_DEF_SGP32_AuthenticateClientRequest_tags_1[0]), /* 2 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_SGP32_AuthenticateClientRequest_1, + 2, /* Elements count */ + &asn_SPC_SGP32_AuthenticateClientRequest_specs_1 /* Additional specs */ +}; + diff --git a/src/ipa/libasn/SGP32-AuthenticateClientRequest.h b/src/ipa/libasn/SGP32-AuthenticateClientRequest.h new file mode 100644 index 0000000..7dae9a5 --- /dev/null +++ b/src/ipa/libasn/SGP32-AuthenticateClientRequest.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 _SGP32_AuthenticateClientRequest_H_ +#define _SGP32_AuthenticateClientRequest_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include "TransactionId.h" +#include "AuthenticateServerResponse.h" +#include <constr_SEQUENCE.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* SGP32-AuthenticateClientRequest */ +typedef struct SGP32_AuthenticateClientRequest { + TransactionId_t transactionId; + AuthenticateServerResponse_t authenticateServerResponse; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} SGP32_AuthenticateClientRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_SGP32_AuthenticateClientRequest; +extern asn_SEQUENCE_specifics_t asn_SPC_SGP32_AuthenticateClientRequest_specs_1; +extern asn_TYPE_member_t asn_MBR_SGP32_AuthenticateClientRequest_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _SGP32_AuthenticateClientRequest_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libasn/SGP32-RemoteProfileProvisioningRequest.c b/src/ipa/libasn/SGP32-RemoteProfileProvisioningRequest.c new file mode 100644 index 0000000..2da7ceb --- /dev/null +++ b/src/ipa/libasn/SGP32-RemoteProfileProvisioningRequest.c @@ -0,0 +1,103 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#include "SGP32-RemoteProfileProvisioningRequest.h" + +static asn_oer_constraints_t asn_OER_type_SGP32_RemoteProfileProvisioningRequest_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_SGP32_RemoteProfileProvisioningRequest_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_SGP32_RemoteProfileProvisioningRequest_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct SGP32_RemoteProfileProvisioningRequest, choice.initiateAuthenticationRequest), + (ASN_TAG_CLASS_CONTEXT | (57 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_InitiateAuthenticationRequest, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "initiateAuthenticationRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct SGP32_RemoteProfileProvisioningRequest, choice.authenticateClientRequest), + (ASN_TAG_CLASS_CONTEXT | (59 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_SGP32_AuthenticateClientRequest, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "authenticateClientRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct SGP32_RemoteProfileProvisioningRequest, choice.getBoundProfilePackageRequest), + (ASN_TAG_CLASS_CONTEXT | (58 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_GetBoundProfilePackageRequest, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "getBoundProfilePackageRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct SGP32_RemoteProfileProvisioningRequest, choice.cancelSessionRequestEs9), + (ASN_TAG_CLASS_CONTEXT | (65 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_CancelSessionRequestEs9, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "cancelSessionRequestEs9" + }, + { ATF_NOFLAGS, 0, offsetof(struct SGP32_RemoteProfileProvisioningRequest, choice.handleNotification), + (ASN_TAG_CLASS_CONTEXT | (61 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_HandleNotification, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "handleNotification" + }, +}; +static const unsigned asn_MAP_SGP32_RemoteProfileProvisioningRequest_to_canonical_1[] = { 0, 2, 1, 4, 3 }; +static const unsigned asn_MAP_SGP32_RemoteProfileProvisioningRequest_from_canonical_1[] = { 0, 2, 1, 4, 3 }; +static const ber_tlv_tag_t asn_DEF_SGP32_RemoteProfileProvisioningRequest_tags_1[] = { + (ASN_TAG_CLASS_CONTEXT | (2 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_SGP32_RemoteProfileProvisioningRequest_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (57 << 2)), 0, 0, 0 }, /* initiateAuthenticationRequest */ + { (ASN_TAG_CLASS_CONTEXT | (58 << 2)), 2, 0, 0 }, /* getBoundProfilePackageRequest */ + { (ASN_TAG_CLASS_CONTEXT | (59 << 2)), 1, 0, 0 }, /* authenticateClientRequest */ + { (ASN_TAG_CLASS_CONTEXT | (61 << 2)), 4, 0, 0 }, /* handleNotification */ + { (ASN_TAG_CLASS_CONTEXT | (65 << 2)), 3, 0, 0 } /* cancelSessionRequestEs9 */ +}; +static asn_CHOICE_specifics_t asn_SPC_SGP32_RemoteProfileProvisioningRequest_specs_1 = { + sizeof(struct SGP32_RemoteProfileProvisioningRequest), + offsetof(struct SGP32_RemoteProfileProvisioningRequest, _asn_ctx), + offsetof(struct SGP32_RemoteProfileProvisioningRequest, present), + sizeof(((struct SGP32_RemoteProfileProvisioningRequest *)0)->present), + asn_MAP_SGP32_RemoteProfileProvisioningRequest_tag2el_1, + 5, /* Count of tags in the map */ + asn_MAP_SGP32_RemoteProfileProvisioningRequest_to_canonical_1, + asn_MAP_SGP32_RemoteProfileProvisioningRequest_from_canonical_1, + 5 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_SGP32_RemoteProfileProvisioningRequest = { + "SGP32-RemoteProfileProvisioningRequest", + "SGP32-RemoteProfileProvisioningRequest", + &asn_OP_CHOICE, + asn_DEF_SGP32_RemoteProfileProvisioningRequest_tags_1, + sizeof(asn_DEF_SGP32_RemoteProfileProvisioningRequest_tags_1) + /sizeof(asn_DEF_SGP32_RemoteProfileProvisioningRequest_tags_1[0]), /* 1 */ + asn_DEF_SGP32_RemoteProfileProvisioningRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_SGP32_RemoteProfileProvisioningRequest_tags_1) + /sizeof(asn_DEF_SGP32_RemoteProfileProvisioningRequest_tags_1[0]), /* 1 */ + { &asn_OER_type_SGP32_RemoteProfileProvisioningRequest_constr_1, &asn_PER_type_SGP32_RemoteProfileProvisioningRequest_constr_1, CHOICE_constraint }, + asn_MBR_SGP32_RemoteProfileProvisioningRequest_1, + 5, /* Elements count */ + &asn_SPC_SGP32_RemoteProfileProvisioningRequest_specs_1 /* Additional specs */ +}; + diff --git a/src/ipa/libasn/SGP32-RemoteProfileProvisioningRequest.h b/src/ipa/libasn/SGP32-RemoteProfileProvisioningRequest.h new file mode 100644 index 0000000..d207616 --- /dev/null +++ b/src/ipa/libasn/SGP32-RemoteProfileProvisioningRequest.h @@ -0,0 +1,65 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#ifndef _SGP32_RemoteProfileProvisioningRequest_H_ +#define _SGP32_RemoteProfileProvisioningRequest_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include "InitiateAuthenticationRequest.h" +#include "SGP32-AuthenticateClientRequest.h" +#include "GetBoundProfilePackageRequest.h" +#include "CancelSessionRequestEs9.h" +#include "HandleNotification.h" +#include <constr_CHOICE.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum SGP32_RemoteProfileProvisioningRequest_PR { + SGP32_RemoteProfileProvisioningRequest_PR_NOTHING, /* No components present */ + SGP32_RemoteProfileProvisioningRequest_PR_initiateAuthenticationRequest, + SGP32_RemoteProfileProvisioningRequest_PR_authenticateClientRequest, + SGP32_RemoteProfileProvisioningRequest_PR_getBoundProfilePackageRequest, + SGP32_RemoteProfileProvisioningRequest_PR_cancelSessionRequestEs9, + SGP32_RemoteProfileProvisioningRequest_PR_handleNotification + /* Extensions may appear below */ + +} SGP32_RemoteProfileProvisioningRequest_PR; + +/* SGP32-RemoteProfileProvisioningRequest */ +typedef struct SGP32_RemoteProfileProvisioningRequest { + SGP32_RemoteProfileProvisioningRequest_PR present; + union SGP32_RemoteProfileProvisioningRequest_u { + InitiateAuthenticationRequest_t initiateAuthenticationRequest; + SGP32_AuthenticateClientRequest_t authenticateClientRequest; + GetBoundProfilePackageRequest_t getBoundProfilePackageRequest; + CancelSessionRequestEs9_t cancelSessionRequestEs9; + HandleNotification_t handleNotification; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} SGP32_RemoteProfileProvisioningRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_SGP32_RemoteProfileProvisioningRequest; + +#ifdef __cplusplus +} +#endif + +#endif /* _SGP32_RemoteProfileProvisioningRequest_H_ */ +#include <asn_internal.h> -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43050?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: I0003994fb82f8bbccb4de19946bbba975c98ef04 Gerrit-Change-Number: 43050 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
[L] Change in onomondo-ipa[master]: V1.2: Add IPAe related ASN.1 templates
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43048?usp=email
) Change subject: V1.2: Add IPAe related ASN.1 templates ...................................................................... V1.2: Add IPAe related ASN.1 templates There is no use of these templates, as beeing IPAe is not supported. Reference: SGP.32 Section 3.8.4 Related: SYS#8101 Change-Id: I7d659734bfac44da4f1f3d5bca80314b2f20c299 --- M asn1/SGP32Definitions.asn M src/ipa/libasn/CMakeLists.txt A src/ipa/libasn/ISDRProprietaryApplicationTemplateIoT.c A src/ipa/libasn/ISDRProprietaryApplicationTemplateIoT.h A src/ipa/libasn/IpaeActivationRequest.c A src/ipa/libasn/IpaeActivationRequest.h A src/ipa/libasn/IpaeActivationResponse.c A src/ipa/libasn/IpaeActivationResponse.h 8 files changed, 324 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/48/43048/1 diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index f38656f..e9e9c46 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -352,6 +352,28 @@ } -- ASN1STOP +-- Section 3.8.4 +-- ASN1START +ISDRProprietaryApplicationTemplateIoT ::= [PRIVATE 1] SEQUENCE { -- Tag 'E1' + euiccConfiguration BIT STRING { + ipaeSupported(0), -- IPA in the eUICC (IPAe) supported + enabledProfile(1) -- eUICC contains an Enabled Profile + } +} +-- ASN1STOP +-- ASN1START +IpaeActivationRequest ::= [66] SEQUENCE { -- Tag 'BF42' + ipaeOption BIT STRING { + activateIpae(0) -- IPAe activation + } +} +-- ASN1START +-- ASN1STOP +IpaeActivationResponse ::= [66] SEQUENCE { -- Tag 'BF42' + ipaeActivationResult INTEGER {ok(0), notSupported(1)} +} +-- ASN1STOP + -- Section 4.1 -- ASN1START IpaCapabilities ::= SEQUENCE { diff --git a/src/ipa/libasn/CMakeLists.txt b/src/ipa/libasn/CMakeLists.txt index 209a5f3..0eb5264 100644 --- a/src/ipa/libasn/CMakeLists.txt +++ b/src/ipa/libasn/CMakeLists.txt @@ -478,6 +478,10 @@ IoTSpecificInfo.h IpaCapabilities.c IpaCapabilities.h +IpaeActivationRequest.c +IpaeActivationRequest.h +IpaeActivationResponse.c +IpaeActivationResponse.h IpaEuiccData.c IpaEuiccDataErrorCode.c IpaEuiccDataErrorCode.h @@ -492,6 +496,8 @@ IpaMode.h ISDRProprietaryApplicationTemplate.c ISDRProprietaryApplicationTemplate.h +ISDRProprietaryApplicationTemplateIoT.c +ISDRProprietaryApplicationTemplateIoT.h IssuerAltName.c IssuerAltName.h IssuingDistributionPoint.c diff --git a/src/ipa/libasn/ISDRProprietaryApplicationTemplateIoT.c b/src/ipa/libasn/ISDRProprietaryApplicationTemplateIoT.c new file mode 100644 index 0000000..01c6819 --- /dev/null +++ b/src/ipa/libasn/ISDRProprietaryApplicationTemplateIoT.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 "ISDRProprietaryApplicationTemplateIoT.h" + +static asn_TYPE_member_t asn_MBR_ISDRProprietaryApplicationTemplateIoT_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct ISDRProprietaryApplicationTemplateIoT, euiccConfiguration), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "euiccConfiguration" + }, +}; +static const ber_tlv_tag_t asn_DEF_ISDRProprietaryApplicationTemplateIoT_tags_1[] = { + (ASN_TAG_CLASS_PRIVATE | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_ISDRProprietaryApplicationTemplateIoT_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* euiccConfiguration */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_ISDRProprietaryApplicationTemplateIoT_specs_1 = { + sizeof(struct ISDRProprietaryApplicationTemplateIoT), + offsetof(struct ISDRProprietaryApplicationTemplateIoT, _asn_ctx), + asn_MAP_ISDRProprietaryApplicationTemplateIoT_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_ISDRProprietaryApplicationTemplateIoT = { + "ISDRProprietaryApplicationTemplateIoT", + "ISDRProprietaryApplicationTemplateIoT", + &asn_OP_SEQUENCE, + asn_DEF_ISDRProprietaryApplicationTemplateIoT_tags_1, + sizeof(asn_DEF_ISDRProprietaryApplicationTemplateIoT_tags_1) + /sizeof(asn_DEF_ISDRProprietaryApplicationTemplateIoT_tags_1[0]) - 1, /* 1 */ + asn_DEF_ISDRProprietaryApplicationTemplateIoT_tags_1, /* Same as above */ + sizeof(asn_DEF_ISDRProprietaryApplicationTemplateIoT_tags_1) + /sizeof(asn_DEF_ISDRProprietaryApplicationTemplateIoT_tags_1[0]), /* 2 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_ISDRProprietaryApplicationTemplateIoT_1, + 1, /* Elements count */ + &asn_SPC_ISDRProprietaryApplicationTemplateIoT_specs_1 /* Additional specs */ +}; + diff --git a/src/ipa/libasn/ISDRProprietaryApplicationTemplateIoT.h b/src/ipa/libasn/ISDRProprietaryApplicationTemplateIoT.h new file mode 100644 index 0000000..f651ce6 --- /dev/null +++ b/src/ipa/libasn/ISDRProprietaryApplicationTemplateIoT.h @@ -0,0 +1,48 @@ +/* + * 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 _ISDRProprietaryApplicationTemplateIoT_H_ +#define _ISDRProprietaryApplicationTemplateIoT_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include <BIT_STRING.h> +#include <constr_SEQUENCE.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum ISDRProprietaryApplicationTemplateIoT__euiccConfiguration { + ISDRProprietaryApplicationTemplateIoT__euiccConfiguration_ipaeSupported = 0, + ISDRProprietaryApplicationTemplateIoT__euiccConfiguration_enabledProfile = 1 +} e_ISDRProprietaryApplicationTemplateIoT__euiccConfiguration; + +/* ISDRProprietaryApplicationTemplateIoT */ +typedef struct ISDRProprietaryApplicationTemplateIoT { + BIT_STRING_t euiccConfiguration; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ISDRProprietaryApplicationTemplateIoT_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ISDRProprietaryApplicationTemplateIoT; + +#ifdef __cplusplus +} +#endif + +#endif /* _ISDRProprietaryApplicationTemplateIoT_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libasn/IpaeActivationRequest.c b/src/ipa/libasn/IpaeActivationRequest.c new file mode 100644 index 0000000..13165c2 --- /dev/null +++ b/src/ipa/libasn/IpaeActivationRequest.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 "IpaeActivationRequest.h" + +static asn_TYPE_member_t asn_MBR_IpaeActivationRequest_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct IpaeActivationRequest, ipaeOption), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ipaeOption" + }, +}; +static const ber_tlv_tag_t asn_DEF_IpaeActivationRequest_tags_1[] = { + (ASN_TAG_CLASS_CONTEXT | (66 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_IpaeActivationRequest_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ipaeOption */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_IpaeActivationRequest_specs_1 = { + sizeof(struct IpaeActivationRequest), + offsetof(struct IpaeActivationRequest, _asn_ctx), + asn_MAP_IpaeActivationRequest_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_IpaeActivationRequest = { + "IpaeActivationRequest", + "IpaeActivationRequest", + &asn_OP_SEQUENCE, + asn_DEF_IpaeActivationRequest_tags_1, + sizeof(asn_DEF_IpaeActivationRequest_tags_1) + /sizeof(asn_DEF_IpaeActivationRequest_tags_1[0]) - 1, /* 1 */ + asn_DEF_IpaeActivationRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_IpaeActivationRequest_tags_1) + /sizeof(asn_DEF_IpaeActivationRequest_tags_1[0]), /* 2 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_IpaeActivationRequest_1, + 1, /* Elements count */ + &asn_SPC_IpaeActivationRequest_specs_1 /* Additional specs */ +}; + diff --git a/src/ipa/libasn/IpaeActivationRequest.h b/src/ipa/libasn/IpaeActivationRequest.h new file mode 100644 index 0000000..0bf6857 --- /dev/null +++ b/src/ipa/libasn/IpaeActivationRequest.h @@ -0,0 +1,47 @@ +/* + * 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 _IpaeActivationRequest_H_ +#define _IpaeActivationRequest_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include <BIT_STRING.h> +#include <constr_SEQUENCE.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum IpaeActivationRequest__ipaeOption { + IpaeActivationRequest__ipaeOption_activateIpae = 0 +} e_IpaeActivationRequest__ipaeOption; + +/* IpaeActivationRequest */ +typedef struct IpaeActivationRequest { + BIT_STRING_t ipaeOption; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} IpaeActivationRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_IpaeActivationRequest; + +#ifdef __cplusplus +} +#endif + +#endif /* _IpaeActivationRequest_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libasn/IpaeActivationResponse.c b/src/ipa/libasn/IpaeActivationResponse.c new file mode 100644 index 0000000..2ba8ae7 --- /dev/null +++ b/src/ipa/libasn/IpaeActivationResponse.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 "IpaeActivationResponse.h" + +static asn_TYPE_member_t asn_MBR_IpaeActivationResponse_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct IpaeActivationResponse, ipaeActivationResult), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ipaeActivationResult" + }, +}; +static const ber_tlv_tag_t asn_DEF_IpaeActivationResponse_tags_1[] = { + (ASN_TAG_CLASS_CONTEXT | (66 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_IpaeActivationResponse_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ipaeActivationResult */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_IpaeActivationResponse_specs_1 = { + sizeof(struct IpaeActivationResponse), + offsetof(struct IpaeActivationResponse, _asn_ctx), + asn_MAP_IpaeActivationResponse_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_IpaeActivationResponse = { + "IpaeActivationResponse", + "IpaeActivationResponse", + &asn_OP_SEQUENCE, + asn_DEF_IpaeActivationResponse_tags_1, + sizeof(asn_DEF_IpaeActivationResponse_tags_1) + /sizeof(asn_DEF_IpaeActivationResponse_tags_1[0]) - 1, /* 1 */ + asn_DEF_IpaeActivationResponse_tags_1, /* Same as above */ + sizeof(asn_DEF_IpaeActivationResponse_tags_1) + /sizeof(asn_DEF_IpaeActivationResponse_tags_1[0]), /* 2 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_IpaeActivationResponse_1, + 1, /* Elements count */ + &asn_SPC_IpaeActivationResponse_specs_1 /* Additional specs */ +}; + diff --git a/src/ipa/libasn/IpaeActivationResponse.h b/src/ipa/libasn/IpaeActivationResponse.h new file mode 100644 index 0000000..ab981f2 --- /dev/null +++ b/src/ipa/libasn/IpaeActivationResponse.h @@ -0,0 +1,48 @@ +/* + * 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 _IpaeActivationResponse_H_ +#define _IpaeActivationResponse_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include <NativeInteger.h> +#include <constr_SEQUENCE.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum IpaeActivationResponse__ipaeActivationResult { + IpaeActivationResponse__ipaeActivationResult_ok = 0, + IpaeActivationResponse__ipaeActivationResult_notSupported = 1 +} e_IpaeActivationResponse__ipaeActivationResult; + +/* IpaeActivationResponse */ +typedef struct IpaeActivationResponse { + long ipaeActivationResult; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} IpaeActivationResponse_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_IpaeActivationResponse; + +#ifdef __cplusplus +} +#endif + +#endif /* _IpaeActivationResponse_H_ */ +#include <asn_internal.h> -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43048?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: I7d659734bfac44da4f1f3d5bca80314b2f20c299 Gerrit-Change-Number: 43048 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
[S] Change in onomondo-ipa[master]: V1.2: Add TERMINAL CAPABILITY for IoT support
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43047?usp=email
) Change subject: V1.2: Add TERMINAL CAPABILITY for IoT support ...................................................................... V1.2: Add TERMINAL CAPABILITY for IoT support Also enable support for IoT function by setting the TERMINAL CAPABILITY. If not set, eUICC may not support IoT specific functions. With IoT eUICC emulation it is disabled. Reference: SGP.32 Section 3.8.2 Related: SYS#8101 Change-Id: I1116bee93b31ee4a159125d840d7c5866be6fdb4 --- M src/ipa/libipa/euicc.c 1 file changed, 14 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/47/43047/1 diff --git a/src/ipa/libipa/euicc.c b/src/ipa/libipa/euicc.c index d14855a..efda3c7 100644 --- a/src/ipa/libipa/euicc.c +++ b/src/ipa/libipa/euicc.c @@ -358,9 +358,8 @@ } /* Send terminal capablilities, see also 3gpp TS 102.221 V16.2.0, section 11.1.19.2.4 */ -static int send_termcap(struct ipa_context *ctx) +static int send_termcap(struct ipa_context *ctx, const uint8_t *termcap, size_t termcap_size) { - const uint8_t termcap[] = { 0xA9, 0x03, 0x83, 0x01, 0x07 }; int rc; struct req_apdu req_apdu = { 0 }; struct res_apdu res_apdu = { 0 }; @@ -375,8 +374,8 @@ req_apdu.ins = 0xAA; req_apdu.p1 = 0x00; req_apdu.p2 = 0x00; - req_apdu.lc = sizeof(termcap); - memcpy(req_apdu.data, termcap, sizeof(termcap)); + req_apdu.lc = termcap_size; + memcpy(req_apdu.data, termcap, termcap_size); buf_req = format_req_apdu(&req_apdu); rc = ipa_scard_transceive(ctx->scard_ctx, buf_res, buf_req); @@ -533,12 +532,22 @@ * \returns 0 on success, negative on error. */ int ipa_euicc_init_es10x(struct ipa_context *ctx) { + const uint8_t termcap_euicc[] = { 0xA9, 0x03, 0x83, 0x01, 0x07 }; + const uint8_t termcap_iot[] = { 0xA9, 0x03, 0x84, 0x01, 0x01 }; int rc; - rc = send_termcap(ctx); + /* Set capabilites to enable support for eUICC functions. */ + rc = send_termcap(ctx, termcap_euicc, sizeof(termcap_euicc)); if (rc < 0) return rc; + /* Set capabilites to enable support for IoT functions. */ + if (!ctx->cfg->iot_euicc_emu_enabled) { + rc = send_termcap(ctx, termcap_iot, sizeof(termcap_iot)); + if (rc < 0) + return rc; + } + rc = manage_channel(ctx, false); if (rc < 0) return rc; -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43047?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: I1116bee93b31ee4a159125d840d7c5866be6fdb4 Gerrit-Change-Number: 43047 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
[XS] Change in onomondo-ipa[master]: V1.2: Add more error codes to AddInitialEimResponse
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43045?usp=email
) Change subject: V1.2: Add more error codes to AddInitialEimResponse ...................................................................... V1.2: Add more error codes to AddInitialEimResponse Reference: SGP.32 Section 3.5.2 Related: SYS#8101 Change-Id: Ib4bc1e06b6571d18ff46080f5e5ba1fe3bc0be70 --- M asn1/SGP32Definitions.asn M src/ipa/libasn/AddInitialEimResponse.h M src/ipa/libipa/es10b_add_init_eim.c 3 files changed, 6 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/45/43045/1 diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index 8dd2579..a158221 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -461,10 +461,11 @@ }, addInitialEimError INTEGER { insufficientMemory(1), - unsignedEimConfigDisallowed(2), + associatedEimAlreadyExists (2), ciPKUnknown(3), invalidAssociationToken(5), counterValueOutOfRange(6), + commandError(7), undefinedError(127) } } diff --git a/src/ipa/libasn/AddInitialEimResponse.h b/src/ipa/libasn/AddInitialEimResponse.h index 72902ad..8cf1756 100644 --- a/src/ipa/libasn/AddInitialEimResponse.h +++ b/src/ipa/libasn/AddInitialEimResponse.h @@ -39,10 +39,11 @@ } AddInitialEimResponse__addInitialEimOk__Member_PR; typedef enum AddInitialEimResponse__addInitialEimError { AddInitialEimResponse__addInitialEimError_insufficientMemory = 1, - AddInitialEimResponse__addInitialEimError_unsignedEimConfigDisallowed = 2, + AddInitialEimResponse__addInitialEimError_associatedEimAlreadyExists = 2, AddInitialEimResponse__addInitialEimError_ciPKUnknown = 3, AddInitialEimResponse__addInitialEimError_invalidAssociationToken = 5, AddInitialEimResponse__addInitialEimError_counterValueOutOfRange = 6, + AddInitialEimResponse__addInitialEimError_commandError = 7, AddInitialEimResponse__addInitialEimError_undefinedError = 127 } e_AddInitialEimResponse__addInitialEimError; diff --git a/src/ipa/libipa/es10b_add_init_eim.c b/src/ipa/libipa/es10b_add_init_eim.c index ae3c80a..0b9fd5e 100644 --- a/src/ipa/libipa/es10b_add_init_eim.c +++ b/src/ipa/libipa/es10b_add_init_eim.c @@ -24,10 +24,11 @@ static const struct num_str_map error_code_strings[] = { { AddInitialEimResponse__addInitialEimError_insufficientMemory, "insufficientMemory" }, - { AddInitialEimResponse__addInitialEimError_unsignedEimConfigDisallowed, "unsignedEimConfigDisallowed" }, + { AddInitialEimResponse__addInitialEimError_associatedEimAlreadyExists, "associatedEimAlreadyExists" }, { AddInitialEimResponse__addInitialEimError_ciPKUnknown, "ciPKUnknown" }, { AddInitialEimResponse__addInitialEimError_invalidAssociationToken, "invalidAssociationToken" }, { AddInitialEimResponse__addInitialEimError_counterValueOutOfRange, "counterValueOutOfRange" }, + { AddInitialEimResponse__addInitialEimError_commandError, "commandError" }, { AddInitialEimResponse__addInitialEimError_undefinedError, "undefinedError" }, { 0, NULL } }; -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43045?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: Ib4bc1e06b6571d18ff46080f5e5ba1fe3bc0be70 Gerrit-Change-Number: 43045 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
[M] Change in onomondo-ipa[master]: V1.2: Add new flags to eUICCMemoryReset
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43046?usp=email
) Change subject: V1.2: Add new flags to eUICCMemoryReset ...................................................................... V1.2: Add new flags to eUICCMemoryReset Introduce flags to reset pre-installed test profiles and provisioning profiles. The IoT eUICC emulation forwards these flags. The eUICC with V3.0 of SGP.22 will delete these profiles. Reference: SGP.32 Section 5.9.5, SGP.22 Section 5.7.19 Related: SYS#8101 Change-Id: I8c683e93c2a10ff64c3ef14767000c59f81be090 --- M asn1/RSPDefinitions.asn M asn1/SGP32Definitions.asn M include/onomondo/ipa/ipad.h M src/ipa/libasn/EuiccMemoryResetRequest.h M src/ipa/libasn/SGP32-EuiccMemoryResetRequest.h M src/ipa/libasn/SGP32-EuiccMemoryResetResponse.c M src/ipa/libasn/SGP32-EuiccMemoryResetResponse.h M src/ipa/libipa/es10b_euicc_mem_rst.c M src/ipa/libipa/es10b_euicc_mem_rst.h M src/ipa/libipa/ipad.c M src/ipa/main.c 11 files changed, 49 insertions(+), 26 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/46/43046/1 diff --git a/asn1/RSPDefinitions.asn b/asn1/RSPDefinitions.asn index f46100c..5427515 100644 --- a/asn1/RSPDefinitions.asn +++ b/asn1/RSPDefinitions.asn @@ -586,7 +586,10 @@ resetOptions [2] BIT STRING { deleteOperationalProfiles(0), deleteFieldLoadedTestProfiles(1), - resetDefaultSmdpAddress(2)} + resetDefaultSmdpAddress(2), + deletePreLoadedTestProfiles(3), -- #SupportedFromV3.0.0# + deleteProvisioningProfiles(4)} -- #SupportedFromV3.0.0# + -- setting bits 0, 1, 3 and 4 wipes all Profiles } EuiccMemoryResetResponse ::= [52] SEQUENCE { -- Tag 'BF34' diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index a158221..f38656f 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -479,14 +479,16 @@ deleteOperationalProfiles(0), deleteFieldLoadedTestProfiles(1), resetDefaultSmdpAddress(2), - resetEimConfigData(3), - resetImmediateEnableConfig(4) + deletePreLoadedTestProfiles(3), + deleteProvisioningProfiles(4), + resetEimConfigData(5), + resetImmediateEnableConfig (6) } } -SGP32-EuiccMemoryResetResponse ::= [52] SEQUENCE { -- Tag 'BF34' - resetResult INTEGER {ok(0), nothingToDelete(1), catBusy(5), undefinedError(127)}, - resetEimResult [1] INTEGER {ok(0), nothingToDelete(1), eimResetNotSupported(2), undefinedError(127)} OPTIONAL, - resetImmediateEnableConfigResult [2] INTEGER {ok(0), resetAECNotSupported(1), undefinedError(127)} OPTIONAL +SGP32-EuiccMemoryResetResponse ::= [100] SEQUENCE { -- Tag 'BF64' + resetResult INTEGER {ok(0), nothingToDelete(1), catBusy(5), ecallActive(104), undefinedError(127)}, + resetEimResult INTEGER {ok(0), nothingToDelete(1), eimResetNotSupported(2), undefinedError(127)} OPTIONAL, + resetImmediateEnableConfigResult INTEGER {ok(0), resetIECNotSupported (1), undefinedError(127)} OPTIONAL } -- Section 5.9.10 diff --git a/include/onomondo/ipa/ipad.h b/include/onomondo/ipa/ipad.h index 139ae21..defa530 100644 --- a/include/onomondo/ipa/ipad.h +++ b/include/onomondo/ipa/ipad.h @@ -92,8 +92,8 @@ int ipa_init(struct ipa_context *ctx); 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 immediate_enable_cfg); +int ipa_euicc_mem_rst(struct ipa_context *ctx, bool operatnl_profiles, bool field_test_profiles, bool default_smdp_addr, + bool pre_test_profiles, bool provisioning_profiles, bool eim_cfg_data, bool immediate_enable_cfg); int ipa_execute_fallback_mechanism(struct ipa_context *ctx, bool refresh_flag); int ipa_return_from_fallback(struct ipa_context *ctx, bool refresh_flag); int ipa_enable_emergency_profile(struct ipa_context *ctx, bool refresh_flag); diff --git a/src/ipa/libasn/EuiccMemoryResetRequest.h b/src/ipa/libasn/EuiccMemoryResetRequest.h index 8ff519a..cf550e5 100644 --- a/src/ipa/libasn/EuiccMemoryResetRequest.h +++ b/src/ipa/libasn/EuiccMemoryResetRequest.h @@ -23,7 +23,9 @@ typedef enum EuiccMemoryResetRequest__resetOptions { EuiccMemoryResetRequest__resetOptions_deleteOperationalProfiles = 0, EuiccMemoryResetRequest__resetOptions_deleteFieldLoadedTestProfiles = 1, - EuiccMemoryResetRequest__resetOptions_resetDefaultSmdpAddress = 2 + EuiccMemoryResetRequest__resetOptions_resetDefaultSmdpAddress = 2, + EuiccMemoryResetRequest__resetOptions_deletePreLoadedTestProfiles = 3, + EuiccMemoryResetRequest__resetOptions_deleteProvisioningProfiles = 4 } e_EuiccMemoryResetRequest__resetOptions; /* EuiccMemoryResetRequest */ diff --git a/src/ipa/libasn/SGP32-EuiccMemoryResetRequest.h b/src/ipa/libasn/SGP32-EuiccMemoryResetRequest.h index 0761f51..3ab6e00 100644 --- a/src/ipa/libasn/SGP32-EuiccMemoryResetRequest.h +++ b/src/ipa/libasn/SGP32-EuiccMemoryResetRequest.h @@ -24,8 +24,10 @@ SGP32_EuiccMemoryResetRequest__resetOptions_deleteOperationalProfiles = 0, SGP32_EuiccMemoryResetRequest__resetOptions_deleteFieldLoadedTestProfiles = 1, SGP32_EuiccMemoryResetRequest__resetOptions_resetDefaultSmdpAddress = 2, - SGP32_EuiccMemoryResetRequest__resetOptions_resetEimConfigData = 3, - SGP32_EuiccMemoryResetRequest__resetOptions_resetImmediateEnableConfig = 4 + SGP32_EuiccMemoryResetRequest__resetOptions_deletePreLoadedTestProfiles = 3, + SGP32_EuiccMemoryResetRequest__resetOptions_deleteProvisioningProfiles = 4, + SGP32_EuiccMemoryResetRequest__resetOptions_resetEimConfigData = 5, + SGP32_EuiccMemoryResetRequest__resetOptions_resetImmediateEnableConfig = 6 } e_SGP32_EuiccMemoryResetRequest__resetOptions; /* SGP32-EuiccMemoryResetRequest */ diff --git a/src/ipa/libasn/SGP32-EuiccMemoryResetResponse.c b/src/ipa/libasn/SGP32-EuiccMemoryResetResponse.c index cc66531..6fa2b83 100644 --- a/src/ipa/libasn/SGP32-EuiccMemoryResetResponse.c +++ b/src/ipa/libasn/SGP32-EuiccMemoryResetResponse.c @@ -9,8 +9,8 @@ static asn_TYPE_member_t asn_MBR_SGP32_EuiccMemoryResetResponse_1[] = { { ATF_NOFLAGS, 0, offsetof(struct SGP32_EuiccMemoryResetResponse, resetResult), - (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), - 0, + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ &asn_DEF_NativeInteger, 0, { 0, 0, 0 }, @@ -38,11 +38,11 @@ }; static const int asn_MAP_SGP32_EuiccMemoryResetResponse_oms_1[] = { 1, 2 }; static const ber_tlv_tag_t asn_DEF_SGP32_EuiccMemoryResetResponse_tags_1[] = { - (ASN_TAG_CLASS_CONTEXT | (52 << 2)), + (ASN_TAG_CLASS_CONTEXT | (100 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_SGP32_EuiccMemoryResetResponse_tag2el_1[] = { - { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* resetResult */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* resetResult */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* resetEimResult */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* resetImmediateEnableConfigResult */ }; diff --git a/src/ipa/libasn/SGP32-EuiccMemoryResetResponse.h b/src/ipa/libasn/SGP32-EuiccMemoryResetResponse.h index da8bcb6..89b4b1a 100644 --- a/src/ipa/libasn/SGP32-EuiccMemoryResetResponse.h +++ b/src/ipa/libasn/SGP32-EuiccMemoryResetResponse.h @@ -24,6 +24,7 @@ SGP32_EuiccMemoryResetResponse__resetResult_ok = 0, SGP32_EuiccMemoryResetResponse__resetResult_nothingToDelete = 1, SGP32_EuiccMemoryResetResponse__resetResult_catBusy = 5, + SGP32_EuiccMemoryResetResponse__resetResult_ecallActive = 104, SGP32_EuiccMemoryResetResponse__resetResult_undefinedError = 127 } e_SGP32_EuiccMemoryResetResponse__resetResult; typedef enum SGP32_EuiccMemoryResetResponse__resetEimResult { @@ -34,7 +35,7 @@ } e_SGP32_EuiccMemoryResetResponse__resetEimResult; typedef enum SGP32_EuiccMemoryResetResponse__resetImmediateEnableConfigResult { SGP32_EuiccMemoryResetResponse__resetImmediateEnableConfigResult_ok = 0, - SGP32_EuiccMemoryResetResponse__resetImmediateEnableConfigResult_resetAECNotSupported = 1, + SGP32_EuiccMemoryResetResponse__resetImmediateEnableConfigResult_resetIECNotSupported = 1, SGP32_EuiccMemoryResetResponse__resetImmediateEnableConfigResult_undefinedError = 127 } e_SGP32_EuiccMemoryResetResponse__resetImmediateEnableConfigResult; diff --git a/src/ipa/libipa/es10b_euicc_mem_rst.c b/src/ipa/libipa/es10b_euicc_mem_rst.c index 5b2040f..5c9d6d2 100644 --- a/src/ipa/libipa/es10b_euicc_mem_rst.c +++ b/src/ipa/libipa/es10b_euicc_mem_rst.c @@ -38,6 +38,7 @@ { SGP32_EuiccMemoryResetResponse__resetResult_ok, "ok" }, { SGP32_EuiccMemoryResetResponse__resetResult_nothingToDelete, "nothingToDelete" }, { SGP32_EuiccMemoryResetResponse__resetResult_catBusy, "catBusy" }, + { SGP32_EuiccMemoryResetResponse__resetResult_ecallActive, "ecallActive" }, { SGP32_EuiccMemoryResetResponse__resetResult_undefinedError, "undefinedError" }, { 0, NULL } }; @@ -52,8 +53,8 @@ static const struct num_str_map sgp32_error_code_strings_resetImmediateEnableConfigResult[] = { { SGP32_EuiccMemoryResetResponse__resetImmediateEnableConfigResult_ok, "ok" }, - { SGP32_EuiccMemoryResetResponse__resetImmediateEnableConfigResult_resetAECNotSupported, "nothingToDelete" }, - { SGP32_EuiccMemoryResetResponse__resetImmediateEnableConfigResult_undefinedError, "eimResetNotSupported" }, + { SGP32_EuiccMemoryResetResponse__resetImmediateEnableConfigResult_resetIECNotSupported, "resetIECNotSupported" }, + { SGP32_EuiccMemoryResetResponse__resetImmediateEnableConfigResult_undefinedError, "undefinedError" }, { 0, NULL } }; @@ -144,10 +145,14 @@ if (req->operatnl_profiles) rst_opt[0] |= (1 << (7 - SGP32_EuiccMemoryResetRequest__resetOptions_deleteOperationalProfiles)); - if (req->test_profiles) + if (req->field_test_profiles) rst_opt[0] |= (1 << (7 - SGP32_EuiccMemoryResetRequest__resetOptions_deleteFieldLoadedTestProfiles)); if (req->default_smdp_addr) rst_opt[0] |= (1 << (7 - SGP32_EuiccMemoryResetRequest__resetOptions_resetDefaultSmdpAddress)); + if (req->pre_test_profiles) + rst_opt[0] |= (1 << (7 - SGP32_EuiccMemoryResetRequest__resetOptions_deletePreLoadedTestProfiles)); + if (req->provisioning_profiles) + rst_opt[0] |= (1 << (7 - SGP32_EuiccMemoryResetRequest__resetOptions_deleteProvisioningProfiles)); if (req->eim_cfg_data) rst_opt[0] |= (1 << (7 - SGP32_EuiccMemoryResetRequest__resetOptions_resetEimConfigData)); if (req->immediate_enable_cfg) @@ -189,10 +194,14 @@ if (req->operatnl_profiles) rst_opt[0] |= (1 << (7 - EuiccMemoryResetRequest__resetOptions_deleteOperationalProfiles)); - if (req->test_profiles) + if (req->field_test_profiles) rst_opt[0] |= (1 << (7 - EuiccMemoryResetRequest__resetOptions_deleteFieldLoadedTestProfiles)); if (req->default_smdp_addr) rst_opt[0] |= (1 << (7 - EuiccMemoryResetRequest__resetOptions_resetDefaultSmdpAddress)); + if (req->pre_test_profiles) + rst_opt[0] |= (1 << (7 - EuiccMemoryResetRequest__resetOptions_deletePreLoadedTestProfiles)); + if (req->provisioning_profiles) + rst_opt[0] |= (1 << (7 - EuiccMemoryResetRequest__resetOptions_deleteProvisioningProfiles)); if (req->eim_cfg_data) { IPA_LOGP_ES10X("eUICCMemoryReset", LINFO, diff --git a/src/ipa/libipa/es10b_euicc_mem_rst.h b/src/ipa/libipa/es10b_euicc_mem_rst.h index 8f4d304..f8974f8 100644 --- a/src/ipa/libipa/es10b_euicc_mem_rst.h +++ b/src/ipa/libipa/es10b_euicc_mem_rst.h @@ -12,8 +12,10 @@ /* GSMA SGP.22, section 5.7.13 */ struct ipa_es10b_euicc_mem_rst { bool operatnl_profiles; - bool test_profiles; + bool field_test_profiles; bool default_smdp_addr; + bool pre_test_profiles; + bool provisioning_profiles; bool eim_cfg_data; bool immediate_enable_cfg; }; diff --git a/src/ipa/libipa/ipad.c b/src/ipa/libipa/ipad.c index 33e634d..00ab37d 100644 --- a/src/ipa/libipa/ipad.c +++ b/src/ipa/libipa/ipad.c @@ -255,13 +255,15 @@ * \param[inout] test_profiles apply reset option "deleteFieldLoadedTestProfiles". * \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 immediate_enable_cfg) +int ipa_euicc_mem_rst(struct ipa_context *ctx, bool operatnl_profiles, bool field_test_profiles, bool default_smdp_addr, + bool pre_test_profiles, bool provisioning_profiles, 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.field_test_profiles = field_test_profiles; euicc_mem_rst.default_smdp_addr = default_smdp_addr; + euicc_mem_rst.pre_test_profiles = pre_test_profiles; + euicc_mem_rst.provisioning_profiles = provisioning_profiles; euicc_mem_rst.eim_cfg_data = eim_cfg_data; euicc_mem_rst.immediate_enable_cfg = immediate_enable_cfg; return ipa_es10b_euicc_mem_rst(ctx, &euicc_mem_rst); diff --git a/src/ipa/main.c b/src/ipa/main.c index 9ed5c36..4352ee6 100644 --- a/src/ipa/main.c +++ b/src/ipa/main.c @@ -309,7 +309,7 @@ IPA_FREE(eim_cfg); } else if (getopt_euicc_memory_reset) { /* Perform an eUICC memory reset */ - ipa_euicc_mem_rst(ctx, true, true, true, true, true); + ipa_euicc_mem_rst(ctx, true, true, true, true, true, true, true); } else if (getopt_execute_fallback_mechanism) { /* Trigger enabling of fallback profile */ ipa_execute_fallback_mechanism(ctx, getopt_refresh_flag); -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43046?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: I8c683e93c2a10ff64c3ef14767000c59f81be090 Gerrit-Change-Number: 43046 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.DisableEmergencyProfile
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43044?usp=email
) Change subject: V1.2: Add function ES10b.DisableEmergencyProfile ...................................................................... V1.2: Add function ES10b.DisableEmergencyProfile Add new library function to disable emergency profile on IoT eUICC. Also add an option to the command line interface to call the library function. The optional refresh flag may be set via command line option. The function cannot be emulated with non-IoT eUICC. Reference: SGP.32 Section 5.9.23 Related: SYS#8101 Change-Id: I2af2077228fb8c5fa3f254acc15bd0afaa33fe43 --- M asn1/SGP32Definitions.asn M include/onomondo/ipa/ipad.h M src/ipa/libasn/CMakeLists.txt A src/ipa/libasn/DisableEmergencyProfileRequest.c A src/ipa/libasn/DisableEmergencyProfileRequest.h A src/ipa/libasn/DisableEmergencyProfileResponse.c A src/ipa/libasn/DisableEmergencyProfileResponse.h M src/ipa/libipa/CMakeLists.txt A src/ipa/libipa/es10b_dis_emerg_prfle.c A src/ipa/libipa/es10b_dis_emerg_prfle.h M src/ipa/libipa/ipad.c M src/ipa/main.c 12 files changed, 371 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/44/43044/1 diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index a33785b..8dd2579 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -648,6 +648,23 @@ } -- ASN1STOP +-- Section 5.9.23 +-- ASN1START +DisableEmergencyProfileRequest ::= [92] SEQUENCE { -- Tag 'BF5C' + refreshFlag BOOLEAN -- indicating whether REFRESH is required +} +-- ASN1STOP +-- ASN1START +DisableEmergencyProfileResponse ::= [92] SEQUENCE { -- Tag 'BF5C' + disableEmergencyProfileResult [0] INTEGER { + ok(0), + profileNotInEnabledState(2), + catBusy(5), + 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 c952603..139ae21 100644 --- a/include/onomondo/ipa/ipad.h +++ b/include/onomondo/ipa/ipad.h @@ -97,6 +97,7 @@ int ipa_execute_fallback_mechanism(struct ipa_context *ctx, bool refresh_flag); int ipa_return_from_fallback(struct ipa_context *ctx, bool refresh_flag); int ipa_enable_emergency_profile(struct ipa_context *ctx, bool refresh_flag); +int ipa_disable_emergency_profile(struct ipa_context *ctx, bool refresh_flag); int ipa_poll(struct ipa_context *ctx); void ipa_close(struct ipa_context *ctx); struct ipa_buf *ipa_free_ctx(struct ipa_context *ctx); diff --git a/src/ipa/libasn/CMakeLists.txt b/src/ipa/libasn/CMakeLists.txt index f25fa19..209a5f3 100644 --- a/src/ipa/libasn/CMakeLists.txt +++ b/src/ipa/libasn/CMakeLists.txt @@ -247,6 +247,10 @@ DeviceInfo.h DirectoryString.c DirectoryString.h +DisableEmergencyProfileRequest.c +DisableEmergencyProfileRequest.h +DisableEmergencyProfileResponse.c +DisableEmergencyProfileResponse.h DisableProfileRequest.c DisableProfileRequest.h DisableProfileResponse.c diff --git a/src/ipa/libasn/DisableEmergencyProfileRequest.c b/src/ipa/libasn/DisableEmergencyProfileRequest.c new file mode 100644 index 0000000..d5a273f --- /dev/null +++ b/src/ipa/libasn/DisableEmergencyProfileRequest.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 "DisableEmergencyProfileRequest.h" + +static asn_TYPE_member_t asn_MBR_DisableEmergencyProfileRequest_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct DisableEmergencyProfileRequest, 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_DisableEmergencyProfileRequest_tags_1[] = { + (ASN_TAG_CLASS_CONTEXT | (92 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_DisableEmergencyProfileRequest_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* refreshFlag */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_DisableEmergencyProfileRequest_specs_1 = { + sizeof(struct DisableEmergencyProfileRequest), + offsetof(struct DisableEmergencyProfileRequest, _asn_ctx), + asn_MAP_DisableEmergencyProfileRequest_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_DisableEmergencyProfileRequest = { + "DisableEmergencyProfileRequest", + "DisableEmergencyProfileRequest", + &asn_OP_SEQUENCE, + asn_DEF_DisableEmergencyProfileRequest_tags_1, + sizeof(asn_DEF_DisableEmergencyProfileRequest_tags_1) + /sizeof(asn_DEF_DisableEmergencyProfileRequest_tags_1[0]) - 1, /* 1 */ + asn_DEF_DisableEmergencyProfileRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_DisableEmergencyProfileRequest_tags_1) + /sizeof(asn_DEF_DisableEmergencyProfileRequest_tags_1[0]), /* 2 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_DisableEmergencyProfileRequest_1, + 1, /* Elements count */ + &asn_SPC_DisableEmergencyProfileRequest_specs_1 /* Additional specs */ +}; + diff --git a/src/ipa/libasn/DisableEmergencyProfileRequest.h b/src/ipa/libasn/DisableEmergencyProfileRequest.h new file mode 100644 index 0000000..04c8057 --- /dev/null +++ b/src/ipa/libasn/DisableEmergencyProfileRequest.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#ifndef _DisableEmergencyProfileRequest_H_ +#define _DisableEmergencyProfileRequest_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include <BOOLEAN.h> +#include <constr_SEQUENCE.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* DisableEmergencyProfileRequest */ +typedef struct DisableEmergencyProfileRequest { + BOOLEAN_t refreshFlag; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} DisableEmergencyProfileRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_DisableEmergencyProfileRequest; + +#ifdef __cplusplus +} +#endif + +#endif /* _DisableEmergencyProfileRequest_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libasn/DisableEmergencyProfileResponse.c b/src/ipa/libasn/DisableEmergencyProfileResponse.c new file mode 100644 index 0000000..12e6527 --- /dev/null +++ b/src/ipa/libasn/DisableEmergencyProfileResponse.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 "DisableEmergencyProfileResponse.h" + +static asn_TYPE_member_t asn_MBR_DisableEmergencyProfileResponse_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct DisableEmergencyProfileResponse, disableEmergencyProfileResult), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "disableEmergencyProfileResult" + }, +}; +static const ber_tlv_tag_t asn_DEF_DisableEmergencyProfileResponse_tags_1[] = { + (ASN_TAG_CLASS_CONTEXT | (92 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_DisableEmergencyProfileResponse_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* disableEmergencyProfileResult */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_DisableEmergencyProfileResponse_specs_1 = { + sizeof(struct DisableEmergencyProfileResponse), + offsetof(struct DisableEmergencyProfileResponse, _asn_ctx), + asn_MAP_DisableEmergencyProfileResponse_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_DisableEmergencyProfileResponse = { + "DisableEmergencyProfileResponse", + "DisableEmergencyProfileResponse", + &asn_OP_SEQUENCE, + asn_DEF_DisableEmergencyProfileResponse_tags_1, + sizeof(asn_DEF_DisableEmergencyProfileResponse_tags_1) + /sizeof(asn_DEF_DisableEmergencyProfileResponse_tags_1[0]) - 1, /* 1 */ + asn_DEF_DisableEmergencyProfileResponse_tags_1, /* Same as above */ + sizeof(asn_DEF_DisableEmergencyProfileResponse_tags_1) + /sizeof(asn_DEF_DisableEmergencyProfileResponse_tags_1[0]), /* 2 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_DisableEmergencyProfileResponse_1, + 1, /* Elements count */ + &asn_SPC_DisableEmergencyProfileResponse_specs_1 /* Additional specs */ +}; + diff --git a/src/ipa/libasn/DisableEmergencyProfileResponse.h b/src/ipa/libasn/DisableEmergencyProfileResponse.h new file mode 100644 index 0000000..898b2c6 --- /dev/null +++ b/src/ipa/libasn/DisableEmergencyProfileResponse.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 _DisableEmergencyProfileResponse_H_ +#define _DisableEmergencyProfileResponse_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include <NativeInteger.h> +#include <constr_SEQUENCE.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum DisableEmergencyProfileResponse__disableEmergencyProfileResult { + DisableEmergencyProfileResponse__disableEmergencyProfileResult_ok = 0, + DisableEmergencyProfileResponse__disableEmergencyProfileResult_profileNotInEnabledState = 2, + DisableEmergencyProfileResponse__disableEmergencyProfileResult_catBusy = 5, + DisableEmergencyProfileResponse__disableEmergencyProfileResult_undefinedError = 127 +} e_DisableEmergencyProfileResponse__disableEmergencyProfileResult; + +/* DisableEmergencyProfileResponse */ +typedef struct DisableEmergencyProfileResponse { + long disableEmergencyProfileResult; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} DisableEmergencyProfileResponse_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_DisableEmergencyProfileResponse; + +#ifdef __cplusplus +} +#endif + +#endif /* _DisableEmergencyProfileResponse_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libipa/CMakeLists.txt b/src/ipa/libipa/CMakeLists.txt index 8b5b9f8..d25b35b 100644 --- a/src/ipa/libipa/CMakeLists.txt +++ b/src/ipa/libipa/CMakeLists.txt @@ -23,6 +23,7 @@ es10b_exec_fallback_mech.c es10b_ret_from_fallback.c es10b_en_emerg_prfle.c + es10b_dis_emerg_prfle.c es10c_delete_prfle.c es10c_disable_prfle.c es10c_enable_prfle.c diff --git a/src/ipa/libipa/es10b_dis_emerg_prfle.c b/src/ipa/libipa/es10b_dis_emerg_prfle.c new file mode 100644 index 0000000..5ca12cf --- /dev/null +++ b/src/ipa/libipa/es10b_dis_emerg_prfle.c @@ -0,0 +1,94 @@ +/* + * 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.23: Function (ES10b): DisableEmergencyProfile + */ + +#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_dis_emerg_prfle.h" + +static const struct num_str_map error_code_strings[] = { + { DisableEmergencyProfileResponse__disableEmergencyProfileResult_ok, "ok" }, + { DisableEmergencyProfileResponse__disableEmergencyProfileResult_profileNotInEnabledState, "profileNotInEnabledState" }, + { DisableEmergencyProfileResponse__disableEmergencyProfileResult_catBusy, "catBusy" }, + { DisableEmergencyProfileResponse__disableEmergencyProfileResult_undefinedError, "undefinedError" }, + { 0, NULL } +}; + +static int dec_dis_emerg_prfle_res(struct ipa_es10b_dis_emerg_prfle_res *res, const struct ipa_buf *es10b_res) +{ + struct DisableEmergencyProfileResponse *asn = NULL; + + asn = ipa_es10x_res_dec(&asn_DEF_DisableEmergencyProfileResponse, es10b_res, "DisableEmergencyProfile"); + if (!asn) + return -EINVAL; + + if (asn->disableEmergencyProfileResult != DisableEmergencyProfileResponse__disableEmergencyProfileResult_ok) { + IPA_LOGP_ES10X("DisableEmergencyProfile", LERROR, "function failed with error code %ld=%s!\n", + asn->disableEmergencyProfileResult, + ipa_str_from_num(error_code_strings, asn->disableEmergencyProfileResult, "(unknown)")); + } else { + IPA_LOGP_ES10X("DisableEmergencyProfile", LERROR, "function succeeded with status code %ld=%s!\n", + asn->disableEmergencyProfileResult, + ipa_str_from_num(error_code_strings, asn->disableEmergencyProfileResult, "(unknown)")); + } + + res->res = asn; + return 0; +} + +/*! Function (Es10b): DisableEmergencyProfile. + * \param[inout] ctx pointer to ipa_context. + * \param[in] req pointer to struct that holds the function parameters. + * \returns pointer newly allocated struct with function result, NULL on error. */ +struct ipa_es10b_dis_emerg_prfle_res *ipa_es10b_dis_emerg_prfle(struct ipa_context *ctx, + const struct ipa_es10b_dis_emerg_prfle_req *req) +{ + struct ipa_buf *es10b_req = NULL; + struct ipa_buf *es10b_res = NULL; + struct ipa_es10b_dis_emerg_prfle_res *res = IPA_ALLOC_ZERO(struct ipa_es10b_dis_emerg_prfle_res); + int rc; + + es10b_req = ipa_es10x_req_enc(&asn_DEF_DisableEmergencyProfileRequest, &req->req, "DisableEmergencyProfile"); + if (!es10b_req) { + IPA_LOGP_ES10X("DisableEmergencyProfile", LERROR, "unable to encode Es10b request\n"); + goto error; + } + + es10b_res = ipa_euicc_transceive_es10x(ctx, es10b_req); + if (!es10b_res) { + IPA_LOGP_ES10X("DisableEmergencyProfile", LERROR, "no Es10b response\n"); + goto error; + } + + rc = dec_dis_emerg_prfle_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_dis_emerg_prfle_res_free(res); + return NULL; +} + +/*! Free results of function (Es10b): DisableEmergencyProfile. + * \param[in] res pointer to function result. */ +void ipa_es10b_dis_emerg_prfle_res_free(struct ipa_es10b_dis_emerg_prfle_res *res) +{ + IPA_ES10X_RES_FREE(asn_DEF_DisableEmergencyProfileResponse, res); +} diff --git a/src/ipa/libipa/es10b_dis_emerg_prfle.h b/src/ipa/libipa/es10b_dis_emerg_prfle.h new file mode 100644 index 0000000..0eb6325 --- /dev/null +++ b/src/ipa/libipa/es10b_dis_emerg_prfle.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2026 sysmocom - s.f.m.c. GmbH. All rights reserved. + * + * SPDX-License-Identifier: AGPL-3.0-only + */ + +#pragma once + +#include <DisableEmergencyProfileRequest.h> +#include <DisableEmergencyProfileResponse.h> +struct ipa_context; + +struct ipa_es10b_dis_emerg_prfle_req { + struct DisableEmergencyProfileRequest req; +}; + +struct ipa_es10b_dis_emerg_prfle_res { + struct DisableEmergencyProfileResponse *res; +}; + +struct ipa_es10b_dis_emerg_prfle_res *ipa_es10b_dis_emerg_prfle(struct ipa_context *ctx, + const struct ipa_es10b_dis_emerg_prfle_req *req); +void ipa_es10b_dis_emerg_prfle_res_free(struct ipa_es10b_dis_emerg_prfle_res *res); diff --git a/src/ipa/libipa/ipad.c b/src/ipa/libipa/ipad.c index 79cab99..33e634d 100644 --- a/src/ipa/libipa/ipad.c +++ b/src/ipa/libipa/ipad.c @@ -28,6 +28,7 @@ #include "es10b_exec_fallback_mech.h" #include "es10b_ret_from_fallback.h" #include "es10b_en_emerg_prfle.h" +#include "es10b_dis_emerg_prfle.h" #include "proc_euicc_pkg_dwnld_exec.h" #include "proc_notif_delivery.h" @@ -344,6 +345,32 @@ return rc; } +/*! Trigger enabling of fallback profile. + * \param[inout] ctx pointer to ipa_context. + * \param[in] refresh_flag send a CAT refresh after switchting profile. + * \returns 0 on success, negative on error. */ +int ipa_disable_emergency_profile(struct ipa_context *ctx, bool refresh_flag) +{ + struct ipa_es10b_dis_emerg_prfle_req dis_emerg_prfle = { 0 }; + struct ipa_es10b_dis_emerg_prfle_res *res; + int rc = -EINVAL; + + if (ctx->cfg->iot_euicc_emu_enabled) { + IPA_LOGP(SIPA, LERROR, "Unable to emulate switching back from emergency profile.\n"); + return -ENOTSUP; + } + + dis_emerg_prfle.req.refreshFlag = refresh_flag; + res = ipa_es10b_dis_emerg_prfle(ctx, &dis_emerg_prfle); + if (!res) + return -EIO; + if (res->res->disableEmergencyProfileResult == DisableEmergencyProfileResponse__disableEmergencyProfileResult_ok) + rc = 0; + ipa_es10b_dis_emerg_prfle_res_free(res); + + return rc; +} + static int check_canaries(struct ipa_context *ctx) { if (ctx->check_http) diff --git a/src/ipa/main.c b/src/ipa/main.c index f49ddd5..9ed5c36 100644 --- a/src/ipa/main.c +++ b/src/ipa/main.c @@ -52,6 +52,7 @@ printf(" --execute-fallback-mechanism Trigger enabling of fallback profile\n"); printf(" --return-from-fallback...... Trigger return from fallback profile to previous profile\n"); 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(" -n PATH .................... path to nvstate file (default: %s)\n", DEFAULT_NVSTATE_PATH); printf(" -y NUM ..................... number of retries for ESipa requests (default: %u)\n", @@ -149,6 +150,7 @@ bool getopt_execute_fallback_mechanism = false; bool getopt_return_from_fallback = false; bool getopt_enable_emergency_profile = false; + bool getopt_disable_emergency_profile = false; bool getopt_refresh_flag = false; char *getopt_nvstate_path = DEFAULT_NVSTATE_PATH; struct ipa_buf *nvstate_load = NULL; @@ -170,6 +172,7 @@ OPT_EXECFALLBACK = 256, OPT_RETURNFALLBACK, OPT_ENABLEEMGERGENCY, + OPT_DISABLEEMGERGENCY, OPT_REFRESHFLAG, }; @@ -177,6 +180,7 @@ { "execute-fallback-mechanism", no_argument, NULL, OPT_EXECFALLBACK}, { "return-from-fallback", no_argument, NULL, OPT_RETURNFALLBACK}, { "enable-emergency-profile", no_argument, NULL, OPT_ENABLEEMGERGENCY}, + { "disable-emergency-profile", no_argument, NULL, OPT_DISABLEEMGERGENCY}, { "refresh-flag", no_argument, NULL, OPT_REFRESHFLAG}, { NULL, 0, NULL, 0} }; @@ -219,6 +223,9 @@ case OPT_ENABLEEMGERGENCY: getopt_enable_emergency_profile = true; break; + case OPT_DISABLEEMGERGENCY: + getopt_disable_emergency_profile = true; + break; case OPT_REFRESHFLAG: getopt_refresh_flag = true; break; @@ -312,6 +319,9 @@ } else if (getopt_enable_emergency_profile) { /* Trigger enabling of emergency profile */ ipa_enable_emergency_profile(ctx, getopt_refresh_flag); + } else if (getopt_disable_emergency_profile) { + /* Trigger return from emergency profile to previous profile */ + ipa_disable_emergency_profile(ctx, getopt_refresh_flag); } else { IPA_LOGP(SMAIN, LINFO, "-----------------------------8<-----------------------------\n"); rc = eim_init(ctx); -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43044?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: I2af2077228fb8c5fa3f254acc15bd0afaa33fe43 Gerrit-Change-Number: 43044 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.EnableEmergencyProfile
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43043?usp=email
) Change subject: V1.2: Add function ES10b.EnableEmergencyProfile ...................................................................... V1.2: Add function ES10b.EnableEmergencyProfile Add new library function to enable emergency profile on IoT eUICC. Also add an option to the command line interface to call the library function. The optional refresh flag may be set via command line option. The function cannot be emulated with non-IoT eUICC. Reference: SGP.32 Section 5.9.22 Related: SYS#8101 Change-Id: I0304b869a14a36b82cc2d1676b2a5f613e1da171 --- M asn1/SGP32Definitions.asn M include/onomondo/ipa/ipad.h M src/ipa/libasn/CMakeLists.txt A src/ipa/libasn/EnableEmergencyProfileRequest.c A src/ipa/libasn/EnableEmergencyProfileRequest.h A src/ipa/libasn/EnableEmergencyProfileResponse.c A src/ipa/libasn/EnableEmergencyProfileResponse.h M src/ipa/libipa/CMakeLists.txt A src/ipa/libipa/es10b_en_emerg_prfle.c A src/ipa/libipa/es10b_en_emerg_prfle.h M src/ipa/libipa/ipad.c M src/ipa/main.c 12 files changed, 374 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/43/43043/1 diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index d22a1c9..a33785b 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -630,6 +630,24 @@ } -- ASN1STOP +-- Section 5.9.22 +-- ASN1START +EnableEmergencyProfileRequest ::= [91] SEQUENCE { -- Tag 'BF5B' + refreshFlag BOOLEAN -- indicating whether REFRESH is required +} +-- ASN1STOP +-- ASN1START +EnableEmergencyProfileResponse ::= [91] SEQUENCE { -- Tag 'BF5B' + enableEmergencyProfileResult [0] INTEGER { + ok(0), + profileNotInDisabledState(2), + catBusy(5), + ecallNotAvailable(8), -- Emergency Profile does not exist + 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 d54b09a..c952603 100644 --- a/include/onomondo/ipa/ipad.h +++ b/include/onomondo/ipa/ipad.h @@ -96,6 +96,7 @@ bool eim_cfg_data, bool immediate_enable_cfg); int ipa_execute_fallback_mechanism(struct ipa_context *ctx, bool refresh_flag); int ipa_return_from_fallback(struct ipa_context *ctx, bool refresh_flag); +int ipa_enable_emergency_profile(struct ipa_context *ctx, bool refresh_flag); int ipa_poll(struct ipa_context *ctx); void ipa_close(struct ipa_context *ctx); struct ipa_buf *ipa_free_ctx(struct ipa_context *ctx); diff --git a/src/ipa/libasn/CMakeLists.txt b/src/ipa/libasn/CMakeLists.txt index 859578a..f25fa19 100644 --- a/src/ipa/libasn/CMakeLists.txt +++ b/src/ipa/libasn/CMakeLists.txt @@ -283,6 +283,10 @@ EimSupportedProtocol.h EmailAddress.c EmailAddress.h +EnableEmergencyProfileRequest.c +EnableEmergencyProfileRequest.h +EnableEmergencyProfileResponse.c +EnableEmergencyProfileResponse.h EnableProfileRequest.c EnableProfileRequest.h EnableProfileResponse.c diff --git a/src/ipa/libasn/EnableEmergencyProfileRequest.c b/src/ipa/libasn/EnableEmergencyProfileRequest.c new file mode 100644 index 0000000..2bbadb5 --- /dev/null +++ b/src/ipa/libasn/EnableEmergencyProfileRequest.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 "EnableEmergencyProfileRequest.h" + +static asn_TYPE_member_t asn_MBR_EnableEmergencyProfileRequest_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct EnableEmergencyProfileRequest, 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_EnableEmergencyProfileRequest_tags_1[] = { + (ASN_TAG_CLASS_CONTEXT | (91 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_EnableEmergencyProfileRequest_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* refreshFlag */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_EnableEmergencyProfileRequest_specs_1 = { + sizeof(struct EnableEmergencyProfileRequest), + offsetof(struct EnableEmergencyProfileRequest, _asn_ctx), + asn_MAP_EnableEmergencyProfileRequest_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_EnableEmergencyProfileRequest = { + "EnableEmergencyProfileRequest", + "EnableEmergencyProfileRequest", + &asn_OP_SEQUENCE, + asn_DEF_EnableEmergencyProfileRequest_tags_1, + sizeof(asn_DEF_EnableEmergencyProfileRequest_tags_1) + /sizeof(asn_DEF_EnableEmergencyProfileRequest_tags_1[0]) - 1, /* 1 */ + asn_DEF_EnableEmergencyProfileRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_EnableEmergencyProfileRequest_tags_1) + /sizeof(asn_DEF_EnableEmergencyProfileRequest_tags_1[0]), /* 2 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_EnableEmergencyProfileRequest_1, + 1, /* Elements count */ + &asn_SPC_EnableEmergencyProfileRequest_specs_1 /* Additional specs */ +}; + diff --git a/src/ipa/libasn/EnableEmergencyProfileRequest.h b/src/ipa/libasn/EnableEmergencyProfileRequest.h new file mode 100644 index 0000000..2eeb5a8 --- /dev/null +++ b/src/ipa/libasn/EnableEmergencyProfileRequest.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#ifndef _EnableEmergencyProfileRequest_H_ +#define _EnableEmergencyProfileRequest_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include <BOOLEAN.h> +#include <constr_SEQUENCE.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* EnableEmergencyProfileRequest */ +typedef struct EnableEmergencyProfileRequest { + BOOLEAN_t refreshFlag; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} EnableEmergencyProfileRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_EnableEmergencyProfileRequest; + +#ifdef __cplusplus +} +#endif + +#endif /* _EnableEmergencyProfileRequest_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libasn/EnableEmergencyProfileResponse.c b/src/ipa/libasn/EnableEmergencyProfileResponse.c new file mode 100644 index 0000000..4e8c04e --- /dev/null +++ b/src/ipa/libasn/EnableEmergencyProfileResponse.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 "EnableEmergencyProfileResponse.h" + +static asn_TYPE_member_t asn_MBR_EnableEmergencyProfileResponse_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct EnableEmergencyProfileResponse, enableEmergencyProfileResult), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "enableEmergencyProfileResult" + }, +}; +static const ber_tlv_tag_t asn_DEF_EnableEmergencyProfileResponse_tags_1[] = { + (ASN_TAG_CLASS_CONTEXT | (91 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_EnableEmergencyProfileResponse_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* enableEmergencyProfileResult */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_EnableEmergencyProfileResponse_specs_1 = { + sizeof(struct EnableEmergencyProfileResponse), + offsetof(struct EnableEmergencyProfileResponse, _asn_ctx), + asn_MAP_EnableEmergencyProfileResponse_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_EnableEmergencyProfileResponse = { + "EnableEmergencyProfileResponse", + "EnableEmergencyProfileResponse", + &asn_OP_SEQUENCE, + asn_DEF_EnableEmergencyProfileResponse_tags_1, + sizeof(asn_DEF_EnableEmergencyProfileResponse_tags_1) + /sizeof(asn_DEF_EnableEmergencyProfileResponse_tags_1[0]) - 1, /* 1 */ + asn_DEF_EnableEmergencyProfileResponse_tags_1, /* Same as above */ + sizeof(asn_DEF_EnableEmergencyProfileResponse_tags_1) + /sizeof(asn_DEF_EnableEmergencyProfileResponse_tags_1[0]), /* 2 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_EnableEmergencyProfileResponse_1, + 1, /* Elements count */ + &asn_SPC_EnableEmergencyProfileResponse_specs_1 /* Additional specs */ +}; + diff --git a/src/ipa/libasn/EnableEmergencyProfileResponse.h b/src/ipa/libasn/EnableEmergencyProfileResponse.h new file mode 100644 index 0000000..7ff7e36 --- /dev/null +++ b/src/ipa/libasn/EnableEmergencyProfileResponse.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 _EnableEmergencyProfileResponse_H_ +#define _EnableEmergencyProfileResponse_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include <NativeInteger.h> +#include <constr_SEQUENCE.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum EnableEmergencyProfileResponse__enableEmergencyProfileResult { + EnableEmergencyProfileResponse__enableEmergencyProfileResult_ok = 0, + EnableEmergencyProfileResponse__enableEmergencyProfileResult_profileNotInDisabledState = 2, + EnableEmergencyProfileResponse__enableEmergencyProfileResult_catBusy = 5, + EnableEmergencyProfileResponse__enableEmergencyProfileResult_ecallNotAvailable = 8, + EnableEmergencyProfileResponse__enableEmergencyProfileResult_undefinedError = 127 +} e_EnableEmergencyProfileResponse__enableEmergencyProfileResult; + +/* EnableEmergencyProfileResponse */ +typedef struct EnableEmergencyProfileResponse { + long enableEmergencyProfileResult; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} EnableEmergencyProfileResponse_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_EnableEmergencyProfileResponse; + +#ifdef __cplusplus +} +#endif + +#endif /* _EnableEmergencyProfileResponse_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libipa/CMakeLists.txt b/src/ipa/libipa/CMakeLists.txt index 45d8f4a..8b5b9f8 100644 --- a/src/ipa/libipa/CMakeLists.txt +++ b/src/ipa/libipa/CMakeLists.txt @@ -22,6 +22,7 @@ es10b_rm_notif_from_lst.c es10b_exec_fallback_mech.c es10b_ret_from_fallback.c + es10b_en_emerg_prfle.c es10c_delete_prfle.c es10c_disable_prfle.c es10c_enable_prfle.c diff --git a/src/ipa/libipa/es10b_en_emerg_prfle.c b/src/ipa/libipa/es10b_en_emerg_prfle.c new file mode 100644 index 0000000..4eddeda --- /dev/null +++ b/src/ipa/libipa/es10b_en_emerg_prfle.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.22: Function (ES10b): EnableEmergencyProfile + */ + +#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_en_emerg_prfle.h" + +static const struct num_str_map error_code_strings[] = { + { EnableEmergencyProfileResponse__enableEmergencyProfileResult_ok, "ok" }, + { EnableEmergencyProfileResponse__enableEmergencyProfileResult_profileNotInDisabledState, "profileNotInDisabledState" }, + { EnableEmergencyProfileResponse__enableEmergencyProfileResult_catBusy, "catBusy" }, + { EnableEmergencyProfileResponse__enableEmergencyProfileResult_ecallNotAvailable, "ecallNotAvailable" }, + { EnableEmergencyProfileResponse__enableEmergencyProfileResult_undefinedError, "undefinedError" }, + { 0, NULL } +}; + +static int dec_en_emerg_prfle_res(struct ipa_es10b_en_emerg_prfle_res *res, const struct ipa_buf *es10b_res) +{ + struct EnableEmergencyProfileResponse *asn = NULL; + + asn = ipa_es10x_res_dec(&asn_DEF_EnableEmergencyProfileResponse, es10b_res, "EnableEmergencyProfile"); + if (!asn) + return -EINVAL; + + if (asn->enableEmergencyProfileResult != EnableEmergencyProfileResponse__enableEmergencyProfileResult_ok) { + IPA_LOGP_ES10X("EnableEmergencyProfile", LERROR, "function failed with error code %ld=%s!\n", + asn->enableEmergencyProfileResult, + ipa_str_from_num(error_code_strings, asn->enableEmergencyProfileResult, "(unknown)")); + } else { + IPA_LOGP_ES10X("EnableEmergencyProfile", LERROR, "function succeeded with status code %ld=%s!\n", + asn->enableEmergencyProfileResult, + ipa_str_from_num(error_code_strings, asn->enableEmergencyProfileResult, "(unknown)")); + } + + res->res = asn; + return 0; +} + +/*! Function (Es10b): EnableEmergencyProfile. + * \param[inout] ctx pointer to ipa_context. + * \param[in] req pointer to struct that holds the function parameters. + * \returns pointer newly allocated struct with function result, NULL on error. */ +struct ipa_es10b_en_emerg_prfle_res *ipa_es10b_en_emerg_prfle(struct ipa_context *ctx, + const struct ipa_es10b_en_emerg_prfle_req *req) +{ + struct ipa_buf *es10b_req = NULL; + struct ipa_buf *es10b_res = NULL; + struct ipa_es10b_en_emerg_prfle_res *res = IPA_ALLOC_ZERO(struct ipa_es10b_en_emerg_prfle_res); + int rc; + + es10b_req = ipa_es10x_req_enc(&asn_DEF_EnableEmergencyProfileRequest, &req->req, "EnableEmergencyProfile"); + if (!es10b_req) { + IPA_LOGP_ES10X("EnableEmergencyProfile", LERROR, "unable to encode Es10b request\n"); + goto error; + } + + es10b_res = ipa_euicc_transceive_es10x(ctx, es10b_req); + if (!es10b_res) { + IPA_LOGP_ES10X("EnableEmergencyProfile", LERROR, "no Es10b response\n"); + goto error; + } + + rc = dec_en_emerg_prfle_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_en_emerg_prfle_res_free(res); + return NULL; +} + +/*! Free results of function (Es10b): EnableEmergencyProfile. + * \param[in] res pointer to function result. */ +void ipa_es10b_en_emerg_prfle_res_free(struct ipa_es10b_en_emerg_prfle_res *res) +{ + IPA_ES10X_RES_FREE(asn_DEF_EnableEmergencyProfileResponse, res); +} diff --git a/src/ipa/libipa/es10b_en_emerg_prfle.h b/src/ipa/libipa/es10b_en_emerg_prfle.h new file mode 100644 index 0000000..db8dd44 --- /dev/null +++ b/src/ipa/libipa/es10b_en_emerg_prfle.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2026 sysmocom - s.f.m.c. GmbH. All rights reserved. + * + * SPDX-License-Identifier: AGPL-3.0-only + */ + +#pragma once + +#include <EnableEmergencyProfileRequest.h> +#include <EnableEmergencyProfileResponse.h> +struct ipa_context; + +struct ipa_es10b_en_emerg_prfle_req { + struct EnableEmergencyProfileRequest req; +}; + +struct ipa_es10b_en_emerg_prfle_res { + struct EnableEmergencyProfileResponse *res; +}; + +struct ipa_es10b_en_emerg_prfle_res *ipa_es10b_en_emerg_prfle(struct ipa_context *ctx, + const struct ipa_es10b_en_emerg_prfle_req *req); +void ipa_es10b_en_emerg_prfle_res_free(struct ipa_es10b_en_emerg_prfle_res *res); diff --git a/src/ipa/libipa/ipad.c b/src/ipa/libipa/ipad.c index 187b3d1..79cab99 100644 --- a/src/ipa/libipa/ipad.c +++ b/src/ipa/libipa/ipad.c @@ -27,6 +27,7 @@ #include "es10b_load_euicc_pkg.h" #include "es10b_exec_fallback_mech.h" #include "es10b_ret_from_fallback.h" +#include "es10b_en_emerg_prfle.h" #include "proc_euicc_pkg_dwnld_exec.h" #include "proc_notif_delivery.h" @@ -317,6 +318,32 @@ return rc; } +/*! Trigger return from emergency profile to previous profile. + * \param[inout] ctx pointer to ipa_context. + * \param[in] refresh_flag send a CAT refresh after switchting profile. + * \returns 0 on success, negative on error. */ +int ipa_enable_emergency_profile(struct ipa_context *ctx, bool refresh_flag) +{ + struct ipa_es10b_en_emerg_prfle_req en_emerg_prfle = { 0 }; + struct ipa_es10b_en_emerg_prfle_res *res; + int rc = -EINVAL; + + if (ctx->cfg->iot_euicc_emu_enabled) { + IPA_LOGP(SIPA, LERROR, "Unable to emulate switching to emergency profile.\n"); + return -ENOTSUP; + } + + en_emerg_prfle.req.refreshFlag = refresh_flag; + res = ipa_es10b_en_emerg_prfle(ctx, &en_emerg_prfle); + if (!res) + return -EIO; + if (res->res->enableEmergencyProfileResult == EnableEmergencyProfileResponse__enableEmergencyProfileResult_ok) + rc = 0; + ipa_es10b_en_emerg_prfle_res_free(res); + + return rc; +} + static int check_canaries(struct ipa_context *ctx) { if (ctx->check_http) diff --git a/src/ipa/main.c b/src/ipa/main.c index 57224dc..f49ddd5 100644 --- a/src/ipa/main.c +++ b/src/ipa/main.c @@ -51,6 +51,7 @@ printf(" -m ......................... reset eUICC memory\n"); printf(" --execute-fallback-mechanism Trigger enabling of fallback profile\n"); printf(" --return-from-fallback...... Trigger return from fallback profile to previous profile\n"); + printf(" --enable-emergency-profile.. Trigger enabling of emergency profile\n"); printf(" --refresh-flag.............. Make eUICC send a CAT refresh after switchting profile with the triggers above.\n"); printf(" -n PATH .................... path to nvstate file (default: %s)\n", DEFAULT_NVSTATE_PATH); printf(" -y NUM ..................... number of retries for ESipa requests (default: %u)\n", @@ -147,6 +148,7 @@ bool getopt_euicc_memory_reset = false; bool getopt_execute_fallback_mechanism = false; bool getopt_return_from_fallback = false; + bool getopt_enable_emergency_profile = false; bool getopt_refresh_flag = false; char *getopt_nvstate_path = DEFAULT_NVSTATE_PATH; struct ipa_buf *nvstate_load = NULL; @@ -167,12 +169,14 @@ enum { OPT_EXECFALLBACK = 256, OPT_RETURNFALLBACK, + OPT_ENABLEEMGERGENCY, OPT_REFRESHFLAG, }; struct option long_options[] = { { "execute-fallback-mechanism", no_argument, NULL, OPT_EXECFALLBACK}, { "return-from-fallback", no_argument, NULL, OPT_RETURNFALLBACK}, + { "enable-emergency-profile", no_argument, NULL, OPT_ENABLEEMGERGENCY}, { "refresh-flag", no_argument, NULL, OPT_REFRESHFLAG}, { NULL, 0, NULL, 0} }; @@ -212,6 +216,9 @@ case OPT_RETURNFALLBACK: getopt_return_from_fallback = true; break; + case OPT_ENABLEEMGERGENCY: + getopt_enable_emergency_profile = true; + break; case OPT_REFRESHFLAG: getopt_refresh_flag = true; break; @@ -302,6 +309,9 @@ } else if (getopt_return_from_fallback) { /* Trigger return from fallback profile to previous profile */ ipa_return_from_fallback(ctx, getopt_refresh_flag); + } else if (getopt_enable_emergency_profile) { + /* Trigger enabling of emergency profile */ + ipa_enable_emergency_profile(ctx, getopt_refresh_flag); } else { IPA_LOGP(SMAIN, LINFO, "-----------------------------8<-----------------------------\n"); rc = eim_init(ctx); -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43043?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: I0304b869a14a36b82cc2d1676b2a5f613e1da171 Gerrit-Change-Number: 43043 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
← Newer
1
...
8
9
10
11
12
13
14
...
51
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Results per page:
10
25
50
100
200