mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-25 14:54:45 +02:00
upstream: terminate process if requested to load a PKCS#11 provider
that isn't a PKCS#11 provider; from / ok markus@ OpenBSD-Commit-ID: 39532cf18b115881bb4cfaee32084497aadfa05c
This commit is contained in:
parent
f3f56df8ec
commit
892506b136
@ -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) 2010 Markus Friedl. All rights reserved.
|
||||||
* Copyright (c) 2014 Pedro Martelletto. All rights reserved.
|
* Copyright (c) 2014 Pedro Martelletto. All rights reserved.
|
||||||
@ -1537,10 +1537,8 @@ pkcs11_register_provider(char *provider_id, char *pin,
|
|||||||
error("dlopen %s failed: %s", provider_id, dlerror());
|
error("dlopen %s failed: %s", provider_id, dlerror());
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
if ((getfunctionlist = dlsym(handle, "C_GetFunctionList")) == NULL) {
|
if ((getfunctionlist = dlsym(handle, "C_GetFunctionList")) == NULL)
|
||||||
error("dlsym(C_GetFunctionList) failed: %s", dlerror());
|
fatal("dlsym(C_GetFunctionList) failed: %s", dlerror());
|
||||||
goto fail;
|
|
||||||
}
|
|
||||||
p = xcalloc(1, sizeof(*p));
|
p = xcalloc(1, sizeof(*p));
|
||||||
p->name = xstrdup(provider_id);
|
p->name = xstrdup(provider_id);
|
||||||
p->handle = handle;
|
p->handle = handle;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user