diff options
author | beck <> | 2023-07-07 12:01:32 +0000 |
---|---|---|
committer | beck <> | 2023-07-07 12:01:32 +0000 |
commit | 5c0527aa790cba96ac1060e17d6a3909694d8e4e (patch) | |
tree | 088d60cfe20bcd912db9923f7699deabc41696db /src | |
parent | 7e8c1dd29d6e69da1876294635c98160b2707e56 (diff) | |
download | openbsd-5c0527aa790cba96ac1060e17d6a3909694d8e4e.tar.gz openbsd-5c0527aa790cba96ac1060e17d6a3909694d8e4e.tar.bz2 openbsd-5c0527aa790cba96ac1060e17d6a3909694d8e4e.zip |
hide symbols in sm, rand, and poly1305
ok jsing@
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/Symbols.namespace | 24 | ||||
-rw-r--r-- | src/lib/libcrypto/hidden/openssl/poly1305.h | 32 | ||||
-rw-r--r-- | src/lib/libcrypto/hidden/openssl/rand.h | 44 | ||||
-rw-r--r-- | src/lib/libcrypto/hidden/openssl/sm3.h | 32 | ||||
-rw-r--r-- | src/lib/libcrypto/hidden/openssl/sm4.h | 32 | ||||
-rw-r--r-- | src/lib/libcrypto/poly1305/poly1305.c | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/rand/rand_err.c | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/rand/rand_lib.c | 13 | ||||
-rw-r--r-- | src/lib/libcrypto/rand/randfile.c | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/sm3/sm3.c | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/sm4/sm4.c | 5 |
11 files changed, 192 insertions, 6 deletions
diff --git a/src/lib/libcrypto/Symbols.namespace b/src/lib/libcrypto/Symbols.namespace index cbf06b4d23..74fe98cd7a 100644 --- a/src/lib/libcrypto/Symbols.namespace +++ b/src/lib/libcrypto/Symbols.namespace | |||
@@ -1263,6 +1263,30 @@ _libre_BIO_vprintf | |||
1263 | _libre_BIO_snprintf | 1263 | _libre_BIO_snprintf |
1264 | _libre_BIO_vsnprintf | 1264 | _libre_BIO_vsnprintf |
1265 | _libre_ERR_load_BIO_strings | 1265 | _libre_ERR_load_BIO_strings |
1266 | _libre_SM4_set_key | ||
1267 | _libre_SM4_decrypt | ||
1268 | _libre_SM4_encrypt | ||
1269 | _libre_SM3_Init | ||
1270 | _libre_SM3_Update | ||
1271 | _libre_SM3_Final | ||
1272 | _libre_RAND_set_rand_method | ||
1273 | _libre_RAND_get_rand_method | ||
1274 | _libre_RAND_set_rand_engine | ||
1275 | _libre_RAND_SSLeay | ||
1276 | _libre_RAND_cleanup | ||
1277 | _libre_RAND_bytes | ||
1278 | _libre_RAND_pseudo_bytes | ||
1279 | _libre_RAND_seed | ||
1280 | _libre_RAND_add | ||
1281 | _libre_RAND_load_file | ||
1282 | _libre_RAND_write_file | ||
1283 | _libre_RAND_file_name | ||
1284 | _libre_RAND_status | ||
1285 | _libre_RAND_poll | ||
1286 | _libre_ERR_load_RAND_strings | ||
1287 | _libre_CRYPTO_poly1305_init | ||
1288 | _libre_CRYPTO_poly1305_update | ||
1289 | _libre_CRYPTO_poly1305_finish | ||
1266 | _libre_TS_REQ_new | 1290 | _libre_TS_REQ_new |
1267 | _libre_TS_REQ_free | 1291 | _libre_TS_REQ_free |
1268 | _libre_i2d_TS_REQ | 1292 | _libre_i2d_TS_REQ |
diff --git a/src/lib/libcrypto/hidden/openssl/poly1305.h b/src/lib/libcrypto/hidden/openssl/poly1305.h new file mode 100644 index 0000000000..0959c560ee --- /dev/null +++ b/src/lib/libcrypto/hidden/openssl/poly1305.h | |||
@@ -0,0 +1,32 @@ | |||
1 | /* $OpenBSD: poly1305.h,v 1.1 2023/07/07 12:01:32 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_POLY1305_H | ||
19 | #define _LIBCRYPTO_POLY1305_H | ||
20 | |||
21 | #ifndef _MSC_VER | ||
22 | #include_next <openssl/poly1305.h> | ||
23 | #else | ||
24 | #include "../include/openssl/poly1305.h" | ||
25 | #endif | ||
26 | #include "crypto_namespace.h" | ||
27 | |||
28 | LCRYPTO_USED(CRYPTO_poly1305_init); | ||
29 | LCRYPTO_USED(CRYPTO_poly1305_update); | ||
30 | LCRYPTO_USED(CRYPTO_poly1305_finish); | ||
31 | |||
32 | #endif /* _LIBCRYPTO_POLY1305_H */ | ||
diff --git a/src/lib/libcrypto/hidden/openssl/rand.h b/src/lib/libcrypto/hidden/openssl/rand.h new file mode 100644 index 0000000000..0bec707a8a --- /dev/null +++ b/src/lib/libcrypto/hidden/openssl/rand.h | |||
@@ -0,0 +1,44 @@ | |||
1 | /* $OpenBSD: rand.h,v 1.1 2023/07/07 12:01:32 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_RAND_H | ||
19 | #define _LIBCRYPTO_RAND_H | ||
20 | |||
21 | #ifndef _MSC_VER | ||
22 | #include_next <openssl/rand.h> | ||
23 | #else | ||
24 | #include "../include/openssl/rand.h" | ||
25 | #endif | ||
26 | #include "crypto_namespace.h" | ||
27 | |||
28 | LCRYPTO_USED(RAND_set_rand_method); | ||
29 | LCRYPTO_USED(RAND_get_rand_method); | ||
30 | LCRYPTO_USED(RAND_set_rand_engine); | ||
31 | LCRYPTO_USED(RAND_SSLeay); | ||
32 | LCRYPTO_USED(RAND_cleanup); | ||
33 | LCRYPTO_USED(RAND_bytes); | ||
34 | LCRYPTO_USED(RAND_pseudo_bytes); | ||
35 | LCRYPTO_USED(RAND_seed); | ||
36 | LCRYPTO_USED(RAND_add); | ||
37 | LCRYPTO_USED(RAND_load_file); | ||
38 | LCRYPTO_USED(RAND_write_file); | ||
39 | LCRYPTO_USED(RAND_file_name); | ||
40 | LCRYPTO_USED(RAND_status); | ||
41 | LCRYPTO_USED(RAND_poll); | ||
42 | LCRYPTO_USED(ERR_load_RAND_strings); | ||
43 | |||
44 | #endif /* _LIBCRYPTO_RAND_H */ | ||
diff --git a/src/lib/libcrypto/hidden/openssl/sm3.h b/src/lib/libcrypto/hidden/openssl/sm3.h new file mode 100644 index 0000000000..3d0a4cd269 --- /dev/null +++ b/src/lib/libcrypto/hidden/openssl/sm3.h | |||
@@ -0,0 +1,32 @@ | |||
1 | /* $OpenBSD: sm3.h,v 1.1 2023/07/07 12:01:32 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/hidden/openssl/sm4.h b/src/lib/libcrypto/hidden/openssl/sm4.h new file mode 100644 index 0000000000..cccb3cecbc --- /dev/null +++ b/src/lib/libcrypto/hidden/openssl/sm4.h | |||
@@ -0,0 +1,32 @@ | |||
1 | /* $OpenBSD: sm4.h,v 1.1 2023/07/07 12:01:32 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_SM4_H | ||
19 | #define _LIBCRYPTO_SM4_H | ||
20 | |||
21 | #ifndef _MSC_VER | ||
22 | #include_next <openssl/sm4.h> | ||
23 | #else | ||
24 | #include "../include/openssl/sm4.h" | ||
25 | #endif | ||
26 | #include "crypto_namespace.h" | ||
27 | |||
28 | LCRYPTO_USED(SM4_set_key); | ||
29 | LCRYPTO_USED(SM4_decrypt); | ||
30 | LCRYPTO_USED(SM4_encrypt); | ||
31 | |||
32 | #endif /* _LIBCRYPTO_SM4_H */ | ||
diff --git a/src/lib/libcrypto/poly1305/poly1305.c b/src/lib/libcrypto/poly1305/poly1305.c index 75a34cc3e1..a34e8f8e88 100644 --- a/src/lib/libcrypto/poly1305/poly1305.c +++ b/src/lib/libcrypto/poly1305/poly1305.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: poly1305.c,v 1.3 2014/06/12 15:49:30 deraadt Exp $ */ | 1 | /* $OpenBSD: poly1305.c,v 1.4 2023/07/07 12:01:32 beck Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -23,6 +23,7 @@ CRYPTO_poly1305_init(poly1305_context *ctx, const unsigned char key[32]) | |||
23 | { | 23 | { |
24 | poly1305_init(ctx, key); | 24 | poly1305_init(ctx, key); |
25 | } | 25 | } |
26 | LCRYPTO_ALIAS(CRYPTO_poly1305_init); | ||
26 | 27 | ||
27 | void | 28 | void |
28 | CRYPTO_poly1305_update(poly1305_context *ctx, const unsigned char *in, | 29 | CRYPTO_poly1305_update(poly1305_context *ctx, const unsigned char *in, |
@@ -30,9 +31,11 @@ CRYPTO_poly1305_update(poly1305_context *ctx, const unsigned char *in, | |||
30 | { | 31 | { |
31 | poly1305_update(ctx, in, len); | 32 | poly1305_update(ctx, in, len); |
32 | } | 33 | } |
34 | LCRYPTO_ALIAS(CRYPTO_poly1305_update); | ||
33 | 35 | ||
34 | void | 36 | void |
35 | CRYPTO_poly1305_finish(poly1305_context *ctx, unsigned char mac[16]) | 37 | CRYPTO_poly1305_finish(poly1305_context *ctx, unsigned char mac[16]) |
36 | { | 38 | { |
37 | poly1305_finish(ctx, mac); | 39 | poly1305_finish(ctx, mac); |
38 | } | 40 | } |
41 | LCRYPTO_ALIAS(CRYPTO_poly1305_finish); | ||
diff --git a/src/lib/libcrypto/rand/rand_err.c b/src/lib/libcrypto/rand/rand_err.c index c57b9a8d63..b156c0c87c 100644 --- a/src/lib/libcrypto/rand/rand_err.c +++ b/src/lib/libcrypto/rand/rand_err.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rand_err.c,v 1.16 2022/07/12 14:42:50 kn Exp $ */ | 1 | /* $OpenBSD: rand_err.c,v 1.17 2023/07/07 12:01:32 beck Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -91,3 +91,4 @@ ERR_load_RAND_strings(void) | |||
91 | } | 91 | } |
92 | #endif | 92 | #endif |
93 | } | 93 | } |
94 | LCRYPTO_ALIAS(ERR_load_RAND_strings); | ||
diff --git a/src/lib/libcrypto/rand/rand_lib.c b/src/lib/libcrypto/rand/rand_lib.c index 8342a55f05..b51db8acf6 100644 --- a/src/lib/libcrypto/rand/rand_lib.c +++ b/src/lib/libcrypto/rand/rand_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rand_lib.c,v 1.20 2014/10/22 13:02:04 jsing Exp $ */ | 1 | /* $OpenBSD: rand_lib.c,v 1.21 2023/07/07 12:01:32 beck Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Ted Unangst <tedu@openbsd.org> | 3 | * Copyright (c) 2014 Ted Unangst <tedu@openbsd.org> |
4 | * | 4 | * |
@@ -29,18 +29,21 @@ RAND_set_rand_method(const RAND_METHOD *meth) | |||
29 | { | 29 | { |
30 | return 1; | 30 | return 1; |
31 | } | 31 | } |
32 | LCRYPTO_ALIAS(RAND_set_rand_method); | ||
32 | 33 | ||
33 | const RAND_METHOD * | 34 | const RAND_METHOD * |
34 | RAND_get_rand_method(void) | 35 | RAND_get_rand_method(void) |
35 | { | 36 | { |
36 | return NULL; | 37 | return NULL; |
37 | } | 38 | } |
39 | LCRYPTO_ALIAS(RAND_get_rand_method); | ||
38 | 40 | ||
39 | RAND_METHOD * | 41 | RAND_METHOD * |
40 | RAND_SSLeay(void) | 42 | RAND_SSLeay(void) |
41 | { | 43 | { |
42 | return NULL; | 44 | return NULL; |
43 | } | 45 | } |
46 | LCRYPTO_ALIAS(RAND_SSLeay); | ||
44 | 47 | ||
45 | #ifndef OPENSSL_NO_ENGINE | 48 | #ifndef OPENSSL_NO_ENGINE |
46 | int | 49 | int |
@@ -48,6 +51,7 @@ RAND_set_rand_engine(ENGINE *engine) | |||
48 | { | 51 | { |
49 | return 1; | 52 | return 1; |
50 | } | 53 | } |
54 | LCRYPTO_ALIAS(RAND_set_rand_engine); | ||
51 | #endif | 55 | #endif |
52 | 56 | ||
53 | void | 57 | void |
@@ -55,30 +59,35 @@ RAND_cleanup(void) | |||
55 | { | 59 | { |
56 | 60 | ||
57 | } | 61 | } |
62 | LCRYPTO_ALIAS(RAND_cleanup); | ||
58 | 63 | ||
59 | void | 64 | void |
60 | RAND_seed(const void *buf, int num) | 65 | RAND_seed(const void *buf, int num) |
61 | { | 66 | { |
62 | 67 | ||
63 | } | 68 | } |
69 | LCRYPTO_ALIAS(RAND_seed); | ||
64 | 70 | ||
65 | void | 71 | void |
66 | RAND_add(const void *buf, int num, double entropy) | 72 | RAND_add(const void *buf, int num, double entropy) |
67 | { | 73 | { |
68 | 74 | ||
69 | } | 75 | } |
76 | LCRYPTO_ALIAS(RAND_add); | ||
70 | 77 | ||
71 | int | 78 | int |
72 | RAND_status(void) | 79 | RAND_status(void) |
73 | { | 80 | { |
74 | return 1; | 81 | return 1; |
75 | } | 82 | } |
83 | LCRYPTO_ALIAS(RAND_status); | ||
76 | 84 | ||
77 | int | 85 | int |
78 | RAND_poll(void) | 86 | RAND_poll(void) |
79 | { | 87 | { |
80 | return 1; | 88 | return 1; |
81 | } | 89 | } |
90 | LCRYPTO_ALIAS(RAND_poll); | ||
82 | 91 | ||
83 | /* | 92 | /* |
84 | * Hurray. You've made it to the good parts. | 93 | * Hurray. You've made it to the good parts. |
@@ -90,6 +99,7 @@ RAND_bytes(unsigned char *buf, int num) | |||
90 | arc4random_buf(buf, num); | 99 | arc4random_buf(buf, num); |
91 | return 1; | 100 | return 1; |
92 | } | 101 | } |
102 | LCRYPTO_ALIAS(RAND_bytes); | ||
93 | 103 | ||
94 | int | 104 | int |
95 | RAND_pseudo_bytes(unsigned char *buf, int num) | 105 | RAND_pseudo_bytes(unsigned char *buf, int num) |
@@ -98,3 +108,4 @@ RAND_pseudo_bytes(unsigned char *buf, int num) | |||
98 | arc4random_buf(buf, num); | 108 | arc4random_buf(buf, num); |
99 | return 1; | 109 | return 1; |
100 | } | 110 | } |
111 | LCRYPTO_ALIAS(RAND_pseudo_bytes); | ||
diff --git a/src/lib/libcrypto/rand/randfile.c b/src/lib/libcrypto/rand/randfile.c index 72c065c48d..7384a65791 100644 --- a/src/lib/libcrypto/rand/randfile.c +++ b/src/lib/libcrypto/rand/randfile.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: randfile.c,v 1.42 2015/09/10 15:56:25 jsing Exp $ */ | 1 | /* $OpenBSD: randfile.c,v 1.43 2023/07/07 12:01:32 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 | * |
@@ -85,6 +85,7 @@ RAND_load_file(const char *file, long bytes) | |||
85 | else | 85 | else |
86 | return bytes; | 86 | return bytes; |
87 | } | 87 | } |
88 | LCRYPTO_ALIAS(RAND_load_file); | ||
88 | 89 | ||
89 | int | 90 | int |
90 | RAND_write_file(const char *file) | 91 | RAND_write_file(const char *file) |
@@ -133,6 +134,7 @@ RAND_write_file(const char *file) | |||
133 | explicit_bzero(buf, BUFSIZE); | 134 | explicit_bzero(buf, BUFSIZE); |
134 | return ret; | 135 | return ret; |
135 | } | 136 | } |
137 | LCRYPTO_ALIAS(RAND_write_file); | ||
136 | 138 | ||
137 | const char * | 139 | const char * |
138 | RAND_file_name(char * buf, size_t size) | 140 | RAND_file_name(char * buf, size_t size) |
@@ -141,3 +143,4 @@ RAND_file_name(char * buf, size_t size) | |||
141 | return (NULL); | 143 | return (NULL); |
142 | return buf; | 144 | return buf; |
143 | } | 145 | } |
146 | LCRYPTO_ALIAS(RAND_file_name); | ||
diff --git a/src/lib/libcrypto/sm3/sm3.c b/src/lib/libcrypto/sm3/sm3.c index 1a96146807..039a92201b 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.2 2022/11/26 16:08:54 tb Exp $ */ | 1 | /* $OpenBSD: sm3.c,v 1.3 2023/07/07 12:01:32 beck Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018, Ribose Inc | 3 | * Copyright (c) 2018, Ribose Inc |
4 | * | 4 | * |
@@ -35,6 +35,7 @@ SM3_Init(SM3_CTX *c) | |||
35 | c->H = SM3_H; | 35 | c->H = SM3_H; |
36 | return 1; | 36 | return 1; |
37 | } | 37 | } |
38 | LCRYPTO_ALIAS(SM3_Init); | ||
38 | 39 | ||
39 | void | 40 | void |
40 | SM3_block_data_order(SM3_CTX *ctx, const void *p, size_t num) | 41 | SM3_block_data_order(SM3_CTX *ctx, const void *p, size_t num) |
diff --git a/src/lib/libcrypto/sm4/sm4.c b/src/lib/libcrypto/sm4/sm4.c index 009c780fb5..bd1689987e 100644 --- a/src/lib/libcrypto/sm4/sm4.c +++ b/src/lib/libcrypto/sm4/sm4.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sm4.c,v 1.1 2019/03/17 17:42:37 tb Exp $ */ | 1 | /* $OpenBSD: sm4.c,v 1.2 2023/07/07 12:01:32 beck Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2017, 2019 Ribose Inc | 3 | * Copyright (c) 2017, 2019 Ribose Inc |
4 | * | 4 | * |
@@ -199,6 +199,7 @@ SM4_set_key(const uint8_t *key, SM4_KEY *k) | |||
199 | 199 | ||
200 | return 1; | 200 | return 1; |
201 | } | 201 | } |
202 | LCRYPTO_ALIAS(SM4_set_key); | ||
202 | 203 | ||
203 | #define SM4_ROUNDS(k0, k1, k2, k3, F) \ | 204 | #define SM4_ROUNDS(k0, k1, k2, k3, F) \ |
204 | do { \ | 205 | do { \ |
@@ -235,6 +236,7 @@ SM4_encrypt(const uint8_t *in, uint8_t *out, const SM4_KEY *k) | |||
235 | store_u32_be(B1, out + 8); | 236 | store_u32_be(B1, out + 8); |
236 | store_u32_be(B0, out + 12); | 237 | store_u32_be(B0, out + 12); |
237 | } | 238 | } |
239 | LCRYPTO_ALIAS(SM4_encrypt); | ||
238 | 240 | ||
239 | void | 241 | void |
240 | SM4_decrypt(const uint8_t *in, uint8_t *out, const SM4_KEY *k) | 242 | SM4_decrypt(const uint8_t *in, uint8_t *out, const SM4_KEY *k) |
@@ -259,5 +261,6 @@ SM4_decrypt(const uint8_t *in, uint8_t *out, const SM4_KEY *k) | |||
259 | store_u32_be(B1, out + 8); | 261 | store_u32_be(B1, out + 8); |
260 | store_u32_be(B0, out + 12); | 262 | store_u32_be(B0, out + 12); |
261 | } | 263 | } |
264 | LCRYPTO_ALIAS(SM4_decrypt); | ||
262 | 265 | ||
263 | #endif /* OPENSSL_NO_SM4 */ | 266 | #endif /* OPENSSL_NO_SM4 */ |