源码对照:4.2.22.2.2
ES10c 停用 Profile 异常用例(Case 3) / TC_eUICC_ES10c.DisableProfile_ErrorCases_Case3
左侧为人工切片入口(-man,来自 原料/切片 的最小可执行脚本),右侧为 Cas 盲生成入口(-cas,仅依据规范生成)。文件按原始编码(多为 GBK)解码为 UTF-8 显示,行号自 1 起;字节级原文与 sha256 见两侧脚本包。完整 unified diff 见本页底部折叠区,以及 报告原文 §4。
-man 入口
Import/TestCase_SGP_23.js
63 行 / 2428 字符 / gb18030
-cas 入口
TC_eUICC_ES10c_DisableProfile_ErrorCases_Case3/Import/TC_eUICC_ES10c_DisableProfile_ErrorCases_Case3.js
288 行 / 24414 字符 / gb18030
默认折行显示长行;取消勾选可横向滚动查看原始行宽
-man 人工切片Import/TestCase_SGP_23.js63 行 / 2428 字符 / gb18030入口函数 @L3
1// slice of Import\TestCase_SGP_23.js - cases: TC_eUICC_ES10c_DisableProfile_ErrorCases_Case3_01_Error_Disable_Profile_by_an_unknown_ISD_P_AID (extracted verbatim)
2
3function TC_eUICC_ES10c_DisableProfile_ErrorCases_Case3_01_Error_Disable_Profile_by_an_unknown_ISD_P_AID()
4{
5 if(!Card_Have_ECC_Cert)
6 return;
7
8 TestOfMEPMode = 0;
9
10 initial_condition_PROFILE_OPERATIONAL1_is_Enabled();
11 var ISD_P_Test01 = curProfile_ISD_P_AID;
12
13
14 tracenamestr = "测试目的:通过未知的ISD-P AID去失效profile";
15 curDis.TraceStart(sno++,tracenamestr);
16
17 curLogicChannel = 0;
18 curDis.TestStepStart2(stno++,"eUICC卡片初始化;");
19 Ini_powerOn_eUICC_LPAe_not_activate();
20
21 curDis.TestStepStart2(stno++,"读卡器向卡片发送MANAGE_CHANNEL命令,打开辅助逻辑通道;");
22 TS_MANAGE_CHANNEL_OPEN();
23
24 curLogicChannel = 1;
25
26 curDis.TestStepStart2(stno++,"读卡器向卡片发送SELECT命令,选择ISD-R;");
27 TS_SELECT("Select ISD",ISD_R_AID,"9000");
28
29
30 curDis.TestStepStart2(stno++,"读卡器向卡片发送 StoreData命令,执行DisableProfileRequest,refreshFlag为 TRUE;");
31
32 var disableProRequest = new DisableProfileRequest();
33 disableProRequest.profileIdentifier = new ChoiceObj(tagOfProfileIdentifier.isdpAid,ISD_P_AIDX);
34 disableProRequest.refreshFlag = BooleanValue_BerCode_True;
35 disableProRequest.GenHexData();
36 var respData = LPAd_Transport_data_to_eUICC(disableProRequest.hexData,"90","00","6A82");
37 curStrHandle.CheckData("", respData, "DisableProfileResponse");
38
39
40 curDis.TestStepStart2(stno++,"读卡器向卡片发送 StoreData命令,执行ProfileInfoListRequest,获取profile状态;");
41 var proInfoListRequest = new ProfileInfoListRequest();
42 proInfoListRequest.searchCriteria = new ChoiceObj(tagOfsearchCriteria_ProfileInfo.isdpAid,ISD_P_Test01);
43 proInfoListRequest.tagList = "5A4F9F70";
44 proInfoListRequest.GenHexData();
45 var respData = LPAd_Transport_data_to_eUICC(proInfoListRequest.hexData);
46
47
48 var proInfoListResponse = new ProfileInfoListResponse();
49 proInfoListResponse.checkCardResDataFormat(respData);
50
51 try
52 {
53 curStrHandle.CheckData(ICCID_OP_PROF1, proInfoListResponse.profileInfoListOk.arrOfElement[0].iccid, "ICCID");
54 curStrHandle.CheckData(ISD_P_Test01, proInfoListResponse.profileInfoListOk.arrOfElement[0].isdpAid, "ISD-P AID");
55 curStrHandle.CheckData(Profile_ENABLED, proInfoListResponse.profileInfoListOk.arrOfElement[0].profileState, "profile State");
56 }catch(e){
57 obj.SubLevel(ProfileInfoListResponse_Data_Error, level_of_SubLevel.error);
58 }
59
60 RecoverCard();
61
62}
63
-cas 盲生成TC_eUICC_ES10c_DisableProfile_ErrorCases_Case3/Import/TC_eUICC_ES10c_DisableProfile_ErrorCases_Case3.js288 行 / 24414 字符 / gb18030入口函数 @L26
1// Author: 卡思Cas智能体
2// Date: 20261005-152741
3// Function: (purpose 原文未由 SGP.23 该 TC 提供,corpus vacuum 登记)TC_eUICC_ES10c.DisableProfile_ErrorCases_Case3,Test Sequence #01 unknown ISD-P AID; #02 unknown ICCID; #03 disable when Disabled (ISD-P AID); #04 disable when Disabled (ICCID); #05 PPR1 set (ISD-P AID); #06 PPR1 set (ICCID); #07 catBusy refreshFlag not set; #08 catBusy refreshFlag set,适用性 M。
4// Test points: S1-C1 SW;S2-C1 SW;S2-C2 contains PROFILE_INFO1
5// S2-C3 contains iccid 989209012143658709F5;S3-C1 SW;S4-C1 SW;S4-C2 contains PROFILE_INFO1
6// S4-C3 contains iccid 989209012143658709F5;S5-C1 SW;S6-C1 SW
7// S6-C2 contains PROFILE_INFO1_DISABLED;S6-C3 contains iccid 989209012143658709F5;S7-C1 SW
8// S8-C1 SW;S8-C2 contains PROFILE_INFO1_DISABLED;S8-C3 contains iccid 989209012143658709F5
9// S9-C1 SW;S10-C1 SW;S10-C2 contains PROFILE_INFO4_ENABLED
10// S10-C3 contains entries1 iccid 989209015476981032F9;S11-C1 SW;S12-C1 SW
11// S12-C2 contains PROFILE_INFO4_ENABLED;S12-C3 contains entries1 iccid 989209015476981032F9
12// S13-C1 SW;S14-C1 proactive command envelope;S15-C1 SW;S16-C1 SW;S16-C2 contains PROFILE_INFO1
13// S16-C3 contains iccid 989209012143658709F5;S17-C1 SW;S18-C1 proactive command envelope
14// S19-C1 SW;S20-C1 SW;S20-C2 contains PROFILE_INFO1;S20-C3 contains iccid 989209012143658709F5
15// 本函数由 CaseIR 4.2.22.2.2 编译生成(fullwave-blindgen-live-70-W1-A3,SGP.23 v1.16 × SGP.22 v2.7):字节权威=CaseIR,非誊录黄金脚本。
16// Value-free template: every data byte is injected from CaseIR fields; no scaffold globals (see docs/speconly/compile-symbol-migration.md).
17// 适用性 M:编译期门,运行时由 harness 环境前置承担。
18// PRECONDITION (declared, NOT compiled): initial_conditions 缺语料过程体(Annex C.2 absent from input package, corpus vacuum): IC 序列属测试工具/卡态编排责任,本脚本不虚构初始化步骤;语义影响见 CaseIR open_items。
19// GIC1 The PROFILE_OPERATIONAL1 has been installed on the eUICC.(Seq#5/#6 以 'PROFILE_OPERATIONAL1 is not loaded' 覆盖本条): declared unexpanded (no fabricated bytes; provenance = expansion_source).
20// Seq01-IC PROFILE_OPERATIONAL1 is Enabled; corresponds to <ISD_P_AID1>; the Operational Profile identified by <ISD_P_AIDX> is not loaded. IC1=PROC_EUICC_INITIALIZATION_SEQUENCE; IC2=PROC_OPEN_LOGICAL_CHANNEL_AND_SELECT_ISDR.: declared unexpanded (no fabricated bytes; provenance = expansion_source).
21// Seq02-IC PROFILE_OPERATIONAL1 is Enabled; the Operational Profile identified by ICCID #ICCID_OP_PROFX is not loaded. IC1/IC2 同上。: declared unexpanded (no fabricated bytes; provenance = expansion_source).
22// Seq03/04-IC PROFILE_OPERATIONAL1 is Disabled on the eUICC(Seq03 另记 corresponds to <ISD_P_AID1>)。IC1/IC2 同上。: declared unexpanded (no fabricated bytes; provenance = expansion_source).
23// Seq05/06-IC PROFILE_OPERATIONAL1 is not loaded(覆盖 GIC);PROFILE_OPERATIONAL4 installed and Enabled(Seq05 另记 corresponds to <ISD_P_AID4>)。: declared unexpanded (no fabricated bytes; provenance = expansion_source).
24// Seq07/08-IC PROFILE_OPERATIONAL1 is Enabled(Seq07 另记 corresponds to <ISD_P_AID1>);IC3: S_Device → eUICC MTD_SEND_SMS_PP([GET_MNO_SD]) → SW=0x91XX(开启 proactive session);IC4: Do not send FETCH command。: declared unexpanded (no fabricated bytes; provenance = expansion_source).
25// PREFLIGHT_CONTEXT AUTHORIZED_DISCOVERY: declared unexpanded (no fabricated bytes; provenance = expansion_source).
26function TC_eUICC_ES10c_DisableProfile_ErrorCases_Case3_01_02_03_04_05_06_07_08_merged() {
27 var bind = curBind;
28 var profileAidSession = BindEs10xProcProfileDynamic.beginSession(bind, "TC_eUICC_ES10c_DisableProfile_ErrorCases_Case3_01_02_03_04_05_06_07_08_merged");
29 // runtime-bound payload: ISD_P_AID1 stays in execution domain; context_lineage: {"context_id": "2c00e242580c15b1", "authority_reference": "E_tc_4222/38-38/G_annexB_dynamic:L51"}
30 var cardCtxLoad1 = BindCardContext.load(bind, profileAidSession, "ISD_P_AID1", {"tag":"4F","bytes":16,"range":{"minHex":"A0000005591010FFFFFFFF8900001000","maxHex":"A0000005591010FFFFFFFF8900FFFF00","lastByte":"00"}}, {token: CARD_CONTEXT_TOKEN, domainId: CARD_CONTEXT_DOMAIN});
31 // runtime-bound payload: ISD_P_AID4 stays in execution domain; context_lineage: {"context_id": "2c00e242580c15b1", "authority_reference": "E_tc_4222/1-1/G_annexB_dynamic:L52"}
32 var cardCtxLoad2 = BindCardContext.load(bind, profileAidSession, "ISD_P_AID4", {"tag":"4F","bytes":16,"range":{"minHex":"A0000005591010FFFFFFFF8900001000","maxHex":"A0000005591010FFFFFFFF8900FFFF00","lastByte":"00"}}, {token: CARD_CONTEXT_TOKEN, domainId: CARD_CONTEXT_DOMAIN});
33 // runtime-bound payload: ISD_P_AIDX stays in execution domain; context_lineage: {"context_id": "2c00e242580c15b1", "authority_reference": "E_tc_4222/1-1/G_annexB_dynamic:L55"}
34 var cardCtxLoad3 = BindCardContext.load(bind, profileAidSession, "ISD_P_AIDX", {"tag":"4F","bytes":16,"range":{"minHex":"A0000005591010FFFFFFFF8900001000","maxHex":"A0000005591010FFFFFFFF8900FFFF00","lastByte":"00"}}, {token: CARD_CONTEXT_TOKEN, domainId: CARD_CONTEXT_DOMAIN});
35
36 // 步骤 1:MTD_STORE_DATA(tc_step)
37 // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
38 var s1 = bind.sendApdu("81", "E2", "91", "00", "BF2D035C014F", "00", "9000");
39
40 // 步骤 2:Seq#01 Step1] MTD_STORE_DATA_Case3(tc_step;REQ: RQ32_031, RQ32_033, RQ57_142_2, RQ57_142_3, RQ57_142_4, RQ57_142_15, RQ57_151, RQ57_152)
41 // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
42 // runtime-bound payload: ISD_P_AIDX stays in execution domain
43 var s2 = bind.sendApdu(null, "E2", "90", "00", BindEs10xProcProfileDynamic.bindProfileAidTemplate(bind, "ISD_P_AIDX", "BF32154F10", "0101FF", profileAidSession), null, "6A82");
44 bind.checkData("S1-C1 SW", "6A82", s2.sw);
45 BindEs10xProcProfileDynamic.assertBoundPayload(bind, "ISD_P_AIDX", s2.cmd, profileAidSession);
46 // S1-C2: kind 'requirement' pattern '' has no static generation face (corpus vacuum; see CaseIR unresolved).
47 // S1-C2: binding:requirement_satisfied_by_same_step_error_sw_assertion (check_attestation)
48
49 // 步骤 3:Seq#01 Step2] MTD_STORE_DATA(tc_step;REQ: RQ32_031, RQ32_033, RQ57_142_2, RQ57_142_3, RQ57_142_4, RQ57_142_15, RQ57_151, RQ57_152)
50 // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
51 // runtime-bound payload: ISD_P_AID1 stays in execution domain
52 var s3 = bind.sendApdu(null, "E2", "91", "00", BindEs10xProcProfileDynamic.bindProfileAidTemplate(bind, "ISD_P_AID1", "BF2D14A0124F10", "", profileAidSession), "00", "9000");
53 bind.checkData("S2-C1 SW", "9000", s3.sw);
54 BindEs10xProcProfileDynamic.assertBoundPayload(bind, "ISD_P_AID1", s3.cmd, profileAidSession);
55 var r2p3 = BindEs10xProcProfile.walkChoiceList(s3.resp, {respTag: "BF2D", okTag: "A0", errTag: "81"});
56 var r2has3_0 = false;
57 for (var r2i3_0 = 0; r2i3_0 < r2p3.elements.length; r2i3_0++) {
58 var f = r2p3.elements[r2i3_0].fields;
59 if (f["5A"] === "989209012143658709F5" && f["9F70"] === "01") { r2has3_0 = true; break; }
60 }
61 bind.checkData("S2-C2 contains PROFILE_INFO1", "1", (r2p3.branch_tag === "A0" && r2has3_0) ? "1" : "0");
62 var r2has3_0 = false;
63 for (var r2i3_0 = 0; r2i3_0 < r2p3.elements.length; r2i3_0++) {
64 var f = r2p3.elements[r2i3_0].fields;
65 if (f["5A"] === "989209012143658709F5" && f["9F70"] === "01") { r2has3_0 = true; break; }
66 }
67 bind.checkData("S2-C3 contains iccid 989209012143658709F5", "1", (r2p3.branch_tag === "A0" && r2has3_0) ? "1" : "0");
68
69 // 步骤 4:Seq#02 Step1] MTD_STORE_DATA_Case3(tc_step;REQ: RQ32_031, RQ32_033, RQ57_142_2, RQ57_142_3, RQ57_142_4, RQ57_142_15, RQ57_151, RQ57_152)
70 // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
71 var s4 = bind.sendApdu(null, "E2", "90", "00", "BF320F5A0A9892090143658709FFFF0101FF", null, "6A82");
72 bind.checkData("S3-C1 SW", "6A82", s4.sw);
73 // S3-C2: kind 'requirement' pattern '' has no static generation face (corpus vacuum; see CaseIR unresolved).
74 // S3-C2: binding:requirement_satisfied_by_same_step_error_sw_assertion (check_attestation)
75
76 // 步骤 5:Seq#02 Step2] MTD_STORE_DATA(tc_step;REQ: RQ32_031, RQ32_033, RQ57_142_2, RQ57_142_3, RQ57_142_4, RQ57_142_15, RQ57_151, RQ57_152)
77 // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
78 var s5 = bind.sendApdu(null, "E2", "91", "00", "BF2D0EA00C5A0A989209012143658709F5", "00", "9000");
79 bind.checkData("S4-C1 SW", "9000", s5.sw);
80 var r2p5 = BindEs10xProcProfile.walkChoiceList(s5.resp, {respTag: "BF2D", okTag: "A0", errTag: "81"});
81 var r2has5_0 = false;
82 for (var r2i5_0 = 0; r2i5_0 < r2p5.elements.length; r2i5_0++) {
83 var f = r2p5.elements[r2i5_0].fields;
84 if (f["5A"] === "989209012143658709F5" && f["9F70"] === "01") { r2has5_0 = true; break; }
85 }
86 bind.checkData("S4-C2 contains PROFILE_INFO1", "1", (r2p5.branch_tag === "A0" && r2has5_0) ? "1" : "0");
87 var r2has5_0 = false;
88 for (var r2i5_0 = 0; r2i5_0 < r2p5.elements.length; r2i5_0++) {
89 var f = r2p5.elements[r2i5_0].fields;
90 if (f["5A"] === "989209012143658709F5" && f["9F70"] === "01") { r2has5_0 = true; break; }
91 }
92 bind.checkData("S4-C3 contains iccid 989209012143658709F5", "1", (r2p5.branch_tag === "A0" && r2has5_0) ? "1" : "0");
93
94 // 步骤 6:Seq#03 Step1] MTD_STORE_DATA_Case3(tc_step;REQ: RQ32_031, RQ32_032, RQ57_142_2, RQ57_142_4, RQ57_142_15, RQ57_151, RQ57_153)
95 // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
96 // runtime-bound payload: ISD_P_AID1 stays in execution domain
97 var s6 = bind.sendApdu(null, "E2", "90", "00", BindEs10xProcProfileDynamic.bindProfileAidTemplate(bind, "ISD_P_AID1", "BF32154F10", "0101FF", profileAidSession), null, "6985");
98 bind.checkData("S5-C1 SW", "6985", s6.sw);
99 BindEs10xProcProfileDynamic.assertBoundPayload(bind, "ISD_P_AID1", s6.cmd, profileAidSession);
100 // S5-C2: kind 'requirement' pattern '' has no static generation face (corpus vacuum; see CaseIR unresolved).
101 // S5-C2: binding:requirement_satisfied_by_same_step_error_sw_assertion (check_attestation)
102
103 // 步骤 7:Seq#03 Step2] MTD_STORE_DATA(tc_step;REQ: RQ32_031, RQ32_032, RQ57_142_2, RQ57_142_4, RQ57_142_15, RQ57_151, RQ57_153)
104 // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
105 // runtime-bound payload: ISD_P_AID1 stays in execution domain
106 var s7 = bind.sendApdu(null, "E2", "91", "00", BindEs10xProcProfileDynamic.bindProfileAidTemplate(bind, "ISD_P_AID1", "BF2D14A0124F10", "", profileAidSession), "00", "9000");
107 bind.checkData("S6-C1 SW", "9000", s7.sw);
108 BindEs10xProcProfileDynamic.assertBoundPayload(bind, "ISD_P_AID1", s7.cmd, profileAidSession);
109 var r2p7 = BindEs10xProcProfile.walkChoiceList(s7.resp, {respTag: "BF2D", okTag: "A0", errTag: "81"});
110 var r2has7_0 = false;
111 for (var r2i7_0 = 0; r2i7_0 < r2p7.elements.length; r2i7_0++) {
112 var f = r2p7.elements[r2i7_0].fields;
113 if (f["5A"] === "989209012143658709F5" && f["9F70"] === "00") { r2has7_0 = true; break; }
114 }
115 bind.checkData("S6-C2 contains PROFILE_INFO1_DISABLED", "1", (r2p7.branch_tag === "A0" && r2has7_0) ? "1" : "0");
116 var r2has7_0 = false;
117 for (var r2i7_0 = 0; r2i7_0 < r2p7.elements.length; r2i7_0++) {
118 var f = r2p7.elements[r2i7_0].fields;
119 if (f["5A"] === "989209012143658709F5" && f["9F70"] === "00") { r2has7_0 = true; break; }
120 }
121 bind.checkData("S6-C3 contains iccid 989209012143658709F5", "1", (r2p7.branch_tag === "A0" && r2has7_0) ? "1" : "0");
122
123 // 步骤 8:Seq#04 Step1] MTD_STORE_DATA_Case3(tc_step;REQ: RQ32_031, RQ32_032, RQ57_142_2, RQ57_142_4, RQ57_142_15, RQ57_151, RQ57_153)
124 // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
125 var s8 = bind.sendApdu(null, "E2", "90", "00", "BF320F5A0A989209012143658709F50101FF", null, "6985");
126 bind.checkData("S7-C1 SW", "6985", s8.sw);
127 // S7-C2: kind 'requirement' pattern '' has no static generation face (corpus vacuum; see CaseIR unresolved).
128 // S7-C2: binding:requirement_satisfied_by_same_step_error_sw_assertion (check_attestation)
129
130 // 步骤 9:Seq#04 Step2] MTD_STORE_DATA(tc_step;REQ: RQ32_031, RQ32_032, RQ57_142_2, RQ57_142_4, RQ57_142_15, RQ57_151, RQ57_153)
131 // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
132 var s9 = bind.sendApdu(null, "E2", "91", "00", "BF2D0EA00C5A0A989209012143658709F5", "00", "9000");
133 bind.checkData("S8-C1 SW", "9000", s9.sw);
134 var r2p9 = BindEs10xProcProfile.walkChoiceList(s9.resp, {respTag: "BF2D", okTag: "A0", errTag: "81"});
135 var r2has9_0 = false;
136 for (var r2i9_0 = 0; r2i9_0 < r2p9.elements.length; r2i9_0++) {
137 var f = r2p9.elements[r2i9_0].fields;
138 if (f["5A"] === "989209012143658709F5" && f["9F70"] === "00") { r2has9_0 = true; break; }
139 }
140 bind.checkData("S8-C2 contains PROFILE_INFO1_DISABLED", "1", (r2p9.branch_tag === "A0" && r2has9_0) ? "1" : "0");
141 var r2has9_0 = false;
142 for (var r2i9_0 = 0; r2i9_0 < r2p9.elements.length; r2i9_0++) {
143 var f = r2p9.elements[r2i9_0].fields;
144 if (f["5A"] === "989209012143658709F5" && f["9F70"] === "00") { r2has9_0 = true; break; }
145 }
146 bind.checkData("S8-C3 contains iccid 989209012143658709F5", "1", (r2p9.branch_tag === "A0" && r2has9_0) ? "1" : "0");
147
148 // 步骤 10:Seq#05 Step1] MTD_STORE_DATA_Case3(tc_step;REQ: RQ32_031, RQ32_032, RQ32_033, RQ32_034, RQ57_142_2, RQ57_142_3, RQ57_142_4, RQ57_142_15, RQ57_151, RQ57_153)
149 // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
150 // runtime-bound payload: ISD_P_AID4 stays in execution domain
151 var s10 = bind.sendApdu(null, "E2", "90", "00", BindEs10xProcProfileDynamic.bindProfileAidTemplate(bind, "ISD_P_AID4", "BF32154F10", "0101FF", profileAidSession), null, "6985");
152 bind.checkData("S9-C1 SW", "6985", s10.sw);
153 BindEs10xProcProfileDynamic.assertBoundPayload(bind, "ISD_P_AID4", s10.cmd, profileAidSession);
154 // S9-C2: kind 'requirement' pattern '' has no static generation face (corpus vacuum; see CaseIR unresolved).
155 // S9-C2: binding:requirement_satisfied_by_same_step_error_sw_assertion (check_attestation)
156
157 // 步骤 11:Seq#05 Step2] MTD_STORE_DATA(tc_step;REQ: RQ32_031, RQ32_032, RQ32_033, RQ32_034, RQ57_142_2, RQ57_142_3, RQ57_142_4, RQ57_142_15, RQ57_151, RQ57_153)
158 // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
159 // runtime-bound payload: ISD_P_AID4 stays in execution domain
160 var s11 = bind.sendApdu(null, "E2", "91", "00", BindEs10xProcProfileDynamic.bindProfileAidTemplate(bind, "ISD_P_AID4", "BF2D14A0124F10", "", profileAidSession), "00", "9000");
161 bind.checkData("S10-C1 SW", "9000", s11.sw);
162 BindEs10xProcProfileDynamic.assertBoundPayload(bind, "ISD_P_AID4", s11.cmd, profileAidSession);
163 var r2p11 = BindEs10xProcProfile.walkChoiceList(s11.resp, {respTag: "BF2D", okTag: "A0", errTag: "81"});
164 var r2has11_0 = false;
165 for (var r2i11_0 = 0; r2i11_0 < r2p11.elements.length; r2i11_0++) {
166 var f = r2p11.elements[r2i11_0].fields;
167 if (f["5A"] === "989209015476981032F9" && f["9F70"] === "01") { r2has11_0 = true; break; }
168 }
169 bind.checkData("S10-C2 contains PROFILE_INFO4_ENABLED", "1", (r2p11.branch_tag === "A0" && r2has11_0) ? "1" : "0");
170 var r2has11_0 = false;
171 for (var r2i11_0 = 0; r2i11_0 < r2p11.elements.length; r2i11_0++) {
172 var f = r2p11.elements[r2i11_0].fields;
173 if (f["5A"] === "989209015476981032F9" && f["9F70"] === "01") { r2has11_0 = true; break; }
174 }
175 bind.checkData("S10-C3 contains entries1 iccid 989209015476981032F9", "1", (r2p11.branch_tag === "A0" && r2has11_0) ? "1" : "0");
176
177 // 步骤 12:Seq#06 Step1] MTD_STORE_DATA_Case3(tc_step;REQ: RQ32_031, RQ32_032, RQ32_033, RQ32_034, RQ57_142_2, RQ57_142_3, RQ57_142_4, RQ57_142_15, RQ57_151, RQ57_153)
178 // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
179 var s12 = bind.sendApdu(null, "E2", "90", "00", "BF320F5A0A989209015476981032F90101FF", null, "6985");
180 bind.checkData("S11-C1 SW", "6985", s12.sw);
181 // S11-C2: kind 'requirement' pattern '' has no static generation face (corpus vacuum; see CaseIR unresolved).
182 // S11-C2: binding:requirement_satisfied_by_same_step_error_sw_assertion (check_attestation)
183
184 // 步骤 13:Seq#06 Step2] MTD_STORE_DATA(tc_step;REQ: RQ32_031, RQ32_032, RQ32_033, RQ32_034, RQ57_142_2, RQ57_142_3, RQ57_142_4, RQ57_142_15, RQ57_151, RQ57_153)
185 // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
186 var s13 = bind.sendApdu(null, "E2", "91", "00", "BF2D0EA00C5A0A989209015476981032F9", "00", "9000");
187 bind.checkData("S12-C1 SW", "9000", s13.sw);
188 var r2p13 = BindEs10xProcProfile.walkChoiceList(s13.resp, {respTag: "BF2D", okTag: "A0", errTag: "81"});
189 var r2has13_0 = false;
190 for (var r2i13_0 = 0; r2i13_0 < r2p13.elements.length; r2i13_0++) {
191 var f = r2p13.elements[r2i13_0].fields;
192 if (f["5A"] === "989209015476981032F9" && f["9F70"] === "01") { r2has13_0 = true; break; }
193 }
194 bind.checkData("S12-C2 contains PROFILE_INFO4_ENABLED", "1", (r2p13.branch_tag === "A0" && r2has13_0) ? "1" : "0");
195 var r2has13_0 = false;
196 for (var r2i13_0 = 0; r2i13_0 < r2p13.elements.length; r2i13_0++) {
197 var f = r2p13.elements[r2i13_0].fields;
198 if (f["5A"] === "989209015476981032F9" && f["9F70"] === "01") { r2has13_0 = true; break; }
199 }
200 bind.checkData("S12-C3 contains entries1 iccid 989209015476981032F9", "1", (r2p13.branch_tag === "A0" && r2has13_0) ? "1" : "0");
201
202 // 步骤 14:Seq#07 Step1] MTD_STORE_DATA_Case3(tc_step;REQ: RQ57_142, RQ57_153_1)
203 // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
204 // runtime-bound payload: ISD_P_AID1 stays in execution domain
205 var s14 = bind.sendApdu(null, "E2", "90", "00", BindEs10xProcProfileDynamic.bindProfileAidTemplate(bind, "ISD_P_AID1", "BF32154F10", "010100", profileAidSession), null, "9300");
206 bind.checkData("S13-C1 SW", "9300", s14.sw);
207 BindEs10xProcProfileDynamic.assertBoundPayload(bind, "ISD_P_AID1", s14.cmd, profileAidSession);
208 // S13-C2: kind 'requirement' pattern '' has no static generation face (corpus vacuum; see CaseIR unresolved).
209 // S13-C2: binding:requirement_satisfied_by_same_step_error_sw_assertion (check_attestation)
210
211 // 步骤 15:Seq#07 Step2] FETCH 'XX'(tc_step)
212 // FETCH header literals follow the golden wire evidence 8012 (same
213 // anchor as runToSteadyState; J Annex D.4 has no FETCH row, D 2.2.2
214 // gives mechanism only). Le = pending length from the last 91XX
215 // (chain rule, binding-internal state).
216 var s15 = bind.fetchPending("80", "12", "00", "00", null);
217 bind.checkData("S14-C1 proactive command envelope", "1", (s15.resp.length >= 4 && s15.resp.substring(0, 2) === "D0") ? "1" : "0");
218 // S14-C1: REFRESH type/mode bytes are not corpus-fixed (envelope face only; per-mode bytes absent from input).
219
220 // 步骤 16:Seq#07 Step3] TERMINAL RESPONSE(tc_step)
221 // TERMINAL RESPONSE data is dynamically built by the binding from the
222 // last FETCHed proactive command (D 2.2.2; buildTrData) - never static.
223 // Header literals follow the golden wire evidence 8014.
224 var s16 = bind.terminalResponseForPending("80", "14", "00", "00", "9000");
225 bind.checkData("S15-C1 SW", "9000", s16.sw);
226
227 // 步骤 17:Seq#07 Step4] MTD_STORE_DATA(tc_step)
228 // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
229 // runtime-bound payload: ISD_P_AID1 stays in execution domain
230 var s17 = bind.sendApdu(null, "E2", "91", "00", BindEs10xProcProfileDynamic.bindProfileAidTemplate(bind, "ISD_P_AID1", "BF2D14A0124F10", "", profileAidSession), "00", "9000");
231 bind.checkData("S16-C1 SW", "9000", s17.sw);
232 BindEs10xProcProfileDynamic.assertBoundPayload(bind, "ISD_P_AID1", s17.cmd, profileAidSession);
233 var r2p17 = BindEs10xProcProfile.walkChoiceList(s17.resp, {respTag: "BF2D", okTag: "A0", errTag: "81"});
234 var r2has17_0 = false;
235 for (var r2i17_0 = 0; r2i17_0 < r2p17.elements.length; r2i17_0++) {
236 var f = r2p17.elements[r2i17_0].fields;
237 if (f["5A"] === "989209012143658709F5" && f["9F70"] === "01") { r2has17_0 = true; break; }
238 }
239 bind.checkData("S16-C2 contains PROFILE_INFO1", "1", (r2p17.branch_tag === "A0" && r2has17_0) ? "1" : "0");
240 var r2has17_0 = false;
241 for (var r2i17_0 = 0; r2i17_0 < r2p17.elements.length; r2i17_0++) {
242 var f = r2p17.elements[r2i17_0].fields;
243 if (f["5A"] === "989209012143658709F5" && f["9F70"] === "01") { r2has17_0 = true; break; }
244 }
245 bind.checkData("S16-C3 contains iccid 989209012143658709F5", "1", (r2p17.branch_tag === "A0" && r2has17_0) ? "1" : "0");
246
247 // 步骤 18:Seq#08 Step1] MTD_STORE_DATA_Case3(tc_step;REQ: RQ57_142_10, RQ57_153_1)
248 // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
249 var s18 = bind.sendApdu(null, "E2", "90", "00", "BF320F5A0A989209012143658709F50101FF", null, "9300");
250 bind.checkData("S17-C1 SW", "9300", s18.sw);
251 // S17-C2: kind 'requirement' pattern '' has no static generation face (corpus vacuum; see CaseIR unresolved).
252 // S17-C2: binding:requirement_satisfied_by_same_step_error_sw_assertion (check_attestation)
253
254 // 步骤 19:Seq#08 Step2] FETCH 'XX'(tc_step)
255 // FETCH header literals follow the golden wire evidence 8012 (same
256 // anchor as runToSteadyState; J Annex D.4 has no FETCH row, D 2.2.2
257 // gives mechanism only). Le = pending length from the last 91XX
258 // (chain rule, binding-internal state).
259 var s19 = bind.fetchPending("80", "12", "00", "00", null);
260 bind.checkData("S18-C1 proactive command envelope", "1", (s19.resp.length >= 4 && s19.resp.substring(0, 2) === "D0") ? "1" : "0");
261 // S18-C1: REFRESH type/mode bytes are not corpus-fixed (envelope face only; per-mode bytes absent from input).
262
263 // 步骤 20:Seq#08 Step3] TERMINAL RESPONSE(tc_step)
264 // TERMINAL RESPONSE data is dynamically built by the binding from the
265 // last FETCHed proactive command (D 2.2.2; buildTrData) - never static.
266 // Header literals follow the golden wire evidence 8014.
267 var s20 = bind.terminalResponseForPending("80", "14", "00", "00", "9000");
268 bind.checkData("S19-C1 SW", "9000", s20.sw);
269
270 // 步骤 21:Seq#08 Step4] MTD_STORE_DATA(tc_step)
271 // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
272 var s21 = bind.sendApdu(null, "E2", "91", "00", "BF2D0EA00C5A0A989209012143658709F5", "00", "9000");
273 bind.checkData("S20-C1 SW", "9000", s21.sw);
274 var r2p21 = BindEs10xProcProfile.walkChoiceList(s21.resp, {respTag: "BF2D", okTag: "A0", errTag: "81"});
275 var r2has21_0 = false;
276 for (var r2i21_0 = 0; r2i21_0 < r2p21.elements.length; r2i21_0++) {
277 var f = r2p21.elements[r2i21_0].fields;
278 if (f["5A"] === "989209012143658709F5" && f["9F70"] === "01") { r2has21_0 = true; break; }
279 }
280 bind.checkData("S20-C2 contains PROFILE_INFO1", "1", (r2p21.branch_tag === "A0" && r2has21_0) ? "1" : "0");
281 var r2has21_0 = false;
282 for (var r2i21_0 = 0; r2i21_0 < r2p21.elements.length; r2i21_0++) {
283 var f = r2p21.elements[r2i21_0].fields;
284 if (f["5A"] === "989209012143658709F5" && f["9F70"] === "01") { r2has21_0 = true; break; }
285 }
286 bind.checkData("S20-C3 contains iccid 989209012143658709F5", "1", (r2p21.branch_tag === "A0" && r2has21_0) ? "1" : "0");
287}
288
完整 unified diff
行级差异:新增 286 行 / 删除 61 行(以 -man 为基准,unified 上下文 3 行)。
展开 diff(352 行)
--- -man
+++ -cas
@@ -1,63 +1,288 @@
-// slice of Import\TestCase_SGP_23.js - cases: TC_eUICC_ES10c_DisableProfile_ErrorCases_Case3_01_Error_Disable_Profile_by_an_unknown_ISD_P_AID (extracted verbatim)
-
-function TC_eUICC_ES10c_DisableProfile_ErrorCases_Case3_01_Error_Disable_Profile_by_an_unknown_ISD_P_AID()
-{
- if(!Card_Have_ECC_Cert)
- return;
-
- TestOfMEPMode = 0;
-
- initial_condition_PROFILE_OPERATIONAL1_is_Enabled();
- var ISD_P_Test01 = curProfile_ISD_P_AID;
-
-
- tracenamestr = "测试目的:通过未知的ISD-P AID去失效profile";
- curDis.TraceStart(sno++,tracenamestr);
-
- curLogicChannel = 0;
- curDis.TestStepStart2(stno++,"eUICC卡片初始化;");
- Ini_powerOn_eUICC_LPAe_not_activate();
-
- curDis.TestStepStart2(stno++,"读卡器向卡片发送MANAGE_CHANNEL命令,打开辅助逻辑通道;");
- TS_MANAGE_CHANNEL_OPEN();
-
- curLogicChannel = 1;
-
- curDis.TestStepStart2(stno++,"读卡器向卡片发送SELECT命令,选择ISD-R;");
- TS_SELECT("Select ISD",ISD_R_AID,"9000");
-
-
- curDis.TestStepStart2(stno++,"读卡器向卡片发送 StoreData命令,执行DisableProfileRequest,refreshFlag为 TRUE;");
-
- var disableProRequest = new DisableProfileRequest();
- disableProRequest.profileIdentifier = new ChoiceObj(tagOfProfileIdentifier.isdpAid,ISD_P_AIDX);
- disableProRequest.refreshFlag = BooleanValue_BerCode_True;
- disableProRequest.GenHexData();
- var respData = LPAd_Transport_data_to_eUICC(disableProRequest.hexData,"90","00","6A82");
- curStrHandle.CheckData("", respData, "DisableProfileResponse");
-
-
- curDis.TestStepStart2(stno++,"读卡器向卡片发送 StoreData命令,执行ProfileInfoListRequest,获取profile状态;");
- var proInfoListRequest = new ProfileInfoListRequest();
- proInfoListRequest.searchCriteria = new ChoiceObj(tagOfsearchCriteria_ProfileInfo.isdpAid,ISD_P_Test01);
- proInfoListRequest.tagList = "5A4F9F70";
- proInfoListRequest.GenHexData();
- var respData = LPAd_Transport_data_to_eUICC(proInfoListRequest.hexData);
-
-
- var proInfoListResponse = new ProfileInfoListResponse();
- proInfoListResponse.checkCardResDataFormat(respData);
-
- try
- {
- curStrHandle.CheckData(ICCID_OP_PROF1, proInfoListResponse.profileInfoListOk.arrOfElement[0].iccid, "ICCID");
- curStrHandle.CheckData(ISD_P_Test01, proInfoListResponse.profileInfoListOk.arrOfElement[0].isdpAid, "ISD-P AID");
- curStrHandle.CheckData(Profile_ENABLED, proInfoListResponse.profileInfoListOk.arrOfElement[0].profileState, "profile State");
- }catch(e){
- obj.SubLevel(ProfileInfoListResponse_Data_Error, level_of_SubLevel.error);
- }
-
- RecoverCard();
-
+// Author: 卡思Cas智能体
+// Date: 20261005-152741
+// Function: (purpose 原文未由 SGP.23 该 TC 提供,corpus vacuum 登记)TC_eUICC_ES10c.DisableProfile_ErrorCases_Case3,Test Sequence #01 unknown ISD-P AID; #02 unknown ICCID; #03 disable when Disabled (ISD-P AID); #04 disable when Disabled (ICCID); #05 PPR1 set (ISD-P AID); #06 PPR1 set (ICCID); #07 catBusy refreshFlag not set; #08 catBusy refreshFlag set,适用性 M。
+// Test points: S1-C1 SW;S2-C1 SW;S2-C2 contains PROFILE_INFO1
+// S2-C3 contains iccid 989209012143658709F5;S3-C1 SW;S4-C1 SW;S4-C2 contains PROFILE_INFO1
+// S4-C3 contains iccid 989209012143658709F5;S5-C1 SW;S6-C1 SW
+// S6-C2 contains PROFILE_INFO1_DISABLED;S6-C3 contains iccid 989209012143658709F5;S7-C1 SW
+// S8-C1 SW;S8-C2 contains PROFILE_INFO1_DISABLED;S8-C3 contains iccid 989209012143658709F5
+// S9-C1 SW;S10-C1 SW;S10-C2 contains PROFILE_INFO4_ENABLED
+// S10-C3 contains entries1 iccid 989209015476981032F9;S11-C1 SW;S12-C1 SW
+// S12-C2 contains PROFILE_INFO4_ENABLED;S12-C3 contains entries1 iccid 989209015476981032F9
+// S13-C1 SW;S14-C1 proactive command envelope;S15-C1 SW;S16-C1 SW;S16-C2 contains PROFILE_INFO1
+// S16-C3 contains iccid 989209012143658709F5;S17-C1 SW;S18-C1 proactive command envelope
+// S19-C1 SW;S20-C1 SW;S20-C2 contains PROFILE_INFO1;S20-C3 contains iccid 989209012143658709F5
+// 本函数由 CaseIR 4.2.22.2.2 编译生成(fullwave-blindgen-live-70-W1-A3,SGP.23 v1.16 × SGP.22 v2.7):字节权威=CaseIR,非誊录黄金脚本。
+// Value-free template: every data byte is injected from CaseIR fields; no scaffold globals (see docs/speconly/compile-symbol-migration.md).
+// 适用性 M:编译期门,运行时由 harness 环境前置承担。
+// PRECONDITION (declared, NOT compiled): initial_conditions 缺语料过程体(Annex C.2 absent from input package, corpus vacuum): IC 序列属测试工具/卡态编排责任,本脚本不虚构初始化步骤;语义影响见 CaseIR open_items。
+// GIC1 The PROFILE_OPERATIONAL1 has been installed on the eUICC.(Seq#5/#6 以 'PROFILE_OPERATIONAL1 is not loaded' 覆盖本条): declared unexpanded (no fabricated bytes; provenance = expansion_source).
+// Seq01-IC PROFILE_OPERATIONAL1 is Enabled; corresponds to <ISD_P_AID1>; the Operational Profile identified by <ISD_P_AIDX> is not loaded. IC1=PROC_EUICC_INITIALIZATION_SEQUENCE; IC2=PROC_OPEN_LOGICAL_CHANNEL_AND_SELECT_ISDR.: declared unexpanded (no fabricated bytes; provenance = expansion_source).
+// Seq02-IC PROFILE_OPERATIONAL1 is Enabled; the Operational Profile identified by ICCID #ICCID_OP_PROFX is not loaded. IC1/IC2 同上。: declared unexpanded (no fabricated bytes; provenance = expansion_source).
+// Seq03/04-IC PROFILE_OPERATIONAL1 is Disabled on the eUICC(Seq03 另记 corresponds to <ISD_P_AID1>)。IC1/IC2 同上。: declared unexpanded (no fabricated bytes; provenance = expansion_source).
+// Seq05/06-IC PROFILE_OPERATIONAL1 is not loaded(覆盖 GIC);PROFILE_OPERATIONAL4 installed and Enabled(Seq05 另记 corresponds to <ISD_P_AID4>)。: declared unexpanded (no fabricated bytes; provenance = expansion_source).
+// Seq07/08-IC PROFILE_OPERATIONAL1 is Enabled(Seq07 另记 corresponds to <ISD_P_AID1>);IC3: S_Device → eUICC MTD_SEND_SMS_PP([GET_MNO_SD]) → SW=0x91XX(开启 proactive session);IC4: Do not send FETCH command。: declared unexpanded (no fabricated bytes; provenance = expansion_source).
+// PREFLIGHT_CONTEXT AUTHORIZED_DISCOVERY: declared unexpanded (no fabricated bytes; provenance = expansion_source).
+function TC_eUICC_ES10c_DisableProfile_ErrorCases_Case3_01_02_03_04_05_06_07_08_merged() {
+ var bind = curBind;
+ var profileAidSession = BindEs10xProcProfileDynamic.beginSession(bind, "TC_eUICC_ES10c_DisableProfile_ErrorCases_Case3_01_02_03_04_05_06_07_08_merged");
+ // runtime-bound payload: ISD_P_AID1 stays in execution domain; context_lineage: {"context_id": "2c00e242580c15b1", "authority_reference": "E_tc_4222/38-38/G_annexB_dynamic:L51"}
+ var cardCtxLoad1 = BindCardContext.load(bind, profileAidSession, "ISD_P_AID1", {"tag":"4F","bytes":16,"range":{"minHex":"A0000005591010FFFFFFFF8900001000","maxHex":"A0000005591010FFFFFFFF8900FFFF00","lastByte":"00"}}, {token: CARD_CONTEXT_TOKEN, domainId: CARD_CONTEXT_DOMAIN});
+ // runtime-bound payload: ISD_P_AID4 stays in execution domain; context_lineage: {"context_id": "2c00e242580c15b1", "authority_reference": "E_tc_4222/1-1/G_annexB_dynamic:L52"}
+ var cardCtxLoad2 = BindCardContext.load(bind, profileAidSession, "ISD_P_AID4", {"tag":"4F","bytes":16,"range":{"minHex":"A0000005591010FFFFFFFF8900001000","maxHex":"A0000005591010FFFFFFFF8900FFFF00","lastByte":"00"}}, {token: CARD_CONTEXT_TOKEN, domainId: CARD_CONTEXT_DOMAIN});
+ // runtime-bound payload: ISD_P_AIDX stays in execution domain; context_lineage: {"context_id": "2c00e242580c15b1", "authority_reference": "E_tc_4222/1-1/G_annexB_dynamic:L55"}
+ var cardCtxLoad3 = BindCardContext.load(bind, profileAidSession, "ISD_P_AIDX", {"tag":"4F","bytes":16,"range":{"minHex":"A0000005591010FFFFFFFF8900001000","maxHex":"A0000005591010FFFFFFFF8900FFFF00","lastByte":"00"}}, {token: CARD_CONTEXT_TOKEN, domainId: CARD_CONTEXT_DOMAIN});
+
+ // 步骤 1:MTD_STORE_DATA(tc_step)
+ // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
+ var s1 = bind.sendApdu("81", "E2", "91", "00", "BF2D035C014F", "00", "9000");
+
+ // 步骤 2:Seq#01 Step1] MTD_STORE_DATA_Case3(tc_step;REQ: RQ32_031, RQ32_033, RQ57_142_2, RQ57_142_3, RQ57_142_4, RQ57_142_15, RQ57_151, RQ57_152)
+ // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
+ // runtime-bound payload: ISD_P_AIDX stays in execution domain
+ var s2 = bind.sendApdu(null, "E2", "90", "00", BindEs10xProcProfileDynamic.bindProfileAidTemplate(bind, "ISD_P_AIDX", "BF32154F10", "0101FF", profileAidSession), null, "6A82");
+ bind.checkData("S1-C1 SW", "6A82", s2.sw);
+ BindEs10xProcProfileDynamic.assertBoundPayload(bind, "ISD_P_AIDX", s2.cmd, profileAidSession);
+ // S1-C2: kind 'requirement' pattern '' has no static generation face (corpus vacuum; see CaseIR unresolved).
+ // S1-C2: binding:requirement_satisfied_by_same_step_error_sw_assertion (check_attestation)
+
+ // 步骤 3:Seq#01 Step2] MTD_STORE_DATA(tc_step;REQ: RQ32_031, RQ32_033, RQ57_142_2, RQ57_142_3, RQ57_142_4, RQ57_142_15, RQ57_151, RQ57_152)
+ // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
+ // runtime-bound payload: ISD_P_AID1 stays in execution domain
+ var s3 = bind.sendApdu(null, "E2", "91", "00", BindEs10xProcProfileDynamic.bindProfileAidTemplate(bind, "ISD_P_AID1", "BF2D14A0124F10", "", profileAidSession), "00", "9000");
+ bind.checkData("S2-C1 SW", "9000", s3.sw);
+ BindEs10xProcProfileDynamic.assertBoundPayload(bind, "ISD_P_AID1", s3.cmd, profileAidSession);
+ var r2p3 = BindEs10xProcProfile.walkChoiceList(s3.resp, {respTag: "BF2D", okTag: "A0", errTag: "81"});
+ var r2has3_0 = false;
+ for (var r2i3_0 = 0; r2i3_0 < r2p3.elements.length; r2i3_0++) {
+ var f = r2p3.elements[r2i3_0].fields;
+ if (f["5A"] === "989209012143658709F5" && f["9F70"] === "01") { r2has3_0 = true; break; }
+ }
+ bind.checkData("S2-C2 contains PROFILE_INFO1", "1", (r2p3.branch_tag === "A0" && r2has3_0) ? "1" : "0");
+ var r2has3_0 = false;
+ for (var r2i3_0 = 0; r2i3_0 < r2p3.elements.length; r2i3_0++) {
+ var f = r2p3.elements[r2i3_0].fields;
+ if (f["5A"] === "989209012143658709F5" && f["9F70"] === "01") { r2has3_0 = true; break; }
+ }
+ bind.checkData("S2-C3 contains iccid 989209012143658709F5", "1", (r2p3.branch_tag === "A0" && r2has3_0) ? "1" : "0");
+
+ // 步骤 4:Seq#02 Step1] MTD_STORE_DATA_Case3(tc_step;REQ: RQ32_031, RQ32_033, RQ57_142_2, RQ57_142_3, RQ57_142_4, RQ57_142_15, RQ57_151, RQ57_152)
+ // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
+ var s4 = bind.sendApdu(null, "E2", "90", "00", "BF320F5A0A9892090143658709FFFF0101FF", null, "6A82");
+ bind.checkData("S3-C1 SW", "6A82", s4.sw);
+ // S3-C2: kind 'requirement' pattern '' has no static generation face (corpus vacuum; see CaseIR unresolved).
+ // S3-C2: binding:requirement_satisfied_by_same_step_error_sw_assertion (check_attestation)
+
+ // 步骤 5:Seq#02 Step2] MTD_STORE_DATA(tc_step;REQ: RQ32_031, RQ32_033, RQ57_142_2, RQ57_142_3, RQ57_142_4, RQ57_142_15, RQ57_151, RQ57_152)
+ // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
+ var s5 = bind.sendApdu(null, "E2", "91", "00", "BF2D0EA00C5A0A989209012143658709F5", "00", "9000");
+ bind.checkData("S4-C1 SW", "9000", s5.sw);
+ var r2p5 = BindEs10xProcProfile.walkChoiceList(s5.resp, {respTag: "BF2D", okTag: "A0", errTag: "81"});
+ var r2has5_0 = false;
+ for (var r2i5_0 = 0; r2i5_0 < r2p5.elements.length; r2i5_0++) {
+ var f = r2p5.elements[r2i5_0].fields;
+ if (f["5A"] === "989209012143658709F5" && f["9F70"] === "01") { r2has5_0 = true; break; }
+ }
+ bind.checkData("S4-C2 contains PROFILE_INFO1", "1", (r2p5.branch_tag === "A0" && r2has5_0) ? "1" : "0");
+ var r2has5_0 = false;
+ for (var r2i5_0 = 0; r2i5_0 < r2p5.elements.length; r2i5_0++) {
+ var f = r2p5.elements[r2i5_0].fields;
+ if (f["5A"] === "989209012143658709F5" && f["9F70"] === "01") { r2has5_0 = true; break; }
+ }
+ bind.checkData("S4-C3 contains iccid 989209012143658709F5", "1", (r2p5.branch_tag === "A0" && r2has5_0) ? "1" : "0");
+
+ // 步骤 6:Seq#03 Step1] MTD_STORE_DATA_Case3(tc_step;REQ: RQ32_031, RQ32_032, RQ57_142_2, RQ57_142_4, RQ57_142_15, RQ57_151, RQ57_153)
+ // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
+ // runtime-bound payload: ISD_P_AID1 stays in execution domain
+ var s6 = bind.sendApdu(null, "E2", "90", "00", BindEs10xProcProfileDynamic.bindProfileAidTemplate(bind, "ISD_P_AID1", "BF32154F10", "0101FF", profileAidSession), null, "6985");
+ bind.checkData("S5-C1 SW", "6985", s6.sw);
+ BindEs10xProcProfileDynamic.assertBoundPayload(bind, "ISD_P_AID1", s6.cmd, profileAidSession);
+ // S5-C2: kind 'requirement' pattern '' has no static generation face (corpus vacuum; see CaseIR unresolved).
+ // S5-C2: binding:requirement_satisfied_by_same_step_error_sw_assertion (check_attestation)
+
+ // 步骤 7:Seq#03 Step2] MTD_STORE_DATA(tc_step;REQ: RQ32_031, RQ32_032, RQ57_142_2, RQ57_142_4, RQ57_142_15, RQ57_151, RQ57_153)
+ // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
+ // runtime-bound payload: ISD_P_AID1 stays in execution domain
+ var s7 = bind.sendApdu(null, "E2", "91", "00", BindEs10xProcProfileDynamic.bindProfileAidTemplate(bind, "ISD_P_AID1", "BF2D14A0124F10", "", profileAidSession), "00", "9000");
+ bind.checkData("S6-C1 SW", "9000", s7.sw);
+ BindEs10xProcProfileDynamic.assertBoundPayload(bind, "ISD_P_AID1", s7.cmd, profileAidSession);
+ var r2p7 = BindEs10xProcProfile.walkChoiceList(s7.resp, {respTag: "BF2D", okTag: "A0", errTag: "81"});
+ var r2has7_0 = false;
+ for (var r2i7_0 = 0; r2i7_0 < r2p7.elements.length; r2i7_0++) {
+ var f = r2p7.elements[r2i7_0].fields;
+ if (f["5A"] === "989209012143658709F5" && f["9F70"] === "00") { r2has7_0 = true; break; }
+ }
+ bind.checkData("S6-C2 contains PROFILE_INFO1_DISABLED", "1", (r2p7.branch_tag === "A0" && r2has7_0) ? "1" : "0");
+ var r2has7_0 = false;
+ for (var r2i7_0 = 0; r2i7_0 < r2p7.elements.length; r2i7_0++) {
+ var f = r2p7.elements[r2i7_0].fields;
+ if (f["5A"] === "989209012143658709F5" && f["9F70"] === "00") { r2has7_0 = true; break; }
+ }
+ bind.checkData("S6-C3 contains iccid 989209012143658709F5", "1", (r2p7.branch_tag === "A0" && r2has7_0) ? "1" : "0");
+
+ // 步骤 8:Seq#04 Step1] MTD_STORE_DATA_Case3(tc_step;REQ: RQ32_031, RQ32_032, RQ57_142_2, RQ57_142_4, RQ57_142_15, RQ57_151, RQ57_153)
+ // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
+ var s8 = bind.sendApdu(null, "E2", "90", "00", "BF320F5A0A989209012143658709F50101FF", null, "6985");
+ bind.checkData("S7-C1 SW", "6985", s8.sw);
+ // S7-C2: kind 'requirement' pattern '' has no static generation face (corpus vacuum; see CaseIR unresolved).
+ // S7-C2: binding:requirement_satisfied_by_same_step_error_sw_assertion (check_attestation)
+
+ // 步骤 9:Seq#04 Step2] MTD_STORE_DATA(tc_step;REQ: RQ32_031, RQ32_032, RQ57_142_2, RQ57_142_4, RQ57_142_15, RQ57_151, RQ57_153)
+ // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
+ var s9 = bind.sendApdu(null, "E2", "91", "00", "BF2D0EA00C5A0A989209012143658709F5", "00", "9000");
+ bind.checkData("S8-C1 SW", "9000", s9.sw);
+ var r2p9 = BindEs10xProcProfile.walkChoiceList(s9.resp, {respTag: "BF2D", okTag: "A0", errTag: "81"});
+ var r2has9_0 = false;
+ for (var r2i9_0 = 0; r2i9_0 < r2p9.elements.length; r2i9_0++) {
+ var f = r2p9.elements[r2i9_0].fields;
+ if (f["5A"] === "989209012143658709F5" && f["9F70"] === "00") { r2has9_0 = true; break; }
+ }
+ bind.checkData("S8-C2 contains PROFILE_INFO1_DISABLED", "1", (r2p9.branch_tag === "A0" && r2has9_0) ? "1" : "0");
+ var r2has9_0 = false;
+ for (var r2i9_0 = 0; r2i9_0 < r2p9.elements.length; r2i9_0++) {
+ var f = r2p9.elements[r2i9_0].fields;
+ if (f["5A"] === "989209012143658709F5" && f["9F70"] === "00") { r2has9_0 = true; break; }
+ }
+ bind.checkData("S8-C3 contains iccid 989209012143658709F5", "1", (r2p9.branch_tag === "A0" && r2has9_0) ? "1" : "0");
+
+ // 步骤 10:Seq#05 Step1] MTD_STORE_DATA_Case3(tc_step;REQ: RQ32_031, RQ32_032, RQ32_033, RQ32_034, RQ57_142_2, RQ57_142_3, RQ57_142_4, RQ57_142_15, RQ57_151, RQ57_153)
+ // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
+ // runtime-bound payload: ISD_P_AID4 stays in execution domain
+ var s10 = bind.sendApdu(null, "E2", "90", "00", BindEs10xProcProfileDynamic.bindProfileAidTemplate(bind, "ISD_P_AID4", "BF32154F10", "0101FF", profileAidSession), null, "6985");
+ bind.checkData("S9-C1 SW", "6985", s10.sw);
+ BindEs10xProcProfileDynamic.assertBoundPayload(bind, "ISD_P_AID4", s10.cmd, profileAidSession);
+ // S9-C2: kind 'requirement' pattern '' has no static generation face (corpus vacuum; see CaseIR unresolved).
+ // S9-C2: binding:requirement_satisfied_by_same_step_error_sw_assertion (check_attestation)
+
+ // 步骤 11:Seq#05 Step2] MTD_STORE_DATA(tc_step;REQ: RQ32_031, RQ32_032, RQ32_033, RQ32_034, RQ57_142_2, RQ57_142_3, RQ57_142_4, RQ57_142_15, RQ57_151, RQ57_153)
+ // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
+ // runtime-bound payload: ISD_P_AID4 stays in execution domain
+ var s11 = bind.sendApdu(null, "E2", "91", "00", BindEs10xProcProfileDynamic.bindProfileAidTemplate(bind, "ISD_P_AID4", "BF2D14A0124F10", "", profileAidSession), "00", "9000");
+ bind.checkData("S10-C1 SW", "9000", s11.sw);
+ BindEs10xProcProfileDynamic.assertBoundPayload(bind, "ISD_P_AID4", s11.cmd, profileAidSession);
+ var r2p11 = BindEs10xProcProfile.walkChoiceList(s11.resp, {respTag: "BF2D", okTag: "A0", errTag: "81"});
+ var r2has11_0 = false;
+ for (var r2i11_0 = 0; r2i11_0 < r2p11.elements.length; r2i11_0++) {
+ var f = r2p11.elements[r2i11_0].fields;
+ if (f["5A"] === "989209015476981032F9" && f["9F70"] === "01") { r2has11_0 = true; break; }
+ }
+ bind.checkData("S10-C2 contains PROFILE_INFO4_ENABLED", "1", (r2p11.branch_tag === "A0" && r2has11_0) ? "1" : "0");
+ var r2has11_0 = false;
+ for (var r2i11_0 = 0; r2i11_0 < r2p11.elements.length; r2i11_0++) {
+ var f = r2p11.elements[r2i11_0].fields;
+ if (f["5A"] === "989209015476981032F9" && f["9F70"] === "01") { r2has11_0 = true; break; }
+ }
+ bind.checkData("S10-C3 contains entries1 iccid 989209015476981032F9", "1", (r2p11.branch_tag === "A0" && r2has11_0) ? "1" : "0");
+
+ // 步骤 12:Seq#06 Step1] MTD_STORE_DATA_Case3(tc_step;REQ: RQ32_031, RQ32_032, RQ32_033, RQ32_034, RQ57_142_2, RQ57_142_3, RQ57_142_4, RQ57_142_15, RQ57_151, RQ57_153)
+ // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
+ var s12 = bind.sendApdu(null, "E2", "90", "00", "BF320F5A0A989209015476981032F90101FF", null, "6985");
+ bind.checkData("S11-C1 SW", "6985", s12.sw);
+ // S11-C2: kind 'requirement' pattern '' has no static generation face (corpus vacuum; see CaseIR unresolved).
+ // S11-C2: binding:requirement_satisfied_by_same_step_error_sw_assertion (check_attestation)
+
+ // 步骤 13:Seq#06 Step2] MTD_STORE_DATA(tc_step;REQ: RQ32_031, RQ32_032, RQ32_033, RQ32_034, RQ57_142_2, RQ57_142_3, RQ57_142_4, RQ57_142_15, RQ57_151, RQ57_153)
+ // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
+ var s13 = bind.sendApdu(null, "E2", "91", "00", "BF2D0EA00C5A0A989209015476981032F9", "00", "9000");
+ bind.checkData("S12-C1 SW", "9000", s13.sw);
+ var r2p13 = BindEs10xProcProfile.walkChoiceList(s13.resp, {respTag: "BF2D", okTag: "A0", errTag: "81"});
+ var r2has13_0 = false;
+ for (var r2i13_0 = 0; r2i13_0 < r2p13.elements.length; r2i13_0++) {
+ var f = r2p13.elements[r2i13_0].fields;
+ if (f["5A"] === "989209015476981032F9" && f["9F70"] === "01") { r2has13_0 = true; break; }
+ }
+ bind.checkData("S12-C2 contains PROFILE_INFO4_ENABLED", "1", (r2p13.branch_tag === "A0" && r2has13_0) ? "1" : "0");
+ var r2has13_0 = false;
+ for (var r2i13_0 = 0; r2i13_0 < r2p13.elements.length; r2i13_0++) {
+ var f = r2p13.elements[r2i13_0].fields;
+ if (f["5A"] === "989209015476981032F9" && f["9F70"] === "01") { r2has13_0 = true; break; }
+ }
+ bind.checkData("S12-C3 contains entries1 iccid 989209015476981032F9", "1", (r2p13.branch_tag === "A0" && r2has13_0) ? "1" : "0");
+
+ // 步骤 14:Seq#07 Step1] MTD_STORE_DATA_Case3(tc_step;REQ: RQ57_142, RQ57_153_1)
+ // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
+ // runtime-bound payload: ISD_P_AID1 stays in execution domain
+ var s14 = bind.sendApdu(null, "E2", "90", "00", BindEs10xProcProfileDynamic.bindProfileAidTemplate(bind, "ISD_P_AID1", "BF32154F10", "010100", profileAidSession), null, "9300");
+ bind.checkData("S13-C1 SW", "9300", s14.sw);
+ BindEs10xProcProfileDynamic.assertBoundPayload(bind, "ISD_P_AID1", s14.cmd, profileAidSession);
+ // S13-C2: kind 'requirement' pattern '' has no static generation face (corpus vacuum; see CaseIR unresolved).
+ // S13-C2: binding:requirement_satisfied_by_same_step_error_sw_assertion (check_attestation)
+
+ // 步骤 15:Seq#07 Step2] FETCH 'XX'(tc_step)
+ // FETCH header literals follow the golden wire evidence 8012 (same
+ // anchor as runToSteadyState; J Annex D.4 has no FETCH row, D 2.2.2
+ // gives mechanism only). Le = pending length from the last 91XX
+ // (chain rule, binding-internal state).
+ var s15 = bind.fetchPending("80", "12", "00", "00", null);
+ bind.checkData("S14-C1 proactive command envelope", "1", (s15.resp.length >= 4 && s15.resp.substring(0, 2) === "D0") ? "1" : "0");
+ // S14-C1: REFRESH type/mode bytes are not corpus-fixed (envelope face only; per-mode bytes absent from input).
+
+ // 步骤 16:Seq#07 Step3] TERMINAL RESPONSE(tc_step)
+ // TERMINAL RESPONSE data is dynamically built by the binding from the
+ // last FETCHed proactive command (D 2.2.2; buildTrData) - never static.
+ // Header literals follow the golden wire evidence 8014.
+ var s16 = bind.terminalResponseForPending("80", "14", "00", "00", "9000");
+ bind.checkData("S15-C1 SW", "9000", s16.sw);
+
+ // 步骤 17:Seq#07 Step4] MTD_STORE_DATA(tc_step)
+ // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
+ // runtime-bound payload: ISD_P_AID1 stays in execution domain
+ var s17 = bind.sendApdu(null, "E2", "91", "00", BindEs10xProcProfileDynamic.bindProfileAidTemplate(bind, "ISD_P_AID1", "BF2D14A0124F10", "", profileAidSession), "00", "9000");
+ bind.checkData("S16-C1 SW", "9000", s17.sw);
+ BindEs10xProcProfileDynamic.assertBoundPayload(bind, "ISD_P_AID1", s17.cmd, profileAidSession);
+ var r2p17 = BindEs10xProcProfile.walkChoiceList(s17.resp, {respTag: "BF2D", okTag: "A0", errTag: "81"});
+ var r2has17_0 = false;
+ for (var r2i17_0 = 0; r2i17_0 < r2p17.elements.length; r2i17_0++) {
+ var f = r2p17.elements[r2i17_0].fields;
+ if (f["5A"] === "989209012143658709F5" && f["9F70"] === "01") { r2has17_0 = true; break; }
+ }
+ bind.checkData("S16-C2 contains PROFILE_INFO1", "1", (r2p17.branch_tag === "A0" && r2has17_0) ? "1" : "0");
+ var r2has17_0 = false;
+ for (var r2i17_0 = 0; r2i17_0 < r2p17.elements.length; r2i17_0++) {
+ var f = r2p17.elements[r2i17_0].fields;
+ if (f["5A"] === "989209012143658709F5" && f["9F70"] === "01") { r2has17_0 = true; break; }
+ }
+ bind.checkData("S16-C3 contains iccid 989209012143658709F5", "1", (r2p17.branch_tag === "A0" && r2has17_0) ? "1" : "0");
+
+ // 步骤 18:Seq#08 Step1] MTD_STORE_DATA_Case3(tc_step;REQ: RQ57_142_10, RQ57_153_1)
+ // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
+ var s18 = bind.sendApdu(null, "E2", "90", "00", "BF320F5A0A989209012143658709F50101FF", null, "9300");
+ bind.checkData("S17-C1 SW", "9300", s18.sw);
+ // S17-C2: kind 'requirement' pattern '' has no static generation face (corpus vacuum; see CaseIR unresolved).
+ // S17-C2: binding:requirement_satisfied_by_same_step_error_sw_assertion (check_attestation)
+
+ // 步骤 19:Seq#08 Step2] FETCH 'XX'(tc_step)
+ // FETCH header literals follow the golden wire evidence 8012 (same
+ // anchor as runToSteadyState; J Annex D.4 has no FETCH row, D 2.2.2
+ // gives mechanism only). Le = pending length from the last 91XX
+ // (chain rule, binding-internal state).
+ var s19 = bind.fetchPending("80", "12", "00", "00", null);
+ bind.checkData("S18-C1 proactive command envelope", "1", (s19.resp.length >= 4 && s19.resp.substring(0, 2) === "D0") ? "1" : "0");
+ // S18-C1: REFRESH type/mode bytes are not corpus-fixed (envelope face only; per-mode bytes absent from input).
+
+ // 步骤 20:Seq#08 Step3] TERMINAL RESPONSE(tc_step)
+ // TERMINAL RESPONSE data is dynamically built by the binding from the
+ // last FETCHed proactive command (D 2.2.2; buildTrData) - never static.
+ // Header literals follow the golden wire evidence 8014.
+ var s20 = bind.terminalResponseForPending("80", "14", "00", "00", "9000");
+ bind.checkData("S19-C1 SW", "9000", s20.sw);
+
+ // 步骤 21:Seq#08 Step4] MTD_STORE_DATA(tc_step)
+ // <L> length binding and the conditional 61XX + GET RESPONSE chain (D.4.2) are CasBind internal state (chaining rule).
+ var s21 = bind.sendApdu(null, "E2", "91", "00", "BF2D0EA00C5A0A989209012143658709F5", "00", "9000");
+ bind.checkData("S20-C1 SW", "9000", s21.sw);
+ var r2p21 = BindEs10xProcProfile.walkChoiceList(s21.resp, {respTag: "BF2D", okTag: "A0", errTag: "81"});
+ var r2has21_0 = false;
+ for (var r2i21_0 = 0; r2i21_0 < r2p21.elements.length; r2i21_0++) {
+ var f = r2p21.elements[r2i21_0].fields;
+ if (f["5A"] === "989209012143658709F5" && f["9F70"] === "01") { r2has21_0 = true; break; }
+ }
+ bind.checkData("S20-C2 contains PROFILE_INFO1", "1", (r2p21.branch_tag === "A0" && r2has21_0) ? "1" : "0");
+ var r2has21_0 = false;
+ for (var r2i21_0 = 0; r2i21_0 < r2p21.elements.length; r2i21_0++) {
+ var f = r2p21.elements[r2i21_0].fields;
+ if (f["5A"] === "989209012143658709F5" && f["9F70"] === "01") { r2has21_0 = true; break; }
+ }
+ bind.checkData("S20-C3 contains iccid 989209012143658709F5", "1", (r2p21.branch_tag === "A0" && r2has21_0) ? "1" : "0");
}