summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2023-07-13 12:09:34 +1000
committerDamien Miller <djm@mindrot.org>2023-07-19 16:23:59 +1000
commitb23fe83f06ee7e721033769cfa03ae840476d280 (patch)
tree8e9a5d7a684b7a0683e997bb19af52261f1a5c84
parentcb30fbdbee869f1ce11f06aa97e1cb8717a0b645 (diff)
terminate pkcs11 process for bad libraries
-rw-r--r--ssh-pkcs11.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ssh-pkcs11.c b/ssh-pkcs11.c
index 6be647ec..ebddf6c3 100644
--- a/ssh-pkcs11.c
+++ b/ssh-pkcs11.c
@@ -1537,10 +1537,8 @@ pkcs11_register_provider(char *provider_id, char *pin,
error("dlopen %s failed: %s", provider_id, dlerror());
goto fail;
}
- if ((getfunctionlist = dlsym(handle, "C_GetFunctionList")) == NULL) {
- error("dlsym(C_GetFunctionList) failed: %s", dlerror());
- goto fail;
- }
+ if ((getfunctionlist = dlsym(handle, "C_GetFunctionList")) == NULL)
+ fatal("dlsym(C_GetFunctionList) failed: %s", dlerror());
p = xcalloc(1, sizeof(*p));
p->name = xstrdup(provider_id);
p->handle = handle;