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 <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>

Reply via email to