[Openvpn-devel,1/3] unify code paths for loading PKCS11

Message ID afaffee7-1c3a-79ad-9eca-ec7e3e5941b9@astos.de
State Superseded
Headers show
Series [Openvpn-devel,1/3] unify code paths for loading PKCS11 | expand

Commit Message

Marc Becker Dec. 7, 2022, 12:59 a.m. UTC
---
  src/openvpn/pkcs11.c | 12 +-----------
  1 file changed, 1 insertion(+), 11 deletions(-)

provider, rv, pkcs11h_getMessage(rv));
          goto cleanup;

Patch

diff --git a/src/openvpn/pkcs11.c b/src/openvpn/pkcs11.c
index 507af17c..b6ceb582 100644
--- a/src/openvpn/pkcs11.c
+++ b/src/openvpn/pkcs11.c
@@ -853,17 +853,7 @@  show_pkcs11_ids(
          goto cleanup;
      }

-    if (
-        (rv = pkcs11h_addProvider(
-             provider,
-             provider,
-             TRUE,
-             0,
-             FALSE,
-             0,
-             cert_private ? TRUE : FALSE
-             )) != CKR_OK
-        )
+    if (!pkcs11_addProvider(provider, TRUE, 0, cert_private ? TRUE : 
FALSE))
      {
          msg(M_FATAL, "PKCS#11: Cannot add provider '%s' %ld-'%s'",