mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-27 13:21:11 +03: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>
This commit is contained in:
@@ -97,7 +97,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