From: beck Date: Fri, 7 Jul 2023 13:40:44 +0000 (+0000) Subject: Hide symbols in lhash, pem, and rc2 X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4a925a6a8d19d7b7ed705f131daa4c3c08f0db82;p=openbsd Hide symbols in lhash, pem, and rc2 ok jsing@ --- diff --git a/lib/libcrypto/Symbols.namespace b/lib/libcrypto/Symbols.namespace index 74fe98cd7ae..ff5c1f6bd6b 100644 --- a/lib/libcrypto/Symbols.namespace +++ b/lib/libcrypto/Symbols.namespace @@ -1477,3 +1477,145 @@ _libre_TS_CONF_set_ordering _libre_TS_CONF_set_tsa_name _libre_TS_CONF_set_ess_cert_id_chain _libre_ERR_load_TS_strings +_libre_RC2_set_key +_libre_RC2_ecb_encrypt +_libre_RC2_encrypt +_libre_RC2_decrypt +_libre_RC2_cbc_encrypt +_libre_RC2_cfb64_encrypt +_libre_RC2_ofb64_encrypt +_libre_PEM_get_EVP_CIPHER_INFO +_libre_PEM_do_header +_libre_PEM_read_bio +_libre_PEM_write_bio +_libre_PEM_bytes_read_bio +_libre_PEM_ASN1_read_bio +_libre_PEM_ASN1_write_bio +_libre_PEM_X509_INFO_read_bio +_libre_PEM_X509_INFO_write_bio +_libre_PEM_read +_libre_PEM_write +_libre_PEM_ASN1_read +_libre_PEM_ASN1_write +_libre_PEM_X509_INFO_read +_libre_PEM_SignInit +_libre_PEM_SignUpdate +_libre_PEM_SignFinal +_libre_PEM_def_callback +_libre_PEM_proc_type +_libre_PEM_dek_info +_libre_PEM_read_X509 +_libre_PEM_read_bio_X509 +_libre_PEM_write_X509 +_libre_PEM_write_bio_X509 +_libre_PEM_read_X509_AUX +_libre_PEM_read_bio_X509_AUX +_libre_PEM_write_X509_AUX +_libre_PEM_write_bio_X509_AUX +_libre_PEM_read_X509_REQ +_libre_PEM_read_bio_X509_REQ +_libre_PEM_write_X509_REQ +_libre_PEM_write_bio_X509_REQ +_libre_PEM_write_X509_REQ_NEW +_libre_PEM_write_bio_X509_REQ_NEW +_libre_PEM_read_X509_CRL +_libre_PEM_read_bio_X509_CRL +_libre_PEM_write_X509_CRL +_libre_PEM_write_bio_X509_CRL +_libre_PEM_read_PKCS7 +_libre_PEM_read_bio_PKCS7 +_libre_PEM_write_PKCS7 +_libre_PEM_write_bio_PKCS7 +_libre_PEM_read_PKCS8 +_libre_PEM_read_bio_PKCS8 +_libre_PEM_write_PKCS8 +_libre_PEM_write_bio_PKCS8 +_libre_PEM_read_PKCS8_PRIV_KEY_INFO +_libre_PEM_read_bio_PKCS8_PRIV_KEY_INFO +_libre_PEM_write_PKCS8_PRIV_KEY_INFO +_libre_PEM_write_bio_PKCS8_PRIV_KEY_INFO +_libre_PEM_read_RSAPrivateKey +_libre_PEM_read_bio_RSAPrivateKey +_libre_PEM_write_RSAPrivateKey +_libre_PEM_write_bio_RSAPrivateKey +_libre_PEM_read_RSAPublicKey +_libre_PEM_read_bio_RSAPublicKey +_libre_PEM_write_RSAPublicKey +_libre_PEM_write_bio_RSAPublicKey +_libre_PEM_read_RSA_PUBKEY +_libre_PEM_read_bio_RSA_PUBKEY +_libre_PEM_write_RSA_PUBKEY +_libre_PEM_write_bio_RSA_PUBKEY +_libre_PEM_read_DSAPrivateKey +_libre_PEM_read_bio_DSAPrivateKey +_libre_PEM_write_DSAPrivateKey +_libre_PEM_write_bio_DSAPrivateKey +_libre_PEM_read_DSA_PUBKEY +_libre_PEM_read_bio_DSA_PUBKEY +_libre_PEM_write_DSA_PUBKEY +_libre_PEM_write_bio_DSA_PUBKEY +_libre_PEM_read_DSAparams +_libre_PEM_read_bio_DSAparams +_libre_PEM_write_DSAparams +_libre_PEM_write_bio_DSAparams +_libre_PEM_read_ECPKParameters +_libre_PEM_read_bio_ECPKParameters +_libre_PEM_write_ECPKParameters +_libre_PEM_write_bio_ECPKParameters +_libre_PEM_read_ECPrivateKey +_libre_PEM_read_bio_ECPrivateKey +_libre_PEM_write_ECPrivateKey +_libre_PEM_write_bio_ECPrivateKey +_libre_PEM_read_EC_PUBKEY +_libre_PEM_read_bio_EC_PUBKEY +_libre_PEM_write_EC_PUBKEY +_libre_PEM_write_bio_EC_PUBKEY +_libre_PEM_read_DHparams +_libre_PEM_read_bio_DHparams +_libre_PEM_write_DHparams +_libre_PEM_write_bio_DHparams +_libre_PEM_read_PrivateKey +_libre_PEM_read_bio_PrivateKey +_libre_PEM_write_PrivateKey +_libre_PEM_write_bio_PrivateKey +_libre_PEM_read_PUBKEY +_libre_PEM_read_bio_PUBKEY +_libre_PEM_write_PUBKEY +_libre_PEM_write_bio_PUBKEY +_libre_PEM_write_bio_PrivateKey_traditional +_libre_PEM_write_bio_PKCS8PrivateKey_nid +_libre_PEM_write_bio_PKCS8PrivateKey +_libre_i2d_PKCS8PrivateKey_bio +_libre_i2d_PKCS8PrivateKey_nid_bio +_libre_d2i_PKCS8PrivateKey_bio +_libre_i2d_PKCS8PrivateKey_fp +_libre_i2d_PKCS8PrivateKey_nid_fp +_libre_PEM_write_PKCS8PrivateKey_nid +_libre_d2i_PKCS8PrivateKey_fp +_libre_PEM_write_PKCS8PrivateKey +_libre_PEM_read_bio_Parameters +_libre_PEM_write_bio_Parameters +_libre_b2i_PrivateKey +_libre_b2i_PublicKey +_libre_b2i_PrivateKey_bio +_libre_b2i_PublicKey_bio +_libre_i2b_PrivateKey_bio +_libre_i2b_PublicKey_bio +_libre_b2i_PVK_bio +_libre_i2b_PVK_bio +_libre_ERR_load_PEM_strings +_libre_lh_new +_libre_lh_free +_libre_lh_insert +_libre_lh_delete +_libre_lh_retrieve +_libre_lh_doall +_libre_lh_doall_arg +_libre_lh_strhash +_libre_lh_num_items +_libre_lh_stats +_libre_lh_node_stats +_libre_lh_node_usage_stats +_libre_lh_stats_bio +_libre_lh_node_stats_bio +_libre_lh_node_usage_stats_bio diff --git a/lib/libcrypto/hidden/openssl/lhash.h b/lib/libcrypto/hidden/openssl/lhash.h new file mode 100644 index 00000000000..63417453220 --- /dev/null +++ b/lib/libcrypto/hidden/openssl/lhash.h @@ -0,0 +1,44 @@ +/* $OpenBSD: lhash.h,v 1.1 2023/07/07 13:40:44 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_LHASH_H +#define _LIBCRYPTO_LHASH_H + +#ifndef _MSC_VER +#include_next +#else +#include "../include/openssl/lhash.h" +#endif +#include "crypto_namespace.h" + +LCRYPTO_USED(lh_new); +LCRYPTO_USED(lh_free); +LCRYPTO_USED(lh_insert); +LCRYPTO_USED(lh_delete); +LCRYPTO_USED(lh_retrieve); +LCRYPTO_USED(lh_doall); +LCRYPTO_USED(lh_doall_arg); +LCRYPTO_USED(lh_strhash); +LCRYPTO_USED(lh_num_items); +LCRYPTO_USED(lh_stats); +LCRYPTO_USED(lh_node_stats); +LCRYPTO_USED(lh_node_usage_stats); +LCRYPTO_USED(lh_stats_bio); +LCRYPTO_USED(lh_node_stats_bio); +LCRYPTO_USED(lh_node_usage_stats_bio); + +#endif /* _LIBCRYPTO_LHASH_H */ diff --git a/lib/libcrypto/hidden/openssl/pem.h b/lib/libcrypto/hidden/openssl/pem.h new file mode 100644 index 00000000000..84be94aef6b --- /dev/null +++ b/lib/libcrypto/hidden/openssl/pem.h @@ -0,0 +1,149 @@ +/* $OpenBSD: pem.h,v 1.1 2023/07/07 13:40:44 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_PEM_H +#define _LIBCRYPTO_PEM_H + +#ifndef _MSC_VER +#include_next +#else +#include "../include/openssl/pem.h" +#endif +#include "crypto_namespace.h" + +LCRYPTO_USED(PEM_get_EVP_CIPHER_INFO); +LCRYPTO_USED(PEM_do_header); +LCRYPTO_USED(PEM_read_bio); +LCRYPTO_USED(PEM_write_bio); +LCRYPTO_USED(PEM_bytes_read_bio); +LCRYPTO_USED(PEM_ASN1_read_bio); +LCRYPTO_USED(PEM_ASN1_write_bio); +LCRYPTO_USED(PEM_X509_INFO_read_bio); +LCRYPTO_USED(PEM_X509_INFO_write_bio); +LCRYPTO_USED(PEM_read); +LCRYPTO_USED(PEM_write); +LCRYPTO_USED(PEM_ASN1_read); +LCRYPTO_USED(PEM_ASN1_write); +LCRYPTO_USED(PEM_X509_INFO_read); +LCRYPTO_USED(PEM_SignInit); +LCRYPTO_USED(PEM_SignUpdate); +LCRYPTO_USED(PEM_SignFinal); +LCRYPTO_USED(PEM_def_callback); +LCRYPTO_USED(PEM_proc_type); +LCRYPTO_USED(PEM_dek_info); +LCRYPTO_USED(PEM_read_X509); +LCRYPTO_USED(PEM_read_bio_X509); +LCRYPTO_USED(PEM_write_X509); +LCRYPTO_USED(PEM_write_bio_X509); +LCRYPTO_USED(PEM_read_X509_AUX); +LCRYPTO_USED(PEM_read_bio_X509_AUX); +LCRYPTO_USED(PEM_write_X509_AUX); +LCRYPTO_USED(PEM_write_bio_X509_AUX); +LCRYPTO_USED(PEM_read_X509_REQ); +LCRYPTO_USED(PEM_read_bio_X509_REQ); +LCRYPTO_USED(PEM_write_X509_REQ); +LCRYPTO_USED(PEM_write_bio_X509_REQ); +LCRYPTO_USED(PEM_write_X509_REQ_NEW); +LCRYPTO_USED(PEM_write_bio_X509_REQ_NEW); +LCRYPTO_USED(PEM_read_X509_CRL); +LCRYPTO_USED(PEM_read_bio_X509_CRL); +LCRYPTO_USED(PEM_write_X509_CRL); +LCRYPTO_USED(PEM_write_bio_X509_CRL); +LCRYPTO_USED(PEM_read_PKCS7); +LCRYPTO_USED(PEM_read_bio_PKCS7); +LCRYPTO_USED(PEM_write_PKCS7); +LCRYPTO_USED(PEM_write_bio_PKCS7); +LCRYPTO_USED(PEM_read_PKCS8); +LCRYPTO_USED(PEM_read_bio_PKCS8); +LCRYPTO_USED(PEM_write_PKCS8); +LCRYPTO_USED(PEM_write_bio_PKCS8); +LCRYPTO_USED(PEM_read_PKCS8_PRIV_KEY_INFO); +LCRYPTO_USED(PEM_read_bio_PKCS8_PRIV_KEY_INFO); +LCRYPTO_USED(PEM_write_PKCS8_PRIV_KEY_INFO); +LCRYPTO_USED(PEM_write_bio_PKCS8_PRIV_KEY_INFO); +LCRYPTO_USED(PEM_read_RSAPrivateKey); +LCRYPTO_USED(PEM_read_bio_RSAPrivateKey); +LCRYPTO_USED(PEM_write_RSAPrivateKey); +LCRYPTO_USED(PEM_write_bio_RSAPrivateKey); +LCRYPTO_USED(PEM_read_RSAPublicKey); +LCRYPTO_USED(PEM_read_bio_RSAPublicKey); +LCRYPTO_USED(PEM_write_RSAPublicKey); +LCRYPTO_USED(PEM_write_bio_RSAPublicKey); +LCRYPTO_USED(PEM_read_RSA_PUBKEY); +LCRYPTO_USED(PEM_read_bio_RSA_PUBKEY); +LCRYPTO_USED(PEM_write_RSA_PUBKEY); +LCRYPTO_USED(PEM_write_bio_RSA_PUBKEY); +LCRYPTO_USED(PEM_read_DSAPrivateKey); +LCRYPTO_USED(PEM_read_bio_DSAPrivateKey); +LCRYPTO_USED(PEM_write_DSAPrivateKey); +LCRYPTO_USED(PEM_write_bio_DSAPrivateKey); +LCRYPTO_USED(PEM_read_DSA_PUBKEY); +LCRYPTO_USED(PEM_read_bio_DSA_PUBKEY); +LCRYPTO_USED(PEM_write_DSA_PUBKEY); +LCRYPTO_USED(PEM_write_bio_DSA_PUBKEY); +LCRYPTO_USED(PEM_read_DSAparams); +LCRYPTO_USED(PEM_read_bio_DSAparams); +LCRYPTO_USED(PEM_write_DSAparams); +LCRYPTO_USED(PEM_write_bio_DSAparams); +LCRYPTO_USED(PEM_read_ECPKParameters); +LCRYPTO_USED(PEM_read_bio_ECPKParameters); +LCRYPTO_USED(PEM_write_ECPKParameters); +LCRYPTO_USED(PEM_write_bio_ECPKParameters); +LCRYPTO_USED(PEM_read_ECPrivateKey); +LCRYPTO_USED(PEM_read_bio_ECPrivateKey); +LCRYPTO_USED(PEM_write_ECPrivateKey); +LCRYPTO_USED(PEM_write_bio_ECPrivateKey); +LCRYPTO_USED(PEM_read_EC_PUBKEY); +LCRYPTO_USED(PEM_read_bio_EC_PUBKEY); +LCRYPTO_USED(PEM_write_EC_PUBKEY); +LCRYPTO_USED(PEM_write_bio_EC_PUBKEY); +LCRYPTO_USED(PEM_read_DHparams); +LCRYPTO_USED(PEM_read_bio_DHparams); +LCRYPTO_USED(PEM_write_DHparams); +LCRYPTO_USED(PEM_write_bio_DHparams); +LCRYPTO_USED(PEM_read_PrivateKey); +LCRYPTO_USED(PEM_read_bio_PrivateKey); +LCRYPTO_USED(PEM_write_PrivateKey); +LCRYPTO_USED(PEM_write_bio_PrivateKey); +LCRYPTO_USED(PEM_read_PUBKEY); +LCRYPTO_USED(PEM_read_bio_PUBKEY); +LCRYPTO_USED(PEM_write_PUBKEY); +LCRYPTO_USED(PEM_write_bio_PUBKEY); +LCRYPTO_USED(PEM_write_bio_PrivateKey_traditional); +LCRYPTO_USED(PEM_write_bio_PKCS8PrivateKey_nid); +LCRYPTO_USED(PEM_write_bio_PKCS8PrivateKey); +LCRYPTO_USED(i2d_PKCS8PrivateKey_bio); +LCRYPTO_USED(i2d_PKCS8PrivateKey_nid_bio); +LCRYPTO_USED(d2i_PKCS8PrivateKey_bio); +LCRYPTO_USED(i2d_PKCS8PrivateKey_fp); +LCRYPTO_USED(i2d_PKCS8PrivateKey_nid_fp); +LCRYPTO_USED(PEM_write_PKCS8PrivateKey_nid); +LCRYPTO_USED(d2i_PKCS8PrivateKey_fp); +LCRYPTO_USED(PEM_write_PKCS8PrivateKey); +LCRYPTO_USED(PEM_read_bio_Parameters); +LCRYPTO_USED(PEM_write_bio_Parameters); +LCRYPTO_USED(b2i_PrivateKey); +LCRYPTO_USED(b2i_PublicKey); +LCRYPTO_USED(b2i_PrivateKey_bio); +LCRYPTO_USED(b2i_PublicKey_bio); +LCRYPTO_USED(i2b_PrivateKey_bio); +LCRYPTO_USED(i2b_PublicKey_bio); +LCRYPTO_USED(b2i_PVK_bio); +LCRYPTO_USED(i2b_PVK_bio); +LCRYPTO_USED(ERR_load_PEM_strings); + +#endif /* _LIBCRYPTO_PEM_H */ diff --git a/lib/libcrypto/hidden/openssl/rc2.h b/lib/libcrypto/hidden/openssl/rc2.h new file mode 100644 index 00000000000..c08c38d7c89 --- /dev/null +++ b/lib/libcrypto/hidden/openssl/rc2.h @@ -0,0 +1,36 @@ +/* $OpenBSD: rc2.h,v 1.1 2023/07/07 13:40:44 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_RC2_H +#define _LIBCRYPTO_RC2_H + +#ifndef _MSC_VER +#include_next +#else +#include "../include/openssl/rc2.h" +#endif +#include "crypto_namespace.h" + +LCRYPTO_USED(RC2_set_key); +LCRYPTO_USED(RC2_ecb_encrypt); +LCRYPTO_USED(RC2_encrypt); +LCRYPTO_USED(RC2_decrypt); +LCRYPTO_USED(RC2_cbc_encrypt); +LCRYPTO_USED(RC2_cfb64_encrypt); +LCRYPTO_USED(RC2_ofb64_encrypt); + +#endif /* _LIBCRYPTO_RC2_H */ diff --git a/lib/libcrypto/lhash/lh_stats.c b/lib/libcrypto/lhash/lh_stats.c index e7dde478065..123792a2ab8 100644 --- a/lib/libcrypto/lhash/lh_stats.c +++ b/lib/libcrypto/lhash/lh_stats.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lh_stats.c,v 1.12 2014/07/11 08:44:48 jsing Exp $ */ +/* $OpenBSD: lh_stats.c,v 1.13 2023/07/07 13:40:44 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -96,6 +96,7 @@ lh_stats(LHASH *lh, FILE *out) fprintf(out, "down_load = %lu\n", lh->down_load); #endif } +LCRYPTO_ALIAS(lh_stats); void lh_node_stats(LHASH *lh, FILE *out) @@ -109,6 +110,7 @@ lh_node_stats(LHASH *lh, FILE *out) fprintf(out, "node %6u -> %3u\n", i, num); } } +LCRYPTO_ALIAS(lh_node_stats); void lh_node_usage_stats(LHASH *lh, FILE *out) @@ -136,6 +138,7 @@ lh_node_usage_stats(LHASH *lh, FILE *out) (int)(total / n_used), (int)((total % n_used) * 100 / n_used)); } +LCRYPTO_ALIAS(lh_node_usage_stats); #else @@ -152,6 +155,7 @@ lh_stats(const _LHASH *lh, FILE *fp) BIO_free(bp); end:; } +LCRYPTO_ALIAS(lh_stats); void lh_node_stats(const _LHASH *lh, FILE *fp) @@ -166,6 +170,7 @@ lh_node_stats(const _LHASH *lh, FILE *fp) BIO_free(bp); end:; } +LCRYPTO_ALIAS(lh_node_stats); void lh_node_usage_stats(const _LHASH *lh, FILE *fp) @@ -180,6 +185,7 @@ lh_node_usage_stats(const _LHASH *lh, FILE *fp) BIO_free(bp); end:; } +LCRYPTO_ALIAS(lh_node_usage_stats); void @@ -210,6 +216,7 @@ lh_stats_bio(const _LHASH *lh, BIO *out) BIO_printf(out, "down_load = %lu\n", lh->down_load); #endif } +LCRYPTO_ALIAS(lh_stats_bio); void lh_node_stats_bio(const _LHASH *lh, BIO *out) @@ -223,6 +230,7 @@ lh_node_stats_bio(const _LHASH *lh, BIO *out) BIO_printf(out, "node %6u -> %3u\n", i, num); } } +LCRYPTO_ALIAS(lh_node_stats_bio); void lh_node_usage_stats_bio(const _LHASH *lh, BIO *out) @@ -250,5 +258,6 @@ lh_node_usage_stats_bio(const _LHASH *lh, BIO *out) (int)(total / n_used), (int)((total % n_used) * 100 / n_used)); } +LCRYPTO_ALIAS(lh_node_usage_stats_bio); #endif diff --git a/lib/libcrypto/lhash/lhash.c b/lib/libcrypto/lhash/lhash.c index a68e4667005..3adec71ed67 100644 --- a/lib/libcrypto/lhash/lhash.c +++ b/lib/libcrypto/lhash/lhash.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lhash.c,v 1.19 2019/05/12 00:09:59 beck Exp $ */ +/* $OpenBSD: lhash.c,v 1.20 2023/07/07 13:40:44 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -133,6 +133,7 @@ lh_new(LHASH_HASH_FN_TYPE h, LHASH_COMP_FN_TYPE c) return (ret); } +LCRYPTO_ALIAS(lh_new); void lh_free(_LHASH *lh) @@ -154,6 +155,7 @@ lh_free(_LHASH *lh) free(lh->b); free(lh); } +LCRYPTO_ALIAS(lh_free); void * lh_insert(_LHASH *lh, void *data) @@ -191,6 +193,7 @@ lh_insert(_LHASH *lh, void *data) } return (ret); } +LCRYPTO_ALIAS(lh_insert); void * lh_delete(_LHASH *lh, const void *data) @@ -220,6 +223,7 @@ lh_delete(_LHASH *lh, const void *data) return (ret); } +LCRYPTO_ALIAS(lh_delete); void * lh_retrieve(_LHASH *lh, const void *data) @@ -240,6 +244,7 @@ lh_retrieve(_LHASH *lh, const void *data) } return (ret); } +LCRYPTO_ALIAS(lh_retrieve); static void doall_util_fn(_LHASH *lh, int use_arg, LHASH_DOALL_FN_TYPE func, @@ -275,12 +280,14 @@ lh_doall(_LHASH *lh, LHASH_DOALL_FN_TYPE func) { doall_util_fn(lh, 0, func, (LHASH_DOALL_ARG_FN_TYPE)0, NULL); } +LCRYPTO_ALIAS(lh_doall); void lh_doall_arg(_LHASH *lh, LHASH_DOALL_ARG_FN_TYPE func, void *arg) { doall_util_fn(lh, 1, (LHASH_DOALL_FN_TYPE)0, func, arg); } +LCRYPTO_ALIAS(lh_doall_arg); static void expand(_LHASH *lh) @@ -426,9 +433,11 @@ lh_strhash(const char *c) } return (ret >> 16) ^ ret; } +LCRYPTO_ALIAS(lh_strhash); unsigned long lh_num_items(const _LHASH *lh) { return lh ? lh->num_items : 0; } +LCRYPTO_ALIAS(lh_num_items); diff --git a/lib/libcrypto/pem/pem_all.c b/lib/libcrypto/pem/pem_all.c index 9fa5184ec09..21e325b9f18 100644 --- a/lib/libcrypto/pem/pem_all.c +++ b/lib/libcrypto/pem/pem_all.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pem_all.c,v 1.20 2023/04/25 17:51:36 tb Exp $ */ +/* $OpenBSD: pem_all.c,v 1.21 2023/07/07 13:40:44 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -147,6 +147,7 @@ PEM_read_X509_REQ(FILE *fp, X509_REQ **x, pem_password_cb *cb, void *u) return PEM_ASN1_read((d2i_of_void *)d2i_X509_REQ, PEM_STRING_X509_REQ, fp, (void **)x, cb, u); } +LCRYPTO_ALIAS(PEM_read_X509_REQ); int PEM_write_X509_REQ(FILE *fp, X509_REQ *x) @@ -154,6 +155,7 @@ PEM_write_X509_REQ(FILE *fp, X509_REQ *x) return PEM_ASN1_write((i2d_of_void *)i2d_X509_REQ, PEM_STRING_X509_REQ, fp, x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_X509_REQ); X509_REQ * PEM_read_bio_X509_REQ(BIO *bp, X509_REQ **x, pem_password_cb *cb, void *u) @@ -161,6 +163,7 @@ PEM_read_bio_X509_REQ(BIO *bp, X509_REQ **x, pem_password_cb *cb, void *u) return PEM_ASN1_read_bio((d2i_of_void *)d2i_X509_REQ, PEM_STRING_X509_REQ, bp, (void **)x, cb, u); } +LCRYPTO_ALIAS(PEM_read_bio_X509_REQ); int PEM_write_bio_X509_REQ(BIO *bp, X509_REQ *x) @@ -168,6 +171,7 @@ PEM_write_bio_X509_REQ(BIO *bp, X509_REQ *x) return PEM_ASN1_write_bio((i2d_of_void *)i2d_X509_REQ, PEM_STRING_X509_REQ, bp, x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_bio_X509_REQ); int PEM_write_X509_REQ_NEW(FILE *fp, X509_REQ *x) @@ -175,6 +179,7 @@ PEM_write_X509_REQ_NEW(FILE *fp, X509_REQ *x) return PEM_ASN1_write((i2d_of_void *)i2d_X509_REQ, PEM_STRING_X509_REQ_OLD, fp, x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_X509_REQ_NEW); int PEM_write_bio_X509_REQ_NEW(BIO *bp, X509_REQ *x) @@ -182,6 +187,7 @@ PEM_write_bio_X509_REQ_NEW(BIO *bp, X509_REQ *x) return PEM_ASN1_write_bio((i2d_of_void *)i2d_X509_REQ, PEM_STRING_X509_REQ_OLD, bp, x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_bio_X509_REQ_NEW); X509_CRL * PEM_read_X509_CRL(FILE *fp, X509_CRL **x, pem_password_cb *cb, void *u) @@ -189,6 +195,7 @@ PEM_read_X509_CRL(FILE *fp, X509_CRL **x, pem_password_cb *cb, void *u) return PEM_ASN1_read((d2i_of_void *)d2i_X509_CRL, PEM_STRING_X509_CRL, fp, (void **)x, cb, u); } +LCRYPTO_ALIAS(PEM_read_X509_CRL); int PEM_write_X509_CRL(FILE *fp, X509_CRL *x) @@ -196,6 +203,7 @@ PEM_write_X509_CRL(FILE *fp, X509_CRL *x) return PEM_ASN1_write((i2d_of_void *)i2d_X509_CRL, PEM_STRING_X509_CRL, fp, x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_X509_CRL); X509_CRL * PEM_read_bio_X509_CRL(BIO *bp, X509_CRL **x, pem_password_cb *cb, void *u) @@ -203,6 +211,7 @@ PEM_read_bio_X509_CRL(BIO *bp, X509_CRL **x, pem_password_cb *cb, void *u) return PEM_ASN1_read_bio((d2i_of_void *)d2i_X509_CRL, PEM_STRING_X509_CRL, bp, (void **)x, cb, u); } +LCRYPTO_ALIAS(PEM_read_bio_X509_CRL); int PEM_write_bio_X509_CRL(BIO *bp, X509_CRL *x) @@ -210,6 +219,7 @@ PEM_write_bio_X509_CRL(BIO *bp, X509_CRL *x) return PEM_ASN1_write_bio((i2d_of_void *)i2d_X509_CRL, PEM_STRING_X509_CRL, bp, x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_bio_X509_CRL); PKCS7 * PEM_read_PKCS7(FILE *fp, PKCS7 **x, pem_password_cb *cb, void *u) @@ -217,6 +227,7 @@ PEM_read_PKCS7(FILE *fp, PKCS7 **x, pem_password_cb *cb, void *u) return PEM_ASN1_read((d2i_of_void *)d2i_PKCS7, PEM_STRING_PKCS7, fp, (void **)x, cb, u); } +LCRYPTO_ALIAS(PEM_read_PKCS7); int PEM_write_PKCS7(FILE *fp, PKCS7 *x) @@ -224,6 +235,7 @@ PEM_write_PKCS7(FILE *fp, PKCS7 *x) return PEM_ASN1_write((i2d_of_void *)i2d_PKCS7, PEM_STRING_PKCS7, fp, x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_PKCS7); PKCS7 * PEM_read_bio_PKCS7(BIO *bp, PKCS7 **x, pem_password_cb *cb, void *u) @@ -231,6 +243,7 @@ PEM_read_bio_PKCS7(BIO *bp, PKCS7 **x, pem_password_cb *cb, void *u) return PEM_ASN1_read_bio((d2i_of_void *)d2i_PKCS7, PEM_STRING_PKCS7, bp, (void **)x, cb, u); } +LCRYPTO_ALIAS(PEM_read_bio_PKCS7); int PEM_write_bio_PKCS7(BIO *bp, PKCS7 *x) @@ -238,6 +251,7 @@ PEM_write_bio_PKCS7(BIO *bp, PKCS7 *x) return PEM_ASN1_write_bio((i2d_of_void *)i2d_PKCS7, PEM_STRING_PKCS7, bp, x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_bio_PKCS7); #ifndef OPENSSL_NO_RSA @@ -275,6 +289,7 @@ PEM_read_RSAPrivateKey(FILE *fp, RSA **rsa, pem_password_cb *cb, void *u) pktmp = PEM_read_PrivateKey(fp, NULL, cb, u); return pkey_get_rsa(pktmp, rsa); } +LCRYPTO_ALIAS(PEM_read_RSAPrivateKey); int PEM_write_RSAPrivateKey(FILE *fp, RSA *x, const EVP_CIPHER *enc, @@ -283,6 +298,7 @@ PEM_write_RSAPrivateKey(FILE *fp, RSA *x, const EVP_CIPHER *enc, return PEM_ASN1_write((i2d_of_void *)i2d_RSAPrivateKey, PEM_STRING_RSA, fp, x, enc, kstr, klen, cb, u); } +LCRYPTO_ALIAS(PEM_write_RSAPrivateKey); RSA * PEM_read_bio_RSAPrivateKey(BIO *bp, RSA **rsa, pem_password_cb *cb, void *u) @@ -292,6 +308,7 @@ PEM_read_bio_RSAPrivateKey(BIO *bp, RSA **rsa, pem_password_cb *cb, void *u) pktmp = PEM_read_bio_PrivateKey(bp, NULL, cb, u); return pkey_get_rsa(pktmp, rsa); } +LCRYPTO_ALIAS(PEM_read_bio_RSAPrivateKey); int PEM_write_bio_RSAPrivateKey(BIO *bp, RSA *x, @@ -301,6 +318,7 @@ PEM_write_bio_RSAPrivateKey(BIO *bp, RSA *x, return PEM_ASN1_write_bio((i2d_of_void *)i2d_RSAPrivateKey, PEM_STRING_RSA, bp, x, enc, kstr, klen, cb, u); } +LCRYPTO_ALIAS(PEM_write_bio_RSAPrivateKey); RSA * PEM_read_RSAPublicKey(FILE *fp, RSA **x, pem_password_cb *cb, void *u) @@ -308,6 +326,7 @@ PEM_read_RSAPublicKey(FILE *fp, RSA **x, pem_password_cb *cb, void *u) return PEM_ASN1_read((d2i_of_void *)d2i_RSAPublicKey, PEM_STRING_RSA_PUBLIC, fp, (void **)x, cb, u); } +LCRYPTO_ALIAS(PEM_read_RSAPublicKey); int PEM_write_RSAPublicKey(FILE *fp, const RSA *x) @@ -315,6 +334,7 @@ PEM_write_RSAPublicKey(FILE *fp, const RSA *x) return PEM_ASN1_write((i2d_of_void *)i2d_RSAPublicKey, PEM_STRING_RSA_PUBLIC, fp, (void *)x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_RSAPublicKey); RSA * PEM_read_bio_RSAPublicKey(BIO *bp, RSA **x, pem_password_cb *cb, void *u) @@ -322,6 +342,7 @@ PEM_read_bio_RSAPublicKey(BIO *bp, RSA **x, pem_password_cb *cb, void *u) return PEM_ASN1_read_bio((d2i_of_void *)d2i_RSAPublicKey, PEM_STRING_RSA_PUBLIC, bp, (void **)x, cb, u); } +LCRYPTO_ALIAS(PEM_read_bio_RSAPublicKey); int PEM_write_bio_RSAPublicKey(BIO *bp, const RSA *x) @@ -329,6 +350,7 @@ PEM_write_bio_RSAPublicKey(BIO *bp, const RSA *x) return PEM_ASN1_write_bio((i2d_of_void *)i2d_RSAPublicKey, PEM_STRING_RSA_PUBLIC, bp, (void *)x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_bio_RSAPublicKey); RSA * PEM_read_RSA_PUBKEY(FILE *fp, RSA **x, pem_password_cb *cb, void *u) @@ -336,6 +358,7 @@ PEM_read_RSA_PUBKEY(FILE *fp, RSA **x, pem_password_cb *cb, void *u) return PEM_ASN1_read((d2i_of_void *)d2i_RSA_PUBKEY, PEM_STRING_PUBLIC, fp, (void **)x, cb, u); } +LCRYPTO_ALIAS(PEM_read_RSA_PUBKEY); int PEM_write_RSA_PUBKEY(FILE *fp, RSA *x) @@ -343,6 +366,7 @@ PEM_write_RSA_PUBKEY(FILE *fp, RSA *x) return PEM_ASN1_write((i2d_of_void *)i2d_RSA_PUBKEY, PEM_STRING_PUBLIC, fp, x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_RSA_PUBKEY); RSA * PEM_read_bio_RSA_PUBKEY(BIO *bp, RSA **x, pem_password_cb *cb, void *u) @@ -350,6 +374,7 @@ PEM_read_bio_RSA_PUBKEY(BIO *bp, RSA **x, pem_password_cb *cb, void *u) return PEM_ASN1_read_bio((d2i_of_void *)d2i_RSA_PUBKEY, PEM_STRING_PUBLIC, bp, (void **)x, cb, u); } +LCRYPTO_ALIAS(PEM_read_bio_RSA_PUBKEY); int PEM_write_bio_RSA_PUBKEY(BIO *bp, RSA *x) @@ -357,6 +382,7 @@ PEM_write_bio_RSA_PUBKEY(BIO *bp, RSA *x) return PEM_ASN1_write_bio((i2d_of_void *)i2d_RSA_PUBKEY, PEM_STRING_PUBLIC, bp, x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_bio_RSA_PUBKEY); #endif @@ -388,6 +414,7 @@ PEM_read_DSAPrivateKey(FILE *fp, DSA **dsa, pem_password_cb *cb, void *u) pktmp = PEM_read_PrivateKey(fp, NULL, cb, u); return pkey_get_dsa(pktmp, dsa); /* will free pktmp */ } +LCRYPTO_ALIAS(PEM_read_DSAPrivateKey); int PEM_write_DSAPrivateKey(FILE *fp, DSA *x, const EVP_CIPHER *enc, @@ -396,6 +423,7 @@ PEM_write_DSAPrivateKey(FILE *fp, DSA *x, const EVP_CIPHER *enc, return PEM_ASN1_write((i2d_of_void *)i2d_DSAPrivateKey, PEM_STRING_DSA, fp, x, enc, kstr, klen, cb, u); } +LCRYPTO_ALIAS(PEM_write_DSAPrivateKey); DSA * PEM_read_bio_DSAPrivateKey(BIO *bp, DSA **dsa, pem_password_cb *cb, void *u) @@ -405,6 +433,7 @@ PEM_read_bio_DSAPrivateKey(BIO *bp, DSA **dsa, pem_password_cb *cb, void *u) pktmp = PEM_read_bio_PrivateKey(bp, NULL, cb, u); return pkey_get_dsa(pktmp, dsa); /* will free pktmp */ } +LCRYPTO_ALIAS(PEM_read_bio_DSAPrivateKey); int PEM_write_bio_DSAPrivateKey(BIO *bp, DSA *x, @@ -414,6 +443,7 @@ PEM_write_bio_DSAPrivateKey(BIO *bp, DSA *x, return PEM_ASN1_write_bio((i2d_of_void *)i2d_DSAPrivateKey, PEM_STRING_DSA, bp, x, enc, kstr, klen, cb, u); } +LCRYPTO_ALIAS(PEM_write_bio_DSAPrivateKey); DSA * PEM_read_DSA_PUBKEY(FILE *fp, DSA **x, pem_password_cb *cb, void *u) @@ -421,6 +451,7 @@ PEM_read_DSA_PUBKEY(FILE *fp, DSA **x, pem_password_cb *cb, void *u) return PEM_ASN1_read((d2i_of_void *)d2i_DSA_PUBKEY, PEM_STRING_PUBLIC, fp, (void **)x, cb, u); } +LCRYPTO_ALIAS(PEM_read_DSA_PUBKEY); int PEM_write_DSA_PUBKEY(FILE *fp, DSA *x) @@ -428,6 +459,7 @@ PEM_write_DSA_PUBKEY(FILE *fp, DSA *x) return PEM_ASN1_write((i2d_of_void *)i2d_DSA_PUBKEY, PEM_STRING_PUBLIC, fp, x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_DSA_PUBKEY); int PEM_write_bio_DSA_PUBKEY(BIO *bp, DSA *x) @@ -435,6 +467,7 @@ PEM_write_bio_DSA_PUBKEY(BIO *bp, DSA *x) return PEM_ASN1_write_bio((i2d_of_void *)i2d_DSA_PUBKEY, PEM_STRING_PUBLIC, bp, x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_bio_DSA_PUBKEY); DSA * PEM_read_bio_DSA_PUBKEY(BIO *bp, DSA **x, pem_password_cb *cb, void *u) @@ -442,6 +475,7 @@ PEM_read_bio_DSA_PUBKEY(BIO *bp, DSA **x, pem_password_cb *cb, void *u) return PEM_ASN1_read_bio((d2i_of_void *)d2i_DSA_PUBKEY, PEM_STRING_PUBLIC, bp, (void **)x, cb, u); } +LCRYPTO_ALIAS(PEM_read_bio_DSA_PUBKEY); DSA * PEM_read_DSAparams(FILE *fp, DSA **x, pem_password_cb *cb, void *u) @@ -449,6 +483,7 @@ PEM_read_DSAparams(FILE *fp, DSA **x, pem_password_cb *cb, void *u) return PEM_ASN1_read((d2i_of_void *)d2i_DSAparams, PEM_STRING_DSAPARAMS, fp, (void **)x, cb, u); } +LCRYPTO_ALIAS(PEM_read_DSAparams); int PEM_write_DSAparams(FILE *fp, const DSA *x) @@ -456,6 +491,7 @@ PEM_write_DSAparams(FILE *fp, const DSA *x) return PEM_ASN1_write((i2d_of_void *)i2d_DSAparams, PEM_STRING_DSAPARAMS, fp, (void *)x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_DSAparams); DSA * PEM_read_bio_DSAparams(BIO *bp, DSA **x, pem_password_cb *cb, void *u) @@ -463,6 +499,7 @@ PEM_read_bio_DSAparams(BIO *bp, DSA **x, pem_password_cb *cb, void *u) return PEM_ASN1_read_bio((d2i_of_void *)d2i_DSAparams, PEM_STRING_DSAPARAMS, bp, (void **)x, cb, u); } +LCRYPTO_ALIAS(PEM_read_bio_DSAparams); int PEM_write_bio_DSAparams(BIO *bp, const DSA *x) @@ -470,6 +507,7 @@ PEM_write_bio_DSAparams(BIO *bp, const DSA *x) return PEM_ASN1_write_bio((i2d_of_void *)i2d_DSAparams, PEM_STRING_DSAPARAMS, bp, (void *)x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_bio_DSAparams); #endif @@ -499,6 +537,7 @@ PEM_read_ECPKParameters(FILE *fp, EC_GROUP **x, pem_password_cb *cb, void *u) return PEM_ASN1_read((d2i_of_void *)d2i_ECPKParameters, PEM_STRING_ECPARAMETERS, fp, (void **)x, cb, u); } +LCRYPTO_ALIAS(PEM_read_ECPKParameters); int PEM_write_ECPKParameters(FILE *fp, const EC_GROUP *x) @@ -506,6 +545,7 @@ PEM_write_ECPKParameters(FILE *fp, const EC_GROUP *x) return PEM_ASN1_write((i2d_of_void *)i2d_ECPKParameters, PEM_STRING_ECPARAMETERS, fp, (void *)x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_ECPKParameters); EC_GROUP * PEM_read_bio_ECPKParameters(BIO *bp, EC_GROUP **x, pem_password_cb *cb, void *u) @@ -513,6 +553,7 @@ PEM_read_bio_ECPKParameters(BIO *bp, EC_GROUP **x, pem_password_cb *cb, void *u) return PEM_ASN1_read_bio((d2i_of_void *)d2i_ECPKParameters, PEM_STRING_ECPARAMETERS, bp, (void **)x, cb, u); } +LCRYPTO_ALIAS(PEM_read_bio_ECPKParameters); int PEM_write_bio_ECPKParameters(BIO *bp, const EC_GROUP *x) @@ -520,6 +561,7 @@ PEM_write_bio_ECPKParameters(BIO *bp, const EC_GROUP *x) return PEM_ASN1_write_bio((i2d_of_void *)i2d_ECPKParameters, PEM_STRING_ECPARAMETERS, bp, (void *)x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_bio_ECPKParameters); EC_KEY * PEM_read_ECPrivateKey(FILE *fp, EC_KEY **eckey, pem_password_cb *cb, void *u) @@ -529,6 +571,7 @@ PEM_read_ECPrivateKey(FILE *fp, EC_KEY **eckey, pem_password_cb *cb, void *u) pktmp = PEM_read_PrivateKey(fp, NULL, cb, u); return pkey_get_eckey(pktmp, eckey); /* will free pktmp */ } +LCRYPTO_ALIAS(PEM_read_ECPrivateKey); int PEM_write_ECPrivateKey(FILE *fp, EC_KEY *x, const EVP_CIPHER *enc, @@ -537,6 +580,7 @@ PEM_write_ECPrivateKey(FILE *fp, EC_KEY *x, const EVP_CIPHER *enc, return PEM_ASN1_write((i2d_of_void *)i2d_ECPrivateKey, PEM_STRING_ECPRIVATEKEY, fp, x, enc, kstr, klen, cb, u); } +LCRYPTO_ALIAS(PEM_write_ECPrivateKey); EC_KEY * PEM_read_bio_ECPrivateKey(BIO *bp, EC_KEY **key, pem_password_cb *cb, void *u) @@ -545,6 +589,7 @@ PEM_read_bio_ECPrivateKey(BIO *bp, EC_KEY **key, pem_password_cb *cb, void *u) pktmp = PEM_read_bio_PrivateKey(bp, NULL, cb, u); return pkey_get_eckey(pktmp, key); /* will free pktmp */ } +LCRYPTO_ALIAS(PEM_read_bio_ECPrivateKey); int PEM_write_bio_ECPrivateKey(BIO *bp, EC_KEY *x, @@ -554,6 +599,7 @@ PEM_write_bio_ECPrivateKey(BIO *bp, EC_KEY *x, return PEM_ASN1_write_bio((i2d_of_void *)i2d_ECPrivateKey, PEM_STRING_ECPRIVATEKEY, bp, x, enc, kstr, klen, cb, u); } +LCRYPTO_ALIAS(PEM_write_bio_ECPrivateKey); EC_KEY * PEM_read_EC_PUBKEY(FILE *fp, EC_KEY **x, pem_password_cb *cb, void *u) @@ -561,6 +607,7 @@ PEM_read_EC_PUBKEY(FILE *fp, EC_KEY **x, pem_password_cb *cb, void *u) return PEM_ASN1_read((d2i_of_void *)d2i_EC_PUBKEY, PEM_STRING_PUBLIC, fp, (void **)x, cb, u); } +LCRYPTO_ALIAS(PEM_read_EC_PUBKEY); int PEM_write_EC_PUBKEY(FILE *fp, EC_KEY *x) @@ -568,6 +615,7 @@ PEM_write_EC_PUBKEY(FILE *fp, EC_KEY *x) return PEM_ASN1_write((i2d_of_void *)i2d_EC_PUBKEY, PEM_STRING_PUBLIC, fp, x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_EC_PUBKEY); EC_KEY * PEM_read_bio_EC_PUBKEY(BIO *bp, EC_KEY **x, pem_password_cb *cb, void *u) @@ -575,6 +623,7 @@ PEM_read_bio_EC_PUBKEY(BIO *bp, EC_KEY **x, pem_password_cb *cb, void *u) return PEM_ASN1_read_bio((d2i_of_void *)d2i_EC_PUBKEY, PEM_STRING_PUBLIC, bp, (void **)x, cb, u); } +LCRYPTO_ALIAS(PEM_read_bio_EC_PUBKEY); int PEM_write_bio_EC_PUBKEY(BIO *bp, EC_KEY *x) @@ -582,6 +631,7 @@ PEM_write_bio_EC_PUBKEY(BIO *bp, EC_KEY *x) return PEM_ASN1_write_bio((i2d_of_void *)i2d_EC_PUBKEY, PEM_STRING_PUBLIC, bp, x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_bio_EC_PUBKEY); #endif @@ -593,6 +643,7 @@ PEM_read_DHparams(FILE *fp, DH **x, pem_password_cb *cb, void *u) return PEM_ASN1_read((d2i_of_void *)d2i_DHparams, PEM_STRING_DHPARAMS, fp, (void **)x, cb, u); } +LCRYPTO_ALIAS(PEM_read_DHparams); int PEM_write_DHparams(FILE *fp, const DH *x) @@ -600,6 +651,7 @@ PEM_write_DHparams(FILE *fp, const DH *x) return PEM_ASN1_write((i2d_of_void *)i2d_DHparams, PEM_STRING_DHPARAMS, fp, (void *)x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_DHparams); DH * PEM_read_bio_DHparams(BIO *bp, DH **x, pem_password_cb *cb, void *u) @@ -607,6 +659,7 @@ PEM_read_bio_DHparams(BIO *bp, DH **x, pem_password_cb *cb, void *u) return PEM_ASN1_read_bio((d2i_of_void *)d2i_DHparams, PEM_STRING_DHPARAMS, bp, (void **)x, cb, u); } +LCRYPTO_ALIAS(PEM_read_bio_DHparams); int PEM_write_bio_DHparams(BIO *bp, const DH *x) @@ -614,6 +667,7 @@ PEM_write_bio_DHparams(BIO *bp, const DH *x) return PEM_ASN1_write_bio((i2d_of_void *)i2d_DHparams, PEM_STRING_DHPARAMS, bp, (void *)x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_bio_DHparams); #endif @@ -623,6 +677,7 @@ PEM_read_PUBKEY(FILE *fp, EVP_PKEY **x, pem_password_cb *cb, void *u) return PEM_ASN1_read((d2i_of_void *)d2i_PUBKEY, PEM_STRING_PUBLIC, fp, (void **)x, cb, u); } +LCRYPTO_ALIAS(PEM_read_PUBKEY); int PEM_write_PUBKEY(FILE *fp, EVP_PKEY *x) @@ -630,6 +685,7 @@ PEM_write_PUBKEY(FILE *fp, EVP_PKEY *x) return PEM_ASN1_write((i2d_of_void *)i2d_PUBKEY, PEM_STRING_PUBLIC, fp, x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_PUBKEY); EVP_PKEY * PEM_read_bio_PUBKEY(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, void *u) @@ -637,6 +693,7 @@ PEM_read_bio_PUBKEY(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, void *u) return PEM_ASN1_read_bio((d2i_of_void *)d2i_PUBKEY, PEM_STRING_PUBLIC, bp, (void **)x, cb, u); } +LCRYPTO_ALIAS(PEM_read_bio_PUBKEY); int PEM_write_bio_PUBKEY(BIO *bp, EVP_PKEY *x) @@ -644,3 +701,4 @@ PEM_write_bio_PUBKEY(BIO *bp, EVP_PKEY *x) return PEM_ASN1_write_bio((i2d_of_void *)i2d_PUBKEY, PEM_STRING_PUBLIC, bp, x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_bio_PUBKEY); diff --git a/lib/libcrypto/pem/pem_err.c b/lib/libcrypto/pem/pem_err.c index d817cafff08..a94e2d5ebb2 100644 --- a/lib/libcrypto/pem/pem_err.c +++ b/lib/libcrypto/pem/pem_err.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pem_err.c,v 1.13 2022/07/12 14:42:50 kn Exp $ */ +/* $OpenBSD: pem_err.c,v 1.14 2023/07/07 13:40:44 beck Exp $ */ /* ==================================================================== * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. * @@ -114,3 +114,4 @@ ERR_load_PEM_strings(void) } #endif } +LCRYPTO_ALIAS(ERR_load_PEM_strings); diff --git a/lib/libcrypto/pem/pem_info.c b/lib/libcrypto/pem/pem_info.c index 3cca828cfd0..b979c79b330 100644 --- a/lib/libcrypto/pem/pem_info.c +++ b/lib/libcrypto/pem/pem_info.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pem_info.c,v 1.26 2022/11/26 16:08:53 tb Exp $ */ +/* $OpenBSD: pem_info.c,v 1.27 2023/07/07 13:40:44 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -93,6 +93,7 @@ PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk, pem_password_cb *cb, BIO_free(b); return (ret); } +LCRYPTO_ALIAS(PEM_X509_INFO_read); STACK_OF(X509_INFO) * PEM_X509_INFO_read_bio(BIO *bp, STACK_OF(X509_INFO) *sk, pem_password_cb *cb, @@ -288,6 +289,7 @@ err: return ret; } +LCRYPTO_ALIAS(PEM_X509_INFO_read_bio); /* A TJH addition */ @@ -382,3 +384,4 @@ err: explicit_bzero(buf, PEM_BUFSIZE); return (ret); } +LCRYPTO_ALIAS(PEM_X509_INFO_write_bio); diff --git a/lib/libcrypto/pem/pem_lib.c b/lib/libcrypto/pem/pem_lib.c index 72cdd41b0da..3f23a0131b7 100644 --- a/lib/libcrypto/pem/pem_lib.c +++ b/lib/libcrypto/pem/pem_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pem_lib.c,v 1.52 2022/11/26 16:08:53 tb Exp $ */ +/* $OpenBSD: pem_lib.c,v 1.53 2023/07/07 13:40:44 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -127,6 +127,7 @@ PEM_def_callback(char *buf, int num, int w, void *key) } return (int)l; } +LCRYPTO_ALIAS(PEM_def_callback); void PEM_proc_type(char *buf, int type) @@ -146,6 +147,7 @@ PEM_proc_type(char *buf, int type) strlcat(buf, str, PEM_BUFSIZE); strlcat(buf, "\n", PEM_BUFSIZE); } +LCRYPTO_ALIAS(PEM_proc_type); void PEM_dek_info(char *buf, const char *type, int len, char *str) @@ -167,6 +169,7 @@ PEM_dek_info(char *buf, const char *type, int len, char *str) buf[j + i * 2] = '\n'; buf[j + i * 2 + 1] = '\0'; } +LCRYPTO_ALIAS(PEM_dek_info); void * PEM_ASN1_read(d2i_of_void *d2i, const char *name, FILE *fp, void **x, @@ -184,6 +187,7 @@ PEM_ASN1_read(d2i_of_void *d2i, const char *name, FILE *fp, void **x, BIO_free(b); return (ret); } +LCRYPTO_ALIAS(PEM_ASN1_read); static int check_pem(const char *nm, const char *name) @@ -322,6 +326,7 @@ err: free(data); return ret; } +LCRYPTO_ALIAS(PEM_bytes_read_bio); int PEM_ASN1_write(i2d_of_void *i2d, const char *name, FILE *fp, void *x, @@ -340,6 +345,7 @@ PEM_ASN1_write(i2d_of_void *i2d, const char *name, FILE *fp, void *x, BIO_free(b); return (ret); } +LCRYPTO_ALIAS(PEM_ASN1_write); int PEM_ASN1_write_bio(i2d_of_void *i2d, const char *name, BIO *bp, void *x, @@ -438,6 +444,7 @@ err: freezero(data, (unsigned int)dsize); return (ret); } +LCRYPTO_ALIAS(PEM_ASN1_write_bio); int PEM_do_header(EVP_CIPHER_INFO *cipher, unsigned char *data, long *plen, @@ -483,6 +490,7 @@ PEM_do_header(EVP_CIPHER_INFO *cipher, unsigned char *data, long *plen, *plen = j + i; return (1); } +LCRYPTO_ALIAS(PEM_do_header); int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher) @@ -544,6 +552,7 @@ PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher) return (1); } +LCRYPTO_ALIAS(PEM_get_EVP_CIPHER_INFO); static int load_iv(char **fromp, unsigned char *to, int num) @@ -590,6 +599,7 @@ PEM_write(FILE *fp, const char *name, const char *header, BIO_free(b); return (ret); } +LCRYPTO_ALIAS(PEM_write); int PEM_write_bio(BIO *bp, const char *name, const char *header, @@ -647,6 +657,7 @@ err: PEMerror(reason); return (0); } +LCRYPTO_ALIAS(PEM_write_bio); int PEM_read(FILE *fp, char **name, char **header, unsigned char **data, long *len) @@ -663,6 +674,7 @@ PEM_read(FILE *fp, char **name, char **header, unsigned char **data, long *len) BIO_free(b); return (ret); } +LCRYPTO_ALIAS(PEM_read); int PEM_read_bio(BIO *bp, char **name, char **header, unsigned char **data, @@ -835,6 +847,7 @@ err: BUF_MEM_free(dataB); return (0); } +LCRYPTO_ALIAS(PEM_read_bio); /* Check pem string and return prefix length. * If for example the pem_str == "RSA PRIVATE KEY" and suffix = "PRIVATE KEY" diff --git a/lib/libcrypto/pem/pem_oth.c b/lib/libcrypto/pem/pem_oth.c index 21498cb6b5b..2dca978efd5 100644 --- a/lib/libcrypto/pem/pem_oth.c +++ b/lib/libcrypto/pem/pem_oth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pem_oth.c,v 1.8 2017/01/29 17:49:23 beck Exp $ */ +/* $OpenBSD: pem_oth.c,v 1.9 2023/07/07 13:40:44 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -85,3 +85,4 @@ PEM_ASN1_read_bio(d2i_of_void *d2i, const char *name, BIO *bp, void **x, free(data); return (ret); } +LCRYPTO_ALIAS(PEM_ASN1_read_bio); diff --git a/lib/libcrypto/pem/pem_pk8.c b/lib/libcrypto/pem/pem_pk8.c index 43581905f03..6d0c0cbd570 100644 --- a/lib/libcrypto/pem/pem_pk8.c +++ b/lib/libcrypto/pem/pem_pk8.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pem_pk8.c,v 1.13 2017/01/29 17:49:23 beck Exp $ */ +/* $OpenBSD: pem_pk8.c,v 1.14 2023/07/07 13:40:44 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -84,6 +84,7 @@ PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, EVP_PKEY *x, int nid, char *kstr, { return do_pk8pkey(bp, x, 0, nid, NULL, kstr, klen, cb, u); } +LCRYPTO_ALIAS(PEM_write_bio_PKCS8PrivateKey_nid); int PEM_write_bio_PKCS8PrivateKey(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc, @@ -91,6 +92,7 @@ PEM_write_bio_PKCS8PrivateKey(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc, { return do_pk8pkey(bp, x, 0, -1, enc, kstr, klen, cb, u); } +LCRYPTO_ALIAS(PEM_write_bio_PKCS8PrivateKey); int i2d_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc, @@ -98,6 +100,7 @@ i2d_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc, { return do_pk8pkey(bp, x, 1, -1, enc, kstr, klen, cb, u); } +LCRYPTO_ALIAS(i2d_PKCS8PrivateKey_bio); int i2d_PKCS8PrivateKey_nid_bio(BIO *bp, EVP_PKEY *x, int nid, @@ -105,6 +108,7 @@ i2d_PKCS8PrivateKey_nid_bio(BIO *bp, EVP_PKEY *x, int nid, { return do_pk8pkey(bp, x, 1, nid, NULL, kstr, klen, cb, u); } +LCRYPTO_ALIAS(i2d_PKCS8PrivateKey_nid_bio); static int do_pk8pkey(BIO *bp, EVP_PKEY *x, int isder, int nid, const EVP_CIPHER *enc, @@ -188,6 +192,7 @@ d2i_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, void *u) } return ret; } +LCRYPTO_ALIAS(d2i_PKCS8PrivateKey_bio); int @@ -196,6 +201,7 @@ i2d_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc, { return do_pk8pkey_fp(fp, x, 1, -1, enc, kstr, klen, cb, u); } +LCRYPTO_ALIAS(i2d_PKCS8PrivateKey_fp); int i2d_PKCS8PrivateKey_nid_fp(FILE *fp, EVP_PKEY *x, int nid, char *kstr, @@ -203,6 +209,7 @@ i2d_PKCS8PrivateKey_nid_fp(FILE *fp, EVP_PKEY *x, int nid, char *kstr, { return do_pk8pkey_fp(fp, x, 1, nid, NULL, kstr, klen, cb, u); } +LCRYPTO_ALIAS(i2d_PKCS8PrivateKey_nid_fp); int PEM_write_PKCS8PrivateKey_nid(FILE *fp, EVP_PKEY *x, int nid, char *kstr, @@ -210,6 +217,7 @@ PEM_write_PKCS8PrivateKey_nid(FILE *fp, EVP_PKEY *x, int nid, char *kstr, { return do_pk8pkey_fp(fp, x, 0, nid, NULL, kstr, klen, cb, u); } +LCRYPTO_ALIAS(PEM_write_PKCS8PrivateKey_nid); int PEM_write_PKCS8PrivateKey(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc, @@ -217,6 +225,7 @@ PEM_write_PKCS8PrivateKey(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc, { return do_pk8pkey_fp(fp, x, 0, -1, enc, kstr, klen, cb, u); } +LCRYPTO_ALIAS(PEM_write_PKCS8PrivateKey); static int do_pk8pkey_fp(FILE *fp, EVP_PKEY *x, int isder, int nid, const EVP_CIPHER *enc, @@ -248,6 +257,7 @@ d2i_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY **x, pem_password_cb *cb, void *u) BIO_free(bp); return ret; } +LCRYPTO_ALIAS(d2i_PKCS8PrivateKey_fp); X509_SIG * PEM_read_PKCS8(FILE *fp, X509_SIG **x, pem_password_cb *cb, void *u) @@ -255,6 +265,7 @@ PEM_read_PKCS8(FILE *fp, X509_SIG **x, pem_password_cb *cb, void *u) return PEM_ASN1_read((d2i_of_void *)d2i_X509_SIG, PEM_STRING_PKCS8, fp, (void **)x, cb, u); } +LCRYPTO_ALIAS(PEM_read_PKCS8); int PEM_write_PKCS8(FILE *fp, X509_SIG *x) @@ -262,6 +273,7 @@ PEM_write_PKCS8(FILE *fp, X509_SIG *x) return PEM_ASN1_write((i2d_of_void *)i2d_X509_SIG, PEM_STRING_PKCS8, fp, x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_PKCS8); X509_SIG * PEM_read_bio_PKCS8(BIO *bp, X509_SIG **x, pem_password_cb *cb, void *u) @@ -269,6 +281,7 @@ PEM_read_bio_PKCS8(BIO *bp, X509_SIG **x, pem_password_cb *cb, void *u) return PEM_ASN1_read_bio((d2i_of_void *)d2i_X509_SIG, PEM_STRING_PKCS8, bp, (void **)x, cb, u); } +LCRYPTO_ALIAS(PEM_read_bio_PKCS8); int PEM_write_bio_PKCS8(BIO *bp, X509_SIG *x) @@ -276,6 +289,7 @@ PEM_write_bio_PKCS8(BIO *bp, X509_SIG *x) return PEM_ASN1_write_bio((i2d_of_void *)i2d_X509_SIG, PEM_STRING_PKCS8, bp, x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_bio_PKCS8); PKCS8_PRIV_KEY_INFO * PEM_read_PKCS8_PRIV_KEY_INFO(FILE *fp, PKCS8_PRIV_KEY_INFO **x, pem_password_cb *cb, void *u) @@ -283,6 +297,7 @@ PEM_read_PKCS8_PRIV_KEY_INFO(FILE *fp, PKCS8_PRIV_KEY_INFO **x, pem_password_cb return PEM_ASN1_read((d2i_of_void *)d2i_PKCS8_PRIV_KEY_INFO, PEM_STRING_PKCS8INF, fp, (void **)x, cb, u); } +LCRYPTO_ALIAS(PEM_read_PKCS8_PRIV_KEY_INFO); int PEM_write_PKCS8_PRIV_KEY_INFO(FILE *fp, PKCS8_PRIV_KEY_INFO *x) @@ -290,6 +305,7 @@ PEM_write_PKCS8_PRIV_KEY_INFO(FILE *fp, PKCS8_PRIV_KEY_INFO *x) return PEM_ASN1_write((i2d_of_void *)i2d_PKCS8_PRIV_KEY_INFO, PEM_STRING_PKCS8INF, fp, x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_PKCS8_PRIV_KEY_INFO); PKCS8_PRIV_KEY_INFO * PEM_read_bio_PKCS8_PRIV_KEY_INFO(BIO *bp, PKCS8_PRIV_KEY_INFO **x, pem_password_cb *cb, void *u) @@ -297,6 +313,7 @@ PEM_read_bio_PKCS8_PRIV_KEY_INFO(BIO *bp, PKCS8_PRIV_KEY_INFO **x, pem_password_ return PEM_ASN1_read_bio((d2i_of_void *)d2i_PKCS8_PRIV_KEY_INFO, PEM_STRING_PKCS8INF, bp, (void **)x, cb, u); } +LCRYPTO_ALIAS(PEM_read_bio_PKCS8_PRIV_KEY_INFO); int PEM_write_bio_PKCS8_PRIV_KEY_INFO(BIO *bp, PKCS8_PRIV_KEY_INFO *x) @@ -304,3 +321,4 @@ PEM_write_bio_PKCS8_PRIV_KEY_INFO(BIO *bp, PKCS8_PRIV_KEY_INFO *x) return PEM_ASN1_write_bio((i2d_of_void *)i2d_PKCS8_PRIV_KEY_INFO, PEM_STRING_PKCS8INF, bp, x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_bio_PKCS8_PRIV_KEY_INFO); diff --git a/lib/libcrypto/pem/pem_pkey.c b/lib/libcrypto/pem/pem_pkey.c index fa2d38f5666..29619521393 100644 --- a/lib/libcrypto/pem/pem_pkey.c +++ b/lib/libcrypto/pem/pem_pkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pem_pkey.c,v 1.26 2022/11/26 16:08:53 tb Exp $ */ +/* $OpenBSD: pem_pkey.c,v 1.27 2023/07/07 13:40:44 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -147,6 +147,7 @@ err: freezero(data, len); return (ret); } +LCRYPTO_ALIAS(PEM_read_bio_PrivateKey); int PEM_write_bio_PrivateKey(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc, @@ -159,6 +160,7 @@ PEM_write_bio_PrivateKey(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc, return PEM_write_bio_PrivateKey_traditional(bp, x, enc, kstr, klen, cb, u); } +LCRYPTO_ALIAS(PEM_write_bio_PrivateKey); int PEM_write_bio_PrivateKey_traditional(BIO *bp, EVP_PKEY *x, @@ -172,6 +174,7 @@ PEM_write_bio_PrivateKey_traditional(BIO *bp, EVP_PKEY *x, return PEM_ASN1_write_bio((i2d_of_void *)i2d_PrivateKey, pem_str, bp, x, enc, kstr, klen, cb, u); } +LCRYPTO_ALIAS(PEM_write_bio_PrivateKey_traditional); EVP_PKEY * PEM_read_bio_Parameters(BIO *bp, EVP_PKEY **x) @@ -212,6 +215,7 @@ err: free(data); return (ret); } +LCRYPTO_ALIAS(PEM_read_bio_Parameters); int PEM_write_bio_Parameters(BIO *bp, EVP_PKEY *x) @@ -226,6 +230,7 @@ PEM_write_bio_Parameters(BIO *bp, EVP_PKEY *x) return PEM_ASN1_write_bio((i2d_of_void *)x->ameth->param_encode, pem_str, bp, x, NULL, NULL, 0, 0, NULL); } +LCRYPTO_ALIAS(PEM_write_bio_Parameters); EVP_PKEY * PEM_read_PrivateKey(FILE *fp, EVP_PKEY **x, pem_password_cb *cb, void *u) @@ -242,6 +247,7 @@ PEM_read_PrivateKey(FILE *fp, EVP_PKEY **x, pem_password_cb *cb, void *u) BIO_free(b); return (ret); } +LCRYPTO_ALIAS(PEM_read_PrivateKey); int PEM_write_PrivateKey(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc, @@ -258,4 +264,4 @@ PEM_write_PrivateKey(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc, BIO_free(b); return ret; } - +LCRYPTO_ALIAS(PEM_write_PrivateKey); diff --git a/lib/libcrypto/pem/pem_sign.c b/lib/libcrypto/pem/pem_sign.c index fddeec79f3e..461f9574455 100644 --- a/lib/libcrypto/pem/pem_sign.c +++ b/lib/libcrypto/pem/pem_sign.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pem_sign.c,v 1.14 2018/08/24 19:51:31 tb Exp $ */ +/* $OpenBSD: pem_sign.c,v 1.15 2023/07/07 13:40:44 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -69,6 +69,7 @@ PEM_SignInit(EVP_MD_CTX *ctx, EVP_MD *type) { return EVP_DigestInit_ex(ctx, type, NULL); } +LCRYPTO_ALIAS(PEM_SignInit); int PEM_SignUpdate(EVP_MD_CTX *ctx, unsigned char *data, @@ -76,6 +77,7 @@ PEM_SignUpdate(EVP_MD_CTX *ctx, unsigned char *data, { return EVP_DigestUpdate(ctx, data, count); } +LCRYPTO_ALIAS(PEM_SignUpdate); int PEM_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen, @@ -103,3 +105,4 @@ err: free(m); return (ret); } +LCRYPTO_ALIAS(PEM_SignFinal); diff --git a/lib/libcrypto/pem/pem_x509.c b/lib/libcrypto/pem/pem_x509.c index f440a9f0aa3..0016413b513 100644 --- a/lib/libcrypto/pem/pem_x509.c +++ b/lib/libcrypto/pem/pem_x509.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pem_x509.c,v 1.8 2016/09/04 16:10:38 jsing Exp $ */ +/* $OpenBSD: pem_x509.c,v 1.9 2023/07/07 13:40:44 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2001. */ @@ -71,6 +71,7 @@ PEM_read_X509(FILE *fp, X509 **x, pem_password_cb *cb, void *u) return PEM_ASN1_read((d2i_of_void *)d2i_X509, PEM_STRING_X509, fp, (void **)x, cb, u); } +LCRYPTO_ALIAS(PEM_read_X509); int PEM_write_X509(FILE *fp, X509 *x) @@ -78,6 +79,7 @@ PEM_write_X509(FILE *fp, X509 *x) return PEM_ASN1_write((i2d_of_void *)i2d_X509, PEM_STRING_X509, fp, x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_X509); X509 * PEM_read_bio_X509(BIO *bp, X509 **x, pem_password_cb *cb, void *u) @@ -85,6 +87,7 @@ PEM_read_bio_X509(BIO *bp, X509 **x, pem_password_cb *cb, void *u) return PEM_ASN1_read_bio((d2i_of_void *)d2i_X509, PEM_STRING_X509, bp, (void **)x, cb, u); } +LCRYPTO_ALIAS(PEM_read_bio_X509); int PEM_write_bio_X509(BIO *bp, X509 *x) @@ -92,3 +95,4 @@ PEM_write_bio_X509(BIO *bp, X509 *x) return PEM_ASN1_write_bio((i2d_of_void *)i2d_X509, PEM_STRING_X509, bp, x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_bio_X509); diff --git a/lib/libcrypto/pem/pem_xaux.c b/lib/libcrypto/pem/pem_xaux.c index 68a78517044..5f44a2b5ef6 100644 --- a/lib/libcrypto/pem/pem_xaux.c +++ b/lib/libcrypto/pem/pem_xaux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pem_xaux.c,v 1.10 2021/10/31 16:28:50 tb Exp $ */ +/* $OpenBSD: pem_xaux.c,v 1.11 2023/07/07 13:40:44 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2001. */ @@ -71,6 +71,7 @@ PEM_read_X509_AUX(FILE *fp, X509 **x, pem_password_cb *cb, void *u) return PEM_ASN1_read((d2i_of_void *)d2i_X509_AUX, PEM_STRING_X509_TRUSTED, fp, (void **)x, cb, u); } +LCRYPTO_ALIAS(PEM_read_X509_AUX); int PEM_write_X509_AUX(FILE *fp, X509 *x) @@ -78,6 +79,7 @@ PEM_write_X509_AUX(FILE *fp, X509 *x) return PEM_ASN1_write((i2d_of_void *)i2d_X509_AUX, PEM_STRING_X509_TRUSTED, fp, x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_X509_AUX); X509 * PEM_read_bio_X509_AUX(BIO *bp, X509 **x, pem_password_cb *cb, void *u) @@ -85,6 +87,7 @@ PEM_read_bio_X509_AUX(BIO *bp, X509 **x, pem_password_cb *cb, void *u) return PEM_ASN1_read_bio((d2i_of_void *)d2i_X509_AUX, PEM_STRING_X509_TRUSTED, bp, (void **)x, cb, u); } +LCRYPTO_ALIAS(PEM_read_bio_X509_AUX); int PEM_write_bio_X509_AUX(BIO *bp, X509 *x) @@ -92,3 +95,4 @@ PEM_write_bio_X509_AUX(BIO *bp, X509 *x) return PEM_ASN1_write_bio((i2d_of_void *)i2d_X509_AUX, PEM_STRING_X509_TRUSTED, bp, x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_bio_X509_AUX); diff --git a/lib/libcrypto/pem/pvkfmt.c b/lib/libcrypto/pem/pvkfmt.c index 1417a7b3c0a..816d8b7dc06 100644 --- a/lib/libcrypto/pem/pvkfmt.c +++ b/lib/libcrypto/pem/pvkfmt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pvkfmt.c,v 1.26 2022/11/26 16:08:53 tb Exp $ */ +/* $OpenBSD: pvkfmt.c,v 1.27 2023/07/07 13:40:44 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2005. */ @@ -414,24 +414,28 @@ b2i_PrivateKey(const unsigned char **in, long length) { return do_b2i(in, length, 0); } +LCRYPTO_ALIAS(b2i_PrivateKey); EVP_PKEY * b2i_PublicKey(const unsigned char **in, long length) { return do_b2i(in, length, 1); } +LCRYPTO_ALIAS(b2i_PublicKey); EVP_PKEY * b2i_PrivateKey_bio(BIO *in) { return do_b2i_bio(in, 0); } +LCRYPTO_ALIAS(b2i_PrivateKey_bio); EVP_PKEY * b2i_PublicKey_bio(BIO *in) { return do_b2i_bio(in, 1); } +LCRYPTO_ALIAS(b2i_PublicKey_bio); static void write_ledword(unsigned char **out, unsigned int dw) @@ -646,12 +650,14 @@ i2b_PrivateKey_bio(BIO *out, EVP_PKEY *pk) { return do_i2b_bio(out, pk, 0); } +LCRYPTO_ALIAS(i2b_PrivateKey_bio); int i2b_PublicKey_bio(BIO *out, EVP_PKEY *pk) { return do_i2b_bio(out, pk, 1); } +LCRYPTO_ALIAS(i2b_PublicKey_bio); #ifndef OPENSSL_NO_RC4 @@ -837,6 +843,7 @@ b2i_PVK_bio(BIO *in, pem_password_cb *cb, void *u) freezero(buf, buflen); return ret; } +LCRYPTO_ALIAS(b2i_PVK_bio); static int i2b_PVK(unsigned char **out, EVP_PKEY*pk, int enclevel, pem_password_cb *cb, @@ -930,6 +937,7 @@ i2b_PVK_bio(BIO *out, EVP_PKEY *pk, int enclevel, pem_password_cb *cb, void *u) } return outlen; } +LCRYPTO_ALIAS(i2b_PVK_bio); #endif diff --git a/lib/libcrypto/rc2/rc2_cbc.c b/lib/libcrypto/rc2/rc2_cbc.c index c4a58384db7..1d8e2def993 100644 --- a/lib/libcrypto/rc2/rc2_cbc.c +++ b/lib/libcrypto/rc2/rc2_cbc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rc2_cbc.c,v 1.7 2023/07/07 08:29:37 beck Exp $ */ +/* $OpenBSD: rc2_cbc.c,v 1.8 2023/07/07 13:40:44 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -136,6 +136,7 @@ RC2_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, tin0 = tin1 = tout0 = tout1 = xor0 = xor1 = 0; tin[0] = tin[1] = 0; } +LCRYPTO_ALIAS(RC2_cbc_encrypt); void RC2_encrypt(unsigned long *d, RC2_KEY *key) @@ -183,6 +184,7 @@ RC2_encrypt(unsigned long *d, RC2_KEY *key) d[1] = (unsigned long)(x2 & 0xffff)|((unsigned long)(x3 & 0xffff) << 16L); } +LCRYPTO_ALIAS(RC2_encrypt); void RC2_decrypt(unsigned long *d, RC2_KEY *key) @@ -231,3 +233,4 @@ RC2_decrypt(unsigned long *d, RC2_KEY *key) d[1] = (unsigned long)(x2 & 0xffff)|((unsigned long)(x3 & 0xffff) << 16L); } +LCRYPTO_ALIAS(RC2_decrypt); diff --git a/lib/libcrypto/rc2/rc2_ecb.c b/lib/libcrypto/rc2/rc2_ecb.c index c87cd991709..6a3c8098eb3 100644 --- a/lib/libcrypto/rc2/rc2_ecb.c +++ b/lib/libcrypto/rc2/rc2_ecb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rc2_ecb.c,v 1.8 2023/07/07 08:29:37 beck Exp $ */ +/* $OpenBSD: rc2_ecb.c,v 1.9 2023/07/07 13:40:44 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -88,3 +88,4 @@ RC2_ecb_encrypt(const unsigned char *in, unsigned char *out, RC2_KEY *ks, l2c(l, out); l = d[0] = d[1] = 0; } +LCRYPTO_ALIAS(RC2_ecb_encrypt); diff --git a/lib/libcrypto/rc2/rc2_skey.c b/lib/libcrypto/rc2/rc2_skey.c index 640ff7ad9b8..d33c02da8ce 100644 --- a/lib/libcrypto/rc2/rc2_skey.c +++ b/lib/libcrypto/rc2/rc2_skey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rc2_skey.c,v 1.14 2023/07/07 08:29:37 beck Exp $ */ +/* $OpenBSD: rc2_skey.c,v 1.15 2023/07/07 13:40:44 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -139,3 +139,4 @@ RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits) for (i = 127; i >= 0; i -= 2) *(ki--) = ((k[i] << 8)|k[i - 1]) & 0xffff; } +LCRYPTO_ALIAS(RC2_set_key); diff --git a/lib/libcrypto/rc2/rc2cfb64.c b/lib/libcrypto/rc2/rc2cfb64.c index e320f5ef949..21266c430b1 100644 --- a/lib/libcrypto/rc2/rc2cfb64.c +++ b/lib/libcrypto/rc2/rc2cfb64.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rc2cfb64.c,v 1.7 2023/07/07 08:29:37 beck Exp $ */ +/* $OpenBSD: rc2cfb64.c,v 1.8 2023/07/07 13:40:44 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -121,3 +121,4 @@ RC2_cfb64_encrypt(const unsigned char *in, unsigned char *out, v0 = v1 = ti[0] = ti[1] = t = c = cc = 0; *num = n; } +LCRYPTO_ALIAS(RC2_cfb64_encrypt); diff --git a/lib/libcrypto/rc2/rc2ofb64.c b/lib/libcrypto/rc2/rc2ofb64.c index f7cbce6c12d..73d8323e92b 100644 --- a/lib/libcrypto/rc2/rc2ofb64.c +++ b/lib/libcrypto/rc2/rc2ofb64.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rc2ofb64.c,v 1.7 2023/07/07 08:29:37 beck Exp $ */ +/* $OpenBSD: rc2ofb64.c,v 1.8 2023/07/07 13:40:44 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -108,3 +108,4 @@ RC2_ofb64_encrypt(const unsigned char *in, unsigned char *out, t = v0 = v1 = ti[0] = ti[1] = 0; *num = n; } +LCRYPTO_ALIAS(RC2_ofb64_encrypt);