[Openvpn-devel,v1] Fix PIN cache time in test_pkcs11.c

Message ID 20251010063934.18197-1-gert@greenie.muc.de
State New
Headers show
Series [Openvpn-devel,v1] Fix PIN cache time in test_pkcs11.c | expand

Commit Message

Gert Doering Oct. 10, 2025, 6:39 a.m. UTC
From: Selva Nair <selva.nair@gmail.com>

Github: closes OpenVPN/openvpn#861

Change-Id: Ic6fd6ba676b4741da7811ffc7c9688d4673465f8
Signed-off-by: Selva Nair <selva.nair@gmail.com>
Acked-by: Arne Schwabe <arne-openvpn@rfc2549.org>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1263
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1263
This mail reflects revision 1 of this Change.

Acked-by according to Gerrit (reflected above):
Arne Schwabe <arne-openvpn@rfc2549.org>

Comments

Gert Doering Oct. 10, 2025, 7:16 a.m. UTC | #1
Thanks for the quick fix.  I have not tested this, but the explanation
makes sense (and all BBs are fine, though that could be Frank's "let's
just retry this particular test if it fails" change).

Your patch has been applied to the master branch.

commit f9bfd1c405f86617ace2f63ff29f1a4099b6920b
Author: Selva Nair
Date:   Fri Oct 10 08:39:27 2025 +0200

     Fix PIN cache time in test_pkcs11.c

     Signed-off-by: Selva Nair <selva.nair@gmail.com>
     Acked-by: Arne Schwabe <arne-openvpn@rfc2549.org>
     Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1263
     Message-Id: <20251010063934.18197-1-gert@greenie.muc.de>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg33306.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

diff --git a/tests/unit_tests/openvpn/test_pkcs11.c b/tests/unit_tests/openvpn/test_pkcs11.c
index a4ba088..01cbf96 100644
--- a/tests/unit_tests/openvpn/test_pkcs11.c
+++ b/tests/unit_tests/openvpn/test_pkcs11.c
@@ -320,7 +320,7 @@ 
     /* set default propq as we do in ssl_openssl.c */
     EVP_set_default_properties(tls_libctx, "?provider!=ovpn.xkey");
 #endif
-    pkcs11_initialize(true, 0); /* protected auth enabled, pin-cache = 0 */
+    pkcs11_initialize(true, 60); /* protected auth enabled, pin-cache = 60s */
     pkcs11_addProvider(SOFTHSM2_MODULE_PATH, false, 0, false);
     return 0;
 }