Skip to content

Commit

Permalink
terminate process if requested to load a PKCS#11 provider that
Browse files Browse the repository at this point in the history
isn't a PKCS#11 provider; from / ok markus@
  • Loading branch information
djmdjm committed Jul 19, 2023
1 parent 82821a6 commit f03a4fa
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions usr.bin/ssh/ssh-pkcs11.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: ssh-pkcs11.c,v 1.56 2023/03/08 05:33:53 tb Exp $ */
/* $OpenBSD: ssh-pkcs11.c,v 1.57 2023/07/19 13:55:53 djm Exp $ */
/*
* Copyright (c) 2010 Markus Friedl. All rights reserved.
* Copyright (c) 2014 Pedro Martelletto. All rights reserved.
Expand Down Expand Up @@ -1512,10 +1512,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;
Expand Down

0 comments on commit f03a4fa

Please sign in to comment.