lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • 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
gerrit-log@lists.osmocom.org

October 2025

  • 1 participants
  • 631 discussions
[XS] Change in ...osmo-s1gw[master]: config/sys.config: separate GTP-U KPI and REST params
by laforge 28 Oct '25

28 Oct '25
Attention is currently required from: fixeria. laforge has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41279?usp=email ) Change subject: config/sys.config: separate GTP-U KPI and REST params ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41279?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I3804a0901e913e2be1c202d0e84372bc80621c1b Gerrit-Change-Number: 41279 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 28 Oct 2025 16:56:18 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in ...osmo-s1gw[master]: doc/osmo-s1gw-cli.md: document {enb,erab}_delete
by laforge 28 Oct '25

28 Oct '25
Attention is currently required from: fixeria. laforge has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41278?usp=email ) Change subject: doc/osmo-s1gw-cli.md: document {enb,erab}_delete ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41278?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: Iec93f90be4c3989fcb98341581d36f4650028f37 Gerrit-Change-Number: 41278 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 28 Oct 2025 16:56:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in ...osmo-s1gw[master]: doc/osmo-s1gw-cli.md: fix 'enb_list' command name
by laforge 28 Oct '25

28 Oct '25
Attention is currently required from: fixeria. laforge has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41277?usp=email ) Change subject: doc/osmo-s1gw-cli.md: fix 'enb_list' command name ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/41277?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I73495db795ef3c9f0eb07b85f18ca9de23fc048c Gerrit-Change-Number: 41277 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 28 Oct 2025 16:55:52 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in pysim[master]: runtime: check record/file size before write
by laforge 28 Oct '25

28 Oct '25
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/41228?usp=email ) Change subject: runtime: check record/file size before write ...................................................................... runtime: check record/file size before write When writing data to a transparent or linear fixed (record oriented) and the data to write exceeds the record/file size, then the UICC will respond with an error "6700: Checking errors - Wrong length" In particular when the data is supplied as a JSON object and not as a hex string, it may not be immediately obvious to the average user what the problem actually is. Let's check the record/file size before writing the data and raise an exception in case the data excieeds the record/file size. Let's also print an informative string message in case the data length is less than the record/file size to make the user aware of unwritten bytes at the end of a record/file. Related: OS#6864 Change-Id: I7fa717d803ae79398d2c5daf92a7336be660c5ad --- M pySim/runtime.py 1 file changed, 43 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/pySim/runtime.py b/pySim/runtime.py index ab21912..597323f 100644 --- a/pySim/runtime.py +++ b/pySim/runtime.py @@ -514,6 +514,47 @@ dec_data = self.selected_file.decode_hex(data) return (dec_data, sw) + def __get_writeable_size(self): + """ Determine the writable size (file or record) using the cached FCP parameters of the currently selected + file. Return None in case the writeable size cannot be determined (no FCP available, FCP lacks size + information). + """ + fcp = self.selected_file_fcp + if not fcp: + return None + + structure = fcp.get('file_descriptor', {}).get('file_descriptor_byte', {}).get('structure') + if not structure: + return None + + if structure == 'transparent': + return fcp.get('file_size') + elif structure == 'linear_fixed': + return fcp.get('file_descriptor', {}).get('record_len') + else: + return None + + def __check_writeable_size(self, data_len): + """ Guard against unsuccessful writes caused by attempts to write data that exceeds the file limits. """ + + writeable_size = self.__get_writeable_size() + if not writeable_size: + return + + if isinstance(self.selected_file, TransparentEF): + writeable_name = "file" + elif isinstance(self.selected_file, LinFixedEF): + writeable_name = "record" + else: + writeable_name = "object" + + if data_len > writeable_size: + raise TypeError("Data length (%u) exceeds %s size (%u) by %u bytes" % + (data_len, writeable_name, writeable_size, data_len - writeable_size)) + elif data_len < writeable_size: + log.warn("Data length (%u) less than %s size (%u), leaving %u unwritten bytes at the end of the %s" % + (data_len, writeable_name, writeable_size, writeable_size - data_len, writeable_name)) + def update_binary(self, data_hex: str, offset: int = 0): """Update transparent EF binary data. @@ -524,6 +565,7 @@ if not isinstance(self.selected_file, TransparentEF): raise TypeError("Only works with TransparentEF, but %s is %s" % (self.selected_file, self.selected_file.__class__.__mro__)) + self.__check_writeable_size(len(data_hex) // 2 + offset) return self.scc.update_binary(self.selected_file.fid, data_hex, offset, conserve=self.rs.conserve_write) def update_binary_dec(self, data: dict): @@ -571,6 +613,7 @@ if not isinstance(self.selected_file, LinFixedEF): raise TypeError("Only works with Linear Fixed EF, but %s is %s" % (self.selected_file, self.selected_file.__class__.__mro__)) + self.__check_writeable_size(len(data_hex) // 2) return self.scc.update_record(self.selected_file.fid, rec_nr, data_hex, conserve=self.rs.conserve_write, leftpad=self.selected_file.leftpad) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/41228?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I7fa717d803ae79398d2c5daf92a7336be660c5ad Gerrit-Change-Number: 41228 Gerrit-PatchSet: 4 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1 0
0 0
[S] Change in pysim[master]: runtime: check record/file size before write
by laforge 28 Oct '25

28 Oct '25
Attention is currently required from: dexter. laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/41228?usp=email ) Change subject: runtime: check record/file size before write ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/41228?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I7fa717d803ae79398d2c5daf92a7336be660c5ad Gerrit-Change-Number: 41228 Gerrit-PatchSet: 4 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 28 Oct 2025 16:55:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: smdpp_Tests: rename f_rsp_client_init to f_init_es9plus
by dexter 28 Oct '25

28 Oct '25
dexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41276?usp=email ) Change subject: smdpp_Tests: rename f_rsp_client_init to f_init_es9plus ...................................................................... smdpp_Tests: rename f_rsp_client_init to f_init_es9plus We already have an init function for ES2+ that is called f_init_es2plus, let's rename f_rsp_client_init to maintain consistency. Related: SYS#7339 Change-Id: I865b9dfc3597f9a962225880b7a5cda838b8377e --- M smdpp/smdpp_Tests.ttcn 1 file changed, 37 insertions(+), 36 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, approved diff --git a/smdpp/smdpp_Tests.ttcn b/smdpp/smdpp_Tests.ttcn index c49187a..1210353 100644 --- a/smdpp/smdpp_Tests.ttcn +++ b/smdpp/smdpp_Tests.ttcn @@ -523,7 +523,8 @@ return true; } -private function f_rsp_client_init() runs on smdpp_ConnHdlr return boolean { +// Initialize RSP client for ES9+ +private function f_init_es9plus() runs on smdpp_ConnHdlr return boolean { ext_logInfo("Initializing RSP client"); g_rsp_client_handle_es9p := ext_RSPClient_create( @@ -1816,7 +1817,7 @@ ) runs on smdpp_ConnHdlr { ext_logInfo("=== Test Case: " & params.testName & " ==="); - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } @@ -2034,7 +2035,7 @@ ext_logInfo("=== Testing AuthenticateClient Error: " & test_name & " ==="); /* Initialize HTTP/TLS and RSP client */ - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } @@ -2192,7 +2193,7 @@ ext_logInfo("=== Testing GetBoundProfilePackage Error: " & test_name & " ==="); /* Initialize RSP client */ - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } @@ -2328,7 +2329,7 @@ private function f_initiateAuth_generic(charstring id, template (omit) octetstring version := omit, charstring testDescription, charstring successMessage, boolean checkPkid := false) runs on smdpp_ConnHdlr { ext_logInfo(testDescription); - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } @@ -2393,7 +2394,7 @@ private function f_TC_InitiateAuth_02_Uniqueness(charstring id) runs on smdpp_ConnHdlr { ext_logInfo("=== Test Case: InitiateAuthentication - Uniqueness of Transaction ID and Server Challenge ==="); - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } @@ -2412,7 +2413,7 @@ /* Step 2: Re-initialize TLS connection (simulated by re-init) */ f_rsp_client_cleanup(); - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client re-initialization failed"); return; } @@ -2456,7 +2457,7 @@ private function f_TC_InitiateAuth_03_InvalidServerAddress(charstring id) runs on smdpp_ConnHdlr { ext_logInfo("=== Test Case: InitiateAuthentication - Invalid Server Address Error ==="); - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } @@ -2524,7 +2525,7 @@ ) runs on smdpp_ConnHdlr { ext_logInfo(params.testName); - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } @@ -2751,7 +2752,7 @@ ) runs on smdpp_ConnHdlr { ext_logInfo(testName); - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } @@ -2886,7 +2887,7 @@ ext_logInfo("=== Testing AuthenticateClient Retry After Cancelled Session ==="); - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } @@ -3036,7 +3037,7 @@ ) runs on smdpp_ConnHdlr { ext_logInfo("=== Test Case: GetBoundProfilePackage Retry - " & test_description & " ==="); - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } @@ -3220,7 +3221,7 @@ private function f_TC_GetBoundProfilePackage_Retry_09_ConfirmationCode(charstring id) runs on smdpp_ConnHdlr { ext_logInfo("=== Test Case: GetBoundProfilePackage - Confirmation Code Retry ==="); - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } @@ -3318,7 +3319,7 @@ integer reason, charstring reason_name ) runs on smdpp_ConnHdlr { - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } @@ -3400,7 +3401,7 @@ charstring id, CancelSessionReason reason ) runs on smdpp_ConnHdlr { - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } @@ -3509,7 +3510,7 @@ CancelSessionErrorInjection err_injection, charstring test_description ) runs on smdpp_ConnHdlr { - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } @@ -3594,7 +3595,7 @@ CancelSessionErrorInjection err_injection, charstring test_description ) runs on smdpp_ConnHdlr { - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } @@ -3777,7 +3778,7 @@ ext_logInfo("Starting complete RSP flow test"); - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } @@ -4045,7 +4046,7 @@ ) runs on smdpp_ConnHdlr { ext_logInfo("=== Test Case: HandleNotification - " & test_description & " ==="); - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } @@ -4177,7 +4178,7 @@ private function f_TC_HandleNotification_02_OtherSignedNotification(charstring id) runs on smdpp_ConnHdlr { ext_logInfo("=== Test Case: HandleNotification - OtherSignedNotification ==="); - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } @@ -4218,7 +4219,7 @@ ) runs on smdpp_ConnHdlr { ext_logInfo("=== Test Case: GetBoundProfilePackage - " & test_description & " ==="); - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } @@ -4328,7 +4329,7 @@ private function f_TC_GetBoundProfilePackage_05_Metadata_Split(charstring id) runs on smdpp_ConnHdlr { ext_logInfo("=== Test Case: GetBoundProfilePackage - S-ENC/S-MAC with Metadata Split ==="); - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } @@ -4367,7 +4368,7 @@ private function f_TC_InitiateAuth_04_UnsupportedPKID(charstring id) runs on smdpp_ConnHdlr { ext_logInfo("=== Test Case: InitiateAuthentication - Unsupported Public Key Identifiers Error ==="); - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } @@ -4389,7 +4390,7 @@ private function f_TC_InitiateAuth_05_UnsupportedVersion(charstring id) runs on smdpp_ConnHdlr { ext_logInfo("=== Test Case: InitiateAuthentication - Unsupported Specification Version Error ==="); - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } @@ -4419,7 +4420,7 @@ private function f_TC_InitiateAuth_06_UnavailableServerAuthCert(charstring id) runs on smdpp_ConnHdlr { ext_logInfo("=== Test Case: InitiateAuthentication - Unavailable Server Auth Certificate Error ==="); - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } @@ -4594,7 +4595,7 @@ private function f_TC_AuthenticateClient_19_Extended_UICC_Capability(charstring id) runs on smdpp_ConnHdlr { ext_logInfo("=== Test Case: AuthenticateClient - Extended UICC Capability ==="); - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } @@ -4627,7 +4628,7 @@ private function f_TC_AuthenticateClient_20_Extended_DeviceInfo(charstring id) runs on smdpp_ConnHdlr { ext_logInfo("=== Test Case: AuthenticateClient - Extended DeviceInfo ==="); - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } @@ -4682,7 +4683,7 @@ private function f_TC_AuthenticateClient_21_Extended_eUICCInfo2(charstring id) runs on smdpp_ConnHdlr { ext_logInfo("=== Test Case: AuthenticateClient - Extended eUICCInfo2 ==="); - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } @@ -4730,7 +4731,7 @@ private function f_TC_AuthenticateClient_Error_01_InvalidEUMCert(charstring id) runs on smdpp_ConnHdlr { ext_logInfo("=== Test Case: AuthenticateClient - Error: Invalid EUM Certificate ==="); - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } @@ -4756,7 +4757,7 @@ private function f_TC_AuthenticateClient_Error_02_ExpiredEUMCert(charstring id) runs on smdpp_ConnHdlr { ext_logInfo("=== Test Case: AuthenticateClient - Error: Expired EUM Certificate ==="); - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } @@ -4782,7 +4783,7 @@ private function f_TC_AuthenticateClient_Error_03_InvalidEUICCCert(charstring id) runs on smdpp_ConnHdlr { ext_logInfo("=== Test Case: AuthenticateClient - Error: Invalid eUICC Certificate ==="); - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } @@ -4808,7 +4809,7 @@ private function f_TC_AuthenticateClient_Error_04_ExpiredEUICCCert(charstring id) runs on smdpp_ConnHdlr { ext_logInfo("=== Test Case: AuthenticateClient - Error: Expired eUICC Certificate ==="); - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } @@ -4834,7 +4835,7 @@ private function f_TC_AuthenticateClient_Error_07_UnknownCIKey(charstring id) runs on smdpp_ConnHdlr { ext_logInfo("=== Test Case: AuthenticateClient - Error: Unknown CI Public Key ==="); - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } @@ -4917,7 +4918,7 @@ * The profile has PPR1 set (disabling not allowed) but the eUICC reports PPR1 as forbidden * because an operational profile is already installed */ - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } @@ -5038,7 +5039,7 @@ private function f_TC_AuthenticateClient_03_SecondAttempt_AfterInvalidMatchingID(charstring id) runs on smdpp_ConnHdlr { ext_logInfo("=== Test Case: AuthenticateClient - Second Attempt After Invalid MatchingID ==="); - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } @@ -5730,7 +5731,7 @@ const charstring c_cert_path := "./test_certs/CERT_MNO_ECDSA_NIST.pem"; const charstring c_key_path := "./test_certs/SK_MNO_ECDSA_NIST.pem"; - if (not f_rsp_client_init()) { + if (not f_init_es9plus()) { setverdict(fail, "RSP client initialization failed"); return; } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41276?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I865b9dfc3597f9a962225880b7a5cda838b8377e Gerrit-Change-Number: 41276 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
1 0
0 0
[XS] Change in osmo-ttcn3-hacks[master]: smdpp_Tests: improve messages when setting verdict in f_init_es9plus
by dexter 28 Oct '25

28 Oct '25
dexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41275?usp=email ) Change subject: smdpp_Tests: improve messages when setting verdict in f_init_es9plus ...................................................................... smdpp_Tests: improve messages when setting verdict in f_init_es9plus It is important to tell that the failure happend in the context of the ES9+ initialization. Related: SYS#7339 Change-Id: I6b55d0bb6d5bd698241a990cf8388adc68a99543 --- M smdpp/smdpp_Tests.ttcn 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: osmith: Looks good to me, approved Jenkins Builder: Verified diff --git a/smdpp/smdpp_Tests.ttcn b/smdpp/smdpp_Tests.ttcn index 17ed4e1..c49187a 100644 --- a/smdpp/smdpp_Tests.ttcn +++ b/smdpp/smdpp_Tests.ttcn @@ -534,18 +534,18 @@ ); if (g_rsp_client_handle_es9p < 0) { - ext_logError("Failed to create RSP client"); + setverdict(fail, "Failed to initialize RSP client for ES9+"); return false; } if (ext_RSPClient_loadEUICCCertificate(g_rsp_client_handle_es9p, g_pars_smdpp.euicc_cert_path) != 0) { - ext_logError("Failed to load eUICC certificate"); + ext_logError("Failed to load eUICC certificate for ES9+"); f_rsp_client_cleanup(); return false; } if (ext_RSPClient_loadEUICCKeyPair(g_rsp_client_handle_es9p, g_pars_smdpp.euicc_key_path) != 0) { - ext_logError("Failed to load eUICC private key"); + ext_logError("Failed to load eUICC private key for ES9+"); f_rsp_client_cleanup(); return false; } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41275?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I6b55d0bb6d5bd698241a990cf8388adc68a99543 Gerrit-Change-Number: 41275 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: smdp_Tests: remove custom_tls_cert module parameters
by dexter 28 Oct '25

28 Oct '25
dexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41271?usp=email ) Change subject: smdp_Tests: remove custom_tls_cert module parameters ...................................................................... smdp_Tests: remove custom_tls_cert module parameters The module parameters mp_use_custom_tls_cert and mp_custom_tls_cert_path are no longer needed, so let's remove them. Change-Id: Ie37da6986410b663378531f4f0d50d95b3068964 Related: SYS#7339 --- M smdpp/smdpp_Tests.ttcn 1 file changed, 5 insertions(+), 10 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, approved diff --git a/smdpp/smdpp_Tests.ttcn b/smdpp/smdpp_Tests.ttcn index da4d054..17ed4e1 100644 --- a/smdpp/smdpp_Tests.ttcn +++ b/smdpp/smdpp_Tests.ttcn @@ -65,9 +65,6 @@ * mutual authentication. */ boolean mp_es2plus_use_mutual_tls := true; - boolean mp_use_custom_tls_cert := true; - charstring mp_custom_tls_cert_path := ""; // Empty means use cert pool only - /* Sets the server port of the ES9+ server (SM-DP+, NIST certificates) */ integer mp_es9plus_server_port_nist := 8000; @@ -554,10 +551,12 @@ } // Configure HTTP client + // The native rspclient cpp code (libcurl) recursively loads certs from the subdir (sgp26) and + // automatically uses self signed certificates as root certificate. var integer result := ext_RSPClient_configureHttpClient( g_rsp_client_handle_es9p, - mp_use_custom_tls_cert, - mp_custom_tls_cert_path + true, // enable the usage of use custom TLS certificates + "" // provede an empty certificate path, this means that the certificate pool is used. ); if (result != 0) { @@ -566,11 +565,7 @@ return false; } - if (mp_use_custom_tls_cert) { - ext_logInfo("HTTP client configured - custom TLS: true"); - } else { - ext_logInfo("HTTP client configured - custom TLS: false"); - } + ext_logInfo("HTTP client (ES9+) configured"); return true; } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41271?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ie37da6986410b663378531f4f0d50d95b3068964 Gerrit-Change-Number: 41271 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
1 0
0 0
[XS] Change in osmo-ttcn3-hacks[master]: smdpp_Tests: add comments to mp_es9plus_server_port_ module parameters
by dexter 28 Oct '25

28 Oct '25
dexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41272?usp=email ) Change subject: smdpp_Tests: add comments to mp_es9plus_server_port_ module parameters ...................................................................... smdpp_Tests: add comments to mp_es9plus_server_port_ module parameters Let's add an explanatory comment to mp_es9plus_server_port_nist and mp_es9plus_server_port_brp Related: SYS#7339 Change-Id: I7e3f0292256b21a75da5b756ee9af6ec58318de1 --- M smdpp/smdpp_Tests.ttcn 1 file changed, 6 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, approved diff --git a/smdpp/smdpp_Tests.ttcn b/smdpp/smdpp_Tests.ttcn index c268e0e..da4d054 100644 --- a/smdpp/smdpp_Tests.ttcn +++ b/smdpp/smdpp_Tests.ttcn @@ -67,8 +67,12 @@ boolean mp_use_custom_tls_cert := true; charstring mp_custom_tls_cert_path := ""; // Empty means use cert pool only - integer mp_es9plus_server_port_nist := 8000; - integer mp_es9plus_server_port_brp := 8001; + + /* Sets the server port of the ES9+ server (SM-DP+, NIST certificates) */ + integer mp_es9plus_server_port_nist := 8000; + + /* Sets the server port of the ES9+ server (SM-DP+, Brainpool certificates) */ + integer mp_es9plus_server_port_brp := 8001; } /* C++ handles only crypto, TTCN-3 handles ASN.1 encoding/decoding most of the time */ -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41272?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I7e3f0292256b21a75da5b756ee9af6ec58318de1 Gerrit-Change-Number: 41272 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
1 0
0 0
[L] Change in osmo-ttcn3-hacks[master]: smdpp_Tests/ES2Plus_Tests: move ES2+ code to smdpp_Tests.ttcn
by dexter 28 Oct '25

28 Oct '25
dexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41270?usp=email ) Change subject: smdpp_Tests/ES2Plus_Tests: move ES2+ code to smdpp_Tests.ttcn ...................................................................... smdpp_Tests/ES2Plus_Tests: move ES2+ code to smdpp_Tests.ttcn In smdp_Tests.ttcn, the ES9+ and ES2+ interface are intermingled. This is a problem since ES2+ and ES9+ are two independed interfaces and they may use different certificates and may even be reachable under a different FQDN from a different network interface. To untable ES2+ and ES9+ we can move the ES2+ code from ES2Plus_Tests.ttcn to smdpp_Tests.ttcn. Since ES2Plus_Tests.ttcn inherits from smdpp_Tests.ttcn the ES2+ code will still be available to ES2Plus_Tests.ttcn. This change will add the flexibility of ES2Plus_Tests.ttcn to smdpp_Tests.ttcn. This means we can now freely configure the FQDN and the certificates used with ES2+. Related: SYS#7339 Change-Id: Ib59568379a9d454ea99d66550d6da8fd203681db --- M smdpp/ES2Plus_Tests.cfg M smdpp/ES2Plus_Tests.ttcn M smdpp/smdpp_Tests.cfg M smdpp/smdpp_Tests.ttcn 4 files changed, 188 insertions(+), 178 deletions(-) Approvals: osmith: Looks good to me, approved Jenkins Builder: Verified diff --git a/smdpp/ES2Plus_Tests.cfg b/smdpp/ES2Plus_Tests.cfg index 91463c6..19b9b78 100644 --- a/smdpp/ES2Plus_Tests.cfg +++ b/smdpp/ES2Plus_Tests.cfg @@ -8,11 +8,11 @@ [MODULE_PARAMETERS] # ES2+ specific parameters -# ES2Plus_Tests.mp_es2plus_server_fqdn := "testsmdpplus1.example.com" # Must match the hostname of the server SSL certificate! -# ES2Plus_Tests.mp_es2plus_server_port := 8000 -# ES2Plus_Tests.mp_es2plus_operator_id := "test.operator.com" -# ES2Plus_Tests.mp_es2plus_client_cert_path := "/path/to/my/client/cert" -# ES2Plus_Tests.mp_es2plus_client_key_path := "/path/to/my/client/cert_key" +# smdpp_Tests.mp_es2plus_server_fqdn := "testsmdpplus1.example.com" # Must match the hostname of the server SSL certificate! +# smdpp_Tests.mp_es2plus_server_port := 8000 +# smdpp_Tests.mp_es2plus_operator_id := "test.operator.com" +# smdpp_Tests.mp_es2plus_client_cert_path := "/path/to/my/client/cert" +# smdpp_Tests.mp_es2plus_client_key_path := "/path/to/my/client/cert_key" [EXECUTE] ES2Plus_Tests.control \ No newline at end of file diff --git a/smdpp/ES2Plus_Tests.ttcn b/smdpp/ES2Plus_Tests.ttcn index c6765f4..e2f034e 100644 --- a/smdpp/ES2Plus_Tests.ttcn +++ b/smdpp/ES2Plus_Tests.ttcn @@ -34,41 +34,13 @@ const charstring c_wrong_cert_path := "./sgp26/eUICC/CERT_EUICC_ECDSA_NIST.der"; const charstring c_wrong_key_path := "./sgp26/eUICC/SK_EUICC_ECDSA_NIST.pem"; -// The external function ext_RSPClient_create requires a path and a name filter as input to load test certificates. -// While those certificates are required for the ES9+ interface related tests (smdpp_Tests.ttcn), for the ES2+ -// interface tests those certificates have no relevance. -const charstring c_es2plus_cert_path := "./sgp26/"; -const charstring c_es2plus_cert_name_filter := "NIST"; - // Module parameters -modulepar { - // The SMDP server host name (FQDN) must match the host name of the SSL certificate of the server. To resolve the - // server host name to an IP address, an entry in /etc/hosts is sufficient. It should also be pointed out that this - // testsuite (libcurl) will also verify the presented server certificate against the related CA. To ensure that - // the server certificate verification is possible, ensure that the related CA certificates are made available in - // /etc/ssl/certs - charstring mp_es2plus_server_fqdn := "testsmdpplus1.example.com"; - - // Sets the server port of the ES2+ server (SM-DP+). - integer mp_es2plus_server_port := 8000; - - // Sets the client certificate to be used to authenticate towards the ES2+ server (SM-DP+) - charstring mp_es2plus_client_cert_path := "./test_certs/CERT_MNO_ECDSA_NIST.pem"; - - // Sets the private key to be used to authenticate towards the ES2+ server (SM-DP+) - charstring mp_es2plus_client_key_path := "./test_certs/SK_MNO_ECDSA_NIST.pem"; - - // Sets the operator ID to be used on the ES2+ interface. (this parameter has no relation to SSL/TLS) - charstring mp_es2plus_operator_id := "test.operator.com"; - - // ES2+ normally uses SSL with client authentication, however for debug purposes it is possible to disable - // mutual authentication. - boolean mp_es2plus_use_mutual_tls := true; -} +// This module has no own module parameters (yet), for the ES2+ related settings, it inherets the module parameters +// (mp_es2plus_) from the smdpp_ConnHdlr // Test component - extend smdpp_ConnHdlr to reuse RSPClient functionality type component ES2Plus_ConnHdlr extends smdpp_ConnHdlr { - // Inherits g_rsp_client_handle from smdpp_ConnHdlr + // Inherits g_rsp_client_handle_es2p from smdpp_ConnHdlr } // Parameter structures for test cases @@ -135,7 +107,7 @@ // Send request using pre-configured authentication response := smdpp_Tests.ext_RSPClient_sendHttpsPostWithAuth( - g_rsp_client_handle, + g_rsp_client_handle_es2p, url, oct2char(req_enc), mp_es2plus_server_port, @@ -187,35 +159,6 @@ return true; } -// Initialize RSP client for ES2+ -function f_init_es2plus() runs on ES2Plus_ConnHdlr { - // Initialize RSP client using imported function from smdpp_Tests - g_rsp_client_handle := smdpp_Tests.ext_RSPClient_create( - mp_es2plus_server_fqdn, - mp_es2plus_server_port, - c_es2plus_cert_path, - c_es2plus_cert_name_filter - ); - - if (g_rsp_client_handle < 0) { - setverdict(fail, "Failed to initialize RSP client for ES2+"); - mtc.stop; - } - - // Set authentication parameters once for all ES2+ operations - var integer result := smdpp_Tests.ext_RSPClient_setAuthParams( - g_rsp_client_handle, - mp_es2plus_use_mutual_tls, - mp_es2plus_client_cert_path, - mp_es2plus_client_key_path - ); - - if (result != 0) { - setverdict(fail, "Failed to set RSP client authentication parameters for ES2+"); - mtc.stop; - } -} - /*********************************************************************** * Generic Test Functions ***********************************************************************/ @@ -978,7 +921,7 @@ // Temporarily set wrong authentication parameters var integer result := smdpp_Tests.ext_RSPClient_setAuthParams( - g_rsp_client_handle, + g_rsp_client_handle_es2p, mp_es2plus_use_mutual_tls, c_wrong_cert_path, // Using wrong certificate c_wrong_key_path // Using wrong key @@ -995,7 +938,7 @@ log("ES2+ Request with WRONG certificate to ", url); response := smdpp_Tests.ext_RSPClient_sendHttpsPostWithAuth( - g_rsp_client_handle, + g_rsp_client_handle_es2p, url, oct2char(req_enc), mp_es2plus_server_port, @@ -1011,7 +954,7 @@ // Restore correct auth params for cleanup smdpp_Tests.ext_RSPClient_setAuthParams( - g_rsp_client_handle, + g_rsp_client_handle_es2p, mp_es2plus_use_mutual_tls, mp_es2plus_client_cert_path, mp_es2plus_client_key_path diff --git a/smdpp/smdpp_Tests.cfg b/smdpp/smdpp_Tests.cfg index 60ad49e..1b4fd99 100644 --- a/smdpp/smdpp_Tests.cfg +++ b/smdpp/smdpp_Tests.cfg @@ -18,9 +18,16 @@ [TESTPORT_PARAMETERS] [MODULE_PARAMETERS] +# ES2+ specific parameters # smdpp_Tests.mp_es9plus_server_port_nist := 8000 # smdpp_Tests.mp_es9plus_server_port_brp := 8001 + +# ES2+ specific parameters +# smdpp_Tests.mp_es2plus_server_fqdn := "testsmdpplus1.example.com" # Must match the hostname of the server SSL certificate! # smdpp_Tests.mp_es2plus_server_port := 8000 +# smdpp_Tests.mp_es2plus_operator_id := "test.operator.com" +# smdpp_Tests.mp_es2plus_client_cert_path := "/path/to/my/client/cert" +# smdpp_Tests.mp_es2plus_client_key_path := "/path/to/my/client/cert_key" [MAIN_CONTROLLER] diff --git a/smdpp/smdpp_Tests.ttcn b/smdpp/smdpp_Tests.ttcn index 339dfe3..c268e0e 100644 --- a/smdpp/smdpp_Tests.ttcn +++ b/smdpp/smdpp_Tests.ttcn @@ -34,13 +34,41 @@ import from esx_header_Types_JSON all; import from ES2Plus_Tests all; +/* The external function ext_RSPClient_create requires a path and a name filter as input to load test certificates. + * While those certificates are required for the ES9+ interface related tests (smdpp_Tests.ttcn), for the ES2+ + * interface tests those certificates have no relevance. */ +const charstring c_es2plus_cert_path := "./sgp26/"; +const charstring c_es2plus_cert_name_filter := "NIST"; + /* Module Parameters */ modulepar { + /* The SMDP server host name (FQDN) must match the host name of the SSL certificate of the server. To resolve the + * server host name to an IP address, an entry in /etc/hosts is sufficient. It should also be pointed out that this + * testsuite (libcurl) will also verify the presented server certificate against the related CA. To ensure that + * the server certificate verification is possible, ensure that the related CA certificates are made available in + * /etc/ssl/certs */ + charstring mp_es2plus_server_fqdn := "testsmdpplus1.example.com"; + + /* Sets the server port of the ES2+ server (SM-DP+). */ + integer mp_es2plus_server_port := 8000; + + /* Sets the client certificate to be used to authenticate towards the ES2+ server (SM-DP+) */ + charstring mp_es2plus_client_cert_path := "./test_certs/CERT_MNO_ECDSA_NIST.pem"; + + /* Sets the private key to be used to authenticate towards the ES2+ server (SM-DP+) */ + charstring mp_es2plus_client_key_path := "./test_certs/SK_MNO_ECDSA_NIST.pem"; + + /* Sets the operator ID to be used on the ES2+ interface. (this parameter has no relation to SSL/TLS) */ + charstring mp_es2plus_operator_id := "test.operator.com"; + + /* ES2+ normally uses SSL with client authentication, however for debug purposes it is possible to disable + * mutual authentication. */ + boolean mp_es2plus_use_mutual_tls := true; + boolean mp_use_custom_tls_cert := true; charstring mp_custom_tls_cert_path := ""; // Empty means use cert pool only integer mp_es9plus_server_port_nist := 8000; integer mp_es9plus_server_port_brp := 8001; - integer mp_es2plus_server_port := 8000; } /* C++ handles only crypto, TTCN-3 handles ASN.1 encoding/decoding most of the time */ @@ -349,7 +377,8 @@ var template integer g_http_client_id_es2p := omit; /* C++ RSP client handle */ - var integer g_rsp_client_handle := -1; + var integer g_rsp_client_handle_es9p := -1; + var integer g_rsp_client_handle_es2p := -1; /* Session state */ var octetstring g_transactionId := ''O; @@ -371,7 +400,7 @@ type record smdpp_ConnHdlrPars { charstring smdp_server_fqdn, integer smdp_es9p_server_port, - integer smdp_es2p_server_port, + integer smdp_es2p_server_port, charstring cert_path, charstring cert_name_filter, charstring euicc_cert_path, @@ -460,28 +489,61 @@ /* RSP CLIENT WRAPPER FUNCTIONS */ +// Initialize RSP client for ES2+ +function f_init_es2plus() runs on smdpp_ConnHdlr return boolean { + // Initialize RSP client using imported function from smdpp_Tests + g_rsp_client_handle_es2p := smdpp_Tests.ext_RSPClient_create( + mp_es2plus_server_fqdn, + mp_es2plus_server_port, + c_es2plus_cert_path, + c_es2plus_cert_name_filter + ); + + if (g_rsp_client_handle_es2p < 0) { + setverdict(fail, "Failed to initialize RSP client for ES2+"); + mtc.stop; + } + + // Set authentication parameters once for all ES2+ operations + var integer result := smdpp_Tests.ext_RSPClient_setAuthParams( + g_rsp_client_handle_es2p, + mp_es2plus_use_mutual_tls, + mp_es2plus_client_cert_path, + mp_es2plus_client_key_path + ); + + if (result != 0) { + setverdict(fail, "Failed to set RSP client authentication parameters for ES2+"); + mtc.stop; + } + + ext_logInfo("HTTP client (ES2+) configured"); + + return true; +} + private function f_rsp_client_init() runs on smdpp_ConnHdlr return boolean { ext_logInfo("Initializing RSP client"); - g_rsp_client_handle := ext_RSPClient_create( + g_rsp_client_handle_es9p := ext_RSPClient_create( g_pars_smdpp.smdp_server_fqdn, g_pars_smdpp.smdp_es9p_server_port, g_pars_smdpp.cert_path, g_pars_smdpp.cert_name_filter ); - if (g_rsp_client_handle < 0) { + if (g_rsp_client_handle_es9p < 0) { ext_logError("Failed to create RSP client"); return false; } - if (ext_RSPClient_loadEUICCCertificate(g_rsp_client_handle, g_pars_smdpp.euicc_cert_path) != 0) { + if (ext_RSPClient_loadEUICCCertificate(g_rsp_client_handle_es9p, g_pars_smdpp.euicc_cert_path) != 0) { ext_logError("Failed to load eUICC certificate"); f_rsp_client_cleanup(); return false; } - if (ext_RSPClient_loadEUICCKeyPair(g_rsp_client_handle, g_pars_smdpp.euicc_key_path) != 0) { + if (ext_RSPClient_loadEUICCKeyPair(g_rsp_client_handle_es9p, g_pars_smdpp.euicc_key_path) != 0) { ext_logError("Failed to load eUICC private key"); f_rsp_client_cleanup(); return false; @@ -489,7 +551,7 @@ // Configure HTTP client var integer result := ext_RSPClient_configureHttpClient( - g_rsp_client_handle, + g_rsp_client_handle_es9p, mp_use_custom_tls_cert, mp_custom_tls_cert_path ); @@ -510,9 +572,13 @@ } private function f_rsp_client_cleanup() runs on smdpp_ConnHdlr { - if (g_rsp_client_handle >= 0) { - ext_RSPClient_destroy(g_rsp_client_handle); - g_rsp_client_handle := -1; + if (g_rsp_client_handle_es9p >= 0) { + ext_RSPClient_destroy(g_rsp_client_handle_es9p); + g_rsp_client_handle_es9p := -1; + } + if (g_rsp_client_handle_es2p >= 0) { + ext_RSPClient_destroy(g_rsp_client_handle_es2p); + g_rsp_client_handle_es2p := -1; } } @@ -538,7 +604,7 @@ var charstring func_call_id := "TTCN3-" & oct2str(rnd_oct); var integer result := smdpp_Tests.ext_RSPClient_setAuthParams( - g_rsp_client_handle, + g_rsp_client_handle_es9p, true, // useMutualTLS c_cert_path, c_key_path @@ -553,7 +619,7 @@ var JSON_ES2p_Request dl_req := { downloadOrderRequest := { header := { - functionRequesterIdentifier := "test.operator.com", + functionRequesterIdentifier := mp_es2plus_operator_id, functionCallIdentifier := func_call_id & "-DL" }, eid := eid, @@ -565,7 +631,7 @@ var octetstring req_enc := enc_JSON_ES2p_Request(dl_req); var integer status_code; var charstring response := ext_RSPClient_sendHttpsPostWithAuth( - g_rsp_client_handle, + g_rsp_client_handle_es2p, c_path_download_order, oct2char(req_enc), g_pars_smdpp.smdp_es2p_server_port, @@ -590,7 +656,7 @@ var JSON_ES2p_Request conf_req := { confirmOrderRequest := { header := { - functionRequesterIdentifier := "test.operator.com", + functionRequesterIdentifier := mp_es2plus_operator_id, functionCallIdentifier := func_call_id & "-CF" }, iccid := new_iccid, @@ -608,7 +674,7 @@ req_enc := enc_JSON_ES2p_Request(conf_req); response := ext_RSPClient_sendHttpsPostWithAuth( - g_rsp_client_handle, + g_rsp_client_handle_es2p, c_path_confirm_order, oct2char(req_enc), g_pars_smdpp.smdp_es2p_server_port, @@ -680,7 +746,7 @@ private function f_create_initiate_authentication_request() runs on smdpp_ConnHdlr return RemoteProfileProvisioningRequest { - g_euiccChallenge := ext_RSPClient_generateChallenge(g_rsp_client_handle); + g_euiccChallenge := ext_RSPClient_generateChallenge(g_rsp_client_handle_es9p); ext_logInfo("Generated eUICC challenge: " & ext_bytesToHex(g_euiccChallenge)); /* Create EUICC_INFO1 using TTCN-3 native types */ @@ -734,7 +800,7 @@ return false; } - if (not ext_RSPClient_verifyServerSignature(g_rsp_client_handle, enc_ServerSigned1(authOk.serverSigned1), authOk.serverSignature1, g_serverCert)) { + if (not ext_RSPClient_verifyServerSignature(g_rsp_client_handle_es9p, enc_ServerSigned1(authOk.serverSigned1), authOk.serverSignature1, g_serverCert)) { ext_logError("Server signature validation failed"); return false; } @@ -762,7 +828,7 @@ private function f_create_get_bound_profile_package_request(octetstring smdpSignature2) runs on smdpp_ConnHdlr return RemoteProfileProvisioningRequest { - var octetstring euiccOtpk := ext_RSPClient_generateEUICCOtpk(g_rsp_client_handle); + var octetstring euiccOtpk := ext_RSPClient_generateEUICCOtpk(g_rsp_client_handle_es9p); var EUICCSigned2 euiccSigned2 := { transactionId := g_transactionId, @@ -771,7 +837,7 @@ }; // Add confirmation code hash if required - var octetstring ccHash := ext_RSPClient_getConfirmationCodeHash(g_rsp_client_handle); + var octetstring ccHash := ext_RSPClient_getConfirmationCodeHash(g_rsp_client_handle_es9p); ext_logInfo("Checking confirmation code hash, length: " & int2str(lengthof(ccHash))); if (lengthof(ccHash) == 32) { euiccSigned2.hashCc := ccHash; @@ -784,7 +850,7 @@ var octetstring euiccSigned2Data := enc_EUICCSigned2(euiccSigned2); var octetstring concatdata := euiccSigned2Data & smdpSignature2; - var octetstring euiccSignature2 := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle, concatdata); + var octetstring euiccSignature2 := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle_es9p, concatdata); var PrepareDownloadResponse prepareDownloadResponse := { downloadResponseOk := { @@ -811,7 +877,7 @@ hashCc := omit /* No confirmation code for nominal case */ }; - var octetstring ccHash := ext_RSPClient_getConfirmationCodeHash(g_rsp_client_handle); + var octetstring ccHash := ext_RSPClient_getConfirmationCodeHash(g_rsp_client_handle_es9p); if (lengthof(ccHash) == 32) { euiccSigned2.hashCc := ccHash; ext_logInfo("Added confirmation code hash to PrepareDownloadResponse: " & oct2str(ccHash)); @@ -821,7 +887,7 @@ var octetstring euiccSigned2_raw := enc_EUICCSigned2(euiccSigned2); var octetstring concatdata := euiccSigned2_raw & smdpSignature2; - var octetstring euiccSignature2 := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle, concatdata); + var octetstring euiccSignature2 := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle_es9p, concatdata); var PrepareDownloadResponse prepareDownloadResponse := { downloadResponseOk := { @@ -918,7 +984,7 @@ var integer http_status; var charstring response_body := ext_RSPClient_sendHttpsPost( - g_rsp_client_handle, + g_rsp_client_handle_es9p, g_last_es9p_endpoint, g_last_es9p_request, g_pars_smdpp.smdp_es9p_server_port, @@ -977,7 +1043,7 @@ var integer http_status; var charstring response_body := ext_RSPClient_sendHttpsPost( - g_rsp_client_handle, + g_rsp_client_handle_es9p, g_last_es9p_endpoint, g_last_es9p_request, g_pars_smdpp.smdp_es9p_server_port, @@ -1012,7 +1078,7 @@ var integer http_status; ext_logInfo("Sending ASN.1 request to /gsma/rsp2/asn1 on port " & int2str(g_pars_smdpp.smdp_es9p_server_port)); var octetstring response_body := ext_RSPClient_sendHttpsPostBinary( - g_rsp_client_handle, + g_rsp_client_handle_es9p, "/gsma/rsp2/asn1", asn1_request, g_pars_smdpp.smdp_es9p_server_port, @@ -1237,14 +1303,14 @@ private function f_get_certificate_pair() runs on smdpp_ConnHdlr return CertificatePair { return { - euicc_cert := dec_Certificate(ext_RSPClient_getEUICCCertificate(g_rsp_client_handle)), - eum_cert := dec_Certificate(ext_RSPClient_getEUMCertificate(g_rsp_client_handle)) + euicc_cert := dec_Certificate(ext_RSPClient_getEUICCCertificate(g_rsp_client_handle_es9p)), + eum_cert := dec_Certificate(ext_RSPClient_getEUMCertificate(g_rsp_client_handle_es9p)) }; } private function f_sign_euicc_signed1(EuiccSigned1 euiccSigned1) runs on smdpp_ConnHdlr return octetstring { var octetstring euiccSigned1_raw := enc_EuiccSigned1(euiccSigned1); - return ext_RSPClient_signDataWithEUICC(g_rsp_client_handle, euiccSigned1_raw); + return ext_RSPClient_signDataWithEUICC(g_rsp_client_handle_es9p, euiccSigned1_raw); } private function f_build_authenticate_client_request( @@ -1359,7 +1425,7 @@ AuthenticateClientOk auok, RemoteProfileProvisioningRequest packageRequest) runs on smdpp_ConnHdlr return boolean { - var octetstring euiccOtpk := ext_RSPClient_getEUICCOtpk(g_rsp_client_handle); + var octetstring euiccOtpk := ext_RSPClient_getEUICCOtpk(g_rsp_client_handle_es9p); if (not ext_CertificateUtil_verifyECDHCompatible(euiccOtpk, iscReq.smdpOtpk)) { ext_logError("eUICC and SM-DP+ public keys are not ECDH compatible"); return false; @@ -1376,7 +1442,7 @@ var octetstring encsecr := encode_DER_InitialiseSecureChannelRequest_ver(toencsec); var octetstring trunc_initsec := substr(encsecr, 4, lengthof(encsecr)-4); - if (not ext_RSPClient_verifyServerSignature(g_rsp_client_handle, trunc_initsec, + if (not ext_RSPClient_verifyServerSignature(g_rsp_client_handle_es9p, trunc_initsec, iscReq.smdpSign, enc_Certificate(auok.smdpCertificate))) { ext_logError("InitialiseSecureChannelRequest signature validation failed"); return false; @@ -1482,7 +1548,7 @@ var integer http_status; var charstring response_body := ext_RSPClient_sendHttpsPost( - g_rsp_client_handle, + g_rsp_client_handle_es9p, g_last_es9p_endpoint, g_last_es9p_request, g_pars_smdpp.smdp_es9p_server_port, @@ -1591,7 +1657,7 @@ } var octetstring full_encoded := encode_DER_profileInstallationResultData(pirData); - var octetstring euiccSignPIR := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle, full_encoded); + var octetstring euiccSignPIR := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle_es9p, full_encoded); var ProfileInstallationResult pir := { profileInstallationResultData := pirData, @@ -1668,10 +1734,10 @@ }; var octetstring euiccSigned1_raw := enc_EuiccSigned1(euiccSigned1); - var octetstring euiccSignature1 := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle, euiccSigned1_raw); + var octetstring euiccSignature1 := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle_es9p, euiccSigned1_raw); - var Certificate g_euicc_cert := dec_Certificate(ext_RSPClient_getEUICCCertificate(g_rsp_client_handle)); - var Certificate g_eum_cert := dec_Certificate(ext_RSPClient_getEUMCertificate(g_rsp_client_handle)); + var Certificate g_euicc_cert := dec_Certificate(ext_RSPClient_getEUICCCertificate(g_rsp_client_handle_es9p)); + var Certificate g_eum_cert := dec_Certificate(ext_RSPClient_getEUMCertificate(g_rsp_client_handle_es9p)); return { authenticateClientRequest := { @@ -1856,7 +1922,7 @@ }; var octetstring cancelSignedData := enc_EuiccCancelSessionSigned(cancelResp.cancelSessionResponseOk.euiccCancelSessionSigned); - cancelResp.cancelSessionResponseOk.euiccCancelSessionSignature := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle, cancelSignedData); + cancelResp.cancelSessionResponseOk.euiccCancelSessionSignature := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle_es9p, cancelSignedData); var RemoteProfileProvisioningRequest cancelReq := { cancelSessionRequestEs9 := { @@ -1891,10 +1957,10 @@ var EuiccSigned1 euiccSigned1 := f_create_euicc_signed1(euiccInfo2, ctxParams); var octetstring euiccSigned1_raw := enc_EuiccSigned1(euiccSigned1); - var octetstring euiccSignature1 := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle, euiccSigned1_raw); + var octetstring euiccSignature1 := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle_es9p, euiccSigned1_raw); - var Certificate g_euicc_cert := dec_Certificate(ext_RSPClient_getEUICCCertificate(g_rsp_client_handle)); - var Certificate g_eum_cert := dec_Certificate(ext_RSPClient_getEUMCertificate(g_rsp_client_handle)); + var Certificate g_euicc_cert := dec_Certificate(ext_RSPClient_getEUICCCertificate(g_rsp_client_handle_es9p)); + var Certificate g_eum_cert := dec_Certificate(ext_RSPClient_getEUMCertificate(g_rsp_client_handle_es9p)); var RemoteProfileProvisioningRequest authReq := { authenticateClientRequest := { @@ -1915,7 +1981,7 @@ private function f_create_prepare_download_response(octetstring smdpSignature2) runs on smdpp_ConnHdlr return PrepareDownloadResponse { - var octetstring euicc_otpk := ext_RSPClient_generateEUICCOtpk(g_rsp_client_handle); + var octetstring euicc_otpk := ext_RSPClient_generateEUICCOtpk(g_rsp_client_handle_es9p); var EUICCSigned2 euiccSigned2 := { transactionId := g_transactionId, @@ -1923,7 +1989,7 @@ hashCc := omit }; - var octetstring ccHash := ext_RSPClient_getConfirmationCodeHash(g_rsp_client_handle); + var octetstring ccHash := ext_RSPClient_getConfirmationCodeHash(g_rsp_client_handle_es9p); if (lengthof(ccHash) == 32) { euiccSigned2.hashCc := ccHash; ext_logInfo("Added confirmation code hash to PrepareDownloadResponse: " & oct2str(ccHash)); @@ -1933,7 +1999,7 @@ var octetstring euiccSigned2_raw := enc_EUICCSigned2(euiccSigned2); var octetstring concatdata := euiccSigned2_raw & smdpSignature2; - var octetstring euiccSignature2 := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle, concatdata); + var octetstring euiccSignature2 := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle_es9p, concatdata); var PrepareDownloadResponse prepDownloadResp := { downloadResponseOk := { @@ -2038,7 +2104,7 @@ /* Sign the data */ var octetstring euiccSigned1_raw := enc_EuiccSigned1(euiccSigned1); - var octetstring euiccSignature1 := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle, euiccSigned1_raw); + var octetstring euiccSignature1 := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle_es9p, euiccSigned1_raw); /* Apply signature error if specified */ if (ischosen(err_injection.sig_error) and err_injection.sig_error.corrupt_signature) { @@ -2050,23 +2116,23 @@ select (err_injection.cert_error.error_type) { case (INVALID_EUM_SIGNATURE) { /* Load invalid (self-signed) EUM certificate */ - ext_RSPClient_loadEUMCertificate(g_rsp_client_handle, "./InvalidTestCases/CERT_EUM_ECDSA_NIST_INVALID.der"); + ext_RSPClient_loadEUMCertificate(g_rsp_client_handle_es9p, "./InvalidTestCases/CERT_EUM_ECDSA_NIST_INVALID.der"); } case (EXPIRED_EUM) { /* Load expired EUM certificate */ - ext_RSPClient_loadEUMCertificate(g_rsp_client_handle, "./InvalidTestCases/CERT_EUM_ECDSA_NIST_EXPIRED.der"); + ext_RSPClient_loadEUMCertificate(g_rsp_client_handle_es9p, "./InvalidTestCases/CERT_EUM_ECDSA_NIST_EXPIRED.der"); } case (INVALID_EUICC_SIGNATURE) { /* Load invalid (self-signed) eUICC certificate */ - ext_RSPClient_loadEUICCCertificate(g_rsp_client_handle, "./InvalidTestCases/CERT_EUICC_ECDSA_NIST_INVALID.der"); + ext_RSPClient_loadEUICCCertificate(g_rsp_client_handle_es9p, "./InvalidTestCases/CERT_EUICC_ECDSA_NIST_INVALID.der"); } case (EXPIRED_EUICC) { /* Load expired eUICC certificate */ - ext_RSPClient_loadEUICCCertificate(g_rsp_client_handle, "./InvalidTestCases/CERT_EUICC_ECDSA_NIST_EXPIRED.der"); + ext_RSPClient_loadEUICCCertificate(g_rsp_client_handle_es9p, "./InvalidTestCases/CERT_EUICC_ECDSA_NIST_EXPIRED.der"); } case (UNKNOWN_CI_KEY) { /* Load EUM certificate signed by unknown CI */ - ext_RSPClient_loadEUMCertificate(g_rsp_client_handle, "./InvalidTestCases/CERT_EUM_ECDSA_NIST_UNKNOWN_CI.der"); + ext_RSPClient_loadEUMCertificate(g_rsp_client_handle_es9p, "./InvalidTestCases/CERT_EUM_ECDSA_NIST_UNKNOWN_CI.der"); } case else { setverdict(fail, "Unsupported certificate error type"); @@ -2076,8 +2142,8 @@ } /* Get certificates from RSP client */ - var Certificate g_euicc_cert := dec_Certificate(ext_RSPClient_getEUICCCertificate(g_rsp_client_handle)); - var Certificate g_eum_cert := dec_Certificate(ext_RSPClient_getEUMCertificate(g_rsp_client_handle)); + var Certificate g_euicc_cert := dec_Certificate(ext_RSPClient_getEUICCCertificate(g_rsp_client_handle_es9p)); + var Certificate g_eum_cert := dec_Certificate(ext_RSPClient_getEUMCertificate(g_rsp_client_handle_es9p)); /* Build the request */ var RemoteProfileProvisioningRequest authClientReq := { @@ -2147,7 +2213,7 @@ /* Step 3: PrepareDownloadResponse with error injection */ var octetstring smdpSignature2 := authClientOk.smdpSignature2; - var octetstring euicc_otpk := ext_RSPClient_generateEUICCOtpk(g_rsp_client_handle); + var octetstring euicc_otpk := ext_RSPClient_generateEUICCOtpk(g_rsp_client_handle_es9p); /* Build EUICCSigned2 */ var EUICCSigned2 euiccSigned2 := { @@ -2163,9 +2229,9 @@ if (server_requires_cc and not ischosen(err_injection.cc_error)) { /* Set confirmation code and get hash */ var charstring confirmationCode := "12345678"; /* Default test code matching server */ - var integer result := ext_RSPClient_setConfirmationCode(g_rsp_client_handle, confirmationCode); + var integer result := ext_RSPClient_setConfirmationCode(g_rsp_client_handle_es9p, confirmationCode); if (result == 0) { - euiccSigned2.hashCc := ext_RSPClient_getConfirmationCodeHash(g_rsp_client_handle); + euiccSigned2.hashCc := ext_RSPClient_getConfirmationCodeHash(g_rsp_client_handle_es9p); ext_logInfo("Using confirmation code hash: " & oct2str(euiccSigned2.hashCc)); } } @@ -2211,7 +2277,7 @@ /* Sign EUICCSigned2 */ var octetstring euiccSigned2_raw := enc_EUICCSigned2(euiccSigned2); var octetstring concatdata := euiccSigned2_raw & smdpSignature2; - var octetstring euiccSignature2 := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle, concatdata); + var octetstring euiccSignature2 := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle_es9p, concatdata); /* Apply signature corruption if needed */ if (ischosen(err_injection.sig_error) and err_injection.sig_error.corrupt_signature) { @@ -2286,7 +2352,7 @@ } var octetstring serverCert := enc_Certificate(authOk.serverCertificate); - if (not ext_RSPClient_verifyServerSignature(g_rsp_client_handle, + if (not ext_RSPClient_verifyServerSignature(g_rsp_client_handle_es9p, enc_ServerSigned1(authOk.serverSigned1), authOk.serverSignature1, serverCert)) { @@ -2495,10 +2561,10 @@ var EuiccSigned1 euiccSigned1 := f_create_euicc_signed1(euiccInfo2, ctxParams); var octetstring euiccSigned1_raw := enc_EuiccSigned1(euiccSigned1); - var octetstring euiccSignature1 := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle, euiccSigned1_raw); + var octetstring euiccSignature1 := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle_es9p, euiccSigned1_raw); - var Certificate g_euicc_cert := dec_Certificate(ext_RSPClient_getEUICCCertificate(g_rsp_client_handle)); - var Certificate g_eum_cert := dec_Certificate(ext_RSPClient_getEUMCertificate(g_rsp_client_handle)); + var Certificate g_euicc_cert := dec_Certificate(ext_RSPClient_getEUICCCertificate(g_rsp_client_handle_es9p)); + var Certificate g_eum_cert := dec_Certificate(ext_RSPClient_getEUMCertificate(g_rsp_client_handle_es9p)); var RemoteProfileProvisioningRequest authReq := { authenticateClientRequest := { @@ -2535,7 +2601,7 @@ if (params.testMode == BPP_RETRY_SAME_OTPK and iter == 0) { /* First iteration: generate and save OTPK */ - euicc_otpk := ext_RSPClient_generateEUICCOtpk(g_rsp_client_handle); + euicc_otpk := ext_RSPClient_generateEUICCOtpk(g_rsp_client_handle_es9p); saved_euicc_otpk := euicc_otpk; ext_logInfo("Generated and saved eUICC OTPK: " & oct2str(euicc_otpk)); } else if (params.testMode == BPP_RETRY_SAME_OTPK and iter == 1) { @@ -2544,7 +2610,7 @@ ext_logInfo("Reusing saved eUICC OTPK: " & oct2str(euicc_otpk)); } else { /* Generate new OTPK for all other cases */ - euicc_otpk := ext_RSPClient_generateEUICCOtpk(g_rsp_client_handle); + euicc_otpk := ext_RSPClient_generateEUICCOtpk(g_rsp_client_handle_es9p); if (params.testMode == BPP_RETRY_DIFFERENT_OTPK and iter == 1) { ext_logInfo("Generated new eUICC OTPK for retry: " & oct2str(euicc_otpk)); } @@ -2711,17 +2777,17 @@ var RemoteProfileProvisioningRequest packageReq; if (requireCC) { - var octetstring euiccOtpk := ext_RSPClient_generateEUICCOtpk(g_rsp_client_handle); + var octetstring euiccOtpk := ext_RSPClient_generateEUICCOtpk(g_rsp_client_handle_es9p); var EUICCSigned2 euiccSigned2 := { transactionId := g_transactionId, euiccOtpk := euiccOtpk, - hashCc := ext_RSPClient_getConfirmationCodeHash(g_rsp_client_handle) + hashCc := ext_RSPClient_getConfirmationCodeHash(g_rsp_client_handle_es9p) }; var octetstring euiccSigned2Data := enc_EUICCSigned2(euiccSigned2); var octetstring concatdata := euiccSigned2Data & authClientOk.smdpSignature2; - var octetstring euiccSignature2 := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle, concatdata); + var octetstring euiccSignature2 := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle_es9p, concatdata); var PrepareDownloadResponse prepDownloadResp := { downloadResponseOk := { @@ -2868,7 +2934,7 @@ ext_logInfo("Step 3: Testing GetBoundProfilePackage with OTPK reuse"); /* simulate reuse from cancelled session */ - var octetstring euicc_otpk := ext_RSPClient_generateEUICCOtpk(g_rsp_client_handle); + var octetstring euicc_otpk := ext_RSPClient_generateEUICCOtpk(g_rsp_client_handle_es9p); var octetstring smdpSignature2 := authClientResp2.smdpSignature2; var PrepareDownloadResponse prepDownloadResp := f_create_prepare_download_response_with_otpk(smdpSignature2, euicc_otpk); @@ -2941,7 +3007,7 @@ }; var octetstring cancelSignedData := enc_EuiccCancelSessionSigned(cancelResp.cancelSessionResponseOk.euiccCancelSessionSigned); - cancelResp.cancelSessionResponseOk.euiccCancelSessionSignature := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle, cancelSignedData); + cancelResp.cancelSessionResponseOk.euiccCancelSessionSignature := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle_es9p, cancelSignedData); var RemoteProfileProvisioningRequest cancelReq := { cancelSessionRequestEs9 := { @@ -2992,7 +3058,7 @@ } if (with_cc) { - ext_RSPClient_setConfirmationCode(g_rsp_client_handle, "12345678"); + ext_RSPClient_setConfirmationCode(g_rsp_client_handle_es9p, "12345678"); } /* Step 3: Prepare retry based on OTPK mode */ @@ -3001,7 +3067,7 @@ if (otpk_mode == RETRY_REUSE_SAME_OTPK) { /* Reuse OTPK from cancelled session */ - var octetstring euicc_otpk := ext_RSPClient_getEUICCOtpk(g_rsp_client_handle); + var octetstring euicc_otpk := ext_RSPClient_getEUICCOtpk(g_rsp_client_handle_es9p); ext_logInfo("Step 3: GetBoundProfilePackage retry with SAME eUICC otPK"); ext_logInfo("Reusing SAME eUICC otPK"); prepDownloadResp := f_create_prepare_download_response_with_otpk( @@ -3009,7 +3075,7 @@ otpk_description := "same"; } else if (otpk_mode == RETRY_SEND_NEW_OTPK) { /* Generate new OTPK to simulate eUICC rejection */ - var octetstring euicc_otpk := ext_RSPClient_generateEUICCOtpk(g_rsp_client_handle); + var octetstring euicc_otpk := ext_RSPClient_generateEUICCOtpk(g_rsp_client_handle_es9p); ext_logInfo("Step 3: GetBoundProfilePackage retry with NEW eUICC otPK"); ext_logInfo("Using NEW eUICC otPK"); prepDownloadResp := f_create_prepare_download_response_with_otpk( @@ -3175,7 +3241,7 @@ /* Set transaction ID for confirmation code hash computation */ ext_logInfo("Setting transaction ID: " & oct2str(g_transactionId)); - var integer result := ext_RSPClient_setTransactionId(g_rsp_client_handle, g_transactionId); + var integer result := ext_RSPClient_setTransactionId(g_rsp_client_handle_es9p, g_transactionId); if (result != 0) { setverdict(fail, "Failed to set transaction ID"); f_rsp_client_cleanup(); @@ -3184,7 +3250,7 @@ /* First attempt with wrong confirmation code */ ext_logInfo("First attempt with wrong confirmation code"); - ext_RSPClient_setConfirmationCode(g_rsp_client_handle, "00000000"); /* Wrong code */ + ext_RSPClient_setConfirmationCode(g_rsp_client_handle_es9p, "00000000"); /* Wrong code */ var PrepareDownloadResponse prepDownloadResp := f_create_prepare_download_response(authClientOk.smdpSignature2); var RemoteProfileProvisioningRequest packageReq := { @@ -3207,7 +3273,7 @@ /* Second attempt with correct confirmation code */ ext_logInfo("Second attempt with correct confirmation code"); - ext_RSPClient_setConfirmationCode(g_rsp_client_handle, "12345678"); /* Correct code */ + ext_RSPClient_setConfirmationCode(g_rsp_client_handle_es9p, "12345678"); /* Correct code */ prepDownloadResp := f_create_prepare_download_response(authClientOk.smdpSignature2); packageReq.getBoundProfilePackageRequest.prepareDownloadResponse := prepDownloadResp; @@ -3285,7 +3351,7 @@ }; var octetstring cancelSignedData := enc_EuiccCancelSessionSigned(cancelResp.cancelSessionResponseOk.euiccCancelSessionSigned); - cancelResp.cancelSessionResponseOk.euiccCancelSessionSignature := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle, cancelSignedData); + cancelResp.cancelSessionResponseOk.euiccCancelSessionSignature := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle_es9p, cancelSignedData); var RemoteProfileProvisioningRequest cancelReq := { cancelSessionRequestEs9 := { @@ -3370,7 +3436,7 @@ }; var octetstring cancelSignedData := enc_EuiccCancelSessionSigned(cancelResp.cancelSessionResponseOk.euiccCancelSessionSigned); - cancelResp.cancelSessionResponseOk.euiccCancelSessionSignature := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle, cancelSignedData); + cancelResp.cancelSessionResponseOk.euiccCancelSessionSignature := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle_es9p, cancelSignedData); var RemoteProfileProvisioningRequest cancelReq := { cancelSessionRequestEs9 := { @@ -3481,7 +3547,7 @@ } var octetstring cancelSignedData := enc_EuiccCancelSessionSigned(cancelResp.cancelSessionResponseOk.euiccCancelSessionSigned); - cancelResp.cancelSessionResponseOk.euiccCancelSessionSignature := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle, cancelSignedData); + cancelResp.cancelSessionResponseOk.euiccCancelSessionSignature := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle_es9p, cancelSignedData); if (ischosen(err_injection.sig_error)) { if (err_injection.sig_error.corrupt_signature) { @@ -3578,7 +3644,7 @@ } var octetstring cancelSignedData := enc_EuiccCancelSessionSigned(cancelResp.cancelSessionResponseOk.euiccCancelSessionSigned); - cancelResp.cancelSessionResponseOk.euiccCancelSessionSignature := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle, cancelSignedData); + cancelResp.cancelSessionResponseOk.euiccCancelSessionSignature := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle_es9p, cancelSignedData); if (ischosen(err_injection.sig_error)) { if (err_injection.sig_error.corrupt_signature) { @@ -3762,13 +3828,13 @@ } var octetstring enc_euicc_tosign := enc_EuiccSigned1(euiccSig); - var octetstring euiccSignature1 := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle, enc_euicc_tosign); + var octetstring euiccSignature1 := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle_es9p, enc_euicc_tosign); var AuthenticateServerResponse authresp := { authenticateResponseOk := { euiccSigned1 := euiccSig, euiccSignature1 := euiccSignature1, - euiccCertificate := dec_Certificate(ext_RSPClient_getEUICCCertificate(g_rsp_client_handle)), - eumCertificate := dec_Certificate(ext_RSPClient_getEUMCertificate(g_rsp_client_handle)) + euiccCertificate := dec_Certificate(ext_RSPClient_getEUICCCertificate(g_rsp_client_handle_es9p)), + eumCertificate := dec_Certificate(ext_RSPClient_getEUMCertificate(g_rsp_client_handle_es9p)) } } @@ -3784,7 +3850,7 @@ } var octetstring auresp_sigdata := enc_SmdpSigned2(auok.smdpSigned2) & '5f3740'O & euiccSignature1; - if (not ext_RSPClient_verifyServerSignature( g_rsp_client_handle, auresp_sigdata, auok.smdpSignature2, enc_Certificate(auok.smdpCertificate))) { + if (not ext_RSPClient_verifyServerSignature( g_rsp_client_handle_es9p, auresp_sigdata, auok.smdpSignature2, enc_Certificate(auok.smdpCertificate))) { ext_logError("Server signature validation failed"); setverdict(fail, "InitiateAuthentication validation failed"); f_rsp_client_cleanup(); @@ -3795,7 +3861,7 @@ ext_logInfo("Confirmation code is required for this profile"); ext_logInfo("Setting transaction ID: " & oct2str(auok.transactionId)); - var integer result := ext_RSPClient_setTransactionId(g_rsp_client_handle, auok.transactionId); + var integer result := ext_RSPClient_setTransactionId(g_rsp_client_handle_es9p, auok.transactionId); if (result != 0) { ext_logError("Failed to set transaction ID"); } @@ -3804,13 +3870,13 @@ if (ispresent(g_pars_smdpp.confirmation_code)) { confirmationCode := g_pars_smdpp.confirmation_code; } - result := ext_RSPClient_setConfirmationCode(g_rsp_client_handle, confirmationCode); + result := ext_RSPClient_setConfirmationCode(g_rsp_client_handle_es9p, confirmationCode); if (result != 0) { ext_logError("Failed to set confirmation code"); } ext_logInfo("Set confirmation code: " & confirmationCode); - var octetstring hashCheck := ext_RSPClient_getConfirmationCodeHash(g_rsp_client_handle); + var octetstring hashCheck := ext_RSPClient_getConfirmationCodeHash(g_rsp_client_handle_es9p); ext_logInfo("Confirmation code hash length: " & int2str(lengthof(hashCheck))); if (lengthof(hashCheck) == 32) { ext_logInfo("Confirmation code hash computed successfully: " & oct2str(hashCheck)); @@ -3821,8 +3887,8 @@ ext_logInfo("Confirmation code is NOT required for this profile"); } - var charstring eid := ext_CertificateUtil_getEID(ext_RSPClient_getEUICCCertificate(g_rsp_client_handle)); - var octetstring eumCert := ext_RSPClient_getEUMCertificate(g_rsp_client_handle); + var charstring eid := ext_CertificateUtil_getEID(ext_RSPClient_getEUICCCertificate(g_rsp_client_handle_es9p)); + var octetstring eumCert := ext_RSPClient_getEUMCertificate(g_rsp_client_handle_es9p); if (not ext_CertificateUtil_validateEIDRange(eid, eumCert)) { setverdict(fail, "EID is not within permitted range of EUM certificate"); @@ -3870,9 +3936,9 @@ ext_logInfo("=== Validating certificate chains ==="); - var octetstring ciCertificate := ext_RSPClient_getCICertificate(g_rsp_client_handle); + var octetstring ciCertificate := ext_RSPClient_getCICertificate(g_rsp_client_handle_es9p); - var octetstring euiccCertDer := ext_RSPClient_getEUICCCertificate(g_rsp_client_handle); + var octetstring euiccCertDer := ext_RSPClient_getEUICCCertificate(g_rsp_client_handle_es9p); if (not ext_CertificateUtil_verifyCertificateChainWithIntermediate(euiccCertDer, eumCert, ciCertificate)) { @@ -3901,7 +3967,7 @@ } ext_logInfo("Both certificates use curve: " & euiccCurve); - var octetstring sharedSecret := ext_RSPClient_computeSharedSecret(g_rsp_client_handle, + var octetstring sharedSecret := ext_RSPClient_computeSharedSecret(g_rsp_client_handle_es9p, iscReq.smdpOtpk); if (lengthof(sharedSecret) == 0) { setverdict(fail, "Failed to compute ECDH shared secret"); @@ -4125,13 +4191,13 @@ }; var octetstring encoded := enc_NotificationMetadata(notifMeta); - var octetstring euicc_signature := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle, encoded); + var octetstring euicc_signature := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle_es9p, encoded); var OtherSignedNotification otherNotif := { tbsOtherNotification := notifMeta, euiccNotificationSignature := euicc_signature, - euiccCertificate := dec_Certificate(ext_RSPClient_getEUICCCertificate(g_rsp_client_handle)), - eumCertificate := dec_Certificate(ext_RSPClient_getEUMCertificate(g_rsp_client_handle)) + euiccCertificate := dec_Certificate(ext_RSPClient_getEUICCCertificate(g_rsp_client_handle_es9p)), + eumCertificate := dec_Certificate(ext_RSPClient_getEUMCertificate(g_rsp_client_handle_es9p)) }; var PendingNotification pendingNotif := { @@ -4167,7 +4233,7 @@ ext_logInfo("=== Step 3: GetBoundProfilePackage with " & test_description & " ==="); var octetstring smdpSignature2 := authClientOk.smdpSignature2; - var octetstring euicc_otpk := ext_RSPClient_generateEUICCOtpk(g_rsp_client_handle); + var octetstring euicc_otpk := ext_RSPClient_generateEUICCOtpk(g_rsp_client_handle_es9p); var EUICCSigned2 euiccSigned2 := { transactionId := g_transactionId, @@ -4186,7 +4252,7 @@ var octetstring euiccSigned2_raw := enc_EUICCSigned2(euiccSigned2); var octetstring concatdata := euiccSigned2_raw & smdpSignature2; - var octetstring euiccSignature2 := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle, concatdata); + var octetstring euiccSignature2 := ext_RSPClient_signDataWithEUICC(g_rsp_client_handle_es9p, concatdata); if (ischosen(err_injection.sig_error)) { if (err_injection.sig_error.corrupt_signature) { @@ -5670,16 +5736,9 @@ return; } - var integer result := smdpp_Tests.ext_RSPClient_setAuthParams( - g_rsp_client_handle, - true, // useMutualTLS - c_cert_path, - c_key_path - ); - - if (result != 0) { - setverdict(fail, "Failed to set authentication parameters"); - mtc.stop; + if (not f_init_es2plus()) { + setverdict(fail, "RSP client initialization for ES2+ failed"); + return; } // Step 1: Order profile via ES2+ @@ -5688,7 +5747,7 @@ var JSON_ES2p_Request dl_req := { downloadOrderRequest := { header := { - functionRequesterIdentifier := "test.operator.com", + functionRequesterIdentifier := mp_es2plus_operator_id, functionCallIdentifier := "01234567890123456789012345678901" }, eid := c_eid1, @@ -5700,7 +5759,7 @@ var octetstring req_enc := enc_JSON_ES2p_Request(dl_req); var integer status_code; var charstring response := ext_RSPClient_sendHttpsPostWithAuth( - g_rsp_client_handle, + g_rsp_client_handle_es2p, c_path_download_order, oct2char(req_enc), g_pars_smdpp.smdp_es2p_server_port, @@ -5726,7 +5785,7 @@ var JSON_ES2p_Request conf_req := { confirmOrderRequest := { header := { - functionRequesterIdentifier := "test.operator.com", + functionRequesterIdentifier := mp_es2plus_operator_id, functionCallIdentifier := "02234567890123456789012345678901" }, iccid := new_iccid, @@ -5740,7 +5799,7 @@ req_enc := enc_JSON_ES2p_Request(conf_req); response := ext_RSPClient_sendHttpsPostWithAuth( - g_rsp_client_handle, + g_rsp_client_handle_es2p, c_path_confirm_order, oct2char(req_enc), g_pars_smdpp.smdp_es2p_server_port, @@ -5789,9 +5848,10 @@ f_validateAuthenticateClientResponse(authClientOk); // Handle confirmation code if required + var integer result; if (authClientOk.smdpSigned2.ccRequiredFlag == true) { log("Confirmation code is required for this profile"); - result := ext_RSPClient_setTransactionId(g_rsp_client_handle, authClientOk.transactionId); + result := ext_RSPClient_setTransactionId(g_rsp_client_handle_es9p, authClientOk.transactionId); if (result != 0) { setverdict(fail, "Failed to set transaction ID"); f_rsp_client_cleanup(); @@ -5799,7 +5859,7 @@ } var charstring confirmationCode := "12345678"; // Default test code - result := ext_RSPClient_setConfirmationCode(g_rsp_client_handle, confirmationCode); + result := ext_RSPClient_setConfirmationCode(g_rsp_client_handle_es9p, confirmationCode); if (result != 0) { setverdict(fail, "Failed to set confirmation code"); f_rsp_client_cleanup(); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41270?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ib59568379a9d454ea99d66550d6da8fd203681db Gerrit-Change-Number: 41270 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • ...
  • 64
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.