lists.osmocom.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2026
September
August
July
June
May
April
March
February
January
2025
December
November
October
September
August
July
June
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
List overview
Download
gerrit-log
July 2026
----- 2026 -----
September 2026
August 2026
July 2026
June 2026
May 2026
April 2026
March 2026
February 2026
January 2026
----- 2025 -----
December 2025
November 2025
October 2025
September 2025
August 2025
July 2025
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
gerrit-log@lists.osmocom.org
1 participants
869 discussions
Start a n
N
ew thread
[S] Change in onomondo-ipa[master]: V1.2: Add eimValue to CompactOtherSignedNotification
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43071?usp=email
) Change subject: V1.2: Add eimValue to CompactOtherSignedNotification ...................................................................... V1.2: Add eimValue to CompactOtherSignedNotification The IPA just forwards the message, so no change in process is required. Reference: SGP.23 Section 5.14.7 Related: SYS#8101 Change-Id: I0183ef6555d23d762e6c8fa8584453b3a07d4940 --- M asn1/SGP32Definitions.asn M src/ipa/libasn/CompactOtherSignedNotification.c M src/ipa/libasn/CompactOtherSignedNotification.h 3 files changed, 22 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/71/43071/1 diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index f67fc4d..d7155c8 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -836,6 +836,7 @@ simaResponse OCTET STRING OPTIONAL -- MUST be present if the simaResponse value (EUICCResponse) is different from the 9-byte value ‘30 07 A0 05 30 03 80 01 00’ representing success } CompactOtherSignedNotification ::= SEQUENCE { + eidValue [APPLICATION 26] Octet16 OPTIONAL, -- Tag '5A' tbsOtherNotification NotificationMetadata, euiccNotificationSignature [APPLICATION 55] OCTET STRING -- eUICC signature of tbsOtherNotification, Tag '5F37' } diff --git a/src/ipa/libasn/CompactOtherSignedNotification.c b/src/ipa/libasn/CompactOtherSignedNotification.c index 1fa5d4b..9406fd7 100644 --- a/src/ipa/libasn/CompactOtherSignedNotification.c +++ b/src/ipa/libasn/CompactOtherSignedNotification.c @@ -8,6 +8,15 @@ #include "CompactOtherSignedNotification.h" asn_TYPE_member_t asn_MBR_CompactOtherSignedNotification_1[] = { + { ATF_POINTER, 1, offsetof(struct CompactOtherSignedNotification, eidValue), + (ASN_TAG_CLASS_APPLICATION | (26 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Octet16, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eidValue" + }, { ATF_NOFLAGS, 0, offsetof(struct CompactOtherSignedNotification, tbsOtherNotification), (ASN_TAG_CLASS_CONTEXT | (47 << 2)), 0, @@ -27,20 +36,23 @@ "euiccNotificationSignature" }, }; +static const int asn_MAP_CompactOtherSignedNotification_oms_1[] = { 0 }; static const ber_tlv_tag_t asn_DEF_CompactOtherSignedNotification_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_CompactOtherSignedNotification_tag2el_1[] = { - { (ASN_TAG_CLASS_APPLICATION | (55 << 2)), 1, 0, 0 }, /* euiccNotificationSignature */ - { (ASN_TAG_CLASS_CONTEXT | (47 << 2)), 0, 0, 0 } /* tbsOtherNotification */ + { (ASN_TAG_CLASS_APPLICATION | (26 << 2)), 0, 0, 0 }, /* eidValue */ + { (ASN_TAG_CLASS_APPLICATION | (55 << 2)), 2, 0, 0 }, /* euiccNotificationSignature */ + { (ASN_TAG_CLASS_CONTEXT | (47 << 2)), 1, 0, 0 } /* tbsOtherNotification */ }; asn_SEQUENCE_specifics_t asn_SPC_CompactOtherSignedNotification_specs_1 = { sizeof(struct CompactOtherSignedNotification), offsetof(struct CompactOtherSignedNotification, _asn_ctx), asn_MAP_CompactOtherSignedNotification_tag2el_1, - 2, /* Count of tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - 2, /* First extension addition */ + 3, /* Count of tags in the map */ + asn_MAP_CompactOtherSignedNotification_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_CompactOtherSignedNotification = { "CompactOtherSignedNotification", @@ -54,7 +66,7 @@ /sizeof(asn_DEF_CompactOtherSignedNotification_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_CompactOtherSignedNotification_1, - 2, /* Elements count */ + 3, /* Elements count */ &asn_SPC_CompactOtherSignedNotification_specs_1 /* Additional specs */ }; diff --git a/src/ipa/libasn/CompactOtherSignedNotification.h b/src/ipa/libasn/CompactOtherSignedNotification.h index c6067cf..9747ba4 100644 --- a/src/ipa/libasn/CompactOtherSignedNotification.h +++ b/src/ipa/libasn/CompactOtherSignedNotification.h @@ -12,6 +12,7 @@ #include <asn_application.h> /* Including external dependencies */ +#include "Octet16.h" #include "NotificationMetadata.h" #include <OCTET_STRING.h> #include <constr_SEQUENCE.h> @@ -22,6 +23,7 @@ /* CompactOtherSignedNotification */ typedef struct CompactOtherSignedNotification { + Octet16_t *eidValue /* OPTIONAL */; NotificationMetadata_t tbsOtherNotification; OCTET_STRING_t euiccNotificationSignature; /* @@ -36,7 +38,7 @@ /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_CompactOtherSignedNotification; extern asn_SEQUENCE_specifics_t asn_SPC_CompactOtherSignedNotification_specs_1; -extern asn_TYPE_member_t asn_MBR_CompactOtherSignedNotification_1[2]; +extern asn_TYPE_member_t asn_MBR_CompactOtherSignedNotification_1[3]; #ifdef __cplusplus } -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43071?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: I0183ef6555d23d762e6c8fa8584453b3a07d4940 Gerrit-Change-Number: 43071 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
[M] Change in onomondo-ipa[master]: WIP: Add eimId to GetEimConfigurationDataRequest
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43072?usp=email
) Change subject: WIP: Add eimId to GetEimConfigurationDataRequest ...................................................................... WIP: Add eimId to GetEimConfigurationDataRequest Add search criteria eimId to GetEimConfigurationDataRequest. The IoT eUICC emulation does not require this, because it returns an empty result anyway. Reference: SGP.23 Section: 5.9.18 Related: SYS#8101 Change-Id: Ia8aacd9d5b8ec7a9d524a446114557efdb0614f5 --- M asn1/SGP32Definitions.asn M src/ipa/libasn/GetEimConfigurationDataRequest.c M src/ipa/libasn/GetEimConfigurationDataRequest.h 3 files changed, 135 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/72/43072/1 diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index d7155c8..b9746ea 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -644,6 +644,9 @@ -- Section 5.9.18 -- ASN1START GetEimConfigurationDataRequest ::= [85] SEQUENCE { -- Tag 'BF55' + searchCriteria CHOICE { + eimId [0] UTF8String (SIZE(1..128)) + } OPTIONAL } -- ASN1STOP -- ASN1START diff --git a/src/ipa/libasn/GetEimConfigurationDataRequest.c b/src/ipa/libasn/GetEimConfigurationDataRequest.c index b321df9..d33b8fb 100644 --- a/src/ipa/libasn/GetEimConfigurationDataRequest.c +++ b/src/ipa/libasn/GetEimConfigurationDataRequest.c @@ -7,17 +7,120 @@ #include "GetEimConfigurationDataRequest.h" +static int +memb_eimId_constraint_2(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const UTF8String_t *st = (const UTF8String_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = UTF8String_length(st); + if((ssize_t)size < 0) { + ASN__CTFAIL(app_key, td, sptr, + "%s: UTF-8: broken encoding (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((size >= 1 && size <= 128)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_eimId_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +static asn_per_constraints_t asn_PER_memb_eimId_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_type_searchCriteria_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1}; +static asn_per_constraints_t asn_PER_type_searchCriteria_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +static asn_TYPE_member_t asn_MBR_searchCriteria_2[] = { + { ATF_NOFLAGS, 0, offsetof(struct GetEimConfigurationDataRequest__searchCriteria, choice.eimId), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_UTF8String, + 0, + { &asn_OER_memb_eimId_constr_3, &asn_PER_memb_eimId_constr_3, memb_eimId_constraint_2 }, + 0, 0, /* No default value */ + "eimId" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_searchCriteria_tag2el_2[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* eimId */ +}; +static asn_CHOICE_specifics_t asn_SPC_searchCriteria_specs_2 = { + sizeof(struct GetEimConfigurationDataRequest__searchCriteria), + offsetof(struct GetEimConfigurationDataRequest__searchCriteria, _asn_ctx), + offsetof(struct GetEimConfigurationDataRequest__searchCriteria, present), + sizeof(((struct GetEimConfigurationDataRequest__searchCriteria *)0)->present), + asn_MAP_searchCriteria_tag2el_2, + 1, /* Count of tags in the map */ + 0, 0, + 1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_searchCriteria_2 = { + "searchCriteria", + "searchCriteria", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { &asn_OER_type_searchCriteria_constr_2, &asn_PER_type_searchCriteria_constr_2, CHOICE_constraint }, + asn_MBR_searchCriteria_2, + 1, /* Elements count */ + &asn_SPC_searchCriteria_specs_2 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_GetEimConfigurationDataRequest_1[] = { + { ATF_POINTER, 1, offsetof(struct GetEimConfigurationDataRequest, searchCriteria), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_searchCriteria_2, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "searchCriteria" + }, +}; +static const int asn_MAP_GetEimConfigurationDataRequest_oms_1[] = { 0 }; static const ber_tlv_tag_t asn_DEF_GetEimConfigurationDataRequest_tags_1[] = { (ASN_TAG_CLASS_CONTEXT | (85 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; +static const asn_TYPE_tag2member_t asn_MAP_GetEimConfigurationDataRequest_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* searchCriteria */ +}; static asn_SEQUENCE_specifics_t asn_SPC_GetEimConfigurationDataRequest_specs_1 = { sizeof(struct GetEimConfigurationDataRequest), offsetof(struct GetEimConfigurationDataRequest, _asn_ctx), - 0, /* No top level tags */ - 0, /* No tags in the map */ - 0, 0, 0, /* Optional elements (not needed) */ - -1, /* First extension addition */ + asn_MAP_GetEimConfigurationDataRequest_tag2el_1, + 1, /* Count of tags in the map */ + asn_MAP_GetEimConfigurationDataRequest_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_GetEimConfigurationDataRequest = { "GetEimConfigurationDataRequest", @@ -30,7 +133,8 @@ sizeof(asn_DEF_GetEimConfigurationDataRequest_tags_1) /sizeof(asn_DEF_GetEimConfigurationDataRequest_tags_1[0]), /* 2 */ { 0, 0, SEQUENCE_constraint }, - 0, 0, /* No members */ + asn_MBR_GetEimConfigurationDataRequest_1, + 1, /* Elements count */ &asn_SPC_GetEimConfigurationDataRequest_specs_1 /* Additional specs */ }; diff --git a/src/ipa/libasn/GetEimConfigurationDataRequest.h b/src/ipa/libasn/GetEimConfigurationDataRequest.h index 385ea6e..ab0c3f2 100644 --- a/src/ipa/libasn/GetEimConfigurationDataRequest.h +++ b/src/ipa/libasn/GetEimConfigurationDataRequest.h @@ -12,14 +12,37 @@ #include <asn_application.h> /* Including external dependencies */ +#include <UTF8String.h> +#include <constr_CHOICE.h> #include <constr_SEQUENCE.h> #ifdef __cplusplus extern "C" { #endif +/* Dependencies */ +typedef enum GetEimConfigurationDataRequest__searchCriteria_PR { + GetEimConfigurationDataRequest__searchCriteria_PR_NOTHING, /* No components present */ + GetEimConfigurationDataRequest__searchCriteria_PR_eimId + /* Extensions may appear below */ + +} GetEimConfigurationDataRequest__searchCriteria_PR; + /* GetEimConfigurationDataRequest */ typedef struct GetEimConfigurationDataRequest { + struct GetEimConfigurationDataRequest__searchCriteria { + GetEimConfigurationDataRequest__searchCriteria_PR present; + union GetEimConfigurationDataRequest__searchCriteria_u { + UTF8String_t eimId; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } *searchCriteria; /* * This type is extensible, * possible extensions are below. -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43072?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: Ia8aacd9d5b8ec7a9d524a446114557efdb0614f5 Gerrit-Change-Number: 43072 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
[M] Change in onomondo-ipa[master]: V1.2: Cange remaining ASN1 definition to SGP.32 V1.2
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43073?usp=email
) Change subject: V1.2: Cange remaining ASN1 definition to SGP.32 V1.2 ...................................................................... V1.2: Cange remaining ASN1 definition to SGP.32 V1.2 These changes are cosmetic or have no impact on functionality. Related: SYS#8101 Change-Id: Ifa2546784a6d75170e4f5aae2a5e98edb2c0627a --- M asn1/SGP32Definitions.asn M src/ipa/libasn/EuiccPackageErrorCode.h M src/ipa/libasn/EuiccPackageErrorDataSigned.c M src/ipa/libasn/EuiccPackageErrorDataSigned.h M src/ipa/libasn/EuiccPackageSigned.c 5 files changed, 87 insertions(+), 40 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/73/43073/1 diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index b9746ea..876dc3d 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -30,7 +30,7 @@ eimSignature [APPLICATION 55] OCTET STRING -- Tag '5F37' } EuiccPackageSigned ::= SEQUENCE { - eimId [0] UTF8String, + eimId [0] UTF8String (SIZE(1..128)), eidValue [APPLICATION 26] Octet16, -- Tag '5A' counterValue [1] INTEGER, eimTransactionId [2] TransactionId OPTIONAL, @@ -47,7 +47,7 @@ -- ASN1START EimConfigurationData ::= SEQUENCE { eimId [0] UTF8String (SIZE(1..128)), -- eimId of eIM - eimFqdn [1] UTF8String OPTIONAL, -- FQDN of eIM + eimFqdn [1] UTF8String OPTIONAL, -- FQDN of eIM or intermediate server, if used eimIdType [2] EimIdType OPTIONAL, counterValue [3] INTEGER OPTIONAL, -- initial counterValue for the eIM associationToken [4] INTEGER OPTIONAL, @@ -61,7 +61,7 @@ } OPTIONAL, eimSupportedProtocol [7] EimSupportedProtocol OPTIONAL, euiccCiPKId [8] SubjectKeyIdentifier OPTIONAL, -- CI Public Key Identifier supported on the eUICC for signature creation - indirectProfileDownload[9] NULL OPTIONAL -- support of Indirect Profile download with indicated EimSupportedProtocol + indirectProfileDownload [9] NULL OPTIONAL -- support of Indirect Profile download with indicated EimSupportedProtocol } EimIdType ::= INTEGER { eimIdTypeOid(1), @@ -113,7 +113,7 @@ -- Section 2.11.1.2 -- ASN1START IpaEuiccDataRequest ::= [82] SEQUENCE { -- Tag BF52 - tagList [APPLICATION 28] OCTET STRING, -- Tag '5C' + tagList [APPLICATION 28] OCTET STRING, -- Tag '5C' euiccCiPKIdentifierToBeUsed OCTET STRING OPTIONAL, -- CI Public Key Identifier (possibly truncated) supported on the eUICC for signature creation searchCriteriaNotification [1] CHOICE { seqNumber [0] INTEGER, @@ -195,10 +195,17 @@ EuiccPackageErrorDataSigned ::= SEQUENCE { eimId [0] UTF8String (SIZE(1..128)), counterValue [1] INTEGER, - transactionId [2] TransactionId OPTIONAL, + eimTransactionId [2] TransactionId OPTIONAL, euiccPackageErrorCode EuiccPackageErrorCode } -EuiccPackageErrorCode ::= INTEGER { invalidEid(3), replayError(4), counterValueOutOfRange(6), sizeOverflow(15), undefinedError(127)} +EuiccPackageErrorCode ::= INTEGER { + invalidEid(3), + replayError(4), + counterValueOutOfRange(6), + sizeOverflow(15), + ecallActive(104), + undefinedError(127) +} EuiccPackageErrorUnsigned ::= SEQUENCE { eimId [0] UTF8String (SIZE(1..128)), eimTransactionId [2] TransactionId OPTIONAL, @@ -369,8 +376,8 @@ activateIpae(0) -- IPAe activation } } --- ASN1START -- ASN1STOP +-- ASN1START IpaeActivationResponse ::= [66] SEQUENCE { -- Tag 'BF42' ipaeActivationResult INTEGER {ok(0), notSupported(1)} } @@ -501,8 +508,8 @@ } -- Definition of IpaMode IpaMode ::= INTEGER { -ipad (0), -- IPAd is active -ipae (1) -- IPAe is active + ipad (0), -- IPAd is active + ipae (1) -- IPAe is active } -- ASN1STOP @@ -536,20 +543,20 @@ -- (added manually since the PDF document lacks the ASN1START/ASN1STOP token for this function, which aused problems -- during the automatic parsing of the PDF document.) SGP32-EuiccMemoryResetRequest ::= [52] SEQUENCE { -- Tag 'BF34' - resetOptions [2] BIT STRING { - deleteOperationalProfiles(0), - deleteFieldLoadedTestProfiles(1), - resetDefaultSmdpAddress(2), - deletePreLoadedTestProfiles(3), - deleteProvisioningProfiles(4), - resetEimConfigData(5), - resetImmediateEnableConfig (6) - } + resetOptions [2] BIT STRING { + deleteOperationalProfiles(0), + deleteFieldLoadedTestProfiles(1), + resetDefaultSmdpAddress(2), + deletePreLoadedTestProfiles(3), + deleteProvisioningProfiles(4), + resetEimConfigData(5), + resetImmediateEnableConfig (6) + } } 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 + 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 @@ -631,8 +638,8 @@ } -- ASN1STOP -- ASN1START - ConfigureImmediateProfileEnablingResponse ::= [89] SEQUENCE { -- Tag 'BF59' - configImmediateEnableResult [0] INTEGER { +ConfigureImmediateProfileEnablingResponse ::= [89] SEQUENCE { -- Tag 'BF59' + configImmediateEnableResult [0] INTEGER { ok(0), insufficientMemory(1), associatedEimAlreadyExists(2), @@ -770,7 +777,7 @@ } CompactEuiccSigned2 ::= SEQUENCE { euiccOtpk [APPLICATION 73] OCTET STRING OPTIONAL, -- otPK.EUICC.ECKA, tag '5F49' euiccOtpk is always present except if bppEuiccOtpk was chosen by the eUICC - hashCc Octet32 OPTIONAL -- Hash of confirmation code, if not received from Eim + hashCc Octet32 OPTIONAL -- Hash of confirmation code, if not received from eIM } -- ASN1STOP @@ -779,9 +786,9 @@ SGP32-EuiccSigned1 ::= SEQUENCE { transactionId [0] TransactionId, serverAddress [3] UTF8String, - serverChallenge [4] Octet16, + serverChallenge [4] Octet16, -- The RSP Server Challenge euiccInfo2 [34] EUICCInfo2, - ctxParams1 CtxParams1 -- The RSP Server Challenge + ctxParams1 CtxParams1 } SGP32-AuthenticateResponseOk ::= SEQUENCE { euiccSigned1 SGP32-EuiccSigned1, -- Signed information @@ -811,6 +818,7 @@ -- Section 5.14.7 -- ASN1START +-- ASN1STOP SGP32-PendingNotification ::= CHOICE { profileInstallationResult [55] SGP32-ProfileInstallationResult, -- tag 'BF37' otherSignedNotification OtherSignedNotification, @@ -843,8 +851,6 @@ tbsOtherNotification NotificationMetadata, euiccNotificationSignature [APPLICATION 55] OCTET STRING -- eUICC signature of tbsOtherNotification, Tag '5F37' } --- ASN1STOP - -- Section 5.14.8 -- ASN1START SGP32-CancelSessionResponse ::= [65] CHOICE { -- Tag 'BF41' @@ -918,7 +924,7 @@ -- Section 6.3.2.2 -- ASN1START AuthenticateClientRequestEsipa ::= [59] SEQUENCE { -- Tag 'BF3B' - transactionId [0] TransactionId, + transactionId [0] TransactionId, -- The TransactionID generated by the SM-DP+/SM-DS authenticateServerResponse [56] SGP32-AuthenticateServerResponse -- This is the response from ES10b.AuthenticateServer, possibly in compact format } AuthenticateClientResponseEsipa ::= [59] CHOICE { -- Tag 'BF3B' @@ -942,7 +948,7 @@ } } AuthenticateClientOkDPEsipa ::= SEQUENCE { - transactionId [0] TransactionId OPTIONAL, + transactionId [0] TransactionId OPTIONAL, -- The TransactionID generated by the SM-DP+ profileMetaData [37] SGP32-StoreMetadataRequest OPTIONAL, smdpSigned2 SmdpSigned2, -- Signed information smdpSignature2 [APPLICATION 55] OCTET STRING, -- Tag '5F37' @@ -950,7 +956,7 @@ hashCc Octet32 OPTIONAL -- Hash of confirmation code } AuthenticateClientOkDSEsipa ::= SEQUENCE { - transactionId [0] TransactionId, + transactionId [0] TransactionId, -- The TransactionID generated by the SM-DS profileDownloadTrigger [84] ProfileDownloadTriggerRequest OPTIONAL -- Tag 'BF54' } -- ASN1STOP @@ -958,7 +964,7 @@ -- Section 6.3.2.3 -- ASN1START GetBoundProfilePackageRequestEsipa ::= [58] SEQUENCE { -- Tag 'BF3A' - transactionId [0] TransactionId, + transactionId [0] TransactionId, -- The TransactionID generated by the SM-DP+ prepareDownloadResponse [33] SGP32-PrepareDownloadResponse -- This is the response from ES10b.PrepareDownload, possibly in compact format } GetBoundProfilePackageResponseEsipa ::= [58] CHOICE { -- Tag 'BF3A' @@ -976,7 +982,7 @@ } } GetBoundProfilePackageOkEsipa ::= SEQUENCE { - transactionId [0] TransactionId OPTIONAL, + transactionId [0] TransactionId OPTIONAL, -- The TransactionID generated by the SM-DP+ boundProfilePackage [54] BoundProfilePackage } -- ASN1STOP @@ -992,8 +998,8 @@ -- Section 6.3.2.5 -- ASN1START CancelSessionRequestEsipa ::= [65] SEQUENCE { -- Tag 'BF41' - transactionId TransactionId, - cancelSessionResponse SGP32-CancelSessionResponse -- This is the response from ES10b. CancelSession function, possibly in compact format + transactionId TransactionId, -- The TransactionID generated by the SM-DP+ + cancelSessionResponse SGP32-CancelSessionResponse -- This is the response from ES10b. CancelSession function, possibly in compact format } CancelSessionResponseEsipa ::= [65] CHOICE { -- Tag 'BF41' cancelSessionOk SGP32-CancelSessionOk, diff --git a/src/ipa/libasn/EuiccPackageErrorCode.h b/src/ipa/libasn/EuiccPackageErrorCode.h index 94382d6..9827660 100644 --- a/src/ipa/libasn/EuiccPackageErrorCode.h +++ b/src/ipa/libasn/EuiccPackageErrorCode.h @@ -24,6 +24,7 @@ EuiccPackageErrorCode_replayError = 4, EuiccPackageErrorCode_counterValueOutOfRange = 6, EuiccPackageErrorCode_sizeOverflow = 15, + EuiccPackageErrorCode_ecallActive = 104, EuiccPackageErrorCode_undefinedError = 127 } e_EuiccPackageErrorCode; diff --git a/src/ipa/libasn/EuiccPackageErrorDataSigned.c b/src/ipa/libasn/EuiccPackageErrorDataSigned.c index 59a6925..44e4a4c 100644 --- a/src/ipa/libasn/EuiccPackageErrorDataSigned.c +++ b/src/ipa/libasn/EuiccPackageErrorDataSigned.c @@ -66,14 +66,14 @@ 0, 0, /* No default value */ "counterValue" }, - { ATF_POINTER, 1, offsetof(struct EuiccPackageErrorDataSigned, transactionId), + { ATF_POINTER, 1, offsetof(struct EuiccPackageErrorDataSigned, eimTransactionId), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_TransactionId, 0, { 0, 0, 0 }, 0, 0, /* No default value */ - "transactionId" + "eimTransactionId" }, { ATF_NOFLAGS, 0, offsetof(struct EuiccPackageErrorDataSigned, euiccPackageErrorCode), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), @@ -93,7 +93,7 @@ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 3, 0, 0 }, /* euiccPackageErrorCode */ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* eimId */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* counterValue */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* transactionId */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* eimTransactionId */ }; asn_SEQUENCE_specifics_t asn_SPC_EuiccPackageErrorDataSigned_specs_1 = { sizeof(struct EuiccPackageErrorDataSigned), diff --git a/src/ipa/libasn/EuiccPackageErrorDataSigned.h b/src/ipa/libasn/EuiccPackageErrorDataSigned.h index 81d22f3..b27aca4 100644 --- a/src/ipa/libasn/EuiccPackageErrorDataSigned.h +++ b/src/ipa/libasn/EuiccPackageErrorDataSigned.h @@ -26,7 +26,7 @@ typedef struct EuiccPackageErrorDataSigned { UTF8String_t eimId; long counterValue; - TransactionId_t *transactionId /* OPTIONAL */; + TransactionId_t *eimTransactionId /* OPTIONAL */; EuiccPackageErrorCode_t euiccPackageErrorCode; /* * This type is extensible, diff --git a/src/ipa/libasn/EuiccPackageSigned.c b/src/ipa/libasn/EuiccPackageSigned.c index abc9109..1c4cd5e 100644 --- a/src/ipa/libasn/EuiccPackageSigned.c +++ b/src/ipa/libasn/EuiccPackageSigned.c @@ -7,13 +7,53 @@ #include "EuiccPackageSigned.h" +static int +memb_eimId_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const UTF8String_t *st = (const UTF8String_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = UTF8String_length(st); + if((ssize_t)size < 0) { + ASN__CTFAIL(app_key, td, sptr, + "%s: UTF-8: broken encoding (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((size >= 1 && size <= 128)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_eimId_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +static asn_per_constraints_t asn_PER_memb_eimId_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; asn_TYPE_member_t asn_MBR_EuiccPackageSigned_1[] = { { ATF_NOFLAGS, 0, offsetof(struct EuiccPackageSigned, eimId), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_UTF8String, 0, - { 0, 0, 0 }, + { &asn_OER_memb_eimId_constr_2, &asn_PER_memb_eimId_constr_2, memb_eimId_constraint_1 }, 0, 0, /* No default value */ "eimId" }, -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43073?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: Ifa2546784a6d75170e4f5aae2a5e98edb2c0627a Gerrit-Change-Number: 43073 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
[S] Change in onomondo-ipa[master]: V1.2: Rename TransactionId in EuiccPackageResultDataSigned
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43036?usp=email
) Change subject: V1.2: Rename TransactionId in EuiccPackageResultDataSigned ...................................................................... V1.2: Rename TransactionId in EuiccPackageResultDataSigned Reference: SGP.32 Section 2.11.2 Related: SYS#8101 Change-Id: I5515bfbff91c1fb4ecd90bb151b499b223f7d673 --- M asn1/SGP32Definitions.asn M src/ipa/libasn/EuiccPackageResultDataSigned.c M src/ipa/libasn/EuiccPackageResultDataSigned.h M src/ipa/libipa/es10b_load_euicc_pkg.c 4 files changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/36/43036/1 diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index efe2e18..e97b418 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -160,7 +160,7 @@ EuiccPackageResultDataSigned ::= SEQUENCE { -- #SupportedForPsmoV1.0.0# eimId [0] UTF8String, counterValue [1] INTEGER, - transactionId[2] TransactionId OPTIONAL, + eimTransactionId[2] TransactionId OPTIONAL, seqNumber [3] INTEGER, euiccResult SEQUENCE OF EuiccResultData } diff --git a/src/ipa/libasn/EuiccPackageResultDataSigned.c b/src/ipa/libasn/EuiccPackageResultDataSigned.c index b8ef57a..f1e6b3a 100644 --- a/src/ipa/libasn/EuiccPackageResultDataSigned.c +++ b/src/ipa/libasn/EuiccPackageResultDataSigned.c @@ -62,14 +62,14 @@ 0, 0, /* No default value */ "counterValue" }, - { ATF_POINTER, 1, offsetof(struct EuiccPackageResultDataSigned, transactionId), + { ATF_POINTER, 1, offsetof(struct EuiccPackageResultDataSigned, eimTransactionId), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_TransactionId, 0, { 0, 0, 0 }, 0, 0, /* No default value */ - "transactionId" + "eimTransactionId" }, { ATF_NOFLAGS, 0, offsetof(struct EuiccPackageResultDataSigned, seqNumber), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), @@ -98,7 +98,7 @@ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, 0, 0 }, /* euiccResult */ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* eimId */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* counterValue */ - { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* transactionId */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* eimTransactionId */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* seqNumber */ }; asn_SEQUENCE_specifics_t asn_SPC_EuiccPackageResultDataSigned_specs_1 = { diff --git a/src/ipa/libasn/EuiccPackageResultDataSigned.h b/src/ipa/libasn/EuiccPackageResultDataSigned.h index 63a4593..32616a5 100644 --- a/src/ipa/libasn/EuiccPackageResultDataSigned.h +++ b/src/ipa/libasn/EuiccPackageResultDataSigned.h @@ -30,7 +30,7 @@ typedef struct EuiccPackageResultDataSigned { UTF8String_t eimId; long counterValue; - TransactionId_t *transactionId /* OPTIONAL */; + TransactionId_t *eimTransactionId /* OPTIONAL */; long seqNumber; struct EuiccPackageResultDataSigned__euiccResult { A_SEQUENCE_OF(struct EuiccResultData) list; diff --git a/src/ipa/libipa/es10b_load_euicc_pkg.c b/src/ipa/libipa/es10b_load_euicc_pkg.c index ff1fc01..d328bd4 100644 --- a/src/ipa/libipa/es10b_load_euicc_pkg.c +++ b/src/ipa/libipa/es10b_load_euicc_pkg.c @@ -618,7 +618,7 @@ asn->choice.euiccPackageResultSigned.euiccPackageResultDataSigned.counterValue = req->req.euiccPackageSigned.counterValue; if (req->req.euiccPackageSigned.eimTransactionId) { - asn->choice.euiccPackageResultSigned.euiccPackageResultDataSigned.transactionId = + asn->choice.euiccPackageResultSigned.euiccPackageResultDataSigned.eimTransactionId = ipa_asn1c_dup(&asn_DEF_TransactionId, req->req.euiccPackageSigned.eimTransactionId); } asn->choice.euiccPackageResultSigned.euiccPackageResultDataSigned.seqNumber = 0; -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43036?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: I5515bfbff91c1fb4ecd90bb151b499b223f7d673 Gerrit-Change-Number: 43036 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
[M] Change in onomondo-ipa[master]: V1.2: Add size constraints to eimId
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43037?usp=email
) Change subject: V1.2: Add size constraints to eimId ...................................................................... V1.2: Add size constraints to eimId The remaining eimId in EuiccPackageResultDataSigned, EuiccPackageErrorDataSigned, EuiccPackageErrorUnsigned and EimIdInfo are now limited to 128 characters. The limit has no impact on the process. Assignments are made from other eimID of other structures that are also limited to 128. At some location the eimId is set from 'eim_id' of context structure, which is received by EimConfigurationData which is also limited to 128. Reference: SGP.32 Section 2.11.2 Related: SYS#8101 Change-Id: I5a0f52c0aa4851e802909f98d5a5677e596c4d7f --- M asn1/SGP32Definitions.asn M src/ipa/libasn/EimIdInfo.c M src/ipa/libasn/EuiccPackageErrorDataSigned.c M src/ipa/libasn/EuiccPackageErrorUnsigned.c M src/ipa/libasn/EuiccPackageResultDataSigned.c 5 files changed, 168 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/37/43037/1 diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index e97b418..bdaedd5 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -158,7 +158,7 @@ euiccSignEPR [APPLICATION 55] OCTET STRING -- Tag '5F37' } EuiccPackageResultDataSigned ::= SEQUENCE { -- #SupportedForPsmoV1.0.0# - eimId [0] UTF8String, + eimId [0] UTF8String (SIZE(1..128)), counterValue [1] INTEGER, eimTransactionId[2] TransactionId OPTIONAL, seqNumber [3] INTEGER, @@ -191,14 +191,14 @@ euiccSignEPE [APPLICATION 55] OCTET STRING -- Tag '5F37' } EuiccPackageErrorDataSigned ::= SEQUENCE { - eimId [0] UTF8String, + eimId [0] UTF8String (SIZE(1..128)), counterValue [1] INTEGER, transactionId [2] TransactionId OPTIONAL, euiccPackageErrorCode EuiccPackageErrorCode } EuiccPackageErrorCode ::= INTEGER { invalidEid(3), replayError(4), counterValueOutOfRange(6), sizeOverflow(15), undefinedError(127)} EuiccPackageErrorUnsigned ::= SEQUENCE { - eimId [0] UTF8String, + eimId [0] UTF8String (SIZE(1..128)), associationToken [4] INTEGER OPTIONAL } ConfigureImmediateEnableResult ::= INTEGER { @@ -287,7 +287,7 @@ } } EimIdInfo ::= SEQUENCE { - eimId [0] UTF8String, + eimId [0] UTF8String (SIZE(1..128)), eimIdType [4] EimIdType OPTIONAL -- present in case of eimIdTypeOid and eimIdTypeFqdn } -- ASN1STOP diff --git a/src/ipa/libasn/EimIdInfo.c b/src/ipa/libasn/EimIdInfo.c index d914e95..9dc4d68 100644 --- a/src/ipa/libasn/EimIdInfo.c +++ b/src/ipa/libasn/EimIdInfo.c @@ -7,13 +7,53 @@ #include "EimIdInfo.h" +static int +memb_eimId_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const UTF8String_t *st = (const UTF8String_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = UTF8String_length(st); + if((ssize_t)size < 0) { + ASN__CTFAIL(app_key, td, sptr, + "%s: UTF-8: broken encoding (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((size >= 1 && size <= 128)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_eimId_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +static asn_per_constraints_t asn_PER_memb_eimId_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; asn_TYPE_member_t asn_MBR_EimIdInfo_1[] = { { ATF_NOFLAGS, 0, offsetof(struct EimIdInfo, eimId), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_UTF8String, 0, - { 0, 0, 0 }, + { &asn_OER_memb_eimId_constr_2, &asn_PER_memb_eimId_constr_2, memb_eimId_constraint_1 }, 0, 0, /* No default value */ "eimId" }, diff --git a/src/ipa/libasn/EuiccPackageErrorDataSigned.c b/src/ipa/libasn/EuiccPackageErrorDataSigned.c index 6f69d84..59a6925 100644 --- a/src/ipa/libasn/EuiccPackageErrorDataSigned.c +++ b/src/ipa/libasn/EuiccPackageErrorDataSigned.c @@ -7,13 +7,53 @@ #include "EuiccPackageErrorDataSigned.h" +static int +memb_eimId_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const UTF8String_t *st = (const UTF8String_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = UTF8String_length(st); + if((ssize_t)size < 0) { + ASN__CTFAIL(app_key, td, sptr, + "%s: UTF-8: broken encoding (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((size >= 1 && size <= 128)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_eimId_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +static asn_per_constraints_t asn_PER_memb_eimId_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; asn_TYPE_member_t asn_MBR_EuiccPackageErrorDataSigned_1[] = { { ATF_NOFLAGS, 0, offsetof(struct EuiccPackageErrorDataSigned, eimId), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_UTF8String, 0, - { 0, 0, 0 }, + { &asn_OER_memb_eimId_constr_2, &asn_PER_memb_eimId_constr_2, memb_eimId_constraint_1 }, 0, 0, /* No default value */ "eimId" }, diff --git a/src/ipa/libasn/EuiccPackageErrorUnsigned.c b/src/ipa/libasn/EuiccPackageErrorUnsigned.c index e42a5cf..bf168e3 100644 --- a/src/ipa/libasn/EuiccPackageErrorUnsigned.c +++ b/src/ipa/libasn/EuiccPackageErrorUnsigned.c @@ -7,13 +7,53 @@ #include "EuiccPackageErrorUnsigned.h" +static int +memb_eimId_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const UTF8String_t *st = (const UTF8String_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = UTF8String_length(st); + if((ssize_t)size < 0) { + ASN__CTFAIL(app_key, td, sptr, + "%s: UTF-8: broken encoding (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((size >= 1 && size <= 128)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_eimId_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +static asn_per_constraints_t asn_PER_memb_eimId_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; asn_TYPE_member_t asn_MBR_EuiccPackageErrorUnsigned_1[] = { { ATF_NOFLAGS, 0, offsetof(struct EuiccPackageErrorUnsigned, eimId), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_UTF8String, 0, - { 0, 0, 0 }, + { &asn_OER_memb_eimId_constr_2, &asn_PER_memb_eimId_constr_2, memb_eimId_constraint_1 }, 0, 0, /* No default value */ "eimId" }, diff --git a/src/ipa/libasn/EuiccPackageResultDataSigned.c b/src/ipa/libasn/EuiccPackageResultDataSigned.c index f1e6b3a..b155424 100644 --- a/src/ipa/libasn/EuiccPackageResultDataSigned.c +++ b/src/ipa/libasn/EuiccPackageResultDataSigned.c @@ -7,6 +7,46 @@ #include "EuiccPackageResultDataSigned.h" +static int +memb_eimId_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const UTF8String_t *st = (const UTF8String_t *)sptr; + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + size = UTF8String_length(st); + if((ssize_t)size < 0) { + ASN__CTFAIL(app_key, td, sptr, + "%s: UTF-8: broken encoding (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((size >= 1 && size <= 128)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static asn_oer_constraints_t asn_OER_memb_eimId_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +static asn_per_constraints_t asn_PER_memb_eimId_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; static asn_TYPE_member_t asn_MBR_euiccResult_6[] = { { ATF_POINTER, 0, 0, -1 /* Ambiguous tag (CHOICE?) */, @@ -49,7 +89,7 @@ -1, /* IMPLICIT tag at current level */ &asn_DEF_UTF8String, 0, - { 0, 0, 0 }, + { &asn_OER_memb_eimId_constr_2, &asn_PER_memb_eimId_constr_2, memb_eimId_constraint_1 }, 0, 0, /* No default value */ "eimId" }, -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43037?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: I5a0f52c0aa4851e802909f98d5a5677e596c4d7f Gerrit-Change-Number: 43037 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
[L] Change in onomondo-ipa[master]: V1.2: Add eimTransactionId to IpaEuiccDataRequest and IpaEuiccDataRes...
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43035?usp=email
) Change subject: V1.2: Add eimTransactionId to IpaEuiccDataRequest and IpaEuiccDataResponse ...................................................................... V1.2: Add eimTransactionId to IpaEuiccDataRequest and IpaEuiccDataResponse Add eimTransactionId to IpaEuiccDataRequest and to IpaEuiccDataResponseError or IpaEuiccData of IpaEuiccDataResponse. The IPA takes the transaction ID from the request, if exists, and sets it in the response. The eIM can use it to match the request with the successful or unsuccessful outcome. Reference: SGP.32 Section 2.11.1.2 Related: SYS#8101 Change-Id: I34db78c4eb8461c154459204ec13a2184085e96a --- M asn1/SGP32Definitions.asn M src/ipa/libasn/CMakeLists.txt M src/ipa/libasn/IpaEuiccData.c M src/ipa/libasn/IpaEuiccData.h A src/ipa/libasn/IpaEuiccDataErrorCode.c A src/ipa/libasn/IpaEuiccDataErrorCode.h M src/ipa/libasn/IpaEuiccDataRequest.c M src/ipa/libasn/IpaEuiccDataRequest.h M src/ipa/libasn/IpaEuiccDataResponse.c M src/ipa/libasn/IpaEuiccDataResponse.h A src/ipa/libasn/IpaEuiccDataResponseError.c A src/ipa/libasn/IpaEuiccDataResponseError.h M src/ipa/libipa/proc_euicc_data_req.c 13 files changed, 269 insertions(+), 45 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/35/43035/1 diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index 69175e1..efe2e18 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -119,7 +119,8 @@ seqNumber [0] INTEGER, profileManagementOperation [1] NotificationEvent, euiccPackageResults [2] NULL - } OPTIONAL + } OPTIONAL, + eimTransactionId [3] TransactionId OPTIONAL -- Tag '83' } -- ASN1STOP @@ -293,13 +294,19 @@ -- Section 2.11.2.2 -- ASN1START +IpaEuiccDataErrorCode ::= INTEGER { + incorrectTagList (1), + euiccCiPKIdNotFound(5), + ecallActive(104), + undefinedError(127) +} +IpaEuiccDataResponseError ::= SEQUENCE { + eimTransactionId [0] TransactionId OPTIONAL, + ipaEuiccDataErrorCode IpaEuiccDataErrorCode +} IpaEuiccDataResponse ::= [82] CHOICE { -- Tag 'BF52' ipaEuiccData IpaEuiccData, - ipaEuiccDataError INTEGER { - incorrectTagList (1), - euiccCiPKIdNotFound(5), - undefinedError(127) - } + ipaEuiccDataResponseError IpaEuiccDataResponseError } IpaEuiccData ::= SEQUENCE { defaultSmdpAddress [0] UTF8String OPTIONAL, -- Tag '80' @@ -309,6 +316,7 @@ associationToken [4] INTEGER OPTIONAL, -- Tag '84' eumCertificate [5] Certificate OPTIONAL, -- Tag 'A5' euiccCertificate [6] Certificate OPTIONAL, -- Tag 'A6' + eimTransactionId [7] TransactionId OPTIONAL, -- Tag '87' ipaCapabilities [8] IpaCapabilities OPTIONAL, -- Tag '88' deviceInfo [9] DeviceInfo OPTIONAL, -- Tag 'A9' notificationsList [43] SGP32-RetrieveNotificationsListResponse OPTIONAL -- Tag 'BF2B'. diff --git a/src/ipa/libasn/CMakeLists.txt b/src/ipa/libasn/CMakeLists.txt index 5ca748e..f9166bd 100644 --- a/src/ipa/libasn/CMakeLists.txt +++ b/src/ipa/libasn/CMakeLists.txt @@ -465,10 +465,14 @@ IpaCapabilities.c IpaCapabilities.h IpaEuiccData.c +IpaEuiccDataErrorCode.c +IpaEuiccDataErrorCode.h IpaEuiccData.h IpaEuiccDataRequest.c IpaEuiccDataRequest.h IpaEuiccDataResponse.c +IpaEuiccDataResponseError.c +IpaEuiccDataResponseError.h IpaEuiccDataResponse.h IpaMode.c IpaMode.h diff --git a/src/ipa/libasn/IpaEuiccData.c b/src/ipa/libasn/IpaEuiccData.c index 0b7d59c..3f44929 100644 --- a/src/ipa/libasn/IpaEuiccData.c +++ b/src/ipa/libasn/IpaEuiccData.c @@ -8,7 +8,7 @@ #include "IpaEuiccData.h" asn_TYPE_member_t asn_MBR_IpaEuiccData_1[] = { - { ATF_POINTER, 10, offsetof(struct IpaEuiccData, defaultSmdpAddress), + { ATF_POINTER, 11, offsetof(struct IpaEuiccData, defaultSmdpAddress), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_UTF8String, @@ -17,7 +17,7 @@ 0, 0, /* No default value */ "defaultSmdpAddress" }, - { ATF_POINTER, 9, offsetof(struct IpaEuiccData, euiccInfo1), + { ATF_POINTER, 10, offsetof(struct IpaEuiccData, euiccInfo1), (ASN_TAG_CLASS_CONTEXT | (32 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_EUICCInfo1, @@ -26,7 +26,7 @@ 0, 0, /* No default value */ "euiccInfo1" }, - { ATF_POINTER, 8, offsetof(struct IpaEuiccData, euiccInfo2), + { ATF_POINTER, 9, offsetof(struct IpaEuiccData, euiccInfo2), (ASN_TAG_CLASS_CONTEXT | (34 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_SGP32_EUICCInfo2, @@ -35,7 +35,7 @@ 0, 0, /* No default value */ "euiccInfo2" }, - { ATF_POINTER, 7, offsetof(struct IpaEuiccData, rootSmdsAddress), + { ATF_POINTER, 8, offsetof(struct IpaEuiccData, rootSmdsAddress), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_UTF8String, @@ -44,7 +44,7 @@ 0, 0, /* No default value */ "rootSmdsAddress" }, - { ATF_POINTER, 6, offsetof(struct IpaEuiccData, associationToken), + { ATF_POINTER, 7, offsetof(struct IpaEuiccData, associationToken), (ASN_TAG_CLASS_CONTEXT | (4 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_NativeInteger, @@ -53,7 +53,7 @@ 0, 0, /* No default value */ "associationToken" }, - { ATF_POINTER, 5, offsetof(struct IpaEuiccData, eumCertificate), + { ATF_POINTER, 6, offsetof(struct IpaEuiccData, eumCertificate), (ASN_TAG_CLASS_CONTEXT | (5 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_Certificate, @@ -62,7 +62,7 @@ 0, 0, /* No default value */ "eumCertificate" }, - { ATF_POINTER, 4, offsetof(struct IpaEuiccData, euiccCertificate), + { ATF_POINTER, 5, offsetof(struct IpaEuiccData, euiccCertificate), (ASN_TAG_CLASS_CONTEXT | (6 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_Certificate, @@ -71,6 +71,15 @@ 0, 0, /* No default value */ "euiccCertificate" }, + { ATF_POINTER, 4, offsetof(struct IpaEuiccData, eimTransactionId), + (ASN_TAG_CLASS_CONTEXT | (7 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_TransactionId, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eimTransactionId" + }, { ATF_POINTER, 3, offsetof(struct IpaEuiccData, ipaCapabilities), (ASN_TAG_CLASS_CONTEXT | (8 << 2)), -1, /* IMPLICIT tag at current level */ @@ -99,7 +108,7 @@ "notificationsList" }, }; -static const int asn_MAP_IpaEuiccData_oms_1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; +static const int asn_MAP_IpaEuiccData_oms_1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; static const ber_tlv_tag_t asn_DEF_IpaEuiccData_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; @@ -109,20 +118,21 @@ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* associationToken */ { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* eumCertificate */ { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* euiccCertificate */ - { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 7, 0, 0 }, /* ipaCapabilities */ - { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 8, 0, 0 }, /* deviceInfo */ + { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* eimTransactionId */ + { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 }, /* ipaCapabilities */ + { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 9, 0, 0 }, /* deviceInfo */ { (ASN_TAG_CLASS_CONTEXT | (32 << 2)), 1, 0, 0 }, /* euiccInfo1 */ { (ASN_TAG_CLASS_CONTEXT | (34 << 2)), 2, 0, 0 }, /* euiccInfo2 */ - { (ASN_TAG_CLASS_CONTEXT | (43 << 2)), 9, 0, 0 } /* notificationsList */ + { (ASN_TAG_CLASS_CONTEXT | (43 << 2)), 10, 0, 0 } /* notificationsList */ }; asn_SEQUENCE_specifics_t asn_SPC_IpaEuiccData_specs_1 = { sizeof(struct IpaEuiccData), offsetof(struct IpaEuiccData, _asn_ctx), asn_MAP_IpaEuiccData_tag2el_1, - 10, /* Count of tags in the map */ + 11, /* Count of tags in the map */ asn_MAP_IpaEuiccData_oms_1, /* Optional members */ - 10, 0, /* Root/Additions */ - 10, /* First extension addition */ + 11, 0, /* Root/Additions */ + 11, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_IpaEuiccData = { "IpaEuiccData", @@ -136,7 +146,7 @@ /sizeof(asn_DEF_IpaEuiccData_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_IpaEuiccData_1, - 10, /* Elements count */ + 11, /* Elements count */ &asn_SPC_IpaEuiccData_specs_1 /* Additional specs */ }; diff --git a/src/ipa/libasn/IpaEuiccData.h b/src/ipa/libasn/IpaEuiccData.h index 755e6de..bf8dc38 100644 --- a/src/ipa/libasn/IpaEuiccData.h +++ b/src/ipa/libasn/IpaEuiccData.h @@ -14,6 +14,7 @@ /* Including external dependencies */ #include <UTF8String.h> #include <NativeInteger.h> +#include "TransactionId.h" #include <constr_SEQUENCE.h> #ifdef __cplusplus @@ -37,6 +38,7 @@ long *associationToken /* OPTIONAL */; struct Certificate *eumCertificate /* OPTIONAL */; struct Certificate *euiccCertificate /* OPTIONAL */; + TransactionId_t *eimTransactionId /* OPTIONAL */; struct IpaCapabilities *ipaCapabilities /* OPTIONAL */; struct DeviceInfo *deviceInfo /* OPTIONAL */; struct SGP32_RetrieveNotificationsListResponse *notificationsList /* OPTIONAL */; @@ -52,7 +54,7 @@ /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_IpaEuiccData; extern asn_SEQUENCE_specifics_t asn_SPC_IpaEuiccData_specs_1; -extern asn_TYPE_member_t asn_MBR_IpaEuiccData_1[10]; +extern asn_TYPE_member_t asn_MBR_IpaEuiccData_1[11]; #ifdef __cplusplus } diff --git a/src/ipa/libasn/IpaEuiccDataErrorCode.c b/src/ipa/libasn/IpaEuiccDataErrorCode.c new file mode 100644 index 0000000..731ed27 --- /dev/null +++ b/src/ipa/libasn/IpaEuiccDataErrorCode.c @@ -0,0 +1,31 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#include "IpaEuiccDataErrorCode.h" + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_IpaEuiccDataErrorCode_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_IpaEuiccDataErrorCode = { + "IpaEuiccDataErrorCode", + "IpaEuiccDataErrorCode", + &asn_OP_NativeInteger, + asn_DEF_IpaEuiccDataErrorCode_tags_1, + sizeof(asn_DEF_IpaEuiccDataErrorCode_tags_1) + /sizeof(asn_DEF_IpaEuiccDataErrorCode_tags_1[0]), /* 1 */ + asn_DEF_IpaEuiccDataErrorCode_tags_1, /* Same as above */ + sizeof(asn_DEF_IpaEuiccDataErrorCode_tags_1) + /sizeof(asn_DEF_IpaEuiccDataErrorCode_tags_1[0]), /* 1 */ + { 0, 0, NativeInteger_constraint }, + 0, 0, /* Defined elsewhere */ + 0 /* No specifics */ +}; + diff --git a/src/ipa/libasn/IpaEuiccDataErrorCode.h b/src/ipa/libasn/IpaEuiccDataErrorCode.h new file mode 100644 index 0000000..78aa1e2 --- /dev/null +++ b/src/ipa/libasn/IpaEuiccDataErrorCode.h @@ -0,0 +1,51 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#ifndef _IpaEuiccDataErrorCode_H_ +#define _IpaEuiccDataErrorCode_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include <NativeInteger.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum IpaEuiccDataErrorCode { + IpaEuiccDataErrorCode_incorrectTagList = 1, + IpaEuiccDataErrorCode_euiccCiPKIdNotFound = 5, + IpaEuiccDataErrorCode_ecallActive = 104, + IpaEuiccDataErrorCode_undefinedError = 127 +} e_IpaEuiccDataErrorCode; + +/* IpaEuiccDataErrorCode */ +typedef long IpaEuiccDataErrorCode_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_IpaEuiccDataErrorCode; +asn_struct_free_f IpaEuiccDataErrorCode_free; +asn_struct_print_f IpaEuiccDataErrorCode_print; +asn_constr_check_f IpaEuiccDataErrorCode_constraint; +ber_type_decoder_f IpaEuiccDataErrorCode_decode_ber; +der_type_encoder_f IpaEuiccDataErrorCode_encode_der; +xer_type_decoder_f IpaEuiccDataErrorCode_decode_xer; +xer_type_encoder_f IpaEuiccDataErrorCode_encode_xer; +oer_type_decoder_f IpaEuiccDataErrorCode_decode_oer; +oer_type_encoder_f IpaEuiccDataErrorCode_encode_oer; +per_type_decoder_f IpaEuiccDataErrorCode_decode_uper; +per_type_encoder_f IpaEuiccDataErrorCode_encode_uper; + +#ifdef __cplusplus +} +#endif + +#endif /* _IpaEuiccDataErrorCode_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libasn/IpaEuiccDataRequest.c b/src/ipa/libasn/IpaEuiccDataRequest.c index a790d61..fa1924d 100644 --- a/src/ipa/libasn/IpaEuiccDataRequest.c +++ b/src/ipa/libasn/IpaEuiccDataRequest.c @@ -84,7 +84,7 @@ 0, 0, /* No default value */ "tagList" }, - { ATF_POINTER, 2, offsetof(struct IpaEuiccDataRequest, euiccCiPKIdentifierToBeUsed), + { ATF_POINTER, 3, offsetof(struct IpaEuiccDataRequest, euiccCiPKIdentifierToBeUsed), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_OCTET_STRING, @@ -93,7 +93,7 @@ 0, 0, /* No default value */ "euiccCiPKIdentifierToBeUsed" }, - { ATF_POINTER, 1, offsetof(struct IpaEuiccDataRequest, searchCriteriaNotification), + { ATF_POINTER, 2, offsetof(struct IpaEuiccDataRequest, searchCriteriaNotification), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_searchCriteriaNotification_4, @@ -102,8 +102,17 @@ 0, 0, /* No default value */ "searchCriteriaNotification" }, + { ATF_POINTER, 1, offsetof(struct IpaEuiccDataRequest, eimTransactionId), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_TransactionId, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eimTransactionId" + }, }; -static const int asn_MAP_IpaEuiccDataRequest_oms_1[] = { 1, 2 }; +static const int asn_MAP_IpaEuiccDataRequest_oms_1[] = { 1, 2, 3 }; static const ber_tlv_tag_t asn_DEF_IpaEuiccDataRequest_tags_1[] = { (ASN_TAG_CLASS_CONTEXT | (82 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) @@ -111,16 +120,17 @@ static const asn_TYPE_tag2member_t asn_MAP_IpaEuiccDataRequest_tag2el_1[] = { { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, 0, 0 }, /* euiccCiPKIdentifierToBeUsed */ { (ASN_TAG_CLASS_APPLICATION | (28 << 2)), 0, 0, 0 }, /* tagList */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 } /* searchCriteriaNotification */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 }, /* searchCriteriaNotification */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* eimTransactionId */ }; asn_SEQUENCE_specifics_t asn_SPC_IpaEuiccDataRequest_specs_1 = { sizeof(struct IpaEuiccDataRequest), offsetof(struct IpaEuiccDataRequest, _asn_ctx), asn_MAP_IpaEuiccDataRequest_tag2el_1, - 3, /* Count of tags in the map */ + 4, /* Count of tags in the map */ asn_MAP_IpaEuiccDataRequest_oms_1, /* Optional members */ - 2, 0, /* Root/Additions */ - 3, /* First extension addition */ + 3, 0, /* Root/Additions */ + 4, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_IpaEuiccDataRequest = { "IpaEuiccDataRequest", @@ -134,7 +144,7 @@ /sizeof(asn_DEF_IpaEuiccDataRequest_tags_1[0]), /* 2 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_IpaEuiccDataRequest_1, - 3, /* Elements count */ + 4, /* Elements count */ &asn_SPC_IpaEuiccDataRequest_specs_1 /* Additional specs */ }; diff --git a/src/ipa/libasn/IpaEuiccDataRequest.h b/src/ipa/libasn/IpaEuiccDataRequest.h index d40dfaf..c4f0a87 100644 --- a/src/ipa/libasn/IpaEuiccDataRequest.h +++ b/src/ipa/libasn/IpaEuiccDataRequest.h @@ -13,6 +13,7 @@ /* Including external dependencies */ #include <OCTET_STRING.h> +#include "TransactionId.h" #include <NativeInteger.h> #include "NotificationEvent.h" #include <NULL.h> @@ -52,6 +53,7 @@ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } *searchCriteriaNotification; + TransactionId_t *eimTransactionId /* OPTIONAL */; /* * This type is extensible, * possible extensions are below. @@ -64,7 +66,7 @@ /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_IpaEuiccDataRequest; extern asn_SEQUENCE_specifics_t asn_SPC_IpaEuiccDataRequest_specs_1; -extern asn_TYPE_member_t asn_MBR_IpaEuiccDataRequest_1[3]; +extern asn_TYPE_member_t asn_MBR_IpaEuiccDataRequest_1[4]; #ifdef __cplusplus } diff --git a/src/ipa/libasn/IpaEuiccDataResponse.c b/src/ipa/libasn/IpaEuiccDataResponse.c index ae935e7..8b0f8c7 100644 --- a/src/ipa/libasn/IpaEuiccDataResponse.c +++ b/src/ipa/libasn/IpaEuiccDataResponse.c @@ -25,14 +25,14 @@ 0, 0, /* No default value */ "ipaEuiccData" }, - { ATF_NOFLAGS, 0, offsetof(struct IpaEuiccDataResponse, choice.ipaEuiccDataError), + { ATF_NOFLAGS, 0, offsetof(struct IpaEuiccDataResponse, choice.ipaEuiccDataResponseError), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ - &asn_DEF_NativeInteger, + &asn_DEF_IpaEuiccDataResponseError, 0, { 0, 0, 0 }, 0, 0, /* No default value */ - "ipaEuiccDataError" + "ipaEuiccDataResponseError" }, }; static const ber_tlv_tag_t asn_DEF_IpaEuiccDataResponse_tags_1[] = { @@ -40,7 +40,7 @@ }; static const asn_TYPE_tag2member_t asn_MAP_IpaEuiccDataResponse_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ipaEuiccData */ - { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ipaEuiccDataError */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ipaEuiccDataResponseError */ }; asn_CHOICE_specifics_t asn_SPC_IpaEuiccDataResponse_specs_1 = { sizeof(struct IpaEuiccDataResponse), diff --git a/src/ipa/libasn/IpaEuiccDataResponse.h b/src/ipa/libasn/IpaEuiccDataResponse.h index 0e1ae58..b0f1143 100644 --- a/src/ipa/libasn/IpaEuiccDataResponse.h +++ b/src/ipa/libasn/IpaEuiccDataResponse.h @@ -13,7 +13,7 @@ /* Including external dependencies */ #include "IpaEuiccData.h" -#include <NativeInteger.h> +#include "IpaEuiccDataResponseError.h" #include <constr_CHOICE.h> #ifdef __cplusplus @@ -24,22 +24,17 @@ typedef enum IpaEuiccDataResponse_PR { IpaEuiccDataResponse_PR_NOTHING, /* No components present */ IpaEuiccDataResponse_PR_ipaEuiccData, - IpaEuiccDataResponse_PR_ipaEuiccDataError + IpaEuiccDataResponse_PR_ipaEuiccDataResponseError /* Extensions may appear below */ } IpaEuiccDataResponse_PR; -typedef enum IpaEuiccDataResponse__ipaEuiccDataError { - IpaEuiccDataResponse__ipaEuiccDataError_incorrectTagList = 1, - IpaEuiccDataResponse__ipaEuiccDataError_euiccCiPKIdNotFound = 5, - IpaEuiccDataResponse__ipaEuiccDataError_undefinedError = 127 -} e_IpaEuiccDataResponse__ipaEuiccDataError; /* IpaEuiccDataResponse */ typedef struct IpaEuiccDataResponse { IpaEuiccDataResponse_PR present; union IpaEuiccDataResponse_u { IpaEuiccData_t ipaEuiccData; - long ipaEuiccDataError; + IpaEuiccDataResponseError_t ipaEuiccDataResponseError; /* * This type is extensible, * possible extensions are below. diff --git a/src/ipa/libasn/IpaEuiccDataResponseError.c b/src/ipa/libasn/IpaEuiccDataResponseError.c new file mode 100644 index 0000000..045bed2 --- /dev/null +++ b/src/ipa/libasn/IpaEuiccDataResponseError.c @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#include "IpaEuiccDataResponseError.h" + +asn_TYPE_member_t asn_MBR_IpaEuiccDataResponseError_1[] = { + { ATF_POINTER, 1, offsetof(struct IpaEuiccDataResponseError, eimTransactionId), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_TransactionId, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "eimTransactionId" + }, + { ATF_NOFLAGS, 0, offsetof(struct IpaEuiccDataResponseError, ipaEuiccDataErrorCode), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_IpaEuiccDataErrorCode, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "ipaEuiccDataErrorCode" + }, +}; +static const int asn_MAP_IpaEuiccDataResponseError_oms_1[] = { 0 }; +static const ber_tlv_tag_t asn_DEF_IpaEuiccDataResponseError_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_IpaEuiccDataResponseError_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* ipaEuiccDataErrorCode */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* eimTransactionId */ +}; +asn_SEQUENCE_specifics_t asn_SPC_IpaEuiccDataResponseError_specs_1 = { + sizeof(struct IpaEuiccDataResponseError), + offsetof(struct IpaEuiccDataResponseError, _asn_ctx), + asn_MAP_IpaEuiccDataResponseError_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_IpaEuiccDataResponseError_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_IpaEuiccDataResponseError = { + "IpaEuiccDataResponseError", + "IpaEuiccDataResponseError", + &asn_OP_SEQUENCE, + asn_DEF_IpaEuiccDataResponseError_tags_1, + sizeof(asn_DEF_IpaEuiccDataResponseError_tags_1) + /sizeof(asn_DEF_IpaEuiccDataResponseError_tags_1[0]), /* 1 */ + asn_DEF_IpaEuiccDataResponseError_tags_1, /* Same as above */ + sizeof(asn_DEF_IpaEuiccDataResponseError_tags_1) + /sizeof(asn_DEF_IpaEuiccDataResponseError_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_IpaEuiccDataResponseError_1, + 2, /* Elements count */ + &asn_SPC_IpaEuiccDataResponseError_specs_1 /* Additional specs */ +}; + diff --git a/src/ipa/libasn/IpaEuiccDataResponseError.h b/src/ipa/libasn/IpaEuiccDataResponseError.h new file mode 100644 index 0000000..0069679 --- /dev/null +++ b/src/ipa/libasn/IpaEuiccDataResponseError.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#ifndef _IpaEuiccDataResponseError_H_ +#define _IpaEuiccDataResponseError_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include "TransactionId.h" +#include "IpaEuiccDataErrorCode.h" +#include <constr_SEQUENCE.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* IpaEuiccDataResponseError */ +typedef struct IpaEuiccDataResponseError { + TransactionId_t *eimTransactionId /* OPTIONAL */; + IpaEuiccDataErrorCode_t ipaEuiccDataErrorCode; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} IpaEuiccDataResponseError_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_IpaEuiccDataResponseError; +extern asn_SEQUENCE_specifics_t asn_SPC_IpaEuiccDataResponseError_specs_1; +extern asn_TYPE_member_t asn_MBR_IpaEuiccDataResponseError_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _IpaEuiccDataResponseError_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libipa/proc_euicc_data_req.c b/src/ipa/libipa/proc_euicc_data_req.c index ebfbf1d..2db088b 100644 --- a/src/ipa/libipa/proc_euicc_data_req.c +++ b/src/ipa/libipa/proc_euicc_data_req.c @@ -209,10 +209,13 @@ if (!prvde_eim_pkg_rslt_res) goto error; - if (ipa_euicc_data_response.present == IpaEuiccDataResponse_PR_ipaEuiccDataError) + if (ipa_euicc_data_response.present == IpaEuiccDataResponse_PR_ipaEuiccDataResponseError) { IPA_LOGP(SIPA, LINFO, "IPA get EUICC data failed, eIM is informed about the failure!\n"); - else + ipa_euicc_data_response.choice.ipaEuiccDataResponseError.eimTransactionId = pars->ipa_euicc_data_request->eimTransactionId; + } else { IPA_LOGP(SIPA, LINFO, "IPA get EUICC data succeeded!\n"); + ipa_euicc_data_response.choice.ipaEuiccData.eimTransactionId = pars->ipa_euicc_data_request->eimTransactionId; + } IPA_FREE(tag_list); ipa_es10a_get_euicc_cfg_addr_free(euicc_cfg_addr); -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43035?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: I34db78c4eb8461c154459204ec13a2184085e96a Gerrit-Change-Number: 43035 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
[S] Change in onomondo-ipa[master]: V1.2: Add new error codes to EnableProfileResult, DisableProfileResul...
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43038?usp=email
) Change subject: V1.2: Add new error codes to EnableProfileResult, DisableProfileResult, DeleteProfileResult, AddEimResult ...................................................................... V1.2: Add new error codes to EnableProfileResult, DisableProfileResult, DeleteProfileResult, AddEimResult Reference: SGP.32 Section 2.11.2 New error code of AddEimResult is used at IoT eUICC emulation. Related: SYS#8101 Change-Id: Idb023c994770fe4ee048da128026f566bd7fe146 --- M asn1/SGP32Definitions.asn M src/ipa/libasn/AddEimResult.h M src/ipa/libasn/DeleteProfileResult.h M src/ipa/libasn/DisableProfileResult.h M src/ipa/libasn/EnableProfileResult.h M src/ipa/libipa/es10b_load_euicc_pkg.c 6 files changed, 19 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/38/43038/1 diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index bdaedd5..93fa33f 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -211,18 +211,26 @@ ok(0), iccidOrAidNotFound(1), profileNotInDisabledState(2), + disallowedByPolicy(3), + catBusy(5), + rollbackNotAvailable(20), undefinedError(127) } DisableProfileResult ::= INTEGER { ok(0), iccidOrAidNotFound(1), profileNotInEnabledState(2), + disallowedByPolicy(3), + catBusy(5), undefinedError(127) } DeleteProfileResult ::= INTEGER { ok(0), iccidOrAidNotFound(1), profileNotInDisabledState(2), + disallowedByPolicy(3), + rollbackNotAvailable(20), + returnFallbackProfile(21), undefinedError(127) } SGP32-ProfileInfoListResponse ::= [45] CHOICE { @@ -257,6 +265,7 @@ addEimResultCode INTEGER { ok(0), insufficientMemory(1), + associatedEimAlreadyExists(2), ciPKUnknown(3), invalidAssociationToken(5), counterValueOutOfRange(6), diff --git a/src/ipa/libasn/AddEimResult.h b/src/ipa/libasn/AddEimResult.h index ac93610..69aca83 100644 --- a/src/ipa/libasn/AddEimResult.h +++ b/src/ipa/libasn/AddEimResult.h @@ -30,6 +30,7 @@ typedef enum AddEimResult__addEimResultCode { AddEimResult__addEimResultCode_ok = 0, AddEimResult__addEimResultCode_insufficientMemory = 1, + AddEimResult__addEimResultCode_associatedEimAlreadyExists = 2, AddEimResult__addEimResultCode_ciPKUnknown = 3, AddEimResult__addEimResultCode_invalidAssociationToken = 5, AddEimResult__addEimResultCode_counterValueOutOfRange = 6, diff --git a/src/ipa/libasn/DeleteProfileResult.h b/src/ipa/libasn/DeleteProfileResult.h index 20f06a4..8853150 100644 --- a/src/ipa/libasn/DeleteProfileResult.h +++ b/src/ipa/libasn/DeleteProfileResult.h @@ -23,6 +23,9 @@ DeleteProfileResult_ok = 0, DeleteProfileResult_iccidOrAidNotFound = 1, DeleteProfileResult_profileNotInDisabledState = 2, + DeleteProfileResult_disallowedByPolicy = 3, + DeleteProfileResult_rollbackNotAvailable = 20, + DeleteProfileResult_returnFallbackProfile = 21, DeleteProfileResult_undefinedError = 127 } e_DeleteProfileResult; diff --git a/src/ipa/libasn/DisableProfileResult.h b/src/ipa/libasn/DisableProfileResult.h index f563caa..71528f5 100644 --- a/src/ipa/libasn/DisableProfileResult.h +++ b/src/ipa/libasn/DisableProfileResult.h @@ -23,6 +23,8 @@ DisableProfileResult_ok = 0, DisableProfileResult_iccidOrAidNotFound = 1, DisableProfileResult_profileNotInEnabledState = 2, + DisableProfileResult_disallowedByPolicy = 3, + DisableProfileResult_catBusy = 5, DisableProfileResult_undefinedError = 127 } e_DisableProfileResult; diff --git a/src/ipa/libasn/EnableProfileResult.h b/src/ipa/libasn/EnableProfileResult.h index a86a8f8..17559b3 100644 --- a/src/ipa/libasn/EnableProfileResult.h +++ b/src/ipa/libasn/EnableProfileResult.h @@ -23,6 +23,9 @@ EnableProfileResult_ok = 0, EnableProfileResult_iccidOrAidNotFound = 1, EnableProfileResult_profileNotInDisabledState = 2, + EnableProfileResult_disallowedByPolicy = 3, + EnableProfileResult_catBusy = 5, + EnableProfileResult_rollbackNotAvailable = 20, EnableProfileResult_undefinedError = 127 } e_EnableProfileResult; diff --git a/src/ipa/libipa/es10b_load_euicc_pkg.c b/src/ipa/libipa/es10b_load_euicc_pkg.c index d328bd4..abed9f6 100644 --- a/src/ipa/libipa/es10b_load_euicc_pkg.c +++ b/src/ipa/libipa/es10b_load_euicc_pkg.c @@ -347,7 +347,7 @@ "IoT eUICC emulation active, addEim eCO failed, eIM with specified eimId already exists!\n"); euicc_result_data->choice.addEimResult.present = AddEimResult_PR_addEimResultCode; euicc_result_data->choice.addEimResult.choice.addEimResultCode = - AddEimResult__addEimResultCode_commandError; + AddEimResult__addEimResultCode_associatedEimAlreadyExists; goto error; } } -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43038?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: Idb023c994770fe4ee048da128026f566bd7fe146 Gerrit-Change-Number: 43038 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
[S] Change in onomondo-ipa[master]: V1.2: Add profileDownloadErrorReason to ProfileDownloadTriggerResult
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43040?usp=email
) Change subject: V1.2: Add profileDownloadErrorReason to ProfileDownloadTriggerResult ...................................................................... V1.2: Add profileDownloadErrorReason to ProfileDownloadTriggerResult Reference: SGP.32 Section 2.11.2.3 Related: SYS#8101 Change-Id: Ia5da46a793db54f2e2671be2b50dd1dddc97e318 --- M asn1/SGP32Definitions.asn M src/ipa/libasn/ProfileDownloadTriggerResult.c M src/ipa/libasn/ProfileDownloadTriggerResult.h 3 files changed, 26 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/40/43040/1 diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index c380182..7c5821c 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -342,6 +342,10 @@ profileDownloadTriggerResultData CHOICE { profileInstallationResult [55] SGP32-ProfileInstallationResult, -- see SGP.22 [4] profileDownloadError SEQUENCE { + profileDownloadErrorReason [0] INTEGER { + ecallActive (104), + undefinedError(127) + }, errorResponse OCTET STRING OPTIONAL } } diff --git a/src/ipa/libasn/ProfileDownloadTriggerResult.c b/src/ipa/libasn/ProfileDownloadTriggerResult.c index f5e7188..faa7065 100644 --- a/src/ipa/libasn/ProfileDownloadTriggerResult.c +++ b/src/ipa/libasn/ProfileDownloadTriggerResult.c @@ -16,9 +16,18 @@ 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_profileDownloadError_5[] = { - { ATF_POINTER, 1, offsetof(struct ProfileDownloadTriggerResult__profileDownloadTriggerResultData__profileDownloadError, errorResponse), + { ATF_NOFLAGS, 0, offsetof(struct ProfileDownloadTriggerResult__profileDownloadTriggerResultData__profileDownloadError, profileDownloadErrorReason), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "profileDownloadErrorReason" + }, + { ATF_POINTER, 1, offsetof(struct ProfileDownloadTriggerResult__profileDownloadTriggerResultData__profileDownloadError, errorResponse), + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, &asn_DEF_OCTET_STRING, 0, { 0, 0, 0 }, @@ -26,21 +35,22 @@ "errorResponse" }, }; -static const int asn_MAP_profileDownloadError_oms_5[] = { 0 }; +static const int asn_MAP_profileDownloadError_oms_5[] = { 1 }; static const ber_tlv_tag_t asn_DEF_profileDownloadError_tags_5[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_profileDownloadError_tag2el_5[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* errorResponse */ + { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, 0, 0 }, /* errorResponse */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* profileDownloadErrorReason */ }; static asn_SEQUENCE_specifics_t asn_SPC_profileDownloadError_specs_5 = { sizeof(struct ProfileDownloadTriggerResult__profileDownloadTriggerResultData__profileDownloadError), offsetof(struct ProfileDownloadTriggerResult__profileDownloadTriggerResultData__profileDownloadError, _asn_ctx), asn_MAP_profileDownloadError_tag2el_5, - 1, /* Count of tags in the map */ + 2, /* Count of tags in the map */ asn_MAP_profileDownloadError_oms_5, /* Optional members */ 1, 0, /* Root/Additions */ - 1, /* First extension addition */ + 2, /* First extension addition */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_profileDownloadError_5 = { @@ -55,7 +65,7 @@ /sizeof(asn_DEF_profileDownloadError_tags_5[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_profileDownloadError_5, - 1, /* Elements count */ + 2, /* Elements count */ &asn_SPC_profileDownloadError_specs_5 /* Additional specs */ }; diff --git a/src/ipa/libasn/ProfileDownloadTriggerResult.h b/src/ipa/libasn/ProfileDownloadTriggerResult.h index 744c8ae..090bcb7 100644 --- a/src/ipa/libasn/ProfileDownloadTriggerResult.h +++ b/src/ipa/libasn/ProfileDownloadTriggerResult.h @@ -14,6 +14,7 @@ /* Including external dependencies */ #include "TransactionId.h" #include "SGP32-ProfileInstallationResult.h" +#include <NativeInteger.h> #include <OCTET_STRING.h> #include <constr_SEQUENCE.h> #include <constr_CHOICE.h> @@ -30,6 +31,10 @@ /* Extensions may appear below */ } ProfileDownloadTriggerResult__profileDownloadTriggerResultData_PR; +typedef enum ProfileDownloadTriggerResult__profileDownloadTriggerResultData__profileDownloadError__profileDownloadErrorReason { + ProfileDownloadTriggerResult__profileDownloadTriggerResultData__profileDownloadError__profileDownloadErrorReason_ecallActive = 104, + ProfileDownloadTriggerResult__profileDownloadTriggerResultData__profileDownloadError__profileDownloadErrorReason_undefinedError = 127 +} e_ProfileDownloadTriggerResult__profileDownloadTriggerResultData__profileDownloadError__profileDownloadErrorReason; /* ProfileDownloadTriggerResult */ typedef struct ProfileDownloadTriggerResult { @@ -39,6 +44,7 @@ union ProfileDownloadTriggerResult__profileDownloadTriggerResultData_u { SGP32_ProfileInstallationResult_t profileInstallationResult; struct ProfileDownloadTriggerResult__profileDownloadTriggerResultData__profileDownloadError { + long profileDownloadErrorReason; OCTET_STRING_t *errorResponse /* OPTIONAL */; /* * This type is extensible, -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43040?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: Ia5da46a793db54f2e2671be2b50dd1dddc97e318 Gerrit-Change-Number: 43040 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
[L] Change in onomondo-ipa[master]: V1.2: Change names and structure in IpaEuiccData
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43039?usp=email
) Change subject: V1.2: Change names and structure in IpaEuiccData ...................................................................... V1.2: Change names and structure in IpaEuiccData The “SEQUENCE OF SGP32-PendingNotification” is now direct member of the IpaEuiccData. The notficationList in IpaEuiccDataResponse is taken from the RetrieveNotificationsListResponse. After the structure change, the ASN.1 compiler creates two equal definitions in the header files. An assignment causes a C compiler error, so that the pointer to the list must be casted to the definition of the response. (See ipa_proc_euicc_data_req().) Reference: SGP.32 Section 2.11.2.2 Related: SYS#8101 Change-Id: I0dc80706bff5b2020cbd31a57c9526aae9d50169 --- M asn1/SGP32Definitions.asn M src/ipa/libasn/CMakeLists.txt A src/ipa/libasn/EuiccPackageResultList.c A src/ipa/libasn/EuiccPackageResultList.h M src/ipa/libasn/IpaEuiccData.c M src/ipa/libasn/IpaEuiccData.h A src/ipa/libasn/PendingNotificationList.c A src/ipa/libasn/PendingNotificationList.h M src/ipa/libipa/proc_euicc_data_req.c 9 files changed, 248 insertions(+), 45 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/39/43039/1 diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index 93fa33f..c380182 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -317,8 +317,12 @@ ipaEuiccData IpaEuiccData, ipaEuiccDataResponseError IpaEuiccDataResponseError } +PendingNotificationList ::= SEQUENCE OF SGP32-PendingNotification +EuiccPackageResultList ::= SEQUENCE OF EuiccPackageResult IpaEuiccData ::= SEQUENCE { - defaultSmdpAddress [0] UTF8String OPTIONAL, -- Tag '80' + notificationsList [0] PendingNotificationList OPTIONAL, -- Tag 'A0' + defaultSmdpAddress [1] UTF8String OPTIONAL, -- Tag '81' + euiccPackageResultList [2] EuiccPackageResultList OPTIONAL, -- Tag 'A2' euiccInfo1 [32] EUICCInfo1 OPTIONAL, -- Tag 'BF20' euiccInfo2 [34] SGP32-EUICCInfo2 OPTIONAL, -- Tag 'BF22' rootSmdsAddress [3] UTF8String OPTIONAL, -- Tag '83' @@ -326,9 +330,8 @@ eumCertificate [5] Certificate OPTIONAL, -- Tag 'A5' euiccCertificate [6] Certificate OPTIONAL, -- Tag 'A6' eimTransactionId [7] TransactionId OPTIONAL, -- Tag '87' - ipaCapabilities [8] IpaCapabilities OPTIONAL, -- Tag '88' - deviceInfo [9] DeviceInfo OPTIONAL, -- Tag 'A9' - notificationsList [43] SGP32-RetrieveNotificationsListResponse OPTIONAL -- Tag 'BF2B'. + ipaCapabilities [8] IpaCapabilities OPTIONAL, -- Tag 'A8' + deviceInfo [9] DeviceInfo OPTIONAL -- Tag 'A9' } -- ASN1STOP diff --git a/src/ipa/libasn/CMakeLists.txt b/src/ipa/libasn/CMakeLists.txt index f9166bd..3c84951 100644 --- a/src/ipa/libasn/CMakeLists.txt +++ b/src/ipa/libasn/CMakeLists.txt @@ -329,6 +329,8 @@ EuiccPackageResultDataSigned.c EuiccPackageResultDataSigned.h EuiccPackageResult.h +EuiccPackageResultList.c +EuiccPackageResultList.h EuiccPackageResultSigned.c EuiccPackageResultSigned.h EuiccPackageSigned.c @@ -626,6 +628,8 @@ PE-MF.h PendingNotification.c PendingNotification.h +PendingNotificationList.c +PendingNotificationList.h PE-NonStandard.c PE-NonStandard.h PE-OPT-CSIM.c diff --git a/src/ipa/libasn/EuiccPackageResultList.c b/src/ipa/libasn/EuiccPackageResultList.c new file mode 100644 index 0000000..f6452c7 --- /dev/null +++ b/src/ipa/libasn/EuiccPackageResultList.c @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#include "EuiccPackageResultList.h" + +asn_TYPE_member_t asn_MBR_EuiccPackageResultList_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_CONTEXT | (81 << 2)), + 0, + &asn_DEF_EuiccPackageResult, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_EuiccPackageResultList_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_EuiccPackageResultList_specs_1 = { + sizeof(struct EuiccPackageResultList), + offsetof(struct EuiccPackageResultList, _asn_ctx), + 2, /* XER encoding is XMLValueList */ +}; +asn_TYPE_descriptor_t asn_DEF_EuiccPackageResultList = { + "EuiccPackageResultList", + "EuiccPackageResultList", + &asn_OP_SEQUENCE_OF, + asn_DEF_EuiccPackageResultList_tags_1, + sizeof(asn_DEF_EuiccPackageResultList_tags_1) + /sizeof(asn_DEF_EuiccPackageResultList_tags_1[0]), /* 1 */ + asn_DEF_EuiccPackageResultList_tags_1, /* Same as above */ + sizeof(asn_DEF_EuiccPackageResultList_tags_1) + /sizeof(asn_DEF_EuiccPackageResultList_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_OF_constraint }, + asn_MBR_EuiccPackageResultList_1, + 1, /* Single element */ + &asn_SPC_EuiccPackageResultList_specs_1 /* Additional specs */ +}; + diff --git a/src/ipa/libasn/EuiccPackageResultList.h b/src/ipa/libasn/EuiccPackageResultList.h new file mode 100644 index 0000000..4fb2dda --- /dev/null +++ b/src/ipa/libasn/EuiccPackageResultList.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#ifndef _EuiccPackageResultList_H_ +#define _EuiccPackageResultList_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include <asn_SEQUENCE_OF.h> +#include <constr_SEQUENCE_OF.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct EuiccPackageResult; + +/* EuiccPackageResultList */ +typedef struct EuiccPackageResultList { + A_SEQUENCE_OF(struct EuiccPackageResult) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} EuiccPackageResultList_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_EuiccPackageResultList; +extern asn_SET_OF_specifics_t asn_SPC_EuiccPackageResultList_specs_1; +extern asn_TYPE_member_t asn_MBR_EuiccPackageResultList_1[1]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "EuiccPackageResult.h" + +#endif /* _EuiccPackageResultList_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libasn/IpaEuiccData.c b/src/ipa/libasn/IpaEuiccData.c index 3f44929..8633cce 100644 --- a/src/ipa/libasn/IpaEuiccData.c +++ b/src/ipa/libasn/IpaEuiccData.c @@ -8,16 +8,34 @@ #include "IpaEuiccData.h" asn_TYPE_member_t asn_MBR_IpaEuiccData_1[] = { - { ATF_POINTER, 11, offsetof(struct IpaEuiccData, defaultSmdpAddress), + { ATF_POINTER, 12, offsetof(struct IpaEuiccData, notificationsList), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ + &asn_DEF_PendingNotificationList, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "notificationsList" + }, + { ATF_POINTER, 11, offsetof(struct IpaEuiccData, defaultSmdpAddress), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ &asn_DEF_UTF8String, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "defaultSmdpAddress" }, - { ATF_POINTER, 10, offsetof(struct IpaEuiccData, euiccInfo1), + { ATF_POINTER, 10, offsetof(struct IpaEuiccData, euiccPackageResultList), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_EuiccPackageResultList, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "euiccPackageResultList" + }, + { ATF_POINTER, 9, offsetof(struct IpaEuiccData, euiccInfo1), (ASN_TAG_CLASS_CONTEXT | (32 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_EUICCInfo1, @@ -26,7 +44,7 @@ 0, 0, /* No default value */ "euiccInfo1" }, - { ATF_POINTER, 9, offsetof(struct IpaEuiccData, euiccInfo2), + { ATF_POINTER, 8, offsetof(struct IpaEuiccData, euiccInfo2), (ASN_TAG_CLASS_CONTEXT | (34 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_SGP32_EUICCInfo2, @@ -35,7 +53,7 @@ 0, 0, /* No default value */ "euiccInfo2" }, - { ATF_POINTER, 8, offsetof(struct IpaEuiccData, rootSmdsAddress), + { ATF_POINTER, 7, offsetof(struct IpaEuiccData, rootSmdsAddress), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_UTF8String, @@ -44,7 +62,7 @@ 0, 0, /* No default value */ "rootSmdsAddress" }, - { ATF_POINTER, 7, offsetof(struct IpaEuiccData, associationToken), + { ATF_POINTER, 6, offsetof(struct IpaEuiccData, associationToken), (ASN_TAG_CLASS_CONTEXT | (4 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_NativeInteger, @@ -53,7 +71,7 @@ 0, 0, /* No default value */ "associationToken" }, - { ATF_POINTER, 6, offsetof(struct IpaEuiccData, eumCertificate), + { ATF_POINTER, 5, offsetof(struct IpaEuiccData, eumCertificate), (ASN_TAG_CLASS_CONTEXT | (5 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_Certificate, @@ -62,7 +80,7 @@ 0, 0, /* No default value */ "eumCertificate" }, - { ATF_POINTER, 5, offsetof(struct IpaEuiccData, euiccCertificate), + { ATF_POINTER, 4, offsetof(struct IpaEuiccData, euiccCertificate), (ASN_TAG_CLASS_CONTEXT | (6 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_Certificate, @@ -71,7 +89,7 @@ 0, 0, /* No default value */ "euiccCertificate" }, - { ATF_POINTER, 4, offsetof(struct IpaEuiccData, eimTransactionId), + { ATF_POINTER, 3, offsetof(struct IpaEuiccData, eimTransactionId), (ASN_TAG_CLASS_CONTEXT | (7 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_TransactionId, @@ -80,7 +98,7 @@ 0, 0, /* No default value */ "eimTransactionId" }, - { ATF_POINTER, 3, offsetof(struct IpaEuiccData, ipaCapabilities), + { ATF_POINTER, 2, offsetof(struct IpaEuiccData, ipaCapabilities), (ASN_TAG_CLASS_CONTEXT | (8 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_IpaCapabilities, @@ -89,7 +107,7 @@ 0, 0, /* No default value */ "ipaCapabilities" }, - { ATF_POINTER, 2, offsetof(struct IpaEuiccData, deviceInfo), + { ATF_POINTER, 1, offsetof(struct IpaEuiccData, deviceInfo), (ASN_TAG_CLASS_CONTEXT | (9 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_DeviceInfo, @@ -98,41 +116,33 @@ 0, 0, /* No default value */ "deviceInfo" }, - { ATF_POINTER, 1, offsetof(struct IpaEuiccData, notificationsList), - (ASN_TAG_CLASS_CONTEXT | (43 << 2)), - -1, /* IMPLICIT tag at current level */ - &asn_DEF_SGP32_RetrieveNotificationsListResponse, - 0, - { 0, 0, 0 }, - 0, 0, /* No default value */ - "notificationsList" - }, }; -static const int asn_MAP_IpaEuiccData_oms_1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; +static const int asn_MAP_IpaEuiccData_oms_1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; static const ber_tlv_tag_t asn_DEF_IpaEuiccData_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_IpaEuiccData_tag2el_1[] = { - { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* defaultSmdpAddress */ - { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* rootSmdsAddress */ - { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* associationToken */ - { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* eumCertificate */ - { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* euiccCertificate */ - { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* eimTransactionId */ - { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 }, /* ipaCapabilities */ - { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 9, 0, 0 }, /* deviceInfo */ - { (ASN_TAG_CLASS_CONTEXT | (32 << 2)), 1, 0, 0 }, /* euiccInfo1 */ - { (ASN_TAG_CLASS_CONTEXT | (34 << 2)), 2, 0, 0 }, /* euiccInfo2 */ - { (ASN_TAG_CLASS_CONTEXT | (43 << 2)), 10, 0, 0 } /* notificationsList */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* notificationsList */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* defaultSmdpAddress */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* euiccPackageResultList */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 5, 0, 0 }, /* rootSmdsAddress */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 6, 0, 0 }, /* associationToken */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 7, 0, 0 }, /* eumCertificate */ + { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 8, 0, 0 }, /* euiccCertificate */ + { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 9, 0, 0 }, /* eimTransactionId */ + { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 10, 0, 0 }, /* ipaCapabilities */ + { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 11, 0, 0 }, /* deviceInfo */ + { (ASN_TAG_CLASS_CONTEXT | (32 << 2)), 3, 0, 0 }, /* euiccInfo1 */ + { (ASN_TAG_CLASS_CONTEXT | (34 << 2)), 4, 0, 0 } /* euiccInfo2 */ }; asn_SEQUENCE_specifics_t asn_SPC_IpaEuiccData_specs_1 = { sizeof(struct IpaEuiccData), offsetof(struct IpaEuiccData, _asn_ctx), asn_MAP_IpaEuiccData_tag2el_1, - 11, /* Count of tags in the map */ + 12, /* Count of tags in the map */ asn_MAP_IpaEuiccData_oms_1, /* Optional members */ - 11, 0, /* Root/Additions */ - 11, /* First extension addition */ + 12, 0, /* Root/Additions */ + 12, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_IpaEuiccData = { "IpaEuiccData", @@ -146,7 +156,7 @@ /sizeof(asn_DEF_IpaEuiccData_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_IpaEuiccData_1, - 11, /* Elements count */ + 12, /* Elements count */ &asn_SPC_IpaEuiccData_specs_1 /* Additional specs */ }; diff --git a/src/ipa/libasn/IpaEuiccData.h b/src/ipa/libasn/IpaEuiccData.h index bf8dc38..740e655 100644 --- a/src/ipa/libasn/IpaEuiccData.h +++ b/src/ipa/libasn/IpaEuiccData.h @@ -22,16 +22,19 @@ #endif /* Forward declarations */ +struct PendingNotificationList; +struct EuiccPackageResultList; struct EUICCInfo1; struct SGP32_EUICCInfo2; struct Certificate; struct IpaCapabilities; struct DeviceInfo; -struct SGP32_RetrieveNotificationsListResponse; /* IpaEuiccData */ typedef struct IpaEuiccData { + struct PendingNotificationList *notificationsList /* OPTIONAL */; UTF8String_t *defaultSmdpAddress /* OPTIONAL */; + struct EuiccPackageResultList *euiccPackageResultList /* OPTIONAL */; struct EUICCInfo1 *euiccInfo1 /* OPTIONAL */; struct SGP32_EUICCInfo2 *euiccInfo2 /* OPTIONAL */; UTF8String_t *rootSmdsAddress /* OPTIONAL */; @@ -41,7 +44,6 @@ TransactionId_t *eimTransactionId /* OPTIONAL */; struct IpaCapabilities *ipaCapabilities /* OPTIONAL */; struct DeviceInfo *deviceInfo /* OPTIONAL */; - struct SGP32_RetrieveNotificationsListResponse *notificationsList /* OPTIONAL */; /* * This type is extensible, * possible extensions are below. @@ -54,19 +56,20 @@ /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_IpaEuiccData; extern asn_SEQUENCE_specifics_t asn_SPC_IpaEuiccData_specs_1; -extern asn_TYPE_member_t asn_MBR_IpaEuiccData_1[11]; +extern asn_TYPE_member_t asn_MBR_IpaEuiccData_1[12]; #ifdef __cplusplus } #endif /* Referred external types */ +#include "PendingNotificationList.h" +#include "EuiccPackageResultList.h" #include "EUICCInfo1.h" #include "SGP32-EUICCInfo2.h" #include "Certificate.h" #include "IpaCapabilities.h" #include "DeviceInfo.h" -#include "SGP32-RetrieveNotificationsListResponse.h" #endif /* _IpaEuiccData_H_ */ #include <asn_internal.h> diff --git a/src/ipa/libasn/PendingNotificationList.c b/src/ipa/libasn/PendingNotificationList.c new file mode 100644 index 0000000..bbca9a5 --- /dev/null +++ b/src/ipa/libasn/PendingNotificationList.c @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#include "PendingNotificationList.h" + +asn_TYPE_member_t asn_MBR_PendingNotificationList_1[] = { + { ATF_POINTER, 0, 0, + -1 /* Ambiguous tag (CHOICE?) */, + 0, + &asn_DEF_SGP32_PendingNotification, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_PendingNotificationList_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_PendingNotificationList_specs_1 = { + sizeof(struct PendingNotificationList), + offsetof(struct PendingNotificationList, _asn_ctx), + 2, /* XER encoding is XMLValueList */ +}; +asn_TYPE_descriptor_t asn_DEF_PendingNotificationList = { + "PendingNotificationList", + "PendingNotificationList", + &asn_OP_SEQUENCE_OF, + asn_DEF_PendingNotificationList_tags_1, + sizeof(asn_DEF_PendingNotificationList_tags_1) + /sizeof(asn_DEF_PendingNotificationList_tags_1[0]), /* 1 */ + asn_DEF_PendingNotificationList_tags_1, /* Same as above */ + sizeof(asn_DEF_PendingNotificationList_tags_1) + /sizeof(asn_DEF_PendingNotificationList_tags_1[0]), /* 1 */ + { 0, 0, SEQUENCE_OF_constraint }, + asn_MBR_PendingNotificationList_1, + 1, /* Single element */ + &asn_SPC_PendingNotificationList_specs_1 /* Additional specs */ +}; + diff --git a/src/ipa/libasn/PendingNotificationList.h b/src/ipa/libasn/PendingNotificationList.h new file mode 100644 index 0000000..2a06c0f --- /dev/null +++ b/src/ipa/libasn/PendingNotificationList.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#ifndef _PendingNotificationList_H_ +#define _PendingNotificationList_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include <asn_SEQUENCE_OF.h> +#include <constr_SEQUENCE_OF.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct SGP32_PendingNotification; + +/* PendingNotificationList */ +typedef struct PendingNotificationList { + A_SEQUENCE_OF(struct SGP32_PendingNotification) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} PendingNotificationList_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_PendingNotificationList; +extern asn_SET_OF_specifics_t asn_SPC_PendingNotificationList_specs_1; +extern asn_TYPE_member_t asn_MBR_PendingNotificationList_1[1]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "SGP32-PendingNotification.h" + +#endif /* _PendingNotificationList_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libipa/proc_euicc_data_req.c b/src/ipa/libipa/proc_euicc_data_req.c index 2db088b..d084ed6 100644 --- a/src/ipa/libipa/proc_euicc_data_req.c +++ b/src/ipa/libipa/proc_euicc_data_req.c @@ -199,8 +199,11 @@ retr_notif_from_lst_req.dr_search_criteria = pars->ipa_euicc_data_request->searchCriteriaNotification; retr_notif_from_lst_res = ipa_es10b_retr_notif_from_lst(ctx, &retr_notif_from_lst_req); - if (retr_notif_from_lst_res && retr_notif_from_lst_res->sgp32_res) - ipa_euicc_data_response.choice.ipaEuiccData.notificationsList = retr_notif_from_lst_res->sgp32_res; + if (retr_notif_from_lst_res && retr_notif_from_lst_res->sgp32_res && + retr_notif_from_lst_res->sgp32_res->present == SGP32_RetrieveNotificationsListResponse_PR_notificationList) { + ipa_euicc_data_response.choice.ipaEuiccData.notificationsList = + (struct PendingNotificationList *)&retr_notif_from_lst_res->sgp32_res->choice.notificationList; + } } ipa_euicc_data_response.present = IpaEuiccDataResponse_PR_ipaEuiccData; -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43039?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: I0dc80706bff5b2020cbd31a57c9526aae9d50169 Gerrit-Change-Number: 43039 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
[L] Change in onomondo-ipa[master]: V1.2: Add function ES10b.ReturnFromFallback
by jolly
16 Jul '26
16 Jul '26
jolly has uploaded this change for review. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43042?usp=email
) Change subject: V1.2: Add function ES10b.ReturnFromFallback ...................................................................... V1.2: Add function ES10b.ReturnFromFallback Add new library function to return from fallback profile on IoT eUICC. Also add an option to the command line interface to call the library function. The optional refresh flag may be set via command line option. The function cannot be emulated with non-IoT eUICC. Reference: SGP.32 Section 5.9.21 Related: SYS#8101 Change-Id: Ib49a8ef3a5ea5639d881ca51eaeeea24f083fe0e --- M asn1/SGP32Definitions.asn M include/onomondo/ipa/ipad.h M src/ipa/libasn/CMakeLists.txt A src/ipa/libasn/ReturnFromFallbackRequest.c A src/ipa/libasn/ReturnFromFallbackRequest.h A src/ipa/libasn/ReturnFromFallbackResponse.c A src/ipa/libasn/ReturnFromFallbackResponse.h M src/ipa/libipa/CMakeLists.txt A src/ipa/libipa/es10b_ret_from_fallback.c A src/ipa/libipa/es10b_ret_from_fallback.h M src/ipa/libipa/ipad.c M src/ipa/main.c 12 files changed, 375 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/42/43042/1 diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn index 287d4c3..d22a1c9 100644 --- a/asn1/SGP32Definitions.asn +++ b/asn1/SGP32Definitions.asn @@ -612,6 +612,24 @@ } -- ASN1STOP +-- Section 5.9.21 +-- ASN1START +ReturnFromFallbackRequest ::= [94] SEQUENCE { -- Tag 'BF5E' + refreshFlag BOOLEAN -- indicating whether REFRESH is required +} +-- ASN1STOP +-- ASN1START +ReturnFromFallbackResponse ::= [94] SEQUENCE { -- Tag 'BF5E' + returnFromFallbackResult [0] INTEGER { + ok(0), + catBusy(5), + fallbackNotAvailable(6), -- Fallback Attribute not set + commandError(7), + undefinedError(127) + } +} +-- ASN1STOP + -- Section 5.9.25 -- ASN1START SGP32-SetDefaultDpAddressRequest ::= [101] SEQUENCE { -- Tag 'BF65' diff --git a/include/onomondo/ipa/ipad.h b/include/onomondo/ipa/ipad.h index 2d11d23..d54b09a 100644 --- a/include/onomondo/ipa/ipad.h +++ b/include/onomondo/ipa/ipad.h @@ -95,6 +95,7 @@ int ipa_euicc_mem_rst(struct ipa_context *ctx, bool operatnl_profiles, bool test_profiles, bool default_smdp_addr, bool eim_cfg_data, bool immediate_enable_cfg); int ipa_execute_fallback_mechanism(struct ipa_context *ctx, bool refresh_flag); +int ipa_return_from_fallback(struct ipa_context *ctx, bool refresh_flag); int ipa_poll(struct ipa_context *ctx); void ipa_close(struct ipa_context *ctx); struct ipa_buf *ipa_free_ctx(struct ipa_context *ctx); diff --git a/src/ipa/libasn/CMakeLists.txt b/src/ipa/libasn/CMakeLists.txt index 166d7f2..859578a 100644 --- a/src/ipa/libasn/CMakeLists.txt +++ b/src/ipa/libasn/CMakeLists.txt @@ -780,6 +780,10 @@ RetrieveNotificationsListRequest.h RetrieveNotificationsListResponse.c RetrieveNotificationsListResponse.h +ReturnFromFallbackRequest.c +ReturnFromFallbackRequest.h +ReturnFromFallbackResponse.c +ReturnFromFallbackResponse.h RollbackProfileResult.c RollbackProfileResult.h RspCapability.c diff --git a/src/ipa/libasn/ReturnFromFallbackRequest.c b/src/ipa/libasn/ReturnFromFallbackRequest.c new file mode 100644 index 0000000..69bd3a3 --- /dev/null +++ b/src/ipa/libasn/ReturnFromFallbackRequest.c @@ -0,0 +1,51 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#include "ReturnFromFallbackRequest.h" + +static asn_TYPE_member_t asn_MBR_ReturnFromFallbackRequest_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct ReturnFromFallbackRequest, refreshFlag), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BOOLEAN, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "refreshFlag" + }, +}; +static const ber_tlv_tag_t asn_DEF_ReturnFromFallbackRequest_tags_1[] = { + (ASN_TAG_CLASS_CONTEXT | (94 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_ReturnFromFallbackRequest_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* refreshFlag */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_ReturnFromFallbackRequest_specs_1 = { + sizeof(struct ReturnFromFallbackRequest), + offsetof(struct ReturnFromFallbackRequest, _asn_ctx), + asn_MAP_ReturnFromFallbackRequest_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_ReturnFromFallbackRequest = { + "ReturnFromFallbackRequest", + "ReturnFromFallbackRequest", + &asn_OP_SEQUENCE, + asn_DEF_ReturnFromFallbackRequest_tags_1, + sizeof(asn_DEF_ReturnFromFallbackRequest_tags_1) + /sizeof(asn_DEF_ReturnFromFallbackRequest_tags_1[0]) - 1, /* 1 */ + asn_DEF_ReturnFromFallbackRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_ReturnFromFallbackRequest_tags_1) + /sizeof(asn_DEF_ReturnFromFallbackRequest_tags_1[0]), /* 2 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_ReturnFromFallbackRequest_1, + 1, /* Elements count */ + &asn_SPC_ReturnFromFallbackRequest_specs_1 /* Additional specs */ +}; + diff --git a/src/ipa/libasn/ReturnFromFallbackRequest.h b/src/ipa/libasn/ReturnFromFallbackRequest.h new file mode 100644 index 0000000..5a43ff0 --- /dev/null +++ b/src/ipa/libasn/ReturnFromFallbackRequest.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#ifndef _ReturnFromFallbackRequest_H_ +#define _ReturnFromFallbackRequest_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include <BOOLEAN.h> +#include <constr_SEQUENCE.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* ReturnFromFallbackRequest */ +typedef struct ReturnFromFallbackRequest { + BOOLEAN_t refreshFlag; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ReturnFromFallbackRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ReturnFromFallbackRequest; + +#ifdef __cplusplus +} +#endif + +#endif /* _ReturnFromFallbackRequest_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libasn/ReturnFromFallbackResponse.c b/src/ipa/libasn/ReturnFromFallbackResponse.c new file mode 100644 index 0000000..a1d21ce --- /dev/null +++ b/src/ipa/libasn/ReturnFromFallbackResponse.c @@ -0,0 +1,51 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#include "ReturnFromFallbackResponse.h" + +static asn_TYPE_member_t asn_MBR_ReturnFromFallbackResponse_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct ReturnFromFallbackResponse, returnFromFallbackResult), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { 0, 0, 0 }, + 0, 0, /* No default value */ + "returnFromFallbackResult" + }, +}; +static const ber_tlv_tag_t asn_DEF_ReturnFromFallbackResponse_tags_1[] = { + (ASN_TAG_CLASS_CONTEXT | (94 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_ReturnFromFallbackResponse_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* returnFromFallbackResult */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_ReturnFromFallbackResponse_specs_1 = { + sizeof(struct ReturnFromFallbackResponse), + offsetof(struct ReturnFromFallbackResponse, _asn_ctx), + asn_MAP_ReturnFromFallbackResponse_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_ReturnFromFallbackResponse = { + "ReturnFromFallbackResponse", + "ReturnFromFallbackResponse", + &asn_OP_SEQUENCE, + asn_DEF_ReturnFromFallbackResponse_tags_1, + sizeof(asn_DEF_ReturnFromFallbackResponse_tags_1) + /sizeof(asn_DEF_ReturnFromFallbackResponse_tags_1[0]) - 1, /* 1 */ + asn_DEF_ReturnFromFallbackResponse_tags_1, /* Same as above */ + sizeof(asn_DEF_ReturnFromFallbackResponse_tags_1) + /sizeof(asn_DEF_ReturnFromFallbackResponse_tags_1[0]), /* 2 */ + { 0, 0, SEQUENCE_constraint }, + asn_MBR_ReturnFromFallbackResponse_1, + 1, /* Elements count */ + &asn_SPC_ReturnFromFallbackResponse_specs_1 /* Additional specs */ +}; + diff --git a/src/ipa/libasn/ReturnFromFallbackResponse.h b/src/ipa/libasn/ReturnFromFallbackResponse.h new file mode 100644 index 0000000..c4a7ae0 --- /dev/null +++ b/src/ipa/libasn/ReturnFromFallbackResponse.h @@ -0,0 +1,51 @@ +/* + * Generated by asn1c-0.9.29 (
http://lionet.info/asn1c
) + * From ASN.1 module "SGP32Definitions" + * found in "../../../asn1/SGP32Definitions.asn" + * `asn1c -fcompound-names -no-gen-example` + */ + +#ifndef _ReturnFromFallbackResponse_H_ +#define _ReturnFromFallbackResponse_H_ + + +#include <asn_application.h> + +/* Including external dependencies */ +#include <NativeInteger.h> +#include <constr_SEQUENCE.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum ReturnFromFallbackResponse__returnFromFallbackResult { + ReturnFromFallbackResponse__returnFromFallbackResult_ok = 0, + ReturnFromFallbackResponse__returnFromFallbackResult_catBusy = 5, + ReturnFromFallbackResponse__returnFromFallbackResult_fallbackNotAvailable = 6, + ReturnFromFallbackResponse__returnFromFallbackResult_commandError = 7, + ReturnFromFallbackResponse__returnFromFallbackResult_undefinedError = 127 +} e_ReturnFromFallbackResponse__returnFromFallbackResult; + +/* ReturnFromFallbackResponse */ +typedef struct ReturnFromFallbackResponse { + long returnFromFallbackResult; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} ReturnFromFallbackResponse_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_ReturnFromFallbackResponse; + +#ifdef __cplusplus +} +#endif + +#endif /* _ReturnFromFallbackResponse_H_ */ +#include <asn_internal.h> diff --git a/src/ipa/libipa/CMakeLists.txt b/src/ipa/libipa/CMakeLists.txt index a46e22b..45d8f4a 100644 --- a/src/ipa/libipa/CMakeLists.txt +++ b/src/ipa/libipa/CMakeLists.txt @@ -21,6 +21,7 @@ es10b_retr_notif_from_lst.c es10b_rm_notif_from_lst.c es10b_exec_fallback_mech.c + es10b_ret_from_fallback.c es10c_delete_prfle.c es10c_disable_prfle.c es10c_enable_prfle.c diff --git a/src/ipa/libipa/es10b_ret_from_fallback.c b/src/ipa/libipa/es10b_ret_from_fallback.c new file mode 100644 index 0000000..1f18e3d --- /dev/null +++ b/src/ipa/libipa/es10b_ret_from_fallback.c @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2026 sysmocom - s.f.m.c. GmbH. All rights reserved. + * + * SPDX-License-Identifier: AGPL-3.0-only + * + * Author: Philipp Maier <pmaier(a)sysmocom.de> / sysmocom - s.f.m.c. GmbH + * Andreas Eversberg <aeversberg(a)sysmocom.de> / sysmocom - s.f.m.c. GmbH + * + * See also: GSMA SGP.22, 5.9.21: Function (ES10b): ReturnFromFallback + */ + +#include <stdio.h> +#include <assert.h> +#include <onomondo/ipa/utils.h> +#include "context.h" +#include "utils.h" +#include "euicc.h" +#include "es10x.h" +#include "es10b_ret_from_fallback.h" + +static const struct num_str_map error_code_strings[] = { + { ReturnFromFallbackResponse__returnFromFallbackResult_ok, "ok" }, + { ReturnFromFallbackResponse__returnFromFallbackResult_catBusy, "catBusy" }, + { ReturnFromFallbackResponse__returnFromFallbackResult_fallbackNotAvailable, "fallbackNotAvailable" }, + { ReturnFromFallbackResponse__returnFromFallbackResult_commandError, "commandError" }, + { ReturnFromFallbackResponse__returnFromFallbackResult_undefinedError, "undefinedError" }, + + { 0, NULL } +}; + +static int dec_ret_from_fallback_res(struct ipa_es10b_ret_from_fallback_res *res, const struct ipa_buf *es10b_res) +{ + struct ReturnFromFallbackResponse *asn = NULL; + + asn = ipa_es10x_res_dec(&asn_DEF_ReturnFromFallbackResponse, es10b_res, "ReturnFromFallback"); + if (!asn) + return -EINVAL; + + if (asn->returnFromFallbackResult != ReturnFromFallbackResponse__returnFromFallbackResult_ok) { + IPA_LOGP_ES10X("ReturnFromFallback", LERROR, "function failed with error code %ld=%s!\n", + asn->returnFromFallbackResult, + ipa_str_from_num(error_code_strings, asn->returnFromFallbackResult, "(unknown)")); + } else { + IPA_LOGP_ES10X("ReturnFromFallback", LERROR, "function succeeded with status code %ld=%s!\n", + asn->returnFromFallbackResult, + ipa_str_from_num(error_code_strings, asn->returnFromFallbackResult, "(unknown)")); + } + + res->res = asn; + return 0; +} + +/*! Function (Es10b): ReturnFromFallback. + * \param[inout] ctx pointer to ipa_context. + * \param[in] req pointer to struct that holds the function parameters. + * \returns pointer newly allocated struct with function result, NULL on error. */ +struct ipa_es10b_ret_from_fallback_res *ipa_es10b_ret_from_fallback(struct ipa_context *ctx, + const struct ipa_es10b_ret_from_fallback_req *req) +{ + struct ipa_buf *es10b_req = NULL; + struct ipa_buf *es10b_res = NULL; + struct ipa_es10b_ret_from_fallback_res *res = IPA_ALLOC_ZERO(struct ipa_es10b_ret_from_fallback_res); + int rc; + + es10b_req = ipa_es10x_req_enc(&asn_DEF_ReturnFromFallbackRequest, &req->req, "ReturnFromFallback"); + if (!es10b_req) { + IPA_LOGP_ES10X("ReturnFromFallback", LERROR, "unable to encode Es10b request\n"); + goto error; + } + + es10b_res = ipa_euicc_transceive_es10x(ctx, es10b_req); + if (!es10b_res) { + IPA_LOGP_ES10X("ReturnFromFallback", LERROR, "no Es10b response\n"); + goto error; + } + + rc = dec_ret_from_fallback_res(res, es10b_res); + if (rc < 0) + goto error; + + IPA_FREE(es10b_req); + IPA_FREE(es10b_res); + return res; +error: + IPA_FREE(es10b_req); + IPA_FREE(es10b_res); + ipa_es10b_ret_from_fallback_res_free(res); + return NULL; +} + +/*! Free results of function (Es10b): ReturnFromFallback. + * \param[in] res pointer to function result. */ +void ipa_es10b_ret_from_fallback_res_free(struct ipa_es10b_ret_from_fallback_res *res) +{ + IPA_ES10X_RES_FREE(asn_DEF_ReturnFromFallbackResponse, res); +} diff --git a/src/ipa/libipa/es10b_ret_from_fallback.h b/src/ipa/libipa/es10b_ret_from_fallback.h new file mode 100644 index 0000000..ba6fd79 --- /dev/null +++ b/src/ipa/libipa/es10b_ret_from_fallback.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2026 sysmocom - s.f.m.c. GmbH. All rights reserved. + * + * SPDX-License-Identifier: AGPL-3.0-only + */ + +#pragma once + +#include <ReturnFromFallbackRequest.h> +#include <ReturnFromFallbackResponse.h> +struct ipa_context; + +struct ipa_es10b_ret_from_fallback_req { + struct ReturnFromFallbackRequest req; +}; + +struct ipa_es10b_ret_from_fallback_res { + struct ReturnFromFallbackResponse *res; +}; + +struct ipa_es10b_ret_from_fallback_res *ipa_es10b_ret_from_fallback(struct ipa_context *ctx, + const struct ipa_es10b_ret_from_fallback_req *req); +void ipa_es10b_ret_from_fallback_res_free(struct ipa_es10b_ret_from_fallback_res *res); diff --git a/src/ipa/libipa/ipad.c b/src/ipa/libipa/ipad.c index ae3ca8e..187b3d1 100644 --- a/src/ipa/libipa/ipad.c +++ b/src/ipa/libipa/ipad.c @@ -26,6 +26,7 @@ #include "es10b_euicc_mem_rst.h" #include "es10b_load_euicc_pkg.h" #include "es10b_exec_fallback_mech.h" +#include "es10b_ret_from_fallback.h" #include "proc_euicc_pkg_dwnld_exec.h" #include "proc_notif_delivery.h" @@ -290,6 +291,32 @@ return rc; } +/*! Trigger enabling of emergency profile. + * \param[inout] ctx pointer to ipa_context. + * \param[in] refresh_flag send a CAT refresh after switchting profile. + * \returns 0 on success, negative on error. */ +int ipa_return_from_fallback(struct ipa_context *ctx, bool refresh_flag) +{ + struct ipa_es10b_ret_from_fallback_req ret_from_fallback = { 0 }; + struct ipa_es10b_ret_from_fallback_res *res; + int rc = -EINVAL; + + if (ctx->cfg->iot_euicc_emu_enabled) { + IPA_LOGP(SIPA, LERROR, "Unable to emulate switching back from fallback profile.\n"); + return -ENOTSUP; + } + + ret_from_fallback.req.refreshFlag = refresh_flag; + res = ipa_es10b_ret_from_fallback(ctx, &ret_from_fallback); + if (!res) + return -EIO; + if (res->res->returnFromFallbackResult == ReturnFromFallbackResponse__returnFromFallbackResult_ok) + rc = 0; + ipa_es10b_ret_from_fallback_res_free(res); + + return rc; +} + static int check_canaries(struct ipa_context *ctx) { if (ctx->check_http) diff --git a/src/ipa/main.c b/src/ipa/main.c index 5a7c1f5..57224dc 100644 --- a/src/ipa/main.c +++ b/src/ipa/main.c @@ -50,6 +50,7 @@ printf(" -f PATH .................... set initial eIM configuration\n"); printf(" -m ......................... reset eUICC memory\n"); printf(" --execute-fallback-mechanism Trigger enabling of fallback profile\n"); + printf(" --return-from-fallback...... Trigger return from fallback profile to previous profile\n"); printf(" --refresh-flag.............. Make eUICC send a CAT refresh after switchting profile with the triggers above.\n"); printf(" -n PATH .................... path to nvstate file (default: %s)\n", DEFAULT_NVSTATE_PATH); printf(" -y NUM ..................... number of retries for ESipa requests (default: %u)\n", @@ -145,6 +146,7 @@ char *getopt_initial_eim_cfg_file = NULL; bool getopt_euicc_memory_reset = false; bool getopt_execute_fallback_mechanism = false; + bool getopt_return_from_fallback = false; bool getopt_refresh_flag = false; char *getopt_nvstate_path = DEFAULT_NVSTATE_PATH; struct ipa_buf *nvstate_load = NULL; @@ -164,11 +166,13 @@ enum { OPT_EXECFALLBACK = 256, + OPT_RETURNFALLBACK, OPT_REFRESHFLAG, }; struct option long_options[] = { { "execute-fallback-mechanism", no_argument, NULL, OPT_EXECFALLBACK}, + { "return-from-fallback", no_argument, NULL, OPT_RETURNFALLBACK}, { "refresh-flag", no_argument, NULL, OPT_REFRESHFLAG}, { NULL, 0, NULL, 0} }; @@ -205,6 +209,9 @@ case OPT_EXECFALLBACK: getopt_execute_fallback_mechanism = true; break; + case OPT_RETURNFALLBACK: + getopt_return_from_fallback = true; + break; case OPT_REFRESHFLAG: getopt_refresh_flag = true; break; @@ -292,6 +299,9 @@ } else if (getopt_execute_fallback_mechanism) { /* Trigger enabling of fallback profile */ ipa_execute_fallback_mechanism(ctx, getopt_refresh_flag); + } else if (getopt_return_from_fallback) { + /* Trigger return from fallback profile to previous profile */ + ipa_return_from_fallback(ctx, getopt_refresh_flag); } else { IPA_LOGP(SMAIN, LINFO, "-----------------------------8<-----------------------------\n"); rc = eim_init(ctx); -- To view, visit
https://gerrit.osmocom.org/c/onomondo-ipa/+/43042?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange Gerrit-Project: onomondo-ipa Gerrit-Branch: master Gerrit-Change-Id: Ib49a8ef3a5ea5639d881ca51eaeeea24f083fe0e Gerrit-Change-Number: 43042 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu>
1
0
0
0
← Newer
1
...
44
45
46
47
48
49
50
...
87
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
Results per page:
10
25
50
100
200