It is no longer static.
Also add it to libssl only with quic enabled.
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26882)
#include "internal/hashfunc.h"
-ossl_unused uint64_t fnv1a_hash(uint8_t *key, size_t len)
+ossl_unused uint64_t ossl_fnv1a_hash(uint8_t *key, size_t len)
{
uint64_t hash = 0xcbf29ce484222325ULL;
size_t i;
goto err;
if (new->config.ht_hash_fn == NULL)
- new->config.ht_hash_fn = fnv1a_hash;
+ new->config.ht_hash_fn = ossl_fnv1a_hash;
return new;
/**
* Generalized fnv1a 64 bit hash function
*/
-ossl_unused uint64_t fnv1a_hash(uint8_t *key, size_t len);
+ossl_unused uint64_t ossl_fnv1a_hash(uint8_t *key, size_t len);
#endif
# For shared builds we need to include the libcrypto packet.c and quic_vlint.c
# in libssl as well.
SHARED_SOURCE[../libssl]=\
- ../crypto/packet.c ../crypto/quic_vlint.c ../crypto/time.c \
- ../crypto/hashtable/hashfunc.c
+ ../crypto/packet.c ../crypto/quic_vlint.c ../crypto/time.c
IF[{- !$disabled{'deprecated-3.0'} -}]
SOURCE[../libssl]=ssl_rsa_legacy.c
IF[{- !$disabled{quic} -}]
SOURCE[../libssl]=priority_queue.c
+ SHARED_SOURCE[../libssl] = ../crypto/hashtable/hashfunc.c
IF[{- $disabled{siphash} -}]
SOURCE[../libssl]=../crypto/siphash/siphash.c
ELSE
static unsigned long quic_token_hash(const QUIC_TOKEN *item)
{
- return (unsigned long)fnv1a_hash(item->hashkey, item->hashkey_len);
+ return (unsigned long)ossl_fnv1a_hash(item->hashkey, item->hashkey_len);
}
static int quic_token_cmp(const QUIC_TOKEN *a, const QUIC_TOKEN *b)