mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
pki: fix pki_key_ecdsa_to_key_type thread-safety
Resolves https://bugs.libssh.org/T214.
Signed-off-by: Jon Simons <jon@jonsimons.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
(cherry picked from commit 3664ba2800)
This commit is contained in:
@@ -94,7 +94,7 @@ static int pki_key_ecdsa_to_nid(EC_KEY *k)
|
||||
|
||||
static enum ssh_keytypes_e pki_key_ecdsa_to_key_type(EC_KEY *k)
|
||||
{
|
||||
static int nid;
|
||||
int nid;
|
||||
|
||||
nid = pki_key_ecdsa_to_nid(k);
|
||||
|
||||
|
||||
@@ -741,7 +741,7 @@ static int pki_key_ecdsa_to_nid(gcry_sexp_t k)
|
||||
|
||||
static enum ssh_keytypes_e pki_key_ecdsa_to_key_type(gcry_sexp_t k)
|
||||
{
|
||||
static int nid;
|
||||
int nid;
|
||||
|
||||
nid = pki_key_ecdsa_to_nid(k);
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ static int pki_key_ecdsa_to_nid(mbedtls_ecdsa_context *ecdsa)
|
||||
|
||||
static enum ssh_keytypes_e pki_key_ecdsa_to_key_type(mbedtls_ecdsa_context *ecdsa)
|
||||
{
|
||||
static int nid;
|
||||
int nid;
|
||||
|
||||
nid = pki_key_ecdsa_to_nid(ecdsa);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user