Add ossl_lhash symbols

Partial fix for #12964

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14473)
This commit is contained in:
Shane Lontis 2021-03-09 13:37:22 +10:00
parent b54cab31d2
commit 285aa80ef1
4 changed files with 6 additions and 6 deletions

View File

@ -10,7 +10,7 @@
#include "e_os.h" /* strcasecmp */
#include "internal/namemap.h"
#include <openssl/lhash.h>
#include "crypto/lhash.h" /* openssl_lh_strcasehash */
#include "crypto/lhash.h" /* ossl_lh_strcasehash */
#include "internal/tsan_assist.h"
/*-
@ -47,7 +47,7 @@ struct ossl_namemap_st {
static unsigned long namenum_hash(const NAMENUM_ENTRY *n)
{
return openssl_lh_strcasehash(n->name);
return ossl_lh_strcasehash(n->name);
}
static int namenum_cmp(const NAMENUM_ENTRY *a, const NAMENUM_ENTRY *b)

View File

@ -360,7 +360,7 @@ unsigned long OPENSSL_LH_strhash(const char *c)
return (ret >> 16) ^ ret;
}
unsigned long openssl_lh_strcasehash(const char *c)
unsigned long ossl_lh_strcasehash(const char *c)
{
unsigned long ret = 0;
long n;

View File

@ -104,7 +104,7 @@ int OBJ_NAME_new_index(unsigned long (*hash_func) (const char *),
ret = 0;
goto out;
}
name_funcs->hash_func = openssl_lh_strcasehash;
name_funcs->hash_func = ossl_lh_strcasehash;
name_funcs->cmp_func = obj_strcasecmp;
push = sk_NAME_FUNCS_push(name_funcs_stack, name_funcs);
@ -154,7 +154,7 @@ static unsigned long obj_name_hash(const OBJ_NAME *a)
sk_NAME_FUNCS_value(name_funcs_stack,
a->type)->hash_func(a->name);
} else {
ret = openssl_lh_strcasehash(a->name);
ret = ossl_lh_strcasehash(a->name);
}
ret ^= a->type;
return ret;

View File

@ -11,6 +11,6 @@
# define OSSL_CRYPTO_LHASH_H
# pragma once
unsigned long openssl_lh_strcasehash(const char *);
unsigned long ossl_lh_strcasehash(const char *);
#endif /* OSSL_CRYPTO_LHASH_H */