diff options
author | beck <> | 2023-07-08 12:26:45 +0000 |
---|---|---|
committer | beck <> | 2023-07-08 12:26:45 +0000 |
commit | 2c1948ab61cef09c8a7c3306a9b8f7c311bb5c82 (patch) | |
tree | 1d31a132992bcce24a664d524c511ad61b072eee /src | |
parent | 1b57bced238de7c542c37916bff7853a1c0a6b40 (diff) | |
download | openbsd-2c1948ab61cef09c8a7c3306a9b8f7c311bb5c82.tar.gz openbsd-2c1948ab61cef09c8a7c3306a9b8f7c311bb5c82.tar.bz2 openbsd-2c1948ab61cef09c8a7c3306a9b8f7c311bb5c82.zip |
Hide symbols in rsa
ok tb@
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/Symbols.namespace | 113 | ||||
-rw-r--r-- | src/lib/libcrypto/hidden/openssl/rsa.h | 142 | ||||
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_asn1.c | 16 | ||||
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_chk.c | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_crpt.c | 12 | ||||
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_eay.c | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_err.c | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_gen.c | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_lib.c | 33 | ||||
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_meth.c | 33 | ||||
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_none.c | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_oaep.c | 7 | ||||
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_pk1.c | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_pmeth.c | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_prn.c | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_pss.c | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_saos.c | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_sign.c | 4 |
18 files changed, 384 insertions, 18 deletions
diff --git a/src/lib/libcrypto/Symbols.namespace b/src/lib/libcrypto/Symbols.namespace index bc50302981..da7ad8dbe7 100644 --- a/src/lib/libcrypto/Symbols.namespace +++ b/src/lib/libcrypto/Symbols.namespace | |||
@@ -2412,3 +2412,116 @@ _libre_SHA512_Update | |||
2412 | _libre_SHA512_Final | 2412 | _libre_SHA512_Final |
2413 | _libre_SHA512 | 2413 | _libre_SHA512 |
2414 | _libre_SHA512_Transform | 2414 | _libre_SHA512_Transform |
2415 | _libre_RSA_new | ||
2416 | _libre_RSA_new_method | ||
2417 | _libre_RSA_bits | ||
2418 | _libre_RSA_size | ||
2419 | _libre_RSA_generate_key | ||
2420 | _libre_RSA_generate_key_ex | ||
2421 | _libre_RSA_check_key | ||
2422 | _libre_RSA_public_encrypt | ||
2423 | _libre_RSA_private_encrypt | ||
2424 | _libre_RSA_public_decrypt | ||
2425 | _libre_RSA_private_decrypt | ||
2426 | _libre_RSA_free | ||
2427 | _libre_RSA_up_ref | ||
2428 | _libre_RSA_flags | ||
2429 | _libre_RSA_set_default_method | ||
2430 | _libre_RSA_get_default_method | ||
2431 | _libre_RSA_get_method | ||
2432 | _libre_RSA_set_method | ||
2433 | _libre_RSA_PKCS1_OpenSSL | ||
2434 | _libre_RSA_PKCS1_SSLeay | ||
2435 | _libre_RSA_pkey_ctx_ctrl | ||
2436 | _libre_d2i_RSAPublicKey | ||
2437 | _libre_i2d_RSAPublicKey | ||
2438 | _libre_d2i_RSAPrivateKey | ||
2439 | _libre_i2d_RSAPrivateKey | ||
2440 | _libre_RSA_PSS_PARAMS_new | ||
2441 | _libre_RSA_PSS_PARAMS_free | ||
2442 | _libre_d2i_RSA_PSS_PARAMS | ||
2443 | _libre_i2d_RSA_PSS_PARAMS | ||
2444 | _libre_RSA_OAEP_PARAMS_new | ||
2445 | _libre_RSA_OAEP_PARAMS_free | ||
2446 | _libre_d2i_RSA_OAEP_PARAMS | ||
2447 | _libre_i2d_RSA_OAEP_PARAMS | ||
2448 | _libre_RSA_print_fp | ||
2449 | _libre_RSA_print | ||
2450 | _libre_RSA_sign | ||
2451 | _libre_RSA_verify | ||
2452 | _libre_RSA_sign_ASN1_OCTET_STRING | ||
2453 | _libre_RSA_verify_ASN1_OCTET_STRING | ||
2454 | _libre_RSA_blinding_on | ||
2455 | _libre_RSA_blinding_off | ||
2456 | _libre_RSA_setup_blinding | ||
2457 | _libre_RSA_padding_add_PKCS1_type_1 | ||
2458 | _libre_RSA_padding_check_PKCS1_type_1 | ||
2459 | _libre_RSA_padding_add_PKCS1_type_2 | ||
2460 | _libre_RSA_padding_check_PKCS1_type_2 | ||
2461 | _libre_PKCS1_MGF1 | ||
2462 | _libre_RSA_padding_add_PKCS1_OAEP | ||
2463 | _libre_RSA_padding_check_PKCS1_OAEP | ||
2464 | _libre_RSA_padding_add_PKCS1_OAEP_mgf1 | ||
2465 | _libre_RSA_padding_check_PKCS1_OAEP_mgf1 | ||
2466 | _libre_RSA_padding_add_none | ||
2467 | _libre_RSA_padding_check_none | ||
2468 | _libre_RSA_verify_PKCS1_PSS | ||
2469 | _libre_RSA_padding_add_PKCS1_PSS | ||
2470 | _libre_RSA_verify_PKCS1_PSS_mgf1 | ||
2471 | _libre_RSA_padding_add_PKCS1_PSS_mgf1 | ||
2472 | _libre_RSA_get_ex_new_index | ||
2473 | _libre_RSA_set_ex_data | ||
2474 | _libre_RSA_get_ex_data | ||
2475 | _libre_RSA_security_bits | ||
2476 | _libre_RSA_get0_key | ||
2477 | _libre_RSA_set0_key | ||
2478 | _libre_RSA_get0_crt_params | ||
2479 | _libre_RSA_set0_crt_params | ||
2480 | _libre_RSA_get0_factors | ||
2481 | _libre_RSA_set0_factors | ||
2482 | _libre_RSA_get0_n | ||
2483 | _libre_RSA_get0_e | ||
2484 | _libre_RSA_get0_d | ||
2485 | _libre_RSA_get0_p | ||
2486 | _libre_RSA_get0_q | ||
2487 | _libre_RSA_get0_dmp1 | ||
2488 | _libre_RSA_get0_dmq1 | ||
2489 | _libre_RSA_get0_iqmp | ||
2490 | _libre_RSA_get0_pss_params | ||
2491 | _libre_RSA_clear_flags | ||
2492 | _libre_RSA_test_flags | ||
2493 | _libre_RSA_set_flags | ||
2494 | _libre_RSAPublicKey_dup | ||
2495 | _libre_RSAPrivateKey_dup | ||
2496 | _libre_RSA_meth_new | ||
2497 | _libre_RSA_meth_free | ||
2498 | _libre_RSA_meth_dup | ||
2499 | _libre_RSA_meth_set1_name | ||
2500 | _libre_RSA_meth_set_priv_enc | ||
2501 | _libre_RSA_meth_set_priv_dec | ||
2502 | _libre_RSA_meth_get_finish | ||
2503 | _libre_RSA_meth_set_finish | ||
2504 | _libre_RSA_meth_set_pub_enc | ||
2505 | _libre_RSA_meth_set_pub_dec | ||
2506 | _libre_RSA_meth_set_mod_exp | ||
2507 | _libre_RSA_meth_set_bn_mod_exp | ||
2508 | _libre_RSA_meth_set_init | ||
2509 | _libre_RSA_meth_set_keygen | ||
2510 | _libre_RSA_meth_set_flags | ||
2511 | _libre_RSA_meth_set0_app_data | ||
2512 | _libre_RSA_meth_get0_name | ||
2513 | _libre_RSA_meth_get_pub_enc | ||
2514 | _libre_RSA_meth_get_pub_dec | ||
2515 | _libre_RSA_meth_get_priv_enc | ||
2516 | _libre_RSA_meth_get_priv_dec | ||
2517 | _libre_RSA_meth_get_mod_exp | ||
2518 | _libre_RSA_meth_get_bn_mod_exp | ||
2519 | _libre_RSA_meth_get_init | ||
2520 | _libre_RSA_meth_get_keygen | ||
2521 | _libre_RSA_meth_get_flags | ||
2522 | _libre_RSA_meth_get0_app_data | ||
2523 | _libre_RSA_meth_get_sign | ||
2524 | _libre_RSA_meth_set_sign | ||
2525 | _libre_RSA_meth_get_verify | ||
2526 | _libre_RSA_meth_set_verify | ||
2527 | _libre_ERR_load_RSA_strings | ||
diff --git a/src/lib/libcrypto/hidden/openssl/rsa.h b/src/lib/libcrypto/hidden/openssl/rsa.h new file mode 100644 index 0000000000..f4342e21da --- /dev/null +++ b/src/lib/libcrypto/hidden/openssl/rsa.h | |||
@@ -0,0 +1,142 @@ | |||
1 | /* $OpenBSD: rsa.h,v 1.1 2023/07/08 12:26:45 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_RSA_H | ||
19 | #define _LIBCRYPTO_RSA_H | ||
20 | |||
21 | #ifndef _MSC_VER | ||
22 | #include_next <openssl/rsa.h> | ||
23 | #else | ||
24 | #include "../include/openssl/rsa.h" | ||
25 | #endif | ||
26 | #include "crypto_namespace.h" | ||
27 | |||
28 | LCRYPTO_USED(RSA_new); | ||
29 | LCRYPTO_USED(RSA_new_method); | ||
30 | LCRYPTO_USED(RSA_bits); | ||
31 | LCRYPTO_USED(RSA_size); | ||
32 | LCRYPTO_USED(RSA_generate_key); | ||
33 | LCRYPTO_USED(RSA_generate_key_ex); | ||
34 | LCRYPTO_USED(RSA_check_key); | ||
35 | LCRYPTO_USED(RSA_public_encrypt); | ||
36 | LCRYPTO_USED(RSA_private_encrypt); | ||
37 | LCRYPTO_USED(RSA_public_decrypt); | ||
38 | LCRYPTO_USED(RSA_private_decrypt); | ||
39 | LCRYPTO_USED(RSA_free); | ||
40 | LCRYPTO_USED(RSA_up_ref); | ||
41 | LCRYPTO_USED(RSA_flags); | ||
42 | LCRYPTO_USED(RSA_set_default_method); | ||
43 | LCRYPTO_USED(RSA_get_default_method); | ||
44 | LCRYPTO_USED(RSA_get_method); | ||
45 | LCRYPTO_USED(RSA_set_method); | ||
46 | LCRYPTO_USED(RSA_PKCS1_OpenSSL); | ||
47 | LCRYPTO_USED(RSA_PKCS1_SSLeay); | ||
48 | LCRYPTO_USED(RSA_pkey_ctx_ctrl); | ||
49 | LCRYPTO_USED(d2i_RSAPublicKey); | ||
50 | LCRYPTO_USED(i2d_RSAPublicKey); | ||
51 | LCRYPTO_USED(d2i_RSAPrivateKey); | ||
52 | LCRYPTO_USED(i2d_RSAPrivateKey); | ||
53 | LCRYPTO_USED(RSA_PSS_PARAMS_new); | ||
54 | LCRYPTO_USED(RSA_PSS_PARAMS_free); | ||
55 | LCRYPTO_USED(d2i_RSA_PSS_PARAMS); | ||
56 | LCRYPTO_USED(i2d_RSA_PSS_PARAMS); | ||
57 | LCRYPTO_USED(RSA_OAEP_PARAMS_new); | ||
58 | LCRYPTO_USED(RSA_OAEP_PARAMS_free); | ||
59 | LCRYPTO_USED(d2i_RSA_OAEP_PARAMS); | ||
60 | LCRYPTO_USED(i2d_RSA_OAEP_PARAMS); | ||
61 | LCRYPTO_USED(RSA_print_fp); | ||
62 | LCRYPTO_USED(RSA_print); | ||
63 | LCRYPTO_USED(RSA_sign); | ||
64 | LCRYPTO_USED(RSA_verify); | ||
65 | LCRYPTO_USED(RSA_sign_ASN1_OCTET_STRING); | ||
66 | LCRYPTO_USED(RSA_verify_ASN1_OCTET_STRING); | ||
67 | LCRYPTO_USED(RSA_blinding_on); | ||
68 | LCRYPTO_USED(RSA_blinding_off); | ||
69 | LCRYPTO_USED(RSA_setup_blinding); | ||
70 | LCRYPTO_USED(RSA_padding_add_PKCS1_type_1); | ||
71 | LCRYPTO_USED(RSA_padding_check_PKCS1_type_1); | ||
72 | LCRYPTO_USED(RSA_padding_add_PKCS1_type_2); | ||
73 | LCRYPTO_USED(RSA_padding_check_PKCS1_type_2); | ||
74 | LCRYPTO_USED(PKCS1_MGF1); | ||
75 | LCRYPTO_USED(RSA_padding_add_PKCS1_OAEP); | ||
76 | LCRYPTO_USED(RSA_padding_check_PKCS1_OAEP); | ||
77 | LCRYPTO_USED(RSA_padding_add_PKCS1_OAEP_mgf1); | ||
78 | LCRYPTO_USED(RSA_padding_check_PKCS1_OAEP_mgf1); | ||
79 | LCRYPTO_USED(RSA_padding_add_none); | ||
80 | LCRYPTO_USED(RSA_padding_check_none); | ||
81 | LCRYPTO_USED(RSA_verify_PKCS1_PSS); | ||
82 | LCRYPTO_USED(RSA_padding_add_PKCS1_PSS); | ||
83 | LCRYPTO_USED(RSA_verify_PKCS1_PSS_mgf1); | ||
84 | LCRYPTO_USED(RSA_padding_add_PKCS1_PSS_mgf1); | ||
85 | LCRYPTO_USED(RSA_get_ex_new_index); | ||
86 | LCRYPTO_USED(RSA_set_ex_data); | ||
87 | LCRYPTO_USED(RSA_get_ex_data); | ||
88 | LCRYPTO_USED(RSA_security_bits); | ||
89 | LCRYPTO_USED(RSA_get0_key); | ||
90 | LCRYPTO_USED(RSA_set0_key); | ||
91 | LCRYPTO_USED(RSA_get0_crt_params); | ||
92 | LCRYPTO_USED(RSA_set0_crt_params); | ||
93 | LCRYPTO_USED(RSA_get0_factors); | ||
94 | LCRYPTO_USED(RSA_set0_factors); | ||
95 | LCRYPTO_USED(RSA_get0_n); | ||
96 | LCRYPTO_USED(RSA_get0_e); | ||
97 | LCRYPTO_USED(RSA_get0_d); | ||
98 | LCRYPTO_USED(RSA_get0_p); | ||
99 | LCRYPTO_USED(RSA_get0_q); | ||
100 | LCRYPTO_USED(RSA_get0_dmp1); | ||
101 | LCRYPTO_USED(RSA_get0_dmq1); | ||
102 | LCRYPTO_USED(RSA_get0_iqmp); | ||
103 | LCRYPTO_USED(RSA_get0_pss_params); | ||
104 | LCRYPTO_USED(RSA_clear_flags); | ||
105 | LCRYPTO_USED(RSA_test_flags); | ||
106 | LCRYPTO_USED(RSA_set_flags); | ||
107 | LCRYPTO_USED(RSAPublicKey_dup); | ||
108 | LCRYPTO_USED(RSAPrivateKey_dup); | ||
109 | LCRYPTO_USED(RSA_meth_new); | ||
110 | LCRYPTO_USED(RSA_meth_free); | ||
111 | LCRYPTO_USED(RSA_meth_dup); | ||
112 | LCRYPTO_USED(RSA_meth_set1_name); | ||
113 | LCRYPTO_USED(RSA_meth_set_priv_enc); | ||
114 | LCRYPTO_USED(RSA_meth_set_priv_dec); | ||
115 | LCRYPTO_USED(RSA_meth_get_finish); | ||
116 | LCRYPTO_USED(RSA_meth_set_finish); | ||
117 | LCRYPTO_USED(RSA_meth_set_pub_enc); | ||
118 | LCRYPTO_USED(RSA_meth_set_pub_dec); | ||
119 | LCRYPTO_USED(RSA_meth_set_mod_exp); | ||
120 | LCRYPTO_USED(RSA_meth_set_bn_mod_exp); | ||
121 | LCRYPTO_USED(RSA_meth_set_init); | ||
122 | LCRYPTO_USED(RSA_meth_set_keygen); | ||
123 | LCRYPTO_USED(RSA_meth_set_flags); | ||
124 | LCRYPTO_USED(RSA_meth_set0_app_data); | ||
125 | LCRYPTO_USED(RSA_meth_get0_name); | ||
126 | LCRYPTO_USED(RSA_meth_get_pub_enc); | ||
127 | LCRYPTO_USED(RSA_meth_get_pub_dec); | ||
128 | LCRYPTO_USED(RSA_meth_get_priv_enc); | ||
129 | LCRYPTO_USED(RSA_meth_get_priv_dec); | ||
130 | LCRYPTO_USED(RSA_meth_get_mod_exp); | ||
131 | LCRYPTO_USED(RSA_meth_get_bn_mod_exp); | ||
132 | LCRYPTO_USED(RSA_meth_get_init); | ||
133 | LCRYPTO_USED(RSA_meth_get_keygen); | ||
134 | LCRYPTO_USED(RSA_meth_get_flags); | ||
135 | LCRYPTO_USED(RSA_meth_get0_app_data); | ||
136 | LCRYPTO_USED(RSA_meth_get_sign); | ||
137 | LCRYPTO_USED(RSA_meth_set_sign); | ||
138 | LCRYPTO_USED(RSA_meth_get_verify); | ||
139 | LCRYPTO_USED(RSA_meth_set_verify); | ||
140 | LCRYPTO_USED(ERR_load_RSA_strings); | ||
141 | |||
142 | #endif /* _LIBCRYPTO_RSA_H */ | ||
diff --git a/src/lib/libcrypto/rsa/rsa_asn1.c b/src/lib/libcrypto/rsa/rsa_asn1.c index 63c3637f46..0f6d8c49fe 100644 --- a/src/lib/libcrypto/rsa/rsa_asn1.c +++ b/src/lib/libcrypto/rsa/rsa_asn1.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_asn1.c,v 1.16 2022/11/26 16:08:54 tb Exp $ */ | 1 | /* $OpenBSD: rsa_asn1.c,v 1.17 2023/07/08 12:26:45 beck Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 2000. | 3 | * project 2000. |
4 | */ | 4 | */ |
@@ -269,24 +269,28 @@ d2i_RSA_PSS_PARAMS(RSA_PSS_PARAMS **a, const unsigned char **in, long len) | |||
269 | return (RSA_PSS_PARAMS *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | 269 | return (RSA_PSS_PARAMS *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, |
270 | &RSA_PSS_PARAMS_it); | 270 | &RSA_PSS_PARAMS_it); |
271 | } | 271 | } |
272 | LCRYPTO_ALIAS(d2i_RSA_PSS_PARAMS); | ||
272 | 273 | ||
273 | int | 274 | int |
274 | i2d_RSA_PSS_PARAMS(RSA_PSS_PARAMS *a, unsigned char **out) | 275 | i2d_RSA_PSS_PARAMS(RSA_PSS_PARAMS *a, unsigned char **out) |
275 | { | 276 | { |
276 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &RSA_PSS_PARAMS_it); | 277 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &RSA_PSS_PARAMS_it); |
277 | } | 278 | } |
279 | LCRYPTO_ALIAS(i2d_RSA_PSS_PARAMS); | ||
278 | 280 | ||
279 | RSA_PSS_PARAMS * | 281 | RSA_PSS_PARAMS * |
280 | RSA_PSS_PARAMS_new(void) | 282 | RSA_PSS_PARAMS_new(void) |
281 | { | 283 | { |
282 | return (RSA_PSS_PARAMS *)ASN1_item_new(&RSA_PSS_PARAMS_it); | 284 | return (RSA_PSS_PARAMS *)ASN1_item_new(&RSA_PSS_PARAMS_it); |
283 | } | 285 | } |
286 | LCRYPTO_ALIAS(RSA_PSS_PARAMS_new); | ||
284 | 287 | ||
285 | void | 288 | void |
286 | RSA_PSS_PARAMS_free(RSA_PSS_PARAMS *a) | 289 | RSA_PSS_PARAMS_free(RSA_PSS_PARAMS *a) |
287 | { | 290 | { |
288 | ASN1_item_free((ASN1_VALUE *)a, &RSA_PSS_PARAMS_it); | 291 | ASN1_item_free((ASN1_VALUE *)a, &RSA_PSS_PARAMS_it); |
289 | } | 292 | } |
293 | LCRYPTO_ALIAS(RSA_PSS_PARAMS_free); | ||
290 | 294 | ||
291 | static int | 295 | static int |
292 | rsa_oaep_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg) | 296 | rsa_oaep_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg) |
@@ -349,24 +353,28 @@ d2i_RSA_OAEP_PARAMS(RSA_OAEP_PARAMS **a, const unsigned char **in, long len) | |||
349 | return (RSA_OAEP_PARAMS *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | 353 | return (RSA_OAEP_PARAMS *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, |
350 | &RSA_OAEP_PARAMS_it); | 354 | &RSA_OAEP_PARAMS_it); |
351 | } | 355 | } |
356 | LCRYPTO_ALIAS(d2i_RSA_OAEP_PARAMS); | ||
352 | 357 | ||
353 | int | 358 | int |
354 | i2d_RSA_OAEP_PARAMS(RSA_OAEP_PARAMS *a, unsigned char **out) | 359 | i2d_RSA_OAEP_PARAMS(RSA_OAEP_PARAMS *a, unsigned char **out) |
355 | { | 360 | { |
356 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &RSA_OAEP_PARAMS_it); | 361 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &RSA_OAEP_PARAMS_it); |
357 | } | 362 | } |
363 | LCRYPTO_ALIAS(i2d_RSA_OAEP_PARAMS); | ||
358 | 364 | ||
359 | RSA_OAEP_PARAMS * | 365 | RSA_OAEP_PARAMS * |
360 | RSA_OAEP_PARAMS_new(void) | 366 | RSA_OAEP_PARAMS_new(void) |
361 | { | 367 | { |
362 | return (RSA_OAEP_PARAMS *)ASN1_item_new(&RSA_OAEP_PARAMS_it); | 368 | return (RSA_OAEP_PARAMS *)ASN1_item_new(&RSA_OAEP_PARAMS_it); |
363 | } | 369 | } |
370 | LCRYPTO_ALIAS(RSA_OAEP_PARAMS_new); | ||
364 | 371 | ||
365 | void | 372 | void |
366 | RSA_OAEP_PARAMS_free(RSA_OAEP_PARAMS *a) | 373 | RSA_OAEP_PARAMS_free(RSA_OAEP_PARAMS *a) |
367 | { | 374 | { |
368 | ASN1_item_free((ASN1_VALUE *)a, &RSA_OAEP_PARAMS_it); | 375 | ASN1_item_free((ASN1_VALUE *)a, &RSA_OAEP_PARAMS_it); |
369 | } | 376 | } |
377 | LCRYPTO_ALIAS(RSA_OAEP_PARAMS_free); | ||
370 | 378 | ||
371 | RSA * | 379 | RSA * |
372 | d2i_RSAPrivateKey(RSA **a, const unsigned char **in, long len) | 380 | d2i_RSAPrivateKey(RSA **a, const unsigned char **in, long len) |
@@ -374,12 +382,14 @@ d2i_RSAPrivateKey(RSA **a, const unsigned char **in, long len) | |||
374 | return (RSA *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | 382 | return (RSA *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, |
375 | &RSAPrivateKey_it); | 383 | &RSAPrivateKey_it); |
376 | } | 384 | } |
385 | LCRYPTO_ALIAS(d2i_RSAPrivateKey); | ||
377 | 386 | ||
378 | int | 387 | int |
379 | i2d_RSAPrivateKey(const RSA *a, unsigned char **out) | 388 | i2d_RSAPrivateKey(const RSA *a, unsigned char **out) |
380 | { | 389 | { |
381 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &RSAPrivateKey_it); | 390 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &RSAPrivateKey_it); |
382 | } | 391 | } |
392 | LCRYPTO_ALIAS(i2d_RSAPrivateKey); | ||
383 | 393 | ||
384 | 394 | ||
385 | RSA * | 395 | RSA * |
@@ -388,21 +398,25 @@ d2i_RSAPublicKey(RSA **a, const unsigned char **in, long len) | |||
388 | return (RSA *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | 398 | return (RSA *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, |
389 | &RSAPublicKey_it); | 399 | &RSAPublicKey_it); |
390 | } | 400 | } |
401 | LCRYPTO_ALIAS(d2i_RSAPublicKey); | ||
391 | 402 | ||
392 | int | 403 | int |
393 | i2d_RSAPublicKey(const RSA *a, unsigned char **out) | 404 | i2d_RSAPublicKey(const RSA *a, unsigned char **out) |
394 | { | 405 | { |
395 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &RSAPublicKey_it); | 406 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &RSAPublicKey_it); |
396 | } | 407 | } |
408 | LCRYPTO_ALIAS(i2d_RSAPublicKey); | ||
397 | 409 | ||
398 | RSA * | 410 | RSA * |
399 | RSAPublicKey_dup(RSA *rsa) | 411 | RSAPublicKey_dup(RSA *rsa) |
400 | { | 412 | { |
401 | return ASN1_item_dup(&RSAPublicKey_it, rsa); | 413 | return ASN1_item_dup(&RSAPublicKey_it, rsa); |
402 | } | 414 | } |
415 | LCRYPTO_ALIAS(RSAPublicKey_dup); | ||
403 | 416 | ||
404 | RSA * | 417 | RSA * |
405 | RSAPrivateKey_dup(RSA *rsa) | 418 | RSAPrivateKey_dup(RSA *rsa) |
406 | { | 419 | { |
407 | return ASN1_item_dup(&RSAPrivateKey_it, rsa); | 420 | return ASN1_item_dup(&RSAPrivateKey_it, rsa); |
408 | } | 421 | } |
422 | LCRYPTO_ALIAS(RSAPrivateKey_dup); | ||
diff --git a/src/lib/libcrypto/rsa/rsa_chk.c b/src/lib/libcrypto/rsa/rsa_chk.c index 5d7f7b307c..b7666e0fed 100644 --- a/src/lib/libcrypto/rsa/rsa_chk.c +++ b/src/lib/libcrypto/rsa/rsa_chk.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_chk.c,v 1.17 2022/11/26 16:08:54 tb Exp $ */ | 1 | /* $OpenBSD: rsa_chk.c,v 1.18 2023/07/08 12:26:45 beck Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -220,3 +220,4 @@ err: | |||
220 | 220 | ||
221 | return (ret); | 221 | return (ret); |
222 | } | 222 | } |
223 | LCRYPTO_ALIAS(RSA_check_key); | ||
diff --git a/src/lib/libcrypto/rsa/rsa_crpt.c b/src/lib/libcrypto/rsa/rsa_crpt.c index a1b2eec6ca..ea79280b15 100644 --- a/src/lib/libcrypto/rsa/rsa_crpt.c +++ b/src/lib/libcrypto/rsa/rsa_crpt.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_crpt.c,v 1.21 2022/11/26 16:08:54 tb Exp $ */ | 1 | /* $OpenBSD: rsa_crpt.c,v 1.22 2023/07/08 12:26:45 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 | * |
@@ -78,12 +78,14 @@ RSA_bits(const RSA *r) | |||
78 | { | 78 | { |
79 | return BN_num_bits(r->n); | 79 | return BN_num_bits(r->n); |
80 | } | 80 | } |
81 | LCRYPTO_ALIAS(RSA_bits); | ||
81 | 82 | ||
82 | int | 83 | int |
83 | RSA_size(const RSA *r) | 84 | RSA_size(const RSA *r) |
84 | { | 85 | { |
85 | return BN_num_bytes(r->n); | 86 | return BN_num_bytes(r->n); |
86 | } | 87 | } |
88 | LCRYPTO_ALIAS(RSA_size); | ||
87 | 89 | ||
88 | int | 90 | int |
89 | RSA_public_encrypt(int flen, const unsigned char *from, unsigned char *to, | 91 | RSA_public_encrypt(int flen, const unsigned char *from, unsigned char *to, |
@@ -91,6 +93,7 @@ RSA_public_encrypt(int flen, const unsigned char *from, unsigned char *to, | |||
91 | { | 93 | { |
92 | return rsa->meth->rsa_pub_enc(flen, from, to, rsa, padding); | 94 | return rsa->meth->rsa_pub_enc(flen, from, to, rsa, padding); |
93 | } | 95 | } |
96 | LCRYPTO_ALIAS(RSA_public_encrypt); | ||
94 | 97 | ||
95 | int | 98 | int |
96 | RSA_private_encrypt(int flen, const unsigned char *from, unsigned char *to, | 99 | RSA_private_encrypt(int flen, const unsigned char *from, unsigned char *to, |
@@ -98,6 +101,7 @@ RSA_private_encrypt(int flen, const unsigned char *from, unsigned char *to, | |||
98 | { | 101 | { |
99 | return rsa->meth->rsa_priv_enc(flen, from, to, rsa, padding); | 102 | return rsa->meth->rsa_priv_enc(flen, from, to, rsa, padding); |
100 | } | 103 | } |
104 | LCRYPTO_ALIAS(RSA_private_encrypt); | ||
101 | 105 | ||
102 | int | 106 | int |
103 | RSA_private_decrypt(int flen, const unsigned char *from, unsigned char *to, | 107 | RSA_private_decrypt(int flen, const unsigned char *from, unsigned char *to, |
@@ -105,6 +109,7 @@ RSA_private_decrypt(int flen, const unsigned char *from, unsigned char *to, | |||
105 | { | 109 | { |
106 | return rsa->meth->rsa_priv_dec(flen, from, to, rsa, padding); | 110 | return rsa->meth->rsa_priv_dec(flen, from, to, rsa, padding); |
107 | } | 111 | } |
112 | LCRYPTO_ALIAS(RSA_private_decrypt); | ||
108 | 113 | ||
109 | int | 114 | int |
110 | RSA_public_decrypt(int flen, const unsigned char *from, unsigned char *to, | 115 | RSA_public_decrypt(int flen, const unsigned char *from, unsigned char *to, |
@@ -112,12 +117,14 @@ RSA_public_decrypt(int flen, const unsigned char *from, unsigned char *to, | |||
112 | { | 117 | { |
113 | return rsa->meth->rsa_pub_dec(flen, from, to, rsa, padding); | 118 | return rsa->meth->rsa_pub_dec(flen, from, to, rsa, padding); |
114 | } | 119 | } |
120 | LCRYPTO_ALIAS(RSA_public_decrypt); | ||
115 | 121 | ||
116 | int | 122 | int |
117 | RSA_flags(const RSA *r) | 123 | RSA_flags(const RSA *r) |
118 | { | 124 | { |
119 | return r == NULL ? 0 : r->meth->flags; | 125 | return r == NULL ? 0 : r->meth->flags; |
120 | } | 126 | } |
127 | LCRYPTO_ALIAS(RSA_flags); | ||
121 | 128 | ||
122 | void | 129 | void |
123 | RSA_blinding_off(RSA *rsa) | 130 | RSA_blinding_off(RSA *rsa) |
@@ -126,6 +133,7 @@ RSA_blinding_off(RSA *rsa) | |||
126 | rsa->blinding = NULL; | 133 | rsa->blinding = NULL; |
127 | rsa->flags |= RSA_FLAG_NO_BLINDING; | 134 | rsa->flags |= RSA_FLAG_NO_BLINDING; |
128 | } | 135 | } |
136 | LCRYPTO_ALIAS(RSA_blinding_off); | ||
129 | 137 | ||
130 | int | 138 | int |
131 | RSA_blinding_on(RSA *rsa, BN_CTX *ctx) | 139 | RSA_blinding_on(RSA *rsa, BN_CTX *ctx) |
@@ -144,6 +152,7 @@ RSA_blinding_on(RSA *rsa, BN_CTX *ctx) | |||
144 | err: | 152 | err: |
145 | return (ret); | 153 | return (ret); |
146 | } | 154 | } |
155 | LCRYPTO_ALIAS(RSA_blinding_on); | ||
147 | 156 | ||
148 | static BIGNUM * | 157 | static BIGNUM * |
149 | rsa_get_public_exp(const BIGNUM *d, const BIGNUM *p, const BIGNUM *q, | 158 | rsa_get_public_exp(const BIGNUM *d, const BIGNUM *p, const BIGNUM *q, |
@@ -220,3 +229,4 @@ err: | |||
220 | 229 | ||
221 | return ret; | 230 | return ret; |
222 | } | 231 | } |
232 | LCRYPTO_ALIAS(RSA_setup_blinding); | ||
diff --git a/src/lib/libcrypto/rsa/rsa_eay.c b/src/lib/libcrypto/rsa/rsa_eay.c index cb44288c9a..f6b1d65553 100644 --- a/src/lib/libcrypto/rsa/rsa_eay.c +++ b/src/lib/libcrypto/rsa/rsa_eay.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_eay.c,v 1.61 2023/07/07 10:11:23 jsing Exp $ */ | 1 | /* $OpenBSD: rsa_eay.c,v 1.62 2023/07/08 12:26:45 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 | * |
@@ -849,10 +849,11 @@ RSA_PKCS1_OpenSSL(void) | |||
849 | { | 849 | { |
850 | return &rsa_pkcs1_meth; | 850 | return &rsa_pkcs1_meth; |
851 | } | 851 | } |
852 | LCRYPTO_ALIAS(RSA_PKCS1_OpenSSL); | ||
852 | 853 | ||
853 | const RSA_METHOD * | 854 | const RSA_METHOD * |
854 | RSA_PKCS1_SSLeay(void) | 855 | RSA_PKCS1_SSLeay(void) |
855 | { | 856 | { |
856 | return RSA_PKCS1_OpenSSL(); | 857 | return RSA_PKCS1_OpenSSL(); |
857 | } | 858 | } |
858 | 859 | LCRYPTO_ALIAS(RSA_PKCS1_SSLeay); | |
diff --git a/src/lib/libcrypto/rsa/rsa_err.c b/src/lib/libcrypto/rsa/rsa_err.c index 79425c0f45..8b54168900 100644 --- a/src/lib/libcrypto/rsa/rsa_err.c +++ b/src/lib/libcrypto/rsa/rsa_err.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_err.c,v 1.21 2022/07/12 14:42:50 kn Exp $ */ | 1 | /* $OpenBSD: rsa_err.c,v 1.22 2023/07/08 12:26:45 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 | * |
@@ -155,3 +155,4 @@ ERR_load_RSA_strings(void) | |||
155 | } | 155 | } |
156 | #endif | 156 | #endif |
157 | } | 157 | } |
158 | LCRYPTO_ALIAS(ERR_load_RSA_strings); | ||
diff --git a/src/lib/libcrypto/rsa/rsa_gen.c b/src/lib/libcrypto/rsa/rsa_gen.c index 9db8eca927..ff64eb2f0e 100644 --- a/src/lib/libcrypto/rsa/rsa_gen.c +++ b/src/lib/libcrypto/rsa/rsa_gen.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_gen.c,v 1.29 2023/04/13 15:18:29 tb Exp $ */ | 1 | /* $OpenBSD: rsa_gen.c,v 1.30 2023/07/08 12:26:45 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 | * |
@@ -75,6 +75,7 @@ RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb) | |||
75 | return rsa->meth->rsa_keygen(rsa, bits, e_value, cb); | 75 | return rsa->meth->rsa_keygen(rsa, bits, e_value, cb); |
76 | return rsa_builtin_keygen(rsa, bits, e_value, cb); | 76 | return rsa_builtin_keygen(rsa, bits, e_value, cb); |
77 | } | 77 | } |
78 | LCRYPTO_ALIAS(RSA_generate_key_ex); | ||
78 | 79 | ||
79 | static int | 80 | static int |
80 | rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb) | 81 | rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb) |
@@ -253,3 +254,4 @@ err: | |||
253 | 254 | ||
254 | return 0; | 255 | return 0; |
255 | } | 256 | } |
257 | LCRYPTO_ALIAS(RSA_generate_key); | ||
diff --git a/src/lib/libcrypto/rsa/rsa_lib.c b/src/lib/libcrypto/rsa/rsa_lib.c index 9656252d77..8831253b9f 100644 --- a/src/lib/libcrypto/rsa/rsa_lib.c +++ b/src/lib/libcrypto/rsa/rsa_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_lib.c,v 1.46 2023/03/11 21:14:26 tb Exp $ */ | 1 | /* $OpenBSD: rsa_lib.c,v 1.47 2023/07/08 12:26:45 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 | * |
@@ -83,12 +83,14 @@ RSA_new(void) | |||
83 | 83 | ||
84 | return r; | 84 | return r; |
85 | } | 85 | } |
86 | LCRYPTO_ALIAS(RSA_new); | ||
86 | 87 | ||
87 | void | 88 | void |
88 | RSA_set_default_method(const RSA_METHOD *meth) | 89 | RSA_set_default_method(const RSA_METHOD *meth) |
89 | { | 90 | { |
90 | default_RSA_meth = meth; | 91 | default_RSA_meth = meth; |
91 | } | 92 | } |
93 | LCRYPTO_ALIAS(RSA_set_default_method); | ||
92 | 94 | ||
93 | const RSA_METHOD * | 95 | const RSA_METHOD * |
94 | RSA_get_default_method(void) | 96 | RSA_get_default_method(void) |
@@ -98,12 +100,14 @@ RSA_get_default_method(void) | |||
98 | 100 | ||
99 | return default_RSA_meth; | 101 | return default_RSA_meth; |
100 | } | 102 | } |
103 | LCRYPTO_ALIAS(RSA_get_default_method); | ||
101 | 104 | ||
102 | const RSA_METHOD * | 105 | const RSA_METHOD * |
103 | RSA_get_method(const RSA *rsa) | 106 | RSA_get_method(const RSA *rsa) |
104 | { | 107 | { |
105 | return rsa->meth; | 108 | return rsa->meth; |
106 | } | 109 | } |
110 | LCRYPTO_ALIAS(RSA_get_method); | ||
107 | 111 | ||
108 | int | 112 | int |
109 | RSA_set_method(RSA *rsa, const RSA_METHOD *meth) | 113 | RSA_set_method(RSA *rsa, const RSA_METHOD *meth) |
@@ -126,6 +130,7 @@ RSA_set_method(RSA *rsa, const RSA_METHOD *meth) | |||
126 | meth->init(rsa); | 130 | meth->init(rsa); |
127 | return 1; | 131 | return 1; |
128 | } | 132 | } |
133 | LCRYPTO_ALIAS(RSA_set_method); | ||
129 | 134 | ||
130 | RSA * | 135 | RSA * |
131 | RSA_new_method(ENGINE *engine) | 136 | RSA_new_method(ENGINE *engine) |
@@ -179,6 +184,7 @@ RSA_new_method(ENGINE *engine) | |||
179 | 184 | ||
180 | return NULL; | 185 | return NULL; |
181 | } | 186 | } |
187 | LCRYPTO_ALIAS(RSA_new_method); | ||
182 | 188 | ||
183 | void | 189 | void |
184 | RSA_free(RSA *r) | 190 | RSA_free(RSA *r) |
@@ -213,6 +219,7 @@ RSA_free(RSA *r) | |||
213 | RSA_PSS_PARAMS_free(r->pss); | 219 | RSA_PSS_PARAMS_free(r->pss); |
214 | free(r); | 220 | free(r); |
215 | } | 221 | } |
222 | LCRYPTO_ALIAS(RSA_free); | ||
216 | 223 | ||
217 | int | 224 | int |
218 | RSA_up_ref(RSA *r) | 225 | RSA_up_ref(RSA *r) |
@@ -220,6 +227,7 @@ RSA_up_ref(RSA *r) | |||
220 | int i = CRYPTO_add(&r->references, 1, CRYPTO_LOCK_RSA); | 227 | int i = CRYPTO_add(&r->references, 1, CRYPTO_LOCK_RSA); |
221 | return i > 1 ? 1 : 0; | 228 | return i > 1 ? 1 : 0; |
222 | } | 229 | } |
230 | LCRYPTO_ALIAS(RSA_up_ref); | ||
223 | 231 | ||
224 | int | 232 | int |
225 | RSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, | 233 | RSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, |
@@ -228,24 +236,28 @@ RSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, | |||
228 | return CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_RSA, argl, argp, | 236 | return CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_RSA, argl, argp, |
229 | new_func, dup_func, free_func); | 237 | new_func, dup_func, free_func); |
230 | } | 238 | } |
239 | LCRYPTO_ALIAS(RSA_get_ex_new_index); | ||
231 | 240 | ||
232 | int | 241 | int |
233 | RSA_set_ex_data(RSA *r, int idx, void *arg) | 242 | RSA_set_ex_data(RSA *r, int idx, void *arg) |
234 | { | 243 | { |
235 | return CRYPTO_set_ex_data(&r->ex_data, idx, arg); | 244 | return CRYPTO_set_ex_data(&r->ex_data, idx, arg); |
236 | } | 245 | } |
246 | LCRYPTO_ALIAS(RSA_set_ex_data); | ||
237 | 247 | ||
238 | void * | 248 | void * |
239 | RSA_get_ex_data(const RSA *r, int idx) | 249 | RSA_get_ex_data(const RSA *r, int idx) |
240 | { | 250 | { |
241 | return CRYPTO_get_ex_data(&r->ex_data, idx); | 251 | return CRYPTO_get_ex_data(&r->ex_data, idx); |
242 | } | 252 | } |
253 | LCRYPTO_ALIAS(RSA_get_ex_data); | ||
243 | 254 | ||
244 | int | 255 | int |
245 | RSA_security_bits(const RSA *rsa) | 256 | RSA_security_bits(const RSA *rsa) |
246 | { | 257 | { |
247 | return BN_security_bits(RSA_bits(rsa), -1); | 258 | return BN_security_bits(RSA_bits(rsa), -1); |
248 | } | 259 | } |
260 | LCRYPTO_ALIAS(RSA_security_bits); | ||
249 | 261 | ||
250 | void | 262 | void |
251 | RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d) | 263 | RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d) |
@@ -257,6 +269,7 @@ RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d) | |||
257 | if (d != NULL) | 269 | if (d != NULL) |
258 | *d = r->d; | 270 | *d = r->d; |
259 | } | 271 | } |
272 | LCRYPTO_ALIAS(RSA_get0_key); | ||
260 | 273 | ||
261 | int | 274 | int |
262 | RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d) | 275 | RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d) |
@@ -279,6 +292,7 @@ RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d) | |||
279 | 292 | ||
280 | return 1; | 293 | return 1; |
281 | } | 294 | } |
295 | LCRYPTO_ALIAS(RSA_set0_key); | ||
282 | 296 | ||
283 | void | 297 | void |
284 | RSA_get0_crt_params(const RSA *r, const BIGNUM **dmp1, const BIGNUM **dmq1, | 298 | RSA_get0_crt_params(const RSA *r, const BIGNUM **dmp1, const BIGNUM **dmq1, |
@@ -291,6 +305,7 @@ RSA_get0_crt_params(const RSA *r, const BIGNUM **dmp1, const BIGNUM **dmq1, | |||
291 | if (iqmp != NULL) | 305 | if (iqmp != NULL) |
292 | *iqmp = r->iqmp; | 306 | *iqmp = r->iqmp; |
293 | } | 307 | } |
308 | LCRYPTO_ALIAS(RSA_get0_crt_params); | ||
294 | 309 | ||
295 | int | 310 | int |
296 | RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp) | 311 | RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp) |
@@ -315,6 +330,7 @@ RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp) | |||
315 | 330 | ||
316 | return 1; | 331 | return 1; |
317 | } | 332 | } |
333 | LCRYPTO_ALIAS(RSA_set0_crt_params); | ||
318 | 334 | ||
319 | void | 335 | void |
320 | RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q) | 336 | RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q) |
@@ -324,6 +340,7 @@ RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q) | |||
324 | if (q != NULL) | 340 | if (q != NULL) |
325 | *q = r->q; | 341 | *q = r->q; |
326 | } | 342 | } |
343 | LCRYPTO_ALIAS(RSA_get0_factors); | ||
327 | 344 | ||
328 | int | 345 | int |
329 | RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q) | 346 | RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q) |
@@ -342,78 +359,91 @@ RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q) | |||
342 | 359 | ||
343 | return 1; | 360 | return 1; |
344 | } | 361 | } |
362 | LCRYPTO_ALIAS(RSA_set0_factors); | ||
345 | 363 | ||
346 | const BIGNUM * | 364 | const BIGNUM * |
347 | RSA_get0_n(const RSA *r) | 365 | RSA_get0_n(const RSA *r) |
348 | { | 366 | { |
349 | return r->n; | 367 | return r->n; |
350 | } | 368 | } |
369 | LCRYPTO_ALIAS(RSA_get0_n); | ||
351 | 370 | ||
352 | const BIGNUM * | 371 | const BIGNUM * |
353 | RSA_get0_e(const RSA *r) | 372 | RSA_get0_e(const RSA *r) |
354 | { | 373 | { |
355 | return r->e; | 374 | return r->e; |
356 | } | 375 | } |
376 | LCRYPTO_ALIAS(RSA_get0_e); | ||
357 | 377 | ||
358 | const BIGNUM * | 378 | const BIGNUM * |
359 | RSA_get0_d(const RSA *r) | 379 | RSA_get0_d(const RSA *r) |
360 | { | 380 | { |
361 | return r->d; | 381 | return r->d; |
362 | } | 382 | } |
383 | LCRYPTO_ALIAS(RSA_get0_d); | ||
363 | 384 | ||
364 | const BIGNUM * | 385 | const BIGNUM * |
365 | RSA_get0_p(const RSA *r) | 386 | RSA_get0_p(const RSA *r) |
366 | { | 387 | { |
367 | return r->p; | 388 | return r->p; |
368 | } | 389 | } |
390 | LCRYPTO_ALIAS(RSA_get0_p); | ||
369 | 391 | ||
370 | const BIGNUM * | 392 | const BIGNUM * |
371 | RSA_get0_q(const RSA *r) | 393 | RSA_get0_q(const RSA *r) |
372 | { | 394 | { |
373 | return r->q; | 395 | return r->q; |
374 | } | 396 | } |
397 | LCRYPTO_ALIAS(RSA_get0_q); | ||
375 | 398 | ||
376 | const BIGNUM * | 399 | const BIGNUM * |
377 | RSA_get0_dmp1(const RSA *r) | 400 | RSA_get0_dmp1(const RSA *r) |
378 | { | 401 | { |
379 | return r->dmp1; | 402 | return r->dmp1; |
380 | } | 403 | } |
404 | LCRYPTO_ALIAS(RSA_get0_dmp1); | ||
381 | 405 | ||
382 | const BIGNUM * | 406 | const BIGNUM * |
383 | RSA_get0_dmq1(const RSA *r) | 407 | RSA_get0_dmq1(const RSA *r) |
384 | { | 408 | { |
385 | return r->dmq1; | 409 | return r->dmq1; |
386 | } | 410 | } |
411 | LCRYPTO_ALIAS(RSA_get0_dmq1); | ||
387 | 412 | ||
388 | const BIGNUM * | 413 | const BIGNUM * |
389 | RSA_get0_iqmp(const RSA *r) | 414 | RSA_get0_iqmp(const RSA *r) |
390 | { | 415 | { |
391 | return r->iqmp; | 416 | return r->iqmp; |
392 | } | 417 | } |
418 | LCRYPTO_ALIAS(RSA_get0_iqmp); | ||
393 | 419 | ||
394 | const RSA_PSS_PARAMS * | 420 | const RSA_PSS_PARAMS * |
395 | RSA_get0_pss_params(const RSA *r) | 421 | RSA_get0_pss_params(const RSA *r) |
396 | { | 422 | { |
397 | return r->pss; | 423 | return r->pss; |
398 | } | 424 | } |
425 | LCRYPTO_ALIAS(RSA_get0_pss_params); | ||
399 | 426 | ||
400 | void | 427 | void |
401 | RSA_clear_flags(RSA *r, int flags) | 428 | RSA_clear_flags(RSA *r, int flags) |
402 | { | 429 | { |
403 | r->flags &= ~flags; | 430 | r->flags &= ~flags; |
404 | } | 431 | } |
432 | LCRYPTO_ALIAS(RSA_clear_flags); | ||
405 | 433 | ||
406 | int | 434 | int |
407 | RSA_test_flags(const RSA *r, int flags) | 435 | RSA_test_flags(const RSA *r, int flags) |
408 | { | 436 | { |
409 | return r->flags & flags; | 437 | return r->flags & flags; |
410 | } | 438 | } |
439 | LCRYPTO_ALIAS(RSA_test_flags); | ||
411 | 440 | ||
412 | void | 441 | void |
413 | RSA_set_flags(RSA *r, int flags) | 442 | RSA_set_flags(RSA *r, int flags) |
414 | { | 443 | { |
415 | r->flags |= flags; | 444 | r->flags |= flags; |
416 | } | 445 | } |
446 | LCRYPTO_ALIAS(RSA_set_flags); | ||
417 | 447 | ||
418 | int | 448 | int |
419 | RSA_pkey_ctx_ctrl(EVP_PKEY_CTX *ctx, int optype, int cmd, int p1, void *p2) | 449 | RSA_pkey_ctx_ctrl(EVP_PKEY_CTX *ctx, int optype, int cmd, int p1, void *p2) |
@@ -426,3 +456,4 @@ RSA_pkey_ctx_ctrl(EVP_PKEY_CTX *ctx, int optype, int cmd, int p1, void *p2) | |||
426 | 456 | ||
427 | return EVP_PKEY_CTX_ctrl(ctx, -1, optype, cmd, p1, p2); | 457 | return EVP_PKEY_CTX_ctrl(ctx, -1, optype, cmd, p1, p2); |
428 | } | 458 | } |
459 | LCRYPTO_ALIAS(RSA_pkey_ctx_ctrl); | ||
diff --git a/src/lib/libcrypto/rsa/rsa_meth.c b/src/lib/libcrypto/rsa/rsa_meth.c index a011927346..71608caa01 100644 --- a/src/lib/libcrypto/rsa/rsa_meth.c +++ b/src/lib/libcrypto/rsa/rsa_meth.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_meth.c,v 1.6 2022/11/26 16:08:54 tb Exp $ */ | 1 | /* $OpenBSD: rsa_meth.c,v 1.7 2023/07/08 12:26:45 beck Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> | 3 | * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> |
4 | * | 4 | * |
@@ -38,6 +38,7 @@ RSA_meth_new(const char *name, int flags) | |||
38 | 38 | ||
39 | return meth; | 39 | return meth; |
40 | } | 40 | } |
41 | LCRYPTO_ALIAS(RSA_meth_new); | ||
41 | 42 | ||
42 | void | 43 | void |
43 | RSA_meth_free(RSA_METHOD *meth) | 44 | RSA_meth_free(RSA_METHOD *meth) |
@@ -48,6 +49,7 @@ RSA_meth_free(RSA_METHOD *meth) | |||
48 | free(meth->name); | 49 | free(meth->name); |
49 | free(meth); | 50 | free(meth); |
50 | } | 51 | } |
52 | LCRYPTO_ALIAS(RSA_meth_free); | ||
51 | 53 | ||
52 | RSA_METHOD * | 54 | RSA_METHOD * |
53 | RSA_meth_dup(const RSA_METHOD *meth) | 55 | RSA_meth_dup(const RSA_METHOD *meth) |
@@ -64,6 +66,7 @@ RSA_meth_dup(const RSA_METHOD *meth) | |||
64 | 66 | ||
65 | return copy; | 67 | return copy; |
66 | } | 68 | } |
69 | LCRYPTO_ALIAS(RSA_meth_dup); | ||
67 | 70 | ||
68 | int | 71 | int |
69 | RSA_meth_set1_name(RSA_METHOD *meth, const char *name) | 72 | RSA_meth_set1_name(RSA_METHOD *meth, const char *name) |
@@ -76,12 +79,14 @@ RSA_meth_set1_name(RSA_METHOD *meth, const char *name) | |||
76 | meth->name = new_name; | 79 | meth->name = new_name; |
77 | return 1; | 80 | return 1; |
78 | } | 81 | } |
82 | LCRYPTO_ALIAS(RSA_meth_set1_name); | ||
79 | 83 | ||
80 | int | 84 | int |
81 | (*RSA_meth_get_finish(const RSA_METHOD *meth))(RSA *rsa) | 85 | (*RSA_meth_get_finish(const RSA_METHOD *meth))(RSA *rsa) |
82 | { | 86 | { |
83 | return meth->finish; | 87 | return meth->finish; |
84 | } | 88 | } |
89 | LCRYPTO_ALIAS(RSA_meth_get_finish); | ||
85 | 90 | ||
86 | int | 91 | int |
87 | RSA_meth_set_priv_enc(RSA_METHOD *meth, int (*priv_enc)(int flen, | 92 | RSA_meth_set_priv_enc(RSA_METHOD *meth, int (*priv_enc)(int flen, |
@@ -90,6 +95,7 @@ RSA_meth_set_priv_enc(RSA_METHOD *meth, int (*priv_enc)(int flen, | |||
90 | meth->rsa_priv_enc = priv_enc; | 95 | meth->rsa_priv_enc = priv_enc; |
91 | return 1; | 96 | return 1; |
92 | } | 97 | } |
98 | LCRYPTO_ALIAS(RSA_meth_set_priv_enc); | ||
93 | 99 | ||
94 | int | 100 | int |
95 | RSA_meth_set_priv_dec(RSA_METHOD *meth, int (*priv_dec)(int flen, | 101 | RSA_meth_set_priv_dec(RSA_METHOD *meth, int (*priv_dec)(int flen, |
@@ -98,6 +104,7 @@ RSA_meth_set_priv_dec(RSA_METHOD *meth, int (*priv_dec)(int flen, | |||
98 | meth->rsa_priv_dec = priv_dec; | 104 | meth->rsa_priv_dec = priv_dec; |
99 | return 1; | 105 | return 1; |
100 | } | 106 | } |
107 | LCRYPTO_ALIAS(RSA_meth_set_priv_dec); | ||
101 | 108 | ||
102 | int | 109 | int |
103 | RSA_meth_set_finish(RSA_METHOD *meth, int (*finish)(RSA *rsa)) | 110 | RSA_meth_set_finish(RSA_METHOD *meth, int (*finish)(RSA *rsa)) |
@@ -105,6 +112,7 @@ RSA_meth_set_finish(RSA_METHOD *meth, int (*finish)(RSA *rsa)) | |||
105 | meth->finish = finish; | 112 | meth->finish = finish; |
106 | return 1; | 113 | return 1; |
107 | } | 114 | } |
115 | LCRYPTO_ALIAS(RSA_meth_set_finish); | ||
108 | 116 | ||
109 | int | 117 | int |
110 | RSA_meth_set_pub_enc(RSA_METHOD *meth, int (*pub_enc)(int flen, | 118 | RSA_meth_set_pub_enc(RSA_METHOD *meth, int (*pub_enc)(int flen, |
@@ -113,6 +121,7 @@ RSA_meth_set_pub_enc(RSA_METHOD *meth, int (*pub_enc)(int flen, | |||
113 | meth->rsa_pub_enc = pub_enc; | 121 | meth->rsa_pub_enc = pub_enc; |
114 | return 1; | 122 | return 1; |
115 | } | 123 | } |
124 | LCRYPTO_ALIAS(RSA_meth_set_pub_enc); | ||
116 | 125 | ||
117 | int | 126 | int |
118 | RSA_meth_set_pub_dec(RSA_METHOD *meth, int (*pub_dec)(int flen, | 127 | RSA_meth_set_pub_dec(RSA_METHOD *meth, int (*pub_dec)(int flen, |
@@ -121,6 +130,7 @@ RSA_meth_set_pub_dec(RSA_METHOD *meth, int (*pub_dec)(int flen, | |||
121 | meth->rsa_pub_dec = pub_dec; | 130 | meth->rsa_pub_dec = pub_dec; |
122 | return 1; | 131 | return 1; |
123 | } | 132 | } |
133 | LCRYPTO_ALIAS(RSA_meth_set_pub_dec); | ||
124 | 134 | ||
125 | int | 135 | int |
126 | RSA_meth_set_mod_exp(RSA_METHOD *meth, int (*mod_exp)(BIGNUM *r0, | 136 | RSA_meth_set_mod_exp(RSA_METHOD *meth, int (*mod_exp)(BIGNUM *r0, |
@@ -129,6 +139,7 @@ RSA_meth_set_mod_exp(RSA_METHOD *meth, int (*mod_exp)(BIGNUM *r0, | |||
129 | meth->rsa_mod_exp = mod_exp; | 139 | meth->rsa_mod_exp = mod_exp; |
130 | return 1; | 140 | return 1; |
131 | } | 141 | } |
142 | LCRYPTO_ALIAS(RSA_meth_set_mod_exp); | ||
132 | 143 | ||
133 | int | 144 | int |
134 | RSA_meth_set_bn_mod_exp(RSA_METHOD *meth, int (*bn_mod_exp)(BIGNUM *r, | 145 | RSA_meth_set_bn_mod_exp(RSA_METHOD *meth, int (*bn_mod_exp)(BIGNUM *r, |
@@ -138,6 +149,7 @@ RSA_meth_set_bn_mod_exp(RSA_METHOD *meth, int (*bn_mod_exp)(BIGNUM *r, | |||
138 | meth->bn_mod_exp = bn_mod_exp; | 149 | meth->bn_mod_exp = bn_mod_exp; |
139 | return 1; | 150 | return 1; |
140 | } | 151 | } |
152 | LCRYPTO_ALIAS(RSA_meth_set_bn_mod_exp); | ||
141 | 153 | ||
142 | int | 154 | int |
143 | RSA_meth_set_init(RSA_METHOD *meth, int (*init)(RSA *rsa)) | 155 | RSA_meth_set_init(RSA_METHOD *meth, int (*init)(RSA *rsa)) |
@@ -145,6 +157,7 @@ RSA_meth_set_init(RSA_METHOD *meth, int (*init)(RSA *rsa)) | |||
145 | meth->init = init; | 157 | meth->init = init; |
146 | return 1; | 158 | return 1; |
147 | } | 159 | } |
160 | LCRYPTO_ALIAS(RSA_meth_set_init); | ||
148 | 161 | ||
149 | int | 162 | int |
150 | RSA_meth_set_keygen(RSA_METHOD *meth, int (*keygen)(RSA *rsa, int bits, | 163 | RSA_meth_set_keygen(RSA_METHOD *meth, int (*keygen)(RSA *rsa, int bits, |
@@ -153,6 +166,7 @@ RSA_meth_set_keygen(RSA_METHOD *meth, int (*keygen)(RSA *rsa, int bits, | |||
153 | meth->rsa_keygen = keygen; | 166 | meth->rsa_keygen = keygen; |
154 | return 1; | 167 | return 1; |
155 | } | 168 | } |
169 | LCRYPTO_ALIAS(RSA_meth_set_keygen); | ||
156 | 170 | ||
157 | int | 171 | int |
158 | RSA_meth_set_flags(RSA_METHOD *meth, int flags) | 172 | RSA_meth_set_flags(RSA_METHOD *meth, int flags) |
@@ -160,6 +174,7 @@ RSA_meth_set_flags(RSA_METHOD *meth, int flags) | |||
160 | meth->flags = flags; | 174 | meth->flags = flags; |
161 | return 1; | 175 | return 1; |
162 | } | 176 | } |
177 | LCRYPTO_ALIAS(RSA_meth_set_flags); | ||
163 | 178 | ||
164 | int | 179 | int |
165 | RSA_meth_set0_app_data(RSA_METHOD *meth, void *app_data) | 180 | RSA_meth_set0_app_data(RSA_METHOD *meth, void *app_data) |
@@ -167,12 +182,14 @@ RSA_meth_set0_app_data(RSA_METHOD *meth, void *app_data) | |||
167 | meth->app_data = app_data; | 182 | meth->app_data = app_data; |
168 | return 1; | 183 | return 1; |
169 | } | 184 | } |
185 | LCRYPTO_ALIAS(RSA_meth_set0_app_data); | ||
170 | 186 | ||
171 | const char * | 187 | const char * |
172 | RSA_meth_get0_name(const RSA_METHOD *meth) | 188 | RSA_meth_get0_name(const RSA_METHOD *meth) |
173 | { | 189 | { |
174 | return meth->name; | 190 | return meth->name; |
175 | } | 191 | } |
192 | LCRYPTO_ALIAS(RSA_meth_get0_name); | ||
176 | 193 | ||
177 | int | 194 | int |
178 | (*RSA_meth_get_pub_enc(const RSA_METHOD *meth))(int flen, | 195 | (*RSA_meth_get_pub_enc(const RSA_METHOD *meth))(int flen, |
@@ -180,6 +197,7 @@ int | |||
180 | { | 197 | { |
181 | return meth->rsa_pub_enc; | 198 | return meth->rsa_pub_enc; |
182 | } | 199 | } |
200 | LCRYPTO_ALIAS(RSA_meth_get_pub_enc); | ||
183 | 201 | ||
184 | int | 202 | int |
185 | (*RSA_meth_get_pub_dec(const RSA_METHOD *meth))(int flen, | 203 | (*RSA_meth_get_pub_dec(const RSA_METHOD *meth))(int flen, |
@@ -187,6 +205,7 @@ int | |||
187 | { | 205 | { |
188 | return meth->rsa_pub_dec; | 206 | return meth->rsa_pub_dec; |
189 | } | 207 | } |
208 | LCRYPTO_ALIAS(RSA_meth_get_pub_dec); | ||
190 | 209 | ||
191 | int | 210 | int |
192 | (*RSA_meth_get_priv_enc(const RSA_METHOD *meth))(int flen, | 211 | (*RSA_meth_get_priv_enc(const RSA_METHOD *meth))(int flen, |
@@ -194,6 +213,7 @@ int | |||
194 | { | 213 | { |
195 | return meth->rsa_priv_enc; | 214 | return meth->rsa_priv_enc; |
196 | } | 215 | } |
216 | LCRYPTO_ALIAS(RSA_meth_get_priv_enc); | ||
197 | 217 | ||
198 | int | 218 | int |
199 | (*RSA_meth_get_priv_dec(const RSA_METHOD *meth))(int flen, | 219 | (*RSA_meth_get_priv_dec(const RSA_METHOD *meth))(int flen, |
@@ -201,6 +221,7 @@ int | |||
201 | { | 221 | { |
202 | return meth->rsa_priv_dec; | 222 | return meth->rsa_priv_dec; |
203 | } | 223 | } |
224 | LCRYPTO_ALIAS(RSA_meth_get_priv_dec); | ||
204 | 225 | ||
205 | int | 226 | int |
206 | (*RSA_meth_get_mod_exp(const RSA_METHOD *meth))(BIGNUM *r0, const BIGNUM *i, | 227 | (*RSA_meth_get_mod_exp(const RSA_METHOD *meth))(BIGNUM *r0, const BIGNUM *i, |
@@ -208,6 +229,7 @@ int | |||
208 | { | 229 | { |
209 | return meth->rsa_mod_exp; | 230 | return meth->rsa_mod_exp; |
210 | } | 231 | } |
232 | LCRYPTO_ALIAS(RSA_meth_get_mod_exp); | ||
211 | 233 | ||
212 | int | 234 | int |
213 | (*RSA_meth_get_bn_mod_exp(const RSA_METHOD *meth))(BIGNUM *r, | 235 | (*RSA_meth_get_bn_mod_exp(const RSA_METHOD *meth))(BIGNUM *r, |
@@ -216,12 +238,14 @@ int | |||
216 | { | 238 | { |
217 | return meth->bn_mod_exp; | 239 | return meth->bn_mod_exp; |
218 | } | 240 | } |
241 | LCRYPTO_ALIAS(RSA_meth_get_bn_mod_exp); | ||
219 | 242 | ||
220 | int | 243 | int |
221 | (*RSA_meth_get_init(const RSA_METHOD *meth))(RSA *rsa) | 244 | (*RSA_meth_get_init(const RSA_METHOD *meth))(RSA *rsa) |
222 | { | 245 | { |
223 | return meth->init; | 246 | return meth->init; |
224 | } | 247 | } |
248 | LCRYPTO_ALIAS(RSA_meth_get_init); | ||
225 | 249 | ||
226 | int | 250 | int |
227 | (*RSA_meth_get_keygen(const RSA_METHOD *meth))(RSA *rsa, int bits, BIGNUM *e, | 251 | (*RSA_meth_get_keygen(const RSA_METHOD *meth))(RSA *rsa, int bits, BIGNUM *e, |
@@ -229,18 +253,21 @@ int | |||
229 | { | 253 | { |
230 | return meth->rsa_keygen; | 254 | return meth->rsa_keygen; |
231 | } | 255 | } |
256 | LCRYPTO_ALIAS(RSA_meth_get_keygen); | ||
232 | 257 | ||
233 | int | 258 | int |
234 | RSA_meth_get_flags(const RSA_METHOD *meth) | 259 | RSA_meth_get_flags(const RSA_METHOD *meth) |
235 | { | 260 | { |
236 | return meth->flags; | 261 | return meth->flags; |
237 | } | 262 | } |
263 | LCRYPTO_ALIAS(RSA_meth_get_flags); | ||
238 | 264 | ||
239 | void * | 265 | void * |
240 | RSA_meth_get0_app_data(const RSA_METHOD *meth) | 266 | RSA_meth_get0_app_data(const RSA_METHOD *meth) |
241 | { | 267 | { |
242 | return meth->app_data; | 268 | return meth->app_data; |
243 | } | 269 | } |
270 | LCRYPTO_ALIAS(RSA_meth_get0_app_data); | ||
244 | 271 | ||
245 | int | 272 | int |
246 | (*RSA_meth_get_sign(const RSA_METHOD *meth))(int type, | 273 | (*RSA_meth_get_sign(const RSA_METHOD *meth))(int type, |
@@ -250,6 +277,7 @@ int | |||
250 | { | 277 | { |
251 | return meth->rsa_sign; | 278 | return meth->rsa_sign; |
252 | } | 279 | } |
280 | LCRYPTO_ALIAS(RSA_meth_get_sign); | ||
253 | 281 | ||
254 | int | 282 | int |
255 | RSA_meth_set_sign(RSA_METHOD *meth, int (*sign)(int type, | 283 | RSA_meth_set_sign(RSA_METHOD *meth, int (*sign)(int type, |
@@ -259,6 +287,7 @@ RSA_meth_set_sign(RSA_METHOD *meth, int (*sign)(int type, | |||
259 | meth->rsa_sign = sign; | 287 | meth->rsa_sign = sign; |
260 | return 1; | 288 | return 1; |
261 | } | 289 | } |
290 | LCRYPTO_ALIAS(RSA_meth_set_sign); | ||
262 | 291 | ||
263 | int | 292 | int |
264 | (*RSA_meth_get_verify(const RSA_METHOD *meth))(int dtype, | 293 | (*RSA_meth_get_verify(const RSA_METHOD *meth))(int dtype, |
@@ -267,6 +296,7 @@ int | |||
267 | { | 296 | { |
268 | return meth->rsa_verify; | 297 | return meth->rsa_verify; |
269 | } | 298 | } |
299 | LCRYPTO_ALIAS(RSA_meth_get_verify); | ||
270 | 300 | ||
271 | int | 301 | int |
272 | RSA_meth_set_verify(RSA_METHOD *meth, int (*verify)(int dtype, | 302 | RSA_meth_set_verify(RSA_METHOD *meth, int (*verify)(int dtype, |
@@ -276,3 +306,4 @@ RSA_meth_set_verify(RSA_METHOD *meth, int (*verify)(int dtype, | |||
276 | meth->rsa_verify = verify; | 306 | meth->rsa_verify = verify; |
277 | return 1; | 307 | return 1; |
278 | } | 308 | } |
309 | LCRYPTO_ALIAS(RSA_meth_set_verify); | ||
diff --git a/src/lib/libcrypto/rsa/rsa_none.c b/src/lib/libcrypto/rsa/rsa_none.c index 13d3449a9f..9c53dcf595 100644 --- a/src/lib/libcrypto/rsa/rsa_none.c +++ b/src/lib/libcrypto/rsa/rsa_none.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_none.c,v 1.11 2017/01/29 17:49:23 beck Exp $ */ | 1 | /* $OpenBSD: rsa_none.c,v 1.12 2023/07/08 12:26:45 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 | * |
@@ -80,6 +80,7 @@ RSA_padding_add_none(unsigned char *to, int tlen, const unsigned char *from, | |||
80 | memcpy(to, from, flen); | 80 | memcpy(to, from, flen); |
81 | return 1; | 81 | return 1; |
82 | } | 82 | } |
83 | LCRYPTO_ALIAS(RSA_padding_add_none); | ||
83 | 84 | ||
84 | int | 85 | int |
85 | RSA_padding_check_none(unsigned char *to, int tlen, const unsigned char *from, | 86 | RSA_padding_check_none(unsigned char *to, int tlen, const unsigned char *from, |
@@ -94,3 +95,4 @@ RSA_padding_check_none(unsigned char *to, int tlen, const unsigned char *from, | |||
94 | memcpy(to + tlen - flen, from, flen); | 95 | memcpy(to + tlen - flen, from, flen); |
95 | return tlen; | 96 | return tlen; |
96 | } | 97 | } |
98 | LCRYPTO_ALIAS(RSA_padding_check_none); | ||
diff --git a/src/lib/libcrypto/rsa/rsa_oaep.c b/src/lib/libcrypto/rsa/rsa_oaep.c index 083f4a6c80..c2c3a61daa 100644 --- a/src/lib/libcrypto/rsa/rsa_oaep.c +++ b/src/lib/libcrypto/rsa/rsa_oaep.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_oaep.c,v 1.36 2022/11/26 16:08:54 tb Exp $ */ | 1 | /* $OpenBSD: rsa_oaep.c,v 1.37 2023/07/08 12:26:45 beck Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved. | 3 | * Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved. |
4 | * | 4 | * |
@@ -90,6 +90,7 @@ RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen, | |||
90 | return RSA_padding_add_PKCS1_OAEP_mgf1(to, tlen, from, flen, param, | 90 | return RSA_padding_add_PKCS1_OAEP_mgf1(to, tlen, from, flen, param, |
91 | plen, NULL, NULL); | 91 | plen, NULL, NULL); |
92 | } | 92 | } |
93 | LCRYPTO_ALIAS(RSA_padding_add_PKCS1_OAEP); | ||
93 | 94 | ||
94 | int | 95 | int |
95 | RSA_padding_add_PKCS1_OAEP_mgf1(unsigned char *to, int tlen, | 96 | RSA_padding_add_PKCS1_OAEP_mgf1(unsigned char *to, int tlen, |
@@ -156,6 +157,7 @@ RSA_padding_add_PKCS1_OAEP_mgf1(unsigned char *to, int tlen, | |||
156 | 157 | ||
157 | return rv; | 158 | return rv; |
158 | } | 159 | } |
160 | LCRYPTO_ALIAS(RSA_padding_add_PKCS1_OAEP_mgf1); | ||
159 | 161 | ||
160 | int | 162 | int |
161 | RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen, | 163 | RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen, |
@@ -165,6 +167,7 @@ RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen, | |||
165 | return RSA_padding_check_PKCS1_OAEP_mgf1(to, tlen, from, flen, num, | 167 | return RSA_padding_check_PKCS1_OAEP_mgf1(to, tlen, from, flen, num, |
166 | param, plen, NULL, NULL); | 168 | param, plen, NULL, NULL); |
167 | } | 169 | } |
170 | LCRYPTO_ALIAS(RSA_padding_check_PKCS1_OAEP); | ||
168 | 171 | ||
169 | int | 172 | int |
170 | RSA_padding_check_PKCS1_OAEP_mgf1(unsigned char *to, int tlen, | 173 | RSA_padding_check_PKCS1_OAEP_mgf1(unsigned char *to, int tlen, |
@@ -315,6 +318,7 @@ RSA_padding_check_PKCS1_OAEP_mgf1(unsigned char *to, int tlen, | |||
315 | 318 | ||
316 | return constant_time_select_int(good, mlen, -1); | 319 | return constant_time_select_int(good, mlen, -1); |
317 | } | 320 | } |
321 | LCRYPTO_ALIAS(RSA_padding_check_PKCS1_OAEP_mgf1); | ||
318 | 322 | ||
319 | int | 323 | int |
320 | PKCS1_MGF1(unsigned char *mask, long len, const unsigned char *seed, | 324 | PKCS1_MGF1(unsigned char *mask, long len, const unsigned char *seed, |
@@ -356,3 +360,4 @@ PKCS1_MGF1(unsigned char *mask, long len, const unsigned char *seed, | |||
356 | EVP_MD_CTX_cleanup(&c); | 360 | EVP_MD_CTX_cleanup(&c); |
357 | return rv; | 361 | return rv; |
358 | } | 362 | } |
363 | LCRYPTO_ALIAS(PKCS1_MGF1); | ||
diff --git a/src/lib/libcrypto/rsa/rsa_pk1.c b/src/lib/libcrypto/rsa/rsa_pk1.c index 6de263113f..38f7c0be0b 100644 --- a/src/lib/libcrypto/rsa/rsa_pk1.c +++ b/src/lib/libcrypto/rsa/rsa_pk1.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_pk1.c,v 1.15 2017/01/29 17:49:23 beck Exp $ */ | 1 | /* $OpenBSD: rsa_pk1.c,v 1.16 2023/07/08 12:26:45 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 | * |
@@ -90,6 +90,7 @@ RSA_padding_add_PKCS1_type_1(unsigned char *to, int tlen, | |||
90 | 90 | ||
91 | return 1; | 91 | return 1; |
92 | } | 92 | } |
93 | LCRYPTO_ALIAS(RSA_padding_add_PKCS1_type_1); | ||
93 | 94 | ||
94 | int | 95 | int |
95 | RSA_padding_check_PKCS1_type_1(unsigned char *to, int tlen, | 96 | RSA_padding_check_PKCS1_type_1(unsigned char *to, int tlen, |
@@ -139,6 +140,7 @@ RSA_padding_check_PKCS1_type_1(unsigned char *to, int tlen, | |||
139 | 140 | ||
140 | return j; | 141 | return j; |
141 | } | 142 | } |
143 | LCRYPTO_ALIAS(RSA_padding_check_PKCS1_type_1); | ||
142 | 144 | ||
143 | int | 145 | int |
144 | RSA_padding_add_PKCS1_type_2(unsigned char *to, int tlen, | 146 | RSA_padding_add_PKCS1_type_2(unsigned char *to, int tlen, |
@@ -172,6 +174,7 @@ RSA_padding_add_PKCS1_type_2(unsigned char *to, int tlen, | |||
172 | memcpy(p, from, flen); | 174 | memcpy(p, from, flen); |
173 | return 1; | 175 | return 1; |
174 | } | 176 | } |
177 | LCRYPTO_ALIAS(RSA_padding_add_PKCS1_type_2); | ||
175 | 178 | ||
176 | int | 179 | int |
177 | RSA_padding_check_PKCS1_type_2(unsigned char *to, int tlen, | 180 | RSA_padding_check_PKCS1_type_2(unsigned char *to, int tlen, |
@@ -211,3 +214,4 @@ RSA_padding_check_PKCS1_type_2(unsigned char *to, int tlen, | |||
211 | 214 | ||
212 | return j; | 215 | return j; |
213 | } | 216 | } |
217 | LCRYPTO_ALIAS(RSA_padding_check_PKCS1_type_2); | ||
diff --git a/src/lib/libcrypto/rsa/rsa_pmeth.c b/src/lib/libcrypto/rsa/rsa_pmeth.c index 429524d73d..cb82b0908f 100644 --- a/src/lib/libcrypto/rsa/rsa_pmeth.c +++ b/src/lib/libcrypto/rsa/rsa_pmeth.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_pmeth.c,v 1.38 2023/05/05 12:21:44 tb Exp $ */ | 1 | /* $OpenBSD: rsa_pmeth.c,v 1.39 2023/07/08 12:26:45 beck Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 2006. | 3 | * project 2006. |
4 | */ | 4 | */ |
@@ -877,4 +877,3 @@ const EVP_PKEY_METHOD rsa_pss_pkey_meth = { | |||
877 | .ctrl = pkey_rsa_ctrl, | 877 | .ctrl = pkey_rsa_ctrl, |
878 | .ctrl_str = pkey_rsa_ctrl_str | 878 | .ctrl_str = pkey_rsa_ctrl_str |
879 | }; | 879 | }; |
880 | |||
diff --git a/src/lib/libcrypto/rsa/rsa_prn.c b/src/lib/libcrypto/rsa/rsa_prn.c index 12f600d674..1783563661 100644 --- a/src/lib/libcrypto/rsa/rsa_prn.c +++ b/src/lib/libcrypto/rsa/rsa_prn.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_prn.c,v 1.9 2022/11/08 19:19:08 tobhe Exp $ */ | 1 | /* $OpenBSD: rsa_prn.c,v 1.10 2023/07/08 12:26:45 beck Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 2006. | 3 | * project 2006. |
4 | */ | 4 | */ |
@@ -77,6 +77,7 @@ RSA_print_fp(FILE *fp, const RSA *x, int off) | |||
77 | BIO_free(b); | 77 | BIO_free(b); |
78 | return ret; | 78 | return ret; |
79 | } | 79 | } |
80 | LCRYPTO_ALIAS(RSA_print_fp); | ||
80 | 81 | ||
81 | int | 82 | int |
82 | RSA_print(BIO *bp, const RSA *x, int off) | 83 | RSA_print(BIO *bp, const RSA *x, int off) |
@@ -95,3 +96,4 @@ RSA_print(BIO *bp, const RSA *x, int off) | |||
95 | EVP_PKEY_free(pk); | 96 | EVP_PKEY_free(pk); |
96 | return ret; | 97 | return ret; |
97 | } | 98 | } |
99 | LCRYPTO_ALIAS(RSA_print); | ||
diff --git a/src/lib/libcrypto/rsa/rsa_pss.c b/src/lib/libcrypto/rsa/rsa_pss.c index 72c79e3b06..0860409be9 100644 --- a/src/lib/libcrypto/rsa/rsa_pss.c +++ b/src/lib/libcrypto/rsa/rsa_pss.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_pss.c,v 1.16 2022/11/26 16:08:54 tb Exp $ */ | 1 | /* $OpenBSD: rsa_pss.c,v 1.17 2023/07/08 12:26:45 beck Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 2005. | 3 | * project 2005. |
4 | */ | 4 | */ |
@@ -77,6 +77,7 @@ RSA_verify_PKCS1_PSS(RSA *rsa, const unsigned char *mHash, const EVP_MD *Hash, | |||
77 | { | 77 | { |
78 | return RSA_verify_PKCS1_PSS_mgf1(rsa, mHash, Hash, NULL, EM, sLen); | 78 | return RSA_verify_PKCS1_PSS_mgf1(rsa, mHash, Hash, NULL, EM, sLen); |
79 | } | 79 | } |
80 | LCRYPTO_ALIAS(RSA_verify_PKCS1_PSS); | ||
80 | 81 | ||
81 | int | 82 | int |
82 | RSA_verify_PKCS1_PSS_mgf1(RSA *rsa, const unsigned char *mHash, | 83 | RSA_verify_PKCS1_PSS_mgf1(RSA *rsa, const unsigned char *mHash, |
@@ -178,6 +179,7 @@ err: | |||
178 | 179 | ||
179 | return ret; | 180 | return ret; |
180 | } | 181 | } |
182 | LCRYPTO_ALIAS(RSA_verify_PKCS1_PSS_mgf1); | ||
181 | 183 | ||
182 | int | 184 | int |
183 | RSA_padding_add_PKCS1_PSS(RSA *rsa, unsigned char *EM, | 185 | RSA_padding_add_PKCS1_PSS(RSA *rsa, unsigned char *EM, |
@@ -185,6 +187,7 @@ RSA_padding_add_PKCS1_PSS(RSA *rsa, unsigned char *EM, | |||
185 | { | 187 | { |
186 | return RSA_padding_add_PKCS1_PSS_mgf1(rsa, EM, mHash, Hash, NULL, sLen); | 188 | return RSA_padding_add_PKCS1_PSS_mgf1(rsa, EM, mHash, Hash, NULL, sLen); |
187 | } | 189 | } |
190 | LCRYPTO_ALIAS(RSA_padding_add_PKCS1_PSS); | ||
188 | 191 | ||
189 | int | 192 | int |
190 | RSA_padding_add_PKCS1_PSS_mgf1(RSA *rsa, unsigned char *EM, | 193 | RSA_padding_add_PKCS1_PSS_mgf1(RSA *rsa, unsigned char *EM, |
@@ -282,3 +285,4 @@ err: | |||
282 | 285 | ||
283 | return ret; | 286 | return ret; |
284 | } | 287 | } |
288 | LCRYPTO_ALIAS(RSA_padding_add_PKCS1_PSS_mgf1); | ||
diff --git a/src/lib/libcrypto/rsa/rsa_saos.c b/src/lib/libcrypto/rsa/rsa_saos.c index 93492ac503..07a4f5d659 100644 --- a/src/lib/libcrypto/rsa/rsa_saos.c +++ b/src/lib/libcrypto/rsa/rsa_saos.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_saos.c,v 1.24 2018/09/05 00:55:33 djm Exp $ */ | 1 | /* $OpenBSD: rsa_saos.c,v 1.25 2023/07/08 12:26:45 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 | * |
@@ -99,6 +99,7 @@ RSA_sign_ASN1_OCTET_STRING(int type, const unsigned char *m, unsigned int m_len, | |||
99 | freezero(s, (unsigned int)j + 1); | 99 | freezero(s, (unsigned int)j + 1); |
100 | return ret; | 100 | return ret; |
101 | } | 101 | } |
102 | LCRYPTO_ALIAS(RSA_sign_ASN1_OCTET_STRING); | ||
102 | 103 | ||
103 | int | 104 | int |
104 | RSA_verify_ASN1_OCTET_STRING(int dtype, const unsigned char *m, | 105 | RSA_verify_ASN1_OCTET_STRING(int dtype, const unsigned char *m, |
@@ -139,3 +140,4 @@ err: | |||
139 | freezero(s, (unsigned int)siglen); | 140 | freezero(s, (unsigned int)siglen); |
140 | return ret; | 141 | return ret; |
141 | } | 142 | } |
143 | LCRYPTO_ALIAS(RSA_verify_ASN1_OCTET_STRING); | ||
diff --git a/src/lib/libcrypto/rsa/rsa_sign.c b/src/lib/libcrypto/rsa/rsa_sign.c index d517fcbcf2..5356768615 100644 --- a/src/lib/libcrypto/rsa/rsa_sign.c +++ b/src/lib/libcrypto/rsa/rsa_sign.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_sign.c,v 1.35 2022/11/26 16:08:54 tb Exp $ */ | 1 | /* $OpenBSD: rsa_sign.c,v 1.36 2023/07/08 12:26:45 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 | * |
@@ -166,6 +166,7 @@ RSA_sign(int type, const unsigned char *m, unsigned int m_len, | |||
166 | freezero(tmps, (size_t)encoded_len); | 166 | freezero(tmps, (size_t)encoded_len); |
167 | return (ret); | 167 | return (ret); |
168 | } | 168 | } |
169 | LCRYPTO_ALIAS(RSA_sign); | ||
169 | 170 | ||
170 | /* | 171 | /* |
171 | * int_rsa_verify verifies an RSA signature in `sigbuf' using `rsa'. It may be | 172 | * int_rsa_verify verifies an RSA signature in `sigbuf' using `rsa'. It may be |
@@ -276,3 +277,4 @@ RSA_verify(int dtype, const unsigned char *m, unsigned int m_len, | |||
276 | 277 | ||
277 | return int_rsa_verify(dtype, m, m_len, NULL, NULL, sigbuf, siglen, rsa); | 278 | return int_rsa_verify(dtype, m, m_len, NULL, NULL, sigbuf, siglen, rsa); |
278 | } | 279 | } |
280 | LCRYPTO_ALIAS(RSA_verify); | ||