diff options
author | beck <> | 2023-07-08 06:13:08 +0000 |
---|---|---|
committer | beck <> | 2023-07-08 06:13:08 +0000 |
commit | e1ea593bb1fac828fbd14800422748eda7a2febd (patch) | |
tree | f544977528a6206be45abe2972a94adb7095aa0e /src | |
parent | 9a67247dade8301b319163999154fc477bea9462 (diff) | |
download | openbsd-e1ea593bb1fac828fbd14800422748eda7a2febd.tar.gz openbsd-e1ea593bb1fac828fbd14800422748eda7a2febd.tar.bz2 openbsd-e1ea593bb1fac828fbd14800422748eda7a2febd.zip |
Hide symbols in sm3
ok tb@ jsing@
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/Symbols.namespace | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/hidden/openssl/sm3.h | 32 | ||||
-rw-r--r-- | src/lib/libcrypto/sm3/sm3.c | 5 |
3 files changed, 39 insertions, 1 deletions
diff --git a/src/lib/libcrypto/Symbols.namespace b/src/lib/libcrypto/Symbols.namespace index fbd8757bb0..b62f9db02b 100644 --- a/src/lib/libcrypto/Symbols.namespace +++ b/src/lib/libcrypto/Symbols.namespace | |||
@@ -1792,3 +1792,6 @@ _libre_lh_node_usage_stats | |||
1792 | _libre_lh_stats_bio | 1792 | _libre_lh_stats_bio |
1793 | _libre_lh_node_stats_bio | 1793 | _libre_lh_node_stats_bio |
1794 | _libre_lh_node_usage_stats_bio | 1794 | _libre_lh_node_usage_stats_bio |
1795 | _libre_SM3_Init | ||
1796 | _libre_SM3_Update | ||
1797 | _libre_SM3_Final | ||
diff --git a/src/lib/libcrypto/hidden/openssl/sm3.h b/src/lib/libcrypto/hidden/openssl/sm3.h new file mode 100644 index 0000000000..12a0e1ad1a --- /dev/null +++ b/src/lib/libcrypto/hidden/openssl/sm3.h | |||
@@ -0,0 +1,32 @@ | |||
1 | /* $OpenBSD: sm3.h,v 1.3 2023/07/08 06:13:08 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_SM3_H | ||
19 | #define _LIBCRYPTO_SM3_H | ||
20 | |||
21 | #ifndef _MSC_VER | ||
22 | #include_next <openssl/sm3.h> | ||
23 | #else | ||
24 | #include "../include/openssl/sm3.h" | ||
25 | #endif | ||
26 | #include "crypto_namespace.h" | ||
27 | |||
28 | LCRYPTO_USED(SM3_Init); | ||
29 | LCRYPTO_USED(SM3_Update); | ||
30 | LCRYPTO_USED(SM3_Final); | ||
31 | |||
32 | #endif /* _LIBCRYPTO_SM3_H */ | ||
diff --git a/src/lib/libcrypto/sm3/sm3.c b/src/lib/libcrypto/sm3/sm3.c index df4a4e8229..a787006434 100644 --- a/src/lib/libcrypto/sm3/sm3.c +++ b/src/lib/libcrypto/sm3/sm3.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sm3.c,v 1.4 2023/07/07 19:37:54 beck Exp $ */ | 1 | /* $OpenBSD: sm3.c,v 1.5 2023/07/08 06:13:08 beck Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018, Ribose Inc | 3 | * Copyright (c) 2018, Ribose Inc |
4 | * | 4 | * |
@@ -20,6 +20,8 @@ | |||
20 | #include <openssl/sm3.h> | 20 | #include <openssl/sm3.h> |
21 | 21 | ||
22 | #include "sm3_local.h" | 22 | #include "sm3_local.h" |
23 | LCRYPTO_ALIAS(SM3_Update); | ||
24 | LCRYPTO_ALIAS(SM3_Final); | ||
23 | 25 | ||
24 | int | 26 | int |
25 | SM3_Init(SM3_CTX *c) | 27 | SM3_Init(SM3_CTX *c) |
@@ -35,6 +37,7 @@ SM3_Init(SM3_CTX *c) | |||
35 | c->H = SM3_H; | 37 | c->H = SM3_H; |
36 | return 1; | 38 | return 1; |
37 | } | 39 | } |
40 | LCRYPTO_ALIAS(SM3_Init); | ||
38 | 41 | ||
39 | void | 42 | void |
40 | SM3_block_data_order(SM3_CTX *ctx, const void *p, size_t num) | 43 | SM3_block_data_order(SM3_CTX *ctx, const void *p, size_t num) |