]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
cmp_client_test.c: fix partly too generous total_timeout limit for IR session with...
authorDr. David von Oheimb <dev@ddvo.net>
Thu, 7 May 2026 19:43:15 +0000 (21:43 +0200)
committerDr. David von Oheimb <dev@ddvo.net>
Wed, 10 Jun 2026 06:46:29 +0000 (08:46 +0200)
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
MergeDate: Wed Jun 10 06:46:36 2026
(Merged from https://github.com/openssl/openssl/pull/31111)

test/cmp_client_test.c

index 7e3ab256e60c1935e02bbb3ecce04ab65209d6f9..cd51d3d0e77350f2160fc951a70f1bc6e97fb755 100644 (file)
@@ -254,7 +254,9 @@ static int test_exec_REQ_ses_poll(int req_type, int check_after,
     return result;
 }
 
-static int checkAfter = 1;
+static const int checkAfter = 1;
+static const int pollCount = 3;
+
 static int test_exec_IR_ses_poll_ok(void)
 {
     return test_exec_REQ_ses_poll(OSSL_CMP_PKIBODY_IR, checkAfter, 2, 0,
@@ -272,7 +274,7 @@ static int test_exec_IR_ses_poll_no_timeout(void)
 static int test_exec_IR_ses_poll_total_timeout(void)
 {
     return test_exec_REQ_ses_poll(OSSL_CMP_PKIBODY_IR, checkAfter,
-        3 /* pollCount */, checkAfter + 4,
+        pollCount, (pollCount - 1) * checkAfter,
         OSSL_CMP_PKISTATUS_trans);
 }
 
@@ -482,7 +484,7 @@ static int test_exec_GENM_ses_poll_no_timeout(void)
 static int test_exec_GENM_ses_poll_total_timeout(void)
 {
     return test_exec_REQ_ses_poll(OSSL_CMP_PKIBODY_GENM, checkAfter,
-        3 /* pollCount */, checkAfter + 2,
+        pollCount, (pollCount - 1) * checkAfter,
         OSSL_CMP_PKISTATUS_trans);
 }