summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/lhash
diff options
context:
space:
mode:
authorbeck <>2023-07-07 13:40:44 +0000
committerbeck <>2023-07-07 13:40:44 +0000
commit6f5543ad3e9567cbb0c420be9104b1c9a41f8370 (patch)
tree4ff69f17732c4c2fea8cf75b4552dab0cd48119e /src/lib/libcrypto/lhash
parenta9cdc101468391df513beb27c13bf27170418093 (diff)
downloadopenbsd-6f5543ad3e9567cbb0c420be9104b1c9a41f8370.tar.gz
openbsd-6f5543ad3e9567cbb0c420be9104b1c9a41f8370.tar.bz2
openbsd-6f5543ad3e9567cbb0c420be9104b1c9a41f8370.zip
Hide symbols in lhash, pem, and rc2
ok jsing@
Diffstat (limited to 'src/lib/libcrypto/lhash')
-rw-r--r--src/lib/libcrypto/lhash/lh_stats.c11
-rw-r--r--src/lib/libcrypto/lhash/lhash.c11
2 files changed, 20 insertions, 2 deletions
diff --git a/src/lib/libcrypto/lhash/lh_stats.c b/src/lib/libcrypto/lhash/lh_stats.c
index e7dde47806..123792a2ab 100644
--- a/src/lib/libcrypto/lhash/lh_stats.c
+++ b/src/lib/libcrypto/lhash/lh_stats.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: lh_stats.c,v 1.12 2014/07/11 08:44:48 jsing Exp $ */ 1/* $OpenBSD: lh_stats.c,v 1.13 2023/07/07 13:40:44 beck 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 *
@@ -96,6 +96,7 @@ lh_stats(LHASH *lh, FILE *out)
96 fprintf(out, "down_load = %lu\n", lh->down_load); 96 fprintf(out, "down_load = %lu\n", lh->down_load);
97#endif 97#endif
98} 98}
99LCRYPTO_ALIAS(lh_stats);
99 100
100void 101void
101lh_node_stats(LHASH *lh, FILE *out) 102lh_node_stats(LHASH *lh, FILE *out)
@@ -109,6 +110,7 @@ lh_node_stats(LHASH *lh, FILE *out)
109 fprintf(out, "node %6u -> %3u\n", i, num); 110 fprintf(out, "node %6u -> %3u\n", i, num);
110 } 111 }
111} 112}
113LCRYPTO_ALIAS(lh_node_stats);
112 114
113void 115void
114lh_node_usage_stats(LHASH *lh, FILE *out) 116lh_node_usage_stats(LHASH *lh, FILE *out)
@@ -136,6 +138,7 @@ lh_node_usage_stats(LHASH *lh, FILE *out)
136 (int)(total / n_used), 138 (int)(total / n_used),
137 (int)((total % n_used) * 100 / n_used)); 139 (int)((total % n_used) * 100 / n_used));
138} 140}
141LCRYPTO_ALIAS(lh_node_usage_stats);
139 142
140#else 143#else
141 144
@@ -152,6 +155,7 @@ lh_stats(const _LHASH *lh, FILE *fp)
152 BIO_free(bp); 155 BIO_free(bp);
153end:; 156end:;
154} 157}
158LCRYPTO_ALIAS(lh_stats);
155 159
156void 160void
157lh_node_stats(const _LHASH *lh, FILE *fp) 161lh_node_stats(const _LHASH *lh, FILE *fp)
@@ -166,6 +170,7 @@ lh_node_stats(const _LHASH *lh, FILE *fp)
166 BIO_free(bp); 170 BIO_free(bp);
167end:; 171end:;
168} 172}
173LCRYPTO_ALIAS(lh_node_stats);
169 174
170void 175void
171lh_node_usage_stats(const _LHASH *lh, FILE *fp) 176lh_node_usage_stats(const _LHASH *lh, FILE *fp)
@@ -180,6 +185,7 @@ lh_node_usage_stats(const _LHASH *lh, FILE *fp)
180 BIO_free(bp); 185 BIO_free(bp);
181end:; 186end:;
182} 187}
188LCRYPTO_ALIAS(lh_node_usage_stats);
183 189
184 190
185void 191void
@@ -210,6 +216,7 @@ lh_stats_bio(const _LHASH *lh, BIO *out)
210 BIO_printf(out, "down_load = %lu\n", lh->down_load); 216 BIO_printf(out, "down_load = %lu\n", lh->down_load);
211#endif 217#endif
212} 218}
219LCRYPTO_ALIAS(lh_stats_bio);
213 220
214void 221void
215lh_node_stats_bio(const _LHASH *lh, BIO *out) 222lh_node_stats_bio(const _LHASH *lh, BIO *out)
@@ -223,6 +230,7 @@ lh_node_stats_bio(const _LHASH *lh, BIO *out)
223 BIO_printf(out, "node %6u -> %3u\n", i, num); 230 BIO_printf(out, "node %6u -> %3u\n", i, num);
224 } 231 }
225} 232}
233LCRYPTO_ALIAS(lh_node_stats_bio);
226 234
227void 235void
228lh_node_usage_stats_bio(const _LHASH *lh, BIO *out) 236lh_node_usage_stats_bio(const _LHASH *lh, BIO *out)
@@ -250,5 +258,6 @@ lh_node_usage_stats_bio(const _LHASH *lh, BIO *out)
250 (int)(total / n_used), 258 (int)(total / n_used),
251 (int)((total % n_used) * 100 / n_used)); 259 (int)((total % n_used) * 100 / n_used));
252} 260}
261LCRYPTO_ALIAS(lh_node_usage_stats_bio);
253 262
254#endif 263#endif
diff --git a/src/lib/libcrypto/lhash/lhash.c b/src/lib/libcrypto/lhash/lhash.c
index a68e466700..3adec71ed6 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.19 2019/05/12 00:09:59 beck Exp $ */ 1/* $OpenBSD: lhash.c,v 1.20 2023/07/07 13:40:44 beck 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 *
@@ -133,6 +133,7 @@ lh_new(LHASH_HASH_FN_TYPE h, LHASH_COMP_FN_TYPE c)
133 133
134 return (ret); 134 return (ret);
135} 135}
136LCRYPTO_ALIAS(lh_new);
136 137
137void 138void
138lh_free(_LHASH *lh) 139lh_free(_LHASH *lh)
@@ -154,6 +155,7 @@ lh_free(_LHASH *lh)
154 free(lh->b); 155 free(lh->b);
155 free(lh); 156 free(lh);
156} 157}
158LCRYPTO_ALIAS(lh_free);
157 159
158void * 160void *
159lh_insert(_LHASH *lh, void *data) 161lh_insert(_LHASH *lh, void *data)
@@ -191,6 +193,7 @@ lh_insert(_LHASH *lh, void *data)
191 } 193 }
192 return (ret); 194 return (ret);
193} 195}
196LCRYPTO_ALIAS(lh_insert);
194 197
195void * 198void *
196lh_delete(_LHASH *lh, const void *data) 199lh_delete(_LHASH *lh, const void *data)
@@ -220,6 +223,7 @@ lh_delete(_LHASH *lh, const void *data)
220 223
221 return (ret); 224 return (ret);
222} 225}
226LCRYPTO_ALIAS(lh_delete);
223 227
224void * 228void *
225lh_retrieve(_LHASH *lh, const void *data) 229lh_retrieve(_LHASH *lh, const void *data)
@@ -240,6 +244,7 @@ lh_retrieve(_LHASH *lh, const void *data)
240 } 244 }
241 return (ret); 245 return (ret);
242} 246}
247LCRYPTO_ALIAS(lh_retrieve);
243 248
244static void 249static void
245doall_util_fn(_LHASH *lh, int use_arg, LHASH_DOALL_FN_TYPE func, 250doall_util_fn(_LHASH *lh, int use_arg, LHASH_DOALL_FN_TYPE func,
@@ -275,12 +280,14 @@ lh_doall(_LHASH *lh, LHASH_DOALL_FN_TYPE func)
275{ 280{
276 doall_util_fn(lh, 0, func, (LHASH_DOALL_ARG_FN_TYPE)0, NULL); 281 doall_util_fn(lh, 0, func, (LHASH_DOALL_ARG_FN_TYPE)0, NULL);
277} 282}
283LCRYPTO_ALIAS(lh_doall);
278 284
279void 285void
280lh_doall_arg(_LHASH *lh, LHASH_DOALL_ARG_FN_TYPE func, void *arg) 286lh_doall_arg(_LHASH *lh, LHASH_DOALL_ARG_FN_TYPE func, void *arg)
281{ 287{
282 doall_util_fn(lh, 1, (LHASH_DOALL_FN_TYPE)0, func, arg); 288 doall_util_fn(lh, 1, (LHASH_DOALL_FN_TYPE)0, func, arg);
283} 289}
290LCRYPTO_ALIAS(lh_doall_arg);
284 291
285static void 292static void
286expand(_LHASH *lh) 293expand(_LHASH *lh)
@@ -426,9 +433,11 @@ lh_strhash(const char *c)
426 } 433 }
427 return (ret >> 16) ^ ret; 434 return (ret >> 16) ^ ret;
428} 435}
436LCRYPTO_ALIAS(lh_strhash);
429 437
430unsigned long 438unsigned long
431lh_num_items(const _LHASH *lh) 439lh_num_items(const _LHASH *lh)
432{ 440{
433 return lh ? lh->num_items : 0; 441 return lh ? lh->num_items : 0;
434} 442}
443LCRYPTO_ALIAS(lh_num_items);