diff options
author | jsing <> | 2024-07-14 14:32:45 +0000 |
---|---|---|
committer | jsing <> | 2024-07-14 14:32:45 +0000 |
commit | 3006ff83f98c4783ee71689e5e63047b95dc7bca (patch) | |
tree | be3db2d41eeefc4911bb452b4bdad674ec31828b /src/lib/libcrypto/lhash/lhash.c | |
parent | 1321c907704edb09732b01534fbb20795096f774 (diff) | |
download | openbsd-3006ff83f98c4783ee71689e5e63047b95dc7bca.tar.gz openbsd-3006ff83f98c4783ee71689e5e63047b95dc7bca.tar.bz2 openbsd-3006ff83f98c4783ee71689e5e63047b95dc7bca.zip |
Remove lhash_local.h.
lhash_local.h was previously needed since conf/conf_api.c and
objects/obj_dat.c were fiddling with lhash internals when deleting via a
callback. Since we no longer need to do that, inline the structs in
lhash.c and remove the header.
ok tb@
Diffstat (limited to 'src/lib/libcrypto/lhash/lhash.c')
-rw-r--r-- | src/lib/libcrypto/lhash/lhash.c | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/src/lib/libcrypto/lhash/lhash.c b/src/lib/libcrypto/lhash/lhash.c index 150831c116..aa532267de 100644 --- a/src/lib/libcrypto/lhash/lhash.c +++ b/src/lib/libcrypto/lhash/lhash.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: lhash.c,v 1.27 2024/06/30 14:13:08 jsing Exp $ */ | 1 | /* $OpenBSD: lhash.c,v 1.28 2024/07/14 14:32:45 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -65,13 +65,34 @@ | |||
65 | #include <openssl/crypto.h> | 65 | #include <openssl/crypto.h> |
66 | #include <openssl/lhash.h> | 66 | #include <openssl/lhash.h> |
67 | 67 | ||
68 | #include "lhash_local.h" | ||
69 | |||
70 | #undef MIN_NODES | 68 | #undef MIN_NODES |
71 | #define MIN_NODES 16 | 69 | #define MIN_NODES 16 |
72 | #define UP_LOAD (2*LH_LOAD_MULT) /* load times 256 (default 2) */ | 70 | #define UP_LOAD (2*LH_LOAD_MULT) /* load times 256 (default 2) */ |
73 | #define DOWN_LOAD (LH_LOAD_MULT) /* load times 256 (default 1) */ | 71 | #define DOWN_LOAD (LH_LOAD_MULT) /* load times 256 (default 1) */ |
74 | 72 | ||
73 | typedef struct lhash_node_st { | ||
74 | void *data; | ||
75 | struct lhash_node_st *next; | ||
76 | #ifndef OPENSSL_NO_HASH_COMP | ||
77 | unsigned long hash; | ||
78 | #endif | ||
79 | } LHASH_NODE; | ||
80 | |||
81 | struct lhash_st { | ||
82 | LHASH_NODE **b; | ||
83 | LHASH_COMP_FN_TYPE comp; | ||
84 | LHASH_HASH_FN_TYPE hash; | ||
85 | unsigned int num_nodes; | ||
86 | unsigned int num_alloc_nodes; | ||
87 | unsigned int p; | ||
88 | unsigned int pmax; | ||
89 | unsigned long up_load; /* load times 256 */ | ||
90 | unsigned long down_load; /* load times 256 */ | ||
91 | unsigned long num_items; | ||
92 | |||
93 | int error; | ||
94 | } /* _LHASH */; | ||
95 | |||
75 | static void | 96 | static void |
76 | expand(_LHASH *lh) | 97 | expand(_LHASH *lh) |
77 | { | 98 | { |