From: beck Date: Sat, 8 Jul 2023 12:26:45 +0000 (+0000) Subject: Hide symbols in rsa X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=1da360153a2aac4b87b158742c54c8dbb9d58f24;p=openbsd Hide symbols in rsa ok tb@ --- diff --git a/lib/libcrypto/Symbols.namespace b/lib/libcrypto/Symbols.namespace index bc50302981d..da7ad8dbe7f 100644 --- a/lib/libcrypto/Symbols.namespace +++ b/lib/libcrypto/Symbols.namespace @@ -2412,3 +2412,116 @@ _libre_SHA512_Update _libre_SHA512_Final _libre_SHA512 _libre_SHA512_Transform +_libre_RSA_new +_libre_RSA_new_method +_libre_RSA_bits +_libre_RSA_size +_libre_RSA_generate_key +_libre_RSA_generate_key_ex +_libre_RSA_check_key +_libre_RSA_public_encrypt +_libre_RSA_private_encrypt +_libre_RSA_public_decrypt +_libre_RSA_private_decrypt +_libre_RSA_free +_libre_RSA_up_ref +_libre_RSA_flags +_libre_RSA_set_default_method +_libre_RSA_get_default_method +_libre_RSA_get_method +_libre_RSA_set_method +_libre_RSA_PKCS1_OpenSSL +_libre_RSA_PKCS1_SSLeay +_libre_RSA_pkey_ctx_ctrl +_libre_d2i_RSAPublicKey +_libre_i2d_RSAPublicKey +_libre_d2i_RSAPrivateKey +_libre_i2d_RSAPrivateKey +_libre_RSA_PSS_PARAMS_new +_libre_RSA_PSS_PARAMS_free +_libre_d2i_RSA_PSS_PARAMS +_libre_i2d_RSA_PSS_PARAMS +_libre_RSA_OAEP_PARAMS_new +_libre_RSA_OAEP_PARAMS_free +_libre_d2i_RSA_OAEP_PARAMS +_libre_i2d_RSA_OAEP_PARAMS +_libre_RSA_print_fp +_libre_RSA_print +_libre_RSA_sign +_libre_RSA_verify +_libre_RSA_sign_ASN1_OCTET_STRING +_libre_RSA_verify_ASN1_OCTET_STRING +_libre_RSA_blinding_on +_libre_RSA_blinding_off +_libre_RSA_setup_blinding +_libre_RSA_padding_add_PKCS1_type_1 +_libre_RSA_padding_check_PKCS1_type_1 +_libre_RSA_padding_add_PKCS1_type_2 +_libre_RSA_padding_check_PKCS1_type_2 +_libre_PKCS1_MGF1 +_libre_RSA_padding_add_PKCS1_OAEP +_libre_RSA_padding_check_PKCS1_OAEP +_libre_RSA_padding_add_PKCS1_OAEP_mgf1 +_libre_RSA_padding_check_PKCS1_OAEP_mgf1 +_libre_RSA_padding_add_none +_libre_RSA_padding_check_none +_libre_RSA_verify_PKCS1_PSS +_libre_RSA_padding_add_PKCS1_PSS +_libre_RSA_verify_PKCS1_PSS_mgf1 +_libre_RSA_padding_add_PKCS1_PSS_mgf1 +_libre_RSA_get_ex_new_index +_libre_RSA_set_ex_data +_libre_RSA_get_ex_data +_libre_RSA_security_bits +_libre_RSA_get0_key +_libre_RSA_set0_key +_libre_RSA_get0_crt_params +_libre_RSA_set0_crt_params +_libre_RSA_get0_factors +_libre_RSA_set0_factors +_libre_RSA_get0_n +_libre_RSA_get0_e +_libre_RSA_get0_d +_libre_RSA_get0_p +_libre_RSA_get0_q +_libre_RSA_get0_dmp1 +_libre_RSA_get0_dmq1 +_libre_RSA_get0_iqmp +_libre_RSA_get0_pss_params +_libre_RSA_clear_flags +_libre_RSA_test_flags +_libre_RSA_set_flags +_libre_RSAPublicKey_dup +_libre_RSAPrivateKey_dup +_libre_RSA_meth_new +_libre_RSA_meth_free +_libre_RSA_meth_dup +_libre_RSA_meth_set1_name +_libre_RSA_meth_set_priv_enc +_libre_RSA_meth_set_priv_dec +_libre_RSA_meth_get_finish +_libre_RSA_meth_set_finish +_libre_RSA_meth_set_pub_enc +_libre_RSA_meth_set_pub_dec +_libre_RSA_meth_set_mod_exp +_libre_RSA_meth_set_bn_mod_exp +_libre_RSA_meth_set_init +_libre_RSA_meth_set_keygen +_libre_RSA_meth_set_flags +_libre_RSA_meth_set0_app_data +_libre_RSA_meth_get0_name +_libre_RSA_meth_get_pub_enc +_libre_RSA_meth_get_pub_dec +_libre_RSA_meth_get_priv_enc +_libre_RSA_meth_get_priv_dec +_libre_RSA_meth_get_mod_exp +_libre_RSA_meth_get_bn_mod_exp +_libre_RSA_meth_get_init +_libre_RSA_meth_get_keygen +_libre_RSA_meth_get_flags +_libre_RSA_meth_get0_app_data +_libre_RSA_meth_get_sign +_libre_RSA_meth_set_sign +_libre_RSA_meth_get_verify +_libre_RSA_meth_set_verify +_libre_ERR_load_RSA_strings diff --git a/lib/libcrypto/hidden/openssl/rsa.h b/lib/libcrypto/hidden/openssl/rsa.h new file mode 100644 index 00000000000..f4342e21da0 --- /dev/null +++ b/lib/libcrypto/hidden/openssl/rsa.h @@ -0,0 +1,142 @@ +/* $OpenBSD: rsa.h,v 1.1 2023/07/08 12:26:45 beck Exp $ */ +/* + * Copyright (c) 2023 Bob Beck + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _LIBCRYPTO_RSA_H +#define _LIBCRYPTO_RSA_H + +#ifndef _MSC_VER +#include_next +#else +#include "../include/openssl/rsa.h" +#endif +#include "crypto_namespace.h" + +LCRYPTO_USED(RSA_new); +LCRYPTO_USED(RSA_new_method); +LCRYPTO_USED(RSA_bits); +LCRYPTO_USED(RSA_size); +LCRYPTO_USED(RSA_generate_key); +LCRYPTO_USED(RSA_generate_key_ex); +LCRYPTO_USED(RSA_check_key); +LCRYPTO_USED(RSA_public_encrypt); +LCRYPTO_USED(RSA_private_encrypt); +LCRYPTO_USED(RSA_public_decrypt); +LCRYPTO_USED(RSA_private_decrypt); +LCRYPTO_USED(RSA_free); +LCRYPTO_USED(RSA_up_ref); +LCRYPTO_USED(RSA_flags); +LCRYPTO_USED(RSA_set_default_method); +LCRYPTO_USED(RSA_get_default_method); +LCRYPTO_USED(RSA_get_method); +LCRYPTO_USED(RSA_set_method); +LCRYPTO_USED(RSA_PKCS1_OpenSSL); +LCRYPTO_USED(RSA_PKCS1_SSLeay); +LCRYPTO_USED(RSA_pkey_ctx_ctrl); +LCRYPTO_USED(d2i_RSAPublicKey); +LCRYPTO_USED(i2d_RSAPublicKey); +LCRYPTO_USED(d2i_RSAPrivateKey); +LCRYPTO_USED(i2d_RSAPrivateKey); +LCRYPTO_USED(RSA_PSS_PARAMS_new); +LCRYPTO_USED(RSA_PSS_PARAMS_free); +LCRYPTO_USED(d2i_RSA_PSS_PARAMS); +LCRYPTO_USED(i2d_RSA_PSS_PARAMS); +LCRYPTO_USED(RSA_OAEP_PARAMS_new); +LCRYPTO_USED(RSA_OAEP_PARAMS_free); +LCRYPTO_USED(d2i_RSA_OAEP_PARAMS); +LCRYPTO_USED(i2d_RSA_OAEP_PARAMS); +LCRYPTO_USED(RSA_print_fp); +LCRYPTO_USED(RSA_print); +LCRYPTO_USED(RSA_sign); +LCRYPTO_USED(RSA_verify); +LCRYPTO_USED(RSA_sign_ASN1_OCTET_STRING); +LCRYPTO_USED(RSA_verify_ASN1_OCTET_STRING); +LCRYPTO_USED(RSA_blinding_on); +LCRYPTO_USED(RSA_blinding_off); +LCRYPTO_USED(RSA_setup_blinding); +LCRYPTO_USED(RSA_padding_add_PKCS1_type_1); +LCRYPTO_USED(RSA_padding_check_PKCS1_type_1); +LCRYPTO_USED(RSA_padding_add_PKCS1_type_2); +LCRYPTO_USED(RSA_padding_check_PKCS1_type_2); +LCRYPTO_USED(PKCS1_MGF1); +LCRYPTO_USED(RSA_padding_add_PKCS1_OAEP); +LCRYPTO_USED(RSA_padding_check_PKCS1_OAEP); +LCRYPTO_USED(RSA_padding_add_PKCS1_OAEP_mgf1); +LCRYPTO_USED(RSA_padding_check_PKCS1_OAEP_mgf1); +LCRYPTO_USED(RSA_padding_add_none); +LCRYPTO_USED(RSA_padding_check_none); +LCRYPTO_USED(RSA_verify_PKCS1_PSS); +LCRYPTO_USED(RSA_padding_add_PKCS1_PSS); +LCRYPTO_USED(RSA_verify_PKCS1_PSS_mgf1); +LCRYPTO_USED(RSA_padding_add_PKCS1_PSS_mgf1); +LCRYPTO_USED(RSA_get_ex_new_index); +LCRYPTO_USED(RSA_set_ex_data); +LCRYPTO_USED(RSA_get_ex_data); +LCRYPTO_USED(RSA_security_bits); +LCRYPTO_USED(RSA_get0_key); +LCRYPTO_USED(RSA_set0_key); +LCRYPTO_USED(RSA_get0_crt_params); +LCRYPTO_USED(RSA_set0_crt_params); +LCRYPTO_USED(RSA_get0_factors); +LCRYPTO_USED(RSA_set0_factors); +LCRYPTO_USED(RSA_get0_n); +LCRYPTO_USED(RSA_get0_e); +LCRYPTO_USED(RSA_get0_d); +LCRYPTO_USED(RSA_get0_p); +LCRYPTO_USED(RSA_get0_q); +LCRYPTO_USED(RSA_get0_dmp1); +LCRYPTO_USED(RSA_get0_dmq1); +LCRYPTO_USED(RSA_get0_iqmp); +LCRYPTO_USED(RSA_get0_pss_params); +LCRYPTO_USED(RSA_clear_flags); +LCRYPTO_USED(RSA_test_flags); +LCRYPTO_USED(RSA_set_flags); +LCRYPTO_USED(RSAPublicKey_dup); +LCRYPTO_USED(RSAPrivateKey_dup); +LCRYPTO_USED(RSA_meth_new); +LCRYPTO_USED(RSA_meth_free); +LCRYPTO_USED(RSA_meth_dup); +LCRYPTO_USED(RSA_meth_set1_name); +LCRYPTO_USED(RSA_meth_set_priv_enc); +LCRYPTO_USED(RSA_meth_set_priv_dec); +LCRYPTO_USED(RSA_meth_get_finish); +LCRYPTO_USED(RSA_meth_set_finish); +LCRYPTO_USED(RSA_meth_set_pub_enc); +LCRYPTO_USED(RSA_meth_set_pub_dec); +LCRYPTO_USED(RSA_meth_set_mod_exp); +LCRYPTO_USED(RSA_meth_set_bn_mod_exp); +LCRYPTO_USED(RSA_meth_set_init); +LCRYPTO_USED(RSA_meth_set_keygen); +LCRYPTO_USED(RSA_meth_set_flags); +LCRYPTO_USED(RSA_meth_set0_app_data); +LCRYPTO_USED(RSA_meth_get0_name); +LCRYPTO_USED(RSA_meth_get_pub_enc); +LCRYPTO_USED(RSA_meth_get_pub_dec); +LCRYPTO_USED(RSA_meth_get_priv_enc); +LCRYPTO_USED(RSA_meth_get_priv_dec); +LCRYPTO_USED(RSA_meth_get_mod_exp); +LCRYPTO_USED(RSA_meth_get_bn_mod_exp); +LCRYPTO_USED(RSA_meth_get_init); +LCRYPTO_USED(RSA_meth_get_keygen); +LCRYPTO_USED(RSA_meth_get_flags); +LCRYPTO_USED(RSA_meth_get0_app_data); +LCRYPTO_USED(RSA_meth_get_sign); +LCRYPTO_USED(RSA_meth_set_sign); +LCRYPTO_USED(RSA_meth_get_verify); +LCRYPTO_USED(RSA_meth_set_verify); +LCRYPTO_USED(ERR_load_RSA_strings); + +#endif /* _LIBCRYPTO_RSA_H */ diff --git a/lib/libcrypto/rsa/rsa_asn1.c b/lib/libcrypto/rsa/rsa_asn1.c index 63c3637f466..0f6d8c49fe7 100644 --- a/lib/libcrypto/rsa/rsa_asn1.c +++ b/lib/libcrypto/rsa/rsa_asn1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa_asn1.c,v 1.16 2022/11/26 16:08:54 tb Exp $ */ +/* $OpenBSD: rsa_asn1.c,v 1.17 2023/07/08 12:26:45 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -269,24 +269,28 @@ d2i_RSA_PSS_PARAMS(RSA_PSS_PARAMS **a, const unsigned char **in, long len) return (RSA_PSS_PARAMS *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &RSA_PSS_PARAMS_it); } +LCRYPTO_ALIAS(d2i_RSA_PSS_PARAMS); int i2d_RSA_PSS_PARAMS(RSA_PSS_PARAMS *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &RSA_PSS_PARAMS_it); } +LCRYPTO_ALIAS(i2d_RSA_PSS_PARAMS); RSA_PSS_PARAMS * RSA_PSS_PARAMS_new(void) { return (RSA_PSS_PARAMS *)ASN1_item_new(&RSA_PSS_PARAMS_it); } +LCRYPTO_ALIAS(RSA_PSS_PARAMS_new); void RSA_PSS_PARAMS_free(RSA_PSS_PARAMS *a) { ASN1_item_free((ASN1_VALUE *)a, &RSA_PSS_PARAMS_it); } +LCRYPTO_ALIAS(RSA_PSS_PARAMS_free); static int 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) return (RSA_OAEP_PARAMS *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &RSA_OAEP_PARAMS_it); } +LCRYPTO_ALIAS(d2i_RSA_OAEP_PARAMS); int i2d_RSA_OAEP_PARAMS(RSA_OAEP_PARAMS *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &RSA_OAEP_PARAMS_it); } +LCRYPTO_ALIAS(i2d_RSA_OAEP_PARAMS); RSA_OAEP_PARAMS * RSA_OAEP_PARAMS_new(void) { return (RSA_OAEP_PARAMS *)ASN1_item_new(&RSA_OAEP_PARAMS_it); } +LCRYPTO_ALIAS(RSA_OAEP_PARAMS_new); void RSA_OAEP_PARAMS_free(RSA_OAEP_PARAMS *a) { ASN1_item_free((ASN1_VALUE *)a, &RSA_OAEP_PARAMS_it); } +LCRYPTO_ALIAS(RSA_OAEP_PARAMS_free); RSA * d2i_RSAPrivateKey(RSA **a, const unsigned char **in, long len) @@ -374,12 +382,14 @@ d2i_RSAPrivateKey(RSA **a, const unsigned char **in, long len) return (RSA *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &RSAPrivateKey_it); } +LCRYPTO_ALIAS(d2i_RSAPrivateKey); int i2d_RSAPrivateKey(const RSA *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &RSAPrivateKey_it); } +LCRYPTO_ALIAS(i2d_RSAPrivateKey); RSA * @@ -388,21 +398,25 @@ d2i_RSAPublicKey(RSA **a, const unsigned char **in, long len) return (RSA *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &RSAPublicKey_it); } +LCRYPTO_ALIAS(d2i_RSAPublicKey); int i2d_RSAPublicKey(const RSA *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &RSAPublicKey_it); } +LCRYPTO_ALIAS(i2d_RSAPublicKey); RSA * RSAPublicKey_dup(RSA *rsa) { return ASN1_item_dup(&RSAPublicKey_it, rsa); } +LCRYPTO_ALIAS(RSAPublicKey_dup); RSA * RSAPrivateKey_dup(RSA *rsa) { return ASN1_item_dup(&RSAPrivateKey_it, rsa); } +LCRYPTO_ALIAS(RSAPrivateKey_dup); diff --git a/lib/libcrypto/rsa/rsa_chk.c b/lib/libcrypto/rsa/rsa_chk.c index 5d7f7b307c8..b7666e0fed0 100644 --- a/lib/libcrypto/rsa/rsa_chk.c +++ b/lib/libcrypto/rsa/rsa_chk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa_chk.c,v 1.17 2022/11/26 16:08:54 tb Exp $ */ +/* $OpenBSD: rsa_chk.c,v 1.18 2023/07/08 12:26:45 beck Exp $ */ /* ==================================================================== * Copyright (c) 1999 The OpenSSL Project. All rights reserved. * @@ -220,3 +220,4 @@ err: return (ret); } +LCRYPTO_ALIAS(RSA_check_key); diff --git a/lib/libcrypto/rsa/rsa_crpt.c b/lib/libcrypto/rsa/rsa_crpt.c index a1b2eec6cab..ea79280b15d 100644 --- a/lib/libcrypto/rsa/rsa_crpt.c +++ b/lib/libcrypto/rsa/rsa_crpt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa_crpt.c,v 1.21 2022/11/26 16:08:54 tb Exp $ */ +/* $OpenBSD: rsa_crpt.c,v 1.22 2023/07/08 12:26:45 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -78,12 +78,14 @@ RSA_bits(const RSA *r) { return BN_num_bits(r->n); } +LCRYPTO_ALIAS(RSA_bits); int RSA_size(const RSA *r) { return BN_num_bytes(r->n); } +LCRYPTO_ALIAS(RSA_size); int 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, { return rsa->meth->rsa_pub_enc(flen, from, to, rsa, padding); } +LCRYPTO_ALIAS(RSA_public_encrypt); int 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, { return rsa->meth->rsa_priv_enc(flen, from, to, rsa, padding); } +LCRYPTO_ALIAS(RSA_private_encrypt); int 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, { return rsa->meth->rsa_priv_dec(flen, from, to, rsa, padding); } +LCRYPTO_ALIAS(RSA_private_decrypt); int 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, { return rsa->meth->rsa_pub_dec(flen, from, to, rsa, padding); } +LCRYPTO_ALIAS(RSA_public_decrypt); int RSA_flags(const RSA *r) { return r == NULL ? 0 : r->meth->flags; } +LCRYPTO_ALIAS(RSA_flags); void RSA_blinding_off(RSA *rsa) @@ -126,6 +133,7 @@ RSA_blinding_off(RSA *rsa) rsa->blinding = NULL; rsa->flags |= RSA_FLAG_NO_BLINDING; } +LCRYPTO_ALIAS(RSA_blinding_off); int RSA_blinding_on(RSA *rsa, BN_CTX *ctx) @@ -144,6 +152,7 @@ RSA_blinding_on(RSA *rsa, BN_CTX *ctx) err: return (ret); } +LCRYPTO_ALIAS(RSA_blinding_on); static BIGNUM * rsa_get_public_exp(const BIGNUM *d, const BIGNUM *p, const BIGNUM *q, @@ -220,3 +229,4 @@ err: return ret; } +LCRYPTO_ALIAS(RSA_setup_blinding); diff --git a/lib/libcrypto/rsa/rsa_eay.c b/lib/libcrypto/rsa/rsa_eay.c index cb44288c9ac..f6b1d655531 100644 --- a/lib/libcrypto/rsa/rsa_eay.c +++ b/lib/libcrypto/rsa/rsa_eay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa_eay.c,v 1.61 2023/07/07 10:11:23 jsing Exp $ */ +/* $OpenBSD: rsa_eay.c,v 1.62 2023/07/08 12:26:45 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -849,10 +849,11 @@ RSA_PKCS1_OpenSSL(void) { return &rsa_pkcs1_meth; } +LCRYPTO_ALIAS(RSA_PKCS1_OpenSSL); const RSA_METHOD * RSA_PKCS1_SSLeay(void) { return RSA_PKCS1_OpenSSL(); } - +LCRYPTO_ALIAS(RSA_PKCS1_SSLeay); diff --git a/lib/libcrypto/rsa/rsa_err.c b/lib/libcrypto/rsa/rsa_err.c index 79425c0f450..8b541689009 100644 --- a/lib/libcrypto/rsa/rsa_err.c +++ b/lib/libcrypto/rsa/rsa_err.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa_err.c,v 1.21 2022/07/12 14:42:50 kn Exp $ */ +/* $OpenBSD: rsa_err.c,v 1.22 2023/07/08 12:26:45 beck Exp $ */ /* ==================================================================== * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. * @@ -155,3 +155,4 @@ ERR_load_RSA_strings(void) } #endif } +LCRYPTO_ALIAS(ERR_load_RSA_strings); diff --git a/lib/libcrypto/rsa/rsa_gen.c b/lib/libcrypto/rsa/rsa_gen.c index 9db8eca9278..ff64eb2f0e4 100644 --- a/lib/libcrypto/rsa/rsa_gen.c +++ b/lib/libcrypto/rsa/rsa_gen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa_gen.c,v 1.29 2023/04/13 15:18:29 tb Exp $ */ +/* $OpenBSD: rsa_gen.c,v 1.30 2023/07/08 12:26:45 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -75,6 +75,7 @@ RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb) return rsa->meth->rsa_keygen(rsa, bits, e_value, cb); return rsa_builtin_keygen(rsa, bits, e_value, cb); } +LCRYPTO_ALIAS(RSA_generate_key_ex); static int rsa_builtin_keygen(RSA *rsa, int bits, BIGNUM *e_value, BN_GENCB *cb) @@ -253,3 +254,4 @@ err: return 0; } +LCRYPTO_ALIAS(RSA_generate_key); diff --git a/lib/libcrypto/rsa/rsa_lib.c b/lib/libcrypto/rsa/rsa_lib.c index 9656252d776..8831253b9fe 100644 --- a/lib/libcrypto/rsa/rsa_lib.c +++ b/lib/libcrypto/rsa/rsa_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa_lib.c,v 1.46 2023/03/11 21:14:26 tb Exp $ */ +/* $OpenBSD: rsa_lib.c,v 1.47 2023/07/08 12:26:45 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -83,12 +83,14 @@ RSA_new(void) return r; } +LCRYPTO_ALIAS(RSA_new); void RSA_set_default_method(const RSA_METHOD *meth) { default_RSA_meth = meth; } +LCRYPTO_ALIAS(RSA_set_default_method); const RSA_METHOD * RSA_get_default_method(void) @@ -98,12 +100,14 @@ RSA_get_default_method(void) return default_RSA_meth; } +LCRYPTO_ALIAS(RSA_get_default_method); const RSA_METHOD * RSA_get_method(const RSA *rsa) { return rsa->meth; } +LCRYPTO_ALIAS(RSA_get_method); int RSA_set_method(RSA *rsa, const RSA_METHOD *meth) @@ -126,6 +130,7 @@ RSA_set_method(RSA *rsa, const RSA_METHOD *meth) meth->init(rsa); return 1; } +LCRYPTO_ALIAS(RSA_set_method); RSA * RSA_new_method(ENGINE *engine) @@ -179,6 +184,7 @@ RSA_new_method(ENGINE *engine) return NULL; } +LCRYPTO_ALIAS(RSA_new_method); void RSA_free(RSA *r) @@ -213,6 +219,7 @@ RSA_free(RSA *r) RSA_PSS_PARAMS_free(r->pss); free(r); } +LCRYPTO_ALIAS(RSA_free); int RSA_up_ref(RSA *r) @@ -220,6 +227,7 @@ RSA_up_ref(RSA *r) int i = CRYPTO_add(&r->references, 1, CRYPTO_LOCK_RSA); return i > 1 ? 1 : 0; } +LCRYPTO_ALIAS(RSA_up_ref); int 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, return CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_RSA, argl, argp, new_func, dup_func, free_func); } +LCRYPTO_ALIAS(RSA_get_ex_new_index); int RSA_set_ex_data(RSA *r, int idx, void *arg) { return CRYPTO_set_ex_data(&r->ex_data, idx, arg); } +LCRYPTO_ALIAS(RSA_set_ex_data); void * RSA_get_ex_data(const RSA *r, int idx) { return CRYPTO_get_ex_data(&r->ex_data, idx); } +LCRYPTO_ALIAS(RSA_get_ex_data); int RSA_security_bits(const RSA *rsa) { return BN_security_bits(RSA_bits(rsa), -1); } +LCRYPTO_ALIAS(RSA_security_bits); void 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) if (d != NULL) *d = r->d; } +LCRYPTO_ALIAS(RSA_get0_key); int 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) return 1; } +LCRYPTO_ALIAS(RSA_set0_key); void 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, if (iqmp != NULL) *iqmp = r->iqmp; } +LCRYPTO_ALIAS(RSA_get0_crt_params); int 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) return 1; } +LCRYPTO_ALIAS(RSA_set0_crt_params); void 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) if (q != NULL) *q = r->q; } +LCRYPTO_ALIAS(RSA_get0_factors); int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q) @@ -342,78 +359,91 @@ RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q) return 1; } +LCRYPTO_ALIAS(RSA_set0_factors); const BIGNUM * RSA_get0_n(const RSA *r) { return r->n; } +LCRYPTO_ALIAS(RSA_get0_n); const BIGNUM * RSA_get0_e(const RSA *r) { return r->e; } +LCRYPTO_ALIAS(RSA_get0_e); const BIGNUM * RSA_get0_d(const RSA *r) { return r->d; } +LCRYPTO_ALIAS(RSA_get0_d); const BIGNUM * RSA_get0_p(const RSA *r) { return r->p; } +LCRYPTO_ALIAS(RSA_get0_p); const BIGNUM * RSA_get0_q(const RSA *r) { return r->q; } +LCRYPTO_ALIAS(RSA_get0_q); const BIGNUM * RSA_get0_dmp1(const RSA *r) { return r->dmp1; } +LCRYPTO_ALIAS(RSA_get0_dmp1); const BIGNUM * RSA_get0_dmq1(const RSA *r) { return r->dmq1; } +LCRYPTO_ALIAS(RSA_get0_dmq1); const BIGNUM * RSA_get0_iqmp(const RSA *r) { return r->iqmp; } +LCRYPTO_ALIAS(RSA_get0_iqmp); const RSA_PSS_PARAMS * RSA_get0_pss_params(const RSA *r) { return r->pss; } +LCRYPTO_ALIAS(RSA_get0_pss_params); void RSA_clear_flags(RSA *r, int flags) { r->flags &= ~flags; } +LCRYPTO_ALIAS(RSA_clear_flags); int RSA_test_flags(const RSA *r, int flags) { return r->flags & flags; } +LCRYPTO_ALIAS(RSA_test_flags); void RSA_set_flags(RSA *r, int flags) { r->flags |= flags; } +LCRYPTO_ALIAS(RSA_set_flags); int 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) return EVP_PKEY_CTX_ctrl(ctx, -1, optype, cmd, p1, p2); } +LCRYPTO_ALIAS(RSA_pkey_ctx_ctrl); diff --git a/lib/libcrypto/rsa/rsa_meth.c b/lib/libcrypto/rsa/rsa_meth.c index a0119273462..71608caa016 100644 --- a/lib/libcrypto/rsa/rsa_meth.c +++ b/lib/libcrypto/rsa/rsa_meth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa_meth.c,v 1.6 2022/11/26 16:08:54 tb Exp $ */ +/* $OpenBSD: rsa_meth.c,v 1.7 2023/07/08 12:26:45 beck Exp $ */ /* * Copyright (c) 2018 Theo Buehler * @@ -38,6 +38,7 @@ RSA_meth_new(const char *name, int flags) return meth; } +LCRYPTO_ALIAS(RSA_meth_new); void RSA_meth_free(RSA_METHOD *meth) @@ -48,6 +49,7 @@ RSA_meth_free(RSA_METHOD *meth) free(meth->name); free(meth); } +LCRYPTO_ALIAS(RSA_meth_free); RSA_METHOD * RSA_meth_dup(const RSA_METHOD *meth) @@ -64,6 +66,7 @@ RSA_meth_dup(const RSA_METHOD *meth) return copy; } +LCRYPTO_ALIAS(RSA_meth_dup); int RSA_meth_set1_name(RSA_METHOD *meth, const char *name) @@ -76,12 +79,14 @@ RSA_meth_set1_name(RSA_METHOD *meth, const char *name) meth->name = new_name; return 1; } +LCRYPTO_ALIAS(RSA_meth_set1_name); int (*RSA_meth_get_finish(const RSA_METHOD *meth))(RSA *rsa) { return meth->finish; } +LCRYPTO_ALIAS(RSA_meth_get_finish); int 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, meth->rsa_priv_enc = priv_enc; return 1; } +LCRYPTO_ALIAS(RSA_meth_set_priv_enc); int 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, meth->rsa_priv_dec = priv_dec; return 1; } +LCRYPTO_ALIAS(RSA_meth_set_priv_dec); int 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)) meth->finish = finish; return 1; } +LCRYPTO_ALIAS(RSA_meth_set_finish); int 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, meth->rsa_pub_enc = pub_enc; return 1; } +LCRYPTO_ALIAS(RSA_meth_set_pub_enc); int 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, meth->rsa_pub_dec = pub_dec; return 1; } +LCRYPTO_ALIAS(RSA_meth_set_pub_dec); int 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, meth->rsa_mod_exp = mod_exp; return 1; } +LCRYPTO_ALIAS(RSA_meth_set_mod_exp); int 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, meth->bn_mod_exp = bn_mod_exp; return 1; } +LCRYPTO_ALIAS(RSA_meth_set_bn_mod_exp); int 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)) meth->init = init; return 1; } +LCRYPTO_ALIAS(RSA_meth_set_init); int 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, meth->rsa_keygen = keygen; return 1; } +LCRYPTO_ALIAS(RSA_meth_set_keygen); int RSA_meth_set_flags(RSA_METHOD *meth, int flags) @@ -160,6 +174,7 @@ RSA_meth_set_flags(RSA_METHOD *meth, int flags) meth->flags = flags; return 1; } +LCRYPTO_ALIAS(RSA_meth_set_flags); int 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) meth->app_data = app_data; return 1; } +LCRYPTO_ALIAS(RSA_meth_set0_app_data); const char * RSA_meth_get0_name(const RSA_METHOD *meth) { return meth->name; } +LCRYPTO_ALIAS(RSA_meth_get0_name); int (*RSA_meth_get_pub_enc(const RSA_METHOD *meth))(int flen, @@ -180,6 +197,7 @@ int { return meth->rsa_pub_enc; } +LCRYPTO_ALIAS(RSA_meth_get_pub_enc); int (*RSA_meth_get_pub_dec(const RSA_METHOD *meth))(int flen, @@ -187,6 +205,7 @@ int { return meth->rsa_pub_dec; } +LCRYPTO_ALIAS(RSA_meth_get_pub_dec); int (*RSA_meth_get_priv_enc(const RSA_METHOD *meth))(int flen, @@ -194,6 +213,7 @@ int { return meth->rsa_priv_enc; } +LCRYPTO_ALIAS(RSA_meth_get_priv_enc); int (*RSA_meth_get_priv_dec(const RSA_METHOD *meth))(int flen, @@ -201,6 +221,7 @@ int { return meth->rsa_priv_dec; } +LCRYPTO_ALIAS(RSA_meth_get_priv_dec); int (*RSA_meth_get_mod_exp(const RSA_METHOD *meth))(BIGNUM *r0, const BIGNUM *i, @@ -208,6 +229,7 @@ int { return meth->rsa_mod_exp; } +LCRYPTO_ALIAS(RSA_meth_get_mod_exp); int (*RSA_meth_get_bn_mod_exp(const RSA_METHOD *meth))(BIGNUM *r, @@ -216,12 +238,14 @@ int { return meth->bn_mod_exp; } +LCRYPTO_ALIAS(RSA_meth_get_bn_mod_exp); int (*RSA_meth_get_init(const RSA_METHOD *meth))(RSA *rsa) { return meth->init; } +LCRYPTO_ALIAS(RSA_meth_get_init); int (*RSA_meth_get_keygen(const RSA_METHOD *meth))(RSA *rsa, int bits, BIGNUM *e, @@ -229,18 +253,21 @@ int { return meth->rsa_keygen; } +LCRYPTO_ALIAS(RSA_meth_get_keygen); int RSA_meth_get_flags(const RSA_METHOD *meth) { return meth->flags; } +LCRYPTO_ALIAS(RSA_meth_get_flags); void * RSA_meth_get0_app_data(const RSA_METHOD *meth) { return meth->app_data; } +LCRYPTO_ALIAS(RSA_meth_get0_app_data); int (*RSA_meth_get_sign(const RSA_METHOD *meth))(int type, @@ -250,6 +277,7 @@ int { return meth->rsa_sign; } +LCRYPTO_ALIAS(RSA_meth_get_sign); int 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, meth->rsa_sign = sign; return 1; } +LCRYPTO_ALIAS(RSA_meth_set_sign); int (*RSA_meth_get_verify(const RSA_METHOD *meth))(int dtype, @@ -267,6 +296,7 @@ int { return meth->rsa_verify; } +LCRYPTO_ALIAS(RSA_meth_get_verify); int 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, meth->rsa_verify = verify; return 1; } +LCRYPTO_ALIAS(RSA_meth_set_verify); diff --git a/lib/libcrypto/rsa/rsa_none.c b/lib/libcrypto/rsa/rsa_none.c index 13d3449a9f4..9c53dcf5955 100644 --- a/lib/libcrypto/rsa/rsa_none.c +++ b/lib/libcrypto/rsa/rsa_none.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa_none.c,v 1.11 2017/01/29 17:49:23 beck Exp $ */ +/* $OpenBSD: rsa_none.c,v 1.12 2023/07/08 12:26:45 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -80,6 +80,7 @@ RSA_padding_add_none(unsigned char *to, int tlen, const unsigned char *from, memcpy(to, from, flen); return 1; } +LCRYPTO_ALIAS(RSA_padding_add_none); int 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, memcpy(to + tlen - flen, from, flen); return tlen; } +LCRYPTO_ALIAS(RSA_padding_check_none); diff --git a/lib/libcrypto/rsa/rsa_oaep.c b/lib/libcrypto/rsa/rsa_oaep.c index 083f4a6c807..c2c3a61daaf 100644 --- a/lib/libcrypto/rsa/rsa_oaep.c +++ b/lib/libcrypto/rsa/rsa_oaep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa_oaep.c,v 1.36 2022/11/26 16:08:54 tb Exp $ */ +/* $OpenBSD: rsa_oaep.c,v 1.37 2023/07/08 12:26:45 beck Exp $ */ /* * Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved. * @@ -90,6 +90,7 @@ RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen, return RSA_padding_add_PKCS1_OAEP_mgf1(to, tlen, from, flen, param, plen, NULL, NULL); } +LCRYPTO_ALIAS(RSA_padding_add_PKCS1_OAEP); int 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, return rv; } +LCRYPTO_ALIAS(RSA_padding_add_PKCS1_OAEP_mgf1); int RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen, @@ -165,6 +167,7 @@ RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen, return RSA_padding_check_PKCS1_OAEP_mgf1(to, tlen, from, flen, num, param, plen, NULL, NULL); } +LCRYPTO_ALIAS(RSA_padding_check_PKCS1_OAEP); int 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, return constant_time_select_int(good, mlen, -1); } +LCRYPTO_ALIAS(RSA_padding_check_PKCS1_OAEP_mgf1); int 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, EVP_MD_CTX_cleanup(&c); return rv; } +LCRYPTO_ALIAS(PKCS1_MGF1); diff --git a/lib/libcrypto/rsa/rsa_pk1.c b/lib/libcrypto/rsa/rsa_pk1.c index 6de263113f6..38f7c0be0bd 100644 --- a/lib/libcrypto/rsa/rsa_pk1.c +++ b/lib/libcrypto/rsa/rsa_pk1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa_pk1.c,v 1.15 2017/01/29 17:49:23 beck Exp $ */ +/* $OpenBSD: rsa_pk1.c,v 1.16 2023/07/08 12:26:45 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -90,6 +90,7 @@ RSA_padding_add_PKCS1_type_1(unsigned char *to, int tlen, return 1; } +LCRYPTO_ALIAS(RSA_padding_add_PKCS1_type_1); int 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, return j; } +LCRYPTO_ALIAS(RSA_padding_check_PKCS1_type_1); int 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, memcpy(p, from, flen); return 1; } +LCRYPTO_ALIAS(RSA_padding_add_PKCS1_type_2); int 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, return j; } +LCRYPTO_ALIAS(RSA_padding_check_PKCS1_type_2); diff --git a/lib/libcrypto/rsa/rsa_pmeth.c b/lib/libcrypto/rsa/rsa_pmeth.c index 429524d73dd..cb82b0908fd 100644 --- a/lib/libcrypto/rsa/rsa_pmeth.c +++ b/lib/libcrypto/rsa/rsa_pmeth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa_pmeth.c,v 1.38 2023/05/05 12:21:44 tb Exp $ */ +/* $OpenBSD: rsa_pmeth.c,v 1.39 2023/07/08 12:26:45 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2006. */ @@ -877,4 +877,3 @@ const EVP_PKEY_METHOD rsa_pss_pkey_meth = { .ctrl = pkey_rsa_ctrl, .ctrl_str = pkey_rsa_ctrl_str }; - diff --git a/lib/libcrypto/rsa/rsa_prn.c b/lib/libcrypto/rsa/rsa_prn.c index 12f600d674b..17835636610 100644 --- a/lib/libcrypto/rsa/rsa_prn.c +++ b/lib/libcrypto/rsa/rsa_prn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa_prn.c,v 1.9 2022/11/08 19:19:08 tobhe Exp $ */ +/* $OpenBSD: rsa_prn.c,v 1.10 2023/07/08 12:26:45 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2006. */ @@ -77,6 +77,7 @@ RSA_print_fp(FILE *fp, const RSA *x, int off) BIO_free(b); return ret; } +LCRYPTO_ALIAS(RSA_print_fp); int RSA_print(BIO *bp, const RSA *x, int off) @@ -95,3 +96,4 @@ RSA_print(BIO *bp, const RSA *x, int off) EVP_PKEY_free(pk); return ret; } +LCRYPTO_ALIAS(RSA_print); diff --git a/lib/libcrypto/rsa/rsa_pss.c b/lib/libcrypto/rsa/rsa_pss.c index 72c79e3b062..0860409be92 100644 --- a/lib/libcrypto/rsa/rsa_pss.c +++ b/lib/libcrypto/rsa/rsa_pss.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa_pss.c,v 1.16 2022/11/26 16:08:54 tb Exp $ */ +/* $OpenBSD: rsa_pss.c,v 1.17 2023/07/08 12:26:45 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2005. */ @@ -77,6 +77,7 @@ RSA_verify_PKCS1_PSS(RSA *rsa, const unsigned char *mHash, const EVP_MD *Hash, { return RSA_verify_PKCS1_PSS_mgf1(rsa, mHash, Hash, NULL, EM, sLen); } +LCRYPTO_ALIAS(RSA_verify_PKCS1_PSS); int RSA_verify_PKCS1_PSS_mgf1(RSA *rsa, const unsigned char *mHash, @@ -178,6 +179,7 @@ err: return ret; } +LCRYPTO_ALIAS(RSA_verify_PKCS1_PSS_mgf1); int RSA_padding_add_PKCS1_PSS(RSA *rsa, unsigned char *EM, @@ -185,6 +187,7 @@ RSA_padding_add_PKCS1_PSS(RSA *rsa, unsigned char *EM, { return RSA_padding_add_PKCS1_PSS_mgf1(rsa, EM, mHash, Hash, NULL, sLen); } +LCRYPTO_ALIAS(RSA_padding_add_PKCS1_PSS); int RSA_padding_add_PKCS1_PSS_mgf1(RSA *rsa, unsigned char *EM, @@ -282,3 +285,4 @@ err: return ret; } +LCRYPTO_ALIAS(RSA_padding_add_PKCS1_PSS_mgf1); diff --git a/lib/libcrypto/rsa/rsa_saos.c b/lib/libcrypto/rsa/rsa_saos.c index 93492ac5035..07a4f5d6596 100644 --- a/lib/libcrypto/rsa/rsa_saos.c +++ b/lib/libcrypto/rsa/rsa_saos.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa_saos.c,v 1.24 2018/09/05 00:55:33 djm Exp $ */ +/* $OpenBSD: rsa_saos.c,v 1.25 2023/07/08 12:26:45 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -99,6 +99,7 @@ RSA_sign_ASN1_OCTET_STRING(int type, const unsigned char *m, unsigned int m_len, freezero(s, (unsigned int)j + 1); return ret; } +LCRYPTO_ALIAS(RSA_sign_ASN1_OCTET_STRING); int RSA_verify_ASN1_OCTET_STRING(int dtype, const unsigned char *m, @@ -139,3 +140,4 @@ err: freezero(s, (unsigned int)siglen); return ret; } +LCRYPTO_ALIAS(RSA_verify_ASN1_OCTET_STRING); diff --git a/lib/libcrypto/rsa/rsa_sign.c b/lib/libcrypto/rsa/rsa_sign.c index d517fcbcf27..53567686154 100644 --- a/lib/libcrypto/rsa/rsa_sign.c +++ b/lib/libcrypto/rsa/rsa_sign.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa_sign.c,v 1.35 2022/11/26 16:08:54 tb Exp $ */ +/* $OpenBSD: rsa_sign.c,v 1.36 2023/07/08 12:26:45 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -166,6 +166,7 @@ RSA_sign(int type, const unsigned char *m, unsigned int m_len, freezero(tmps, (size_t)encoded_len); return (ret); } +LCRYPTO_ALIAS(RSA_sign); /* * 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, return int_rsa_verify(dtype, m, m_len, NULL, NULL, sigbuf, siglen, rsa); } +LCRYPTO_ALIAS(RSA_verify);