jolly has submitted this change. (
https://gerrit.osmocom.org/c/onomondo-ipa/+/43073?usp=email )
(
8 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted
one.
)Change subject: V1.2: Change remaining ASN1 definition to SGP.32 V1.2
......................................................................
V1.2: Change remaining ASN1 definition to SGP.32 V1.2
These minor changes are not relevant, because they have no impact on
the process of IPAd. Most of them relate to formatting and comments.
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(-)
Approvals:
Jenkins Builder: Verified
dexter: Looks good to me, approved
laforge: Looks good to me, but someone else must approve
diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn
index bded05f..d53e9d9 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: merged
Gerrit-Project: onomondo-ipa
Gerrit-Branch: master
Gerrit-Change-Id: Ifa2546784a6d75170e4f5aae2a5e98edb2c0627a
Gerrit-Change-Number: 43073
Gerrit-PatchSet: 13
Gerrit-Owner: jolly <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <[email protected]>
Gerrit-Reviewer: jolly <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>