diff options
author | beck <> | 2023-07-08 11:28:03 +0000 |
---|---|---|
committer | beck <> | 2023-07-08 11:28:03 +0000 |
commit | de1ea0d71a59536dfa9a5b0b755c13d3d6eddbeb (patch) | |
tree | d54ef01ff15e142b0f06959b9ab9e89a03c5d01e /src | |
parent | 7206f78ba1f7dcccb571fd5c7f99d2ac1c35a9b4 (diff) | |
download | openbsd-de1ea0d71a59536dfa9a5b0b755c13d3d6eddbeb.tar.gz openbsd-de1ea0d71a59536dfa9a5b0b755c13d3d6eddbeb.tar.bz2 openbsd-de1ea0d71a59536dfa9a5b0b755c13d3d6eddbeb.zip |
Hide symbols in txt_db
ok tb@
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/Symbols.namespace | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/hidden/openssl/txt_db.h | 35 | ||||
-rw-r--r-- | src/lib/libcrypto/txt_db/txt_db.c | 8 |
3 files changed, 48 insertions, 1 deletions
diff --git a/src/lib/libcrypto/Symbols.namespace b/src/lib/libcrypto/Symbols.namespace index b134de290e..2c5ec993c2 100644 --- a/src/lib/libcrypto/Symbols.namespace +++ b/src/lib/libcrypto/Symbols.namespace | |||
@@ -2249,3 +2249,9 @@ _libre_MD4_Update | |||
2249 | _libre_MD4_Final | 2249 | _libre_MD4_Final |
2250 | _libre_MD4 | 2250 | _libre_MD4 |
2251 | _libre_MD4_Transform | 2251 | _libre_MD4_Transform |
2252 | _libre_TXT_DB_read | ||
2253 | _libre_TXT_DB_write | ||
2254 | _libre_TXT_DB_create_index | ||
2255 | _libre_TXT_DB_free | ||
2256 | _libre_TXT_DB_get_by_index | ||
2257 | _libre_TXT_DB_insert | ||
diff --git a/src/lib/libcrypto/hidden/openssl/txt_db.h b/src/lib/libcrypto/hidden/openssl/txt_db.h new file mode 100644 index 0000000000..f93dbc67d2 --- /dev/null +++ b/src/lib/libcrypto/hidden/openssl/txt_db.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* $OpenBSD: txt_db.h,v 1.1 2023/07/08 11:28:03 beck Exp $ */ | ||
2 | /* | ||
3 | * Copyright (c) 2023 Bob Beck <beck@openbsd.org> | ||
4 | * | ||
5 | * Permission to use, copy, modify, and distribute this software for any | ||
6 | * purpose with or without fee is hereby granted, provided that the above | ||
7 | * copyright notice and this permission notice appear in all copies. | ||
8 | * | ||
9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | */ | ||
17 | |||
18 | #ifndef _LIBCRYPTO_TXT_DB_H | ||
19 | #define _LIBCRYPTO_TXT_DB_H | ||
20 | |||
21 | #ifndef _MSC_VER | ||
22 | #include_next <openssl/txt_db.h> | ||
23 | #else | ||
24 | #include "../include/openssl/txt_db.h" | ||
25 | #endif | ||
26 | #include "crypto_namespace.h" | ||
27 | |||
28 | LCRYPTO_USED(TXT_DB_read); | ||
29 | LCRYPTO_USED(TXT_DB_write); | ||
30 | LCRYPTO_USED(TXT_DB_create_index); | ||
31 | LCRYPTO_USED(TXT_DB_free); | ||
32 | LCRYPTO_USED(TXT_DB_get_by_index); | ||
33 | LCRYPTO_USED(TXT_DB_insert); | ||
34 | |||
35 | #endif /* _LIBCRYPTO_TXT_DB_H */ | ||
diff --git a/src/lib/libcrypto/txt_db/txt_db.c b/src/lib/libcrypto/txt_db/txt_db.c index 26df76a9c2..7d1f82c49d 100644 --- a/src/lib/libcrypto/txt_db/txt_db.c +++ b/src/lib/libcrypto/txt_db/txt_db.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: txt_db.c,v 1.18 2014/07/11 08:44:49 jsing Exp $ */ | 1 | /* $OpenBSD: txt_db.c,v 1.19 2023/07/08 11:28:03 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 | * |
@@ -184,6 +184,7 @@ err: | |||
184 | } else | 184 | } else |
185 | return (ret); | 185 | return (ret); |
186 | } | 186 | } |
187 | LCRYPTO_ALIAS(TXT_DB_read); | ||
187 | 188 | ||
188 | OPENSSL_STRING * | 189 | OPENSSL_STRING * |
189 | TXT_DB_get_by_index(TXT_DB *db, int idx, OPENSSL_STRING *value) | 190 | TXT_DB_get_by_index(TXT_DB *db, int idx, OPENSSL_STRING *value) |
@@ -204,6 +205,7 @@ TXT_DB_get_by_index(TXT_DB *db, int idx, OPENSSL_STRING *value) | |||
204 | db->error = DB_ERROR_OK; | 205 | db->error = DB_ERROR_OK; |
205 | return (ret); | 206 | return (ret); |
206 | } | 207 | } |
208 | LCRYPTO_ALIAS(TXT_DB_get_by_index); | ||
207 | 209 | ||
208 | int | 210 | int |
209 | TXT_DB_create_index(TXT_DB *db, int field, int (*qual)(OPENSSL_STRING *), | 211 | TXT_DB_create_index(TXT_DB *db, int field, int (*qual)(OPENSSL_STRING *), |
@@ -241,6 +243,7 @@ TXT_DB_create_index(TXT_DB *db, int field, int (*qual)(OPENSSL_STRING *), | |||
241 | db->qual[field] = qual; | 243 | db->qual[field] = qual; |
242 | return (1); | 244 | return (1); |
243 | } | 245 | } |
246 | LCRYPTO_ALIAS(TXT_DB_create_index); | ||
244 | 247 | ||
245 | long | 248 | long |
246 | TXT_DB_write(BIO *out, TXT_DB *db) | 249 | TXT_DB_write(BIO *out, TXT_DB *db) |
@@ -291,6 +294,7 @@ err: | |||
291 | BUF_MEM_free(buf); | 294 | BUF_MEM_free(buf); |
292 | return (ret); | 295 | return (ret); |
293 | } | 296 | } |
297 | LCRYPTO_ALIAS(TXT_DB_write); | ||
294 | 298 | ||
295 | int | 299 | int |
296 | TXT_DB_insert(TXT_DB *db, OPENSSL_STRING *row) | 300 | TXT_DB_insert(TXT_DB *db, OPENSSL_STRING *row) |
@@ -329,6 +333,7 @@ TXT_DB_insert(TXT_DB *db, OPENSSL_STRING *row) | |||
329 | err: | 333 | err: |
330 | return (0); | 334 | return (0); |
331 | } | 335 | } |
336 | LCRYPTO_ALIAS(TXT_DB_insert); | ||
332 | 337 | ||
333 | void | 338 | void |
334 | TXT_DB_free(TXT_DB *db) | 339 | TXT_DB_free(TXT_DB *db) |
@@ -370,3 +375,4 @@ TXT_DB_free(TXT_DB *db) | |||
370 | } | 375 | } |
371 | free(db); | 376 | free(db); |
372 | } | 377 | } |
378 | LCRYPTO_ALIAS(TXT_DB_free); | ||