From: beck Date: Tue, 9 Apr 2024 13:52:41 +0000 (+0000) Subject: Hide public symbols in evp.h X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9bac3682a248384cde711fdda825c3b5960b1005;p=openbsd Hide public symbols in evp.h largely mechanically done by the guentherizer 9000 ok tb@ --- diff --git a/lib/libcrypto/Symbols.namespace b/lib/libcrypto/Symbols.namespace index ae248759a65..e17e38e6f59 100644 --- a/lib/libcrypto/Symbols.namespace +++ b/lib/libcrypto/Symbols.namespace @@ -2560,3 +2560,352 @@ _libre_AES_ctr128_encrypt _libre_AES_ige_encrypt _libre_AES_wrap_key _libre_AES_unwrap_key +_libre_EVP_MD_type +_libre_EVP_MD_pkey_type +_libre_EVP_MD_size +_libre_EVP_MD_block_size +_libre_EVP_MD_flags +_libre_EVP_MD_CTX_md +_libre_EVP_MD_CTX_md_data +_libre_EVP_MD_CTX_pkey_ctx +_libre_EVP_MD_CTX_set_pkey_ctx +_libre_EVP_CIPHER_nid +_libre_EVP_CIPHER_block_size +_libre_EVP_CIPHER_key_length +_libre_EVP_CIPHER_iv_length +_libre_EVP_CIPHER_flags +_libre_EVP_CIPHER_CTX_cipher +_libre_EVP_CIPHER_CTX_encrypting +_libre_EVP_CIPHER_CTX_nid +_libre_EVP_CIPHER_CTX_block_size +_libre_EVP_CIPHER_CTX_key_length +_libre_EVP_CIPHER_CTX_iv_length +_libre_EVP_CIPHER_CTX_get_iv +_libre_EVP_CIPHER_CTX_set_iv +_libre_EVP_CIPHER_CTX_copy +_libre_EVP_CIPHER_CTX_get_app_data +_libre_EVP_CIPHER_CTX_set_app_data +_libre_EVP_CIPHER_CTX_get_cipher_data +_libre_EVP_CIPHER_CTX_set_cipher_data +_libre_EVP_CIPHER_CTX_buf_noconst +_libre_EVP_CIPHER_CTX_flags +_libre_EVP_CIPHER_meth_new +_libre_EVP_CIPHER_meth_dup +_libre_EVP_CIPHER_meth_free +_libre_EVP_CIPHER_meth_set_iv_length +_libre_EVP_CIPHER_meth_set_flags +_libre_EVP_CIPHER_meth_set_impl_ctx_size +_libre_EVP_CIPHER_meth_set_init +_libre_EVP_CIPHER_meth_set_do_cipher +_libre_EVP_CIPHER_meth_set_cleanup +_libre_EVP_CIPHER_meth_set_set_asn1_params +_libre_EVP_CIPHER_meth_set_get_asn1_params +_libre_EVP_CIPHER_meth_set_ctrl +_libre_EVP_PKEY_new_raw_private_key +_libre_EVP_PKEY_new_raw_public_key +_libre_EVP_PKEY_get_raw_private_key +_libre_EVP_PKEY_get_raw_public_key +_libre_EVP_Cipher +_libre_EVP_MD_CTX_new +_libre_EVP_MD_CTX_free +_libre_EVP_MD_CTX_reset +_libre_EVP_MD_CTX_create +_libre_EVP_MD_CTX_destroy +_libre_EVP_MD_CTX_cleanup +_libre_EVP_MD_CTX_copy_ex +_libre_EVP_MD_CTX_set_flags +_libre_EVP_MD_CTX_clear_flags +_libre_EVP_MD_CTX_ctrl +_libre_EVP_MD_CTX_test_flags +_libre_EVP_DigestInit_ex +_libre_EVP_DigestUpdate +_libre_EVP_DigestFinal_ex +_libre_EVP_Digest +_libre_EVP_MD_CTX_copy +_libre_EVP_DigestInit +_libre_EVP_DigestFinal +_libre_EVP_read_pw_string +_libre_EVP_read_pw_string_min +_libre_EVP_set_pw_prompt +_libre_EVP_get_pw_prompt +_libre_EVP_BytesToKey +_libre_EVP_CIPHER_CTX_set_flags +_libre_EVP_CIPHER_CTX_clear_flags +_libre_EVP_CIPHER_CTX_test_flags +_libre_EVP_EncryptInit +_libre_EVP_EncryptInit_ex +_libre_EVP_EncryptUpdate +_libre_EVP_EncryptFinal_ex +_libre_EVP_DecryptInit +_libre_EVP_DecryptInit_ex +_libre_EVP_DecryptUpdate +_libre_EVP_DecryptFinal_ex +_libre_EVP_CipherInit +_libre_EVP_CipherInit_ex +_libre_EVP_CipherUpdate +_libre_EVP_CipherFinal_ex +_libre_EVP_SignFinal +_libre_EVP_VerifyFinal +_libre_EVP_DigestSignInit +_libre_EVP_DigestSignFinal +_libre_EVP_DigestSign +_libre_EVP_DigestVerifyInit +_libre_EVP_DigestVerifyFinal +_libre_EVP_DigestVerify +_libre_EVP_OpenInit +_libre_EVP_OpenFinal +_libre_EVP_SealInit +_libre_EVP_SealFinal +_libre_EVP_ENCODE_CTX_new +_libre_EVP_ENCODE_CTX_free +_libre_EVP_EncodeInit +_libre_EVP_EncodeUpdate +_libre_EVP_EncodeFinal +_libre_EVP_EncodeBlock +_libre_EVP_DecodeInit +_libre_EVP_DecodeUpdate +_libre_EVP_DecodeFinal +_libre_EVP_DecodeBlock +_libre_EVP_CIPHER_CTX_cleanup +_libre_EVP_CIPHER_CTX_new +_libre_EVP_CIPHER_CTX_free +_libre_EVP_CIPHER_CTX_reset +_libre_EVP_CIPHER_CTX_set_key_length +_libre_EVP_CIPHER_CTX_set_padding +_libre_EVP_CIPHER_CTX_ctrl +_libre_EVP_CIPHER_CTX_rand_key +_libre_BIO_f_md +_libre_BIO_f_base64 +_libre_BIO_f_cipher +_libre_BIO_set_cipher +_libre_EVP_md_null +_libre_EVP_md4 +_libre_EVP_md5 +_libre_EVP_md5_sha1 +_libre_EVP_sha1 +_libre_EVP_sha224 +_libre_EVP_sha256 +_libre_EVP_sha384 +_libre_EVP_sha512 +_libre_EVP_sha512_224 +_libre_EVP_sha512_256 +_libre_EVP_sha3_224 +_libre_EVP_sha3_256 +_libre_EVP_sha3_384 +_libre_EVP_sha3_512 +_libre_EVP_sm3 +_libre_EVP_ripemd160 +_libre_EVP_whirlpool +_libre_EVP_enc_null +_libre_EVP_des_ecb +_libre_EVP_des_ede +_libre_EVP_des_ede3 +_libre_EVP_des_ede_ecb +_libre_EVP_des_ede3_ecb +_libre_EVP_des_cfb64 +_libre_EVP_des_cfb1 +_libre_EVP_des_cfb8 +_libre_EVP_des_ede_cfb64 +_libre_EVP_des_ede3_cfb64 +_libre_EVP_des_ede3_cfb1 +_libre_EVP_des_ede3_cfb8 +_libre_EVP_des_ofb +_libre_EVP_des_ede_ofb +_libre_EVP_des_ede3_ofb +_libre_EVP_des_cbc +_libre_EVP_des_ede_cbc +_libre_EVP_des_ede3_cbc +_libre_EVP_desx_cbc +_libre_EVP_rc4 +_libre_EVP_rc4_40 +_libre_EVP_idea_ecb +_libre_EVP_idea_cfb64 +_libre_EVP_idea_ofb +_libre_EVP_idea_cbc +_libre_EVP_rc2_ecb +_libre_EVP_rc2_cbc +_libre_EVP_rc2_40_cbc +_libre_EVP_rc2_64_cbc +_libre_EVP_rc2_cfb64 +_libre_EVP_rc2_ofb +_libre_EVP_bf_ecb +_libre_EVP_bf_cbc +_libre_EVP_bf_cfb64 +_libre_EVP_bf_ofb +_libre_EVP_cast5_ecb +_libre_EVP_cast5_cbc +_libre_EVP_cast5_cfb64 +_libre_EVP_cast5_ofb +_libre_EVP_aes_128_ecb +_libre_EVP_aes_128_cbc +_libre_EVP_aes_128_cfb1 +_libre_EVP_aes_128_cfb8 +_libre_EVP_aes_128_cfb128 +_libre_EVP_aes_128_ofb +_libre_EVP_aes_128_ctr +_libre_EVP_aes_128_ccm +_libre_EVP_aes_128_gcm +_libre_EVP_aes_128_wrap +_libre_EVP_aes_128_xts +_libre_EVP_aes_192_ecb +_libre_EVP_aes_192_cbc +_libre_EVP_aes_192_cfb1 +_libre_EVP_aes_192_cfb8 +_libre_EVP_aes_192_cfb128 +_libre_EVP_aes_192_ofb +_libre_EVP_aes_192_ctr +_libre_EVP_aes_192_ccm +_libre_EVP_aes_192_gcm +_libre_EVP_aes_192_wrap +_libre_EVP_aes_256_ecb +_libre_EVP_aes_256_cbc +_libre_EVP_aes_256_cfb1 +_libre_EVP_aes_256_cfb8 +_libre_EVP_aes_256_cfb128 +_libre_EVP_aes_256_ofb +_libre_EVP_aes_256_ctr +_libre_EVP_aes_256_ccm +_libre_EVP_aes_256_gcm +_libre_EVP_aes_256_wrap +_libre_EVP_aes_256_xts +_libre_EVP_chacha20_poly1305 +_libre_EVP_camellia_128_ecb +_libre_EVP_camellia_128_cbc +_libre_EVP_camellia_128_cfb1 +_libre_EVP_camellia_128_cfb8 +_libre_EVP_camellia_128_cfb128 +_libre_EVP_camellia_128_ofb +_libre_EVP_camellia_192_ecb +_libre_EVP_camellia_192_cbc +_libre_EVP_camellia_192_cfb1 +_libre_EVP_camellia_192_cfb8 +_libre_EVP_camellia_192_cfb128 +_libre_EVP_camellia_192_ofb +_libre_EVP_camellia_256_ecb +_libre_EVP_camellia_256_cbc +_libre_EVP_camellia_256_cfb1 +_libre_EVP_camellia_256_cfb8 +_libre_EVP_camellia_256_cfb128 +_libre_EVP_camellia_256_ofb +_libre_EVP_chacha20 +_libre_EVP_sm4_ecb +_libre_EVP_sm4_cbc +_libre_EVP_sm4_cfb128 +_libre_EVP_sm4_ofb +_libre_EVP_sm4_ctr +_libre_OPENSSL_add_all_algorithms_noconf +_libre_OPENSSL_add_all_algorithms_conf +_libre_OpenSSL_add_all_ciphers +_libre_OpenSSL_add_all_digests +_libre_EVP_get_cipherbyname +_libre_EVP_get_digestbyname +_libre_EVP_cleanup +_libre_EVP_CIPHER_do_all +_libre_EVP_CIPHER_do_all_sorted +_libre_EVP_MD_do_all +_libre_EVP_MD_do_all_sorted +_libre_EVP_PKEY_decrypt_old +_libre_EVP_PKEY_encrypt_old +_libre_EVP_PKEY_type +_libre_EVP_PKEY_id +_libre_EVP_PKEY_base_id +_libre_EVP_PKEY_bits +_libre_EVP_PKEY_security_bits +_libre_EVP_PKEY_size +_libre_EVP_PKEY_set_type +_libre_EVP_PKEY_set_type_str +_libre_EVP_PKEY_assign +_libre_EVP_PKEY_get0 +_libre_EVP_PKEY_get0_hmac +_libre_EVP_PKEY_get0_RSA +_libre_EVP_PKEY_get1_RSA +_libre_EVP_PKEY_set1_RSA +_libre_EVP_PKEY_get0_DSA +_libre_EVP_PKEY_get1_DSA +_libre_EVP_PKEY_set1_DSA +_libre_EVP_PKEY_get0_DH +_libre_EVP_PKEY_get1_DH +_libre_EVP_PKEY_set1_DH +_libre_EVP_PKEY_get0_EC_KEY +_libre_EVP_PKEY_get1_EC_KEY +_libre_EVP_PKEY_set1_EC_KEY +_libre_EVP_PKEY_new +_libre_EVP_PKEY_free +_libre_EVP_PKEY_up_ref +_libre_d2i_PublicKey +_libre_i2d_PublicKey +_libre_d2i_PrivateKey +_libre_d2i_AutoPrivateKey +_libre_i2d_PrivateKey +_libre_EVP_PKEY_copy_parameters +_libre_EVP_PKEY_missing_parameters +_libre_EVP_PKEY_save_parameters +_libre_EVP_PKEY_cmp_parameters +_libre_EVP_PKEY_cmp +_libre_EVP_PKEY_print_public +_libre_EVP_PKEY_print_private +_libre_EVP_PKEY_print_params +_libre_EVP_PKEY_get_default_digest_nid +_libre_EVP_CIPHER_type +_libre_PKCS5_PBKDF2_HMAC_SHA1 +_libre_PKCS5_PBKDF2_HMAC +_libre_EVP_PKEY_asn1_get_count +_libre_EVP_PKEY_asn1_get0 +_libre_EVP_PKEY_asn1_find +_libre_EVP_PKEY_asn1_find_str +_libre_EVP_PKEY_asn1_get0_info +_libre_EVP_PKEY_get0_asn1 +_libre_EVP_PKEY_CTX_new +_libre_EVP_PKEY_CTX_new_id +_libre_EVP_PKEY_CTX_dup +_libre_EVP_PKEY_CTX_free +_libre_EVP_PKEY_CTX_ctrl +_libre_EVP_PKEY_CTX_ctrl_str +_libre_EVP_PKEY_CTX_get_operation +_libre_EVP_PKEY_CTX_set0_keygen_info +_libre_EVP_PKEY_new_mac_key +_libre_EVP_PKEY_new_CMAC_key +_libre_EVP_PKEY_CTX_set_data +_libre_EVP_PKEY_CTX_get_data +_libre_EVP_PKEY_CTX_get0_pkey +_libre_EVP_PKEY_CTX_get0_peerkey +_libre_EVP_PKEY_CTX_set_app_data +_libre_EVP_PKEY_CTX_get_app_data +_libre_EVP_PKEY_sign_init +_libre_EVP_PKEY_sign +_libre_EVP_PKEY_verify_init +_libre_EVP_PKEY_verify +_libre_EVP_PKEY_verify_recover_init +_libre_EVP_PKEY_verify_recover +_libre_EVP_PKEY_encrypt_init +_libre_EVP_PKEY_encrypt +_libre_EVP_PKEY_decrypt_init +_libre_EVP_PKEY_decrypt +_libre_EVP_PKEY_derive_init +_libre_EVP_PKEY_derive_set_peer +_libre_EVP_PKEY_derive +_libre_EVP_PKEY_paramgen_init +_libre_EVP_PKEY_paramgen +_libre_EVP_PKEY_keygen_init +_libre_EVP_PKEY_keygen +_libre_EVP_PKEY_check +_libre_EVP_PKEY_public_check +_libre_EVP_PKEY_param_check +_libre_EVP_PKEY_CTX_set_cb +_libre_EVP_PKEY_CTX_get_cb +_libre_EVP_PKEY_CTX_get_keygen_info +_libre_EVP_aead_aes_128_gcm +_libre_EVP_aead_aes_256_gcm +_libre_EVP_aead_chacha20_poly1305 +_libre_EVP_aead_xchacha20_poly1305 +_libre_EVP_AEAD_key_length +_libre_EVP_AEAD_nonce_length +_libre_EVP_AEAD_max_overhead +_libre_EVP_AEAD_max_tag_len +_libre_EVP_AEAD_CTX_new +_libre_EVP_AEAD_CTX_free +_libre_EVP_AEAD_CTX_init +_libre_EVP_AEAD_CTX_cleanup +_libre_EVP_AEAD_CTX_seal +_libre_EVP_AEAD_CTX_open +_libre_ERR_load_EVP_strings diff --git a/lib/libcrypto/asn1/a_pkey.c b/lib/libcrypto/asn1/a_pkey.c index 1e8ebc913fc..a7307280762 100644 --- a/lib/libcrypto/asn1/a_pkey.c +++ b/lib/libcrypto/asn1/a_pkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: a_pkey.c,v 1.7 2023/11/19 15:46:09 tb Exp $ */ +/* $OpenBSD: a_pkey.c,v 1.8 2024/04/09 13:52:41 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -115,6 +115,7 @@ d2i_PrivateKey(int type, EVP_PKEY **a, const unsigned char **pp, long length) EVP_PKEY_free(ret); return (NULL); } +LCRYPTO_ALIAS(d2i_PrivateKey); int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp) @@ -131,6 +132,7 @@ i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp) ASN1error(ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE); return (-1); } +LCRYPTO_ALIAS(i2d_PrivateKey); /* This works like d2i_PrivateKey() except it automatically works out the type */ @@ -176,3 +178,4 @@ d2i_AutoPrivateKey(EVP_PKEY **a, const unsigned char **pp, long length) sk_ASN1_TYPE_pop_free(inkey, ASN1_TYPE_free); return d2i_PrivateKey(keytype, a, pp, length); } +LCRYPTO_ALIAS(d2i_AutoPrivateKey); diff --git a/lib/libcrypto/asn1/a_pubkey.c b/lib/libcrypto/asn1/a_pubkey.c index 5e022d34ec4..544f3d2cf05 100644 --- a/lib/libcrypto/asn1/a_pubkey.c +++ b/lib/libcrypto/asn1/a_pubkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: a_pubkey.c,v 1.6 2023/07/07 19:37:52 beck Exp $ */ +/* $OpenBSD: a_pubkey.c,v 1.7 2024/04/09 13:52:41 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -136,6 +136,7 @@ d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp, long length) EVP_PKEY_free(ret); return (NULL); } +LCRYPTO_ALIAS(d2i_PublicKey); int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp) @@ -158,3 +159,4 @@ i2d_PublicKey(EVP_PKEY *a, unsigned char **pp) return (-1); } } +LCRYPTO_ALIAS(i2d_PublicKey); diff --git a/lib/libcrypto/crypto_init.c b/lib/libcrypto/crypto_init.c index ddd3ec19bc3..45210366395 100644 --- a/lib/libcrypto/crypto_init.c +++ b/lib/libcrypto/crypto_init.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crypto_init.c,v 1.19 2024/03/19 19:27:33 tb Exp $ */ +/* $OpenBSD: crypto_init.c,v 1.20 2024/04/09 13:52:41 beck Exp $ */ /* * Copyright (c) 2018 Bob Beck * @@ -98,19 +98,23 @@ void OpenSSL_add_all_ciphers(void) { } +LCRYPTO_ALIAS(OpenSSL_add_all_ciphers); void OpenSSL_add_all_digests(void) { } +LCRYPTO_ALIAS(OpenSSL_add_all_digests); void OPENSSL_add_all_algorithms_noconf(void) { } +LCRYPTO_ALIAS(OPENSSL_add_all_algorithms_noconf); void OPENSSL_add_all_algorithms_conf(void) { OPENSSL_config(NULL); } +LCRYPTO_ALIAS(OPENSSL_add_all_algorithms_conf); diff --git a/lib/libcrypto/evp/bio_b64.c b/lib/libcrypto/evp/bio_b64.c index 3c47628f544..32cd1f06dfa 100644 --- a/lib/libcrypto/evp/bio_b64.c +++ b/lib/libcrypto/evp/bio_b64.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bio_b64.c,v 1.28 2023/07/07 19:37:53 beck Exp $ */ +/* $OpenBSD: bio_b64.c,v 1.29 2024/04/09 13:52:41 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -111,6 +111,7 @@ BIO_f_base64(void) { return (&methods_b64); } +LCRYPTO_ALIAS(BIO_f_base64); static int b64_new(BIO *bi) diff --git a/lib/libcrypto/evp/bio_enc.c b/lib/libcrypto/evp/bio_enc.c index f9a95f53eca..62712830a82 100644 --- a/lib/libcrypto/evp/bio_enc.c +++ b/lib/libcrypto/evp/bio_enc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bio_enc.c,v 1.31 2024/03/25 04:05:22 joshua Exp $ */ +/* $OpenBSD: bio_enc.c,v 1.32 2024/04/09 13:52:41 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -107,6 +107,7 @@ BIO_f_cipher(void) { return (&methods_enc); } +LCRYPTO_ALIAS(BIO_f_cipher); static void bio_enc_ctx_free(BIO_ENC_CTX *ctx) @@ -426,3 +427,4 @@ BIO_set_cipher(BIO *b, const EVP_CIPHER *c, const unsigned char *k, return 1; } +LCRYPTO_ALIAS(BIO_set_cipher); diff --git a/lib/libcrypto/evp/bio_md.c b/lib/libcrypto/evp/bio_md.c index ccfcd1ea1d0..420192d23cf 100644 --- a/lib/libcrypto/evp/bio_md.c +++ b/lib/libcrypto/evp/bio_md.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bio_md.c,v 1.21 2023/07/07 19:37:53 beck Exp $ */ +/* $OpenBSD: bio_md.c,v 1.22 2024/04/09 13:52:41 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -94,6 +94,7 @@ BIO_f_md(void) { return (&methods_md); } +LCRYPTO_ALIAS(BIO_f_md); static int md_new(BIO *bi) diff --git a/lib/libcrypto/evp/e_aes.c b/lib/libcrypto/evp/e_aes.c index 1102b21c159..6135c7d84aa 100644 --- a/lib/libcrypto/evp/e_aes.c +++ b/lib/libcrypto/evp/e_aes.c @@ -1,4 +1,4 @@ -/* $OpenBSD: e_aes.c,v 1.57 2024/04/09 13:48:51 beck Exp $ */ +/* $OpenBSD: e_aes.c,v 1.58 2024/04/09 13:52:41 beck Exp $ */ /* ==================================================================== * Copyright (c) 2001-2011 The OpenSSL Project. All rights reserved. * @@ -572,6 +572,7 @@ EVP_aes_128_cbc(void) return &aes_128_cbc; #endif } +LCRYPTO_ALIAS(EVP_aes_128_cbc); #ifdef AESNI_CAPABLE static const EVP_CIPHER aesni_128_ecb = { @@ -606,6 +607,7 @@ EVP_aes_128_ecb(void) return &aes_128_ecb; #endif } +LCRYPTO_ALIAS(EVP_aes_128_ecb); #ifdef AESNI_CAPABLE static const EVP_CIPHER aesni_128_ofb = { @@ -640,6 +642,7 @@ EVP_aes_128_ofb(void) return &aes_128_ofb; #endif } +LCRYPTO_ALIAS(EVP_aes_128_ofb); #ifdef AESNI_CAPABLE static const EVP_CIPHER aesni_128_cfb = { @@ -674,6 +677,7 @@ EVP_aes_128_cfb128(void) return &aes_128_cfb; #endif } +LCRYPTO_ALIAS(EVP_aes_128_cfb128); #ifdef AESNI_CAPABLE static const EVP_CIPHER aesni_128_cfb1 = { @@ -708,6 +712,7 @@ EVP_aes_128_cfb1(void) return &aes_128_cfb1; #endif } +LCRYPTO_ALIAS(EVP_aes_128_cfb1); #ifdef AESNI_CAPABLE static const EVP_CIPHER aesni_128_cfb8 = { @@ -742,6 +747,7 @@ EVP_aes_128_cfb8(void) return &aes_128_cfb8; #endif } +LCRYPTO_ALIAS(EVP_aes_128_cfb8); #ifdef AESNI_CAPABLE static const EVP_CIPHER aesni_128_ctr = { @@ -776,6 +782,7 @@ EVP_aes_128_ctr(void) return &aes_128_ctr; #endif } +LCRYPTO_ALIAS(EVP_aes_128_ctr); #ifdef AESNI_CAPABLE @@ -811,6 +818,7 @@ EVP_aes_192_cbc(void) return &aes_192_cbc; #endif } +LCRYPTO_ALIAS(EVP_aes_192_cbc); #ifdef AESNI_CAPABLE static const EVP_CIPHER aesni_192_ecb = { @@ -845,6 +853,7 @@ EVP_aes_192_ecb(void) return &aes_192_ecb; #endif } +LCRYPTO_ALIAS(EVP_aes_192_ecb); #ifdef AESNI_CAPABLE static const EVP_CIPHER aesni_192_ofb = { @@ -879,6 +888,7 @@ EVP_aes_192_ofb(void) return &aes_192_ofb; #endif } +LCRYPTO_ALIAS(EVP_aes_192_ofb); #ifdef AESNI_CAPABLE static const EVP_CIPHER aesni_192_cfb = { @@ -913,6 +923,7 @@ EVP_aes_192_cfb128(void) return &aes_192_cfb; #endif } +LCRYPTO_ALIAS(EVP_aes_192_cfb128); #ifdef AESNI_CAPABLE static const EVP_CIPHER aesni_192_cfb1 = { @@ -947,6 +958,7 @@ EVP_aes_192_cfb1(void) return &aes_192_cfb1; #endif } +LCRYPTO_ALIAS(EVP_aes_192_cfb1); #ifdef AESNI_CAPABLE static const EVP_CIPHER aesni_192_cfb8 = { @@ -981,6 +993,7 @@ EVP_aes_192_cfb8(void) return &aes_192_cfb8; #endif } +LCRYPTO_ALIAS(EVP_aes_192_cfb8); #ifdef AESNI_CAPABLE static const EVP_CIPHER aesni_192_ctr = { @@ -1015,6 +1028,7 @@ EVP_aes_192_ctr(void) return &aes_192_ctr; #endif } +LCRYPTO_ALIAS(EVP_aes_192_ctr); #ifdef AESNI_CAPABLE @@ -1050,6 +1064,7 @@ EVP_aes_256_cbc(void) return &aes_256_cbc; #endif } +LCRYPTO_ALIAS(EVP_aes_256_cbc); #ifdef AESNI_CAPABLE static const EVP_CIPHER aesni_256_ecb = { @@ -1084,6 +1099,7 @@ EVP_aes_256_ecb(void) return &aes_256_ecb; #endif } +LCRYPTO_ALIAS(EVP_aes_256_ecb); #ifdef AESNI_CAPABLE static const EVP_CIPHER aesni_256_ofb = { @@ -1118,6 +1134,7 @@ EVP_aes_256_ofb(void) return &aes_256_ofb; #endif } +LCRYPTO_ALIAS(EVP_aes_256_ofb); #ifdef AESNI_CAPABLE static const EVP_CIPHER aesni_256_cfb = { @@ -1152,6 +1169,7 @@ EVP_aes_256_cfb128(void) return &aes_256_cfb; #endif } +LCRYPTO_ALIAS(EVP_aes_256_cfb128); #ifdef AESNI_CAPABLE static const EVP_CIPHER aesni_256_cfb1 = { @@ -1186,6 +1204,7 @@ EVP_aes_256_cfb1(void) return &aes_256_cfb1; #endif } +LCRYPTO_ALIAS(EVP_aes_256_cfb1); #ifdef AESNI_CAPABLE static const EVP_CIPHER aesni_256_cfb8 = { @@ -1220,6 +1239,7 @@ EVP_aes_256_cfb8(void) return &aes_256_cfb8; #endif } +LCRYPTO_ALIAS(EVP_aes_256_cfb8); #ifdef AESNI_CAPABLE static const EVP_CIPHER aesni_256_ctr = { @@ -1254,6 +1274,7 @@ EVP_aes_256_ctr(void) return &aes_256_ctr; #endif } +LCRYPTO_ALIAS(EVP_aes_256_ctr); static int aes_gcm_cleanup(EVP_CIPHER_CTX *c) @@ -1677,6 +1698,7 @@ EVP_aes_128_gcm(void) return &aes_128_gcm; #endif } +LCRYPTO_ALIAS(EVP_aes_128_gcm); #ifdef AESNI_CAPABLE static const EVP_CIPHER aesni_192_gcm = { @@ -1715,6 +1737,7 @@ EVP_aes_192_gcm(void) return &aes_192_gcm; #endif } +LCRYPTO_ALIAS(EVP_aes_192_gcm); #ifdef AESNI_CAPABLE static const EVP_CIPHER aesni_256_gcm = { @@ -1753,6 +1776,7 @@ EVP_aes_256_gcm(void) return &aes_256_gcm; #endif } +LCRYPTO_ALIAS(EVP_aes_256_gcm); static int aes_xts_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) @@ -1919,6 +1943,7 @@ EVP_aes_128_xts(void) return &aes_128_xts; #endif } +LCRYPTO_ALIAS(EVP_aes_128_xts); #ifdef AESNI_CAPABLE static const EVP_CIPHER aesni_256_xts = { @@ -1957,6 +1982,7 @@ EVP_aes_256_xts(void) return &aes_256_xts; #endif } +LCRYPTO_ALIAS(EVP_aes_256_xts); static int aes_ccm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) @@ -2157,6 +2183,7 @@ EVP_aes_128_ccm(void) return &aes_128_ccm; #endif } +LCRYPTO_ALIAS(EVP_aes_128_ccm); #ifdef AESNI_CAPABLE static const EVP_CIPHER aesni_192_ccm = { @@ -2195,6 +2222,7 @@ EVP_aes_192_ccm(void) return &aes_192_ccm; #endif } +LCRYPTO_ALIAS(EVP_aes_192_ccm); #ifdef AESNI_CAPABLE static const EVP_CIPHER aesni_256_ccm = { @@ -2233,6 +2261,7 @@ EVP_aes_256_ccm(void) return &aes_256_ccm; #endif } +LCRYPTO_ALIAS(EVP_aes_256_ccm); #define EVP_AEAD_AES_GCM_TAG_LEN 16 @@ -2423,12 +2452,14 @@ EVP_aead_aes_128_gcm(void) { return &aead_aes_128_gcm; } +LCRYPTO_ALIAS(EVP_aead_aes_128_gcm); const EVP_AEAD * EVP_aead_aes_256_gcm(void) { return &aead_aes_256_gcm; } +LCRYPTO_ALIAS(EVP_aead_aes_256_gcm); typedef struct { union { @@ -2557,6 +2588,7 @@ EVP_aes_128_wrap(void) { return &aes_128_wrap; } +LCRYPTO_ALIAS(EVP_aes_128_wrap); static const EVP_CIPHER aes_192_wrap = { .nid = NID_id_aes192_wrap, @@ -2578,6 +2610,7 @@ EVP_aes_192_wrap(void) { return &aes_192_wrap; } +LCRYPTO_ALIAS(EVP_aes_192_wrap); static const EVP_CIPHER aes_256_wrap = { .nid = NID_id_aes256_wrap, @@ -2599,5 +2632,6 @@ EVP_aes_256_wrap(void) { return &aes_256_wrap; } +LCRYPTO_ALIAS(EVP_aes_256_wrap); #endif diff --git a/lib/libcrypto/evp/e_bf.c b/lib/libcrypto/evp/e_bf.c index 90a589c6081..4f3799975bd 100644 --- a/lib/libcrypto/evp/e_bf.c +++ b/lib/libcrypto/evp/e_bf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: e_bf.c,v 1.18 2024/01/04 17:38:36 tb Exp $ */ +/* $OpenBSD: e_bf.c,v 1.19 2024/04/09 13:52:41 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -177,6 +177,7 @@ EVP_bf_cbc(void) { return &bf_cbc; } +LCRYPTO_ALIAS(EVP_bf_cbc); static const EVP_CIPHER bf_cfb64 = { .nid = NID_bf_cfb64, @@ -198,6 +199,7 @@ EVP_bf_cfb64(void) { return &bf_cfb64; } +LCRYPTO_ALIAS(EVP_bf_cfb64); static const EVP_CIPHER bf_ofb = { .nid = NID_bf_ofb64, @@ -219,6 +221,7 @@ EVP_bf_ofb(void) { return &bf_ofb; } +LCRYPTO_ALIAS(EVP_bf_ofb); static const EVP_CIPHER bf_ecb = { .nid = NID_bf_ecb, @@ -240,4 +243,5 @@ EVP_bf_ecb(void) { return &bf_ecb; } +LCRYPTO_ALIAS(EVP_bf_ecb); #endif diff --git a/lib/libcrypto/evp/e_camellia.c b/lib/libcrypto/evp/e_camellia.c index 6d9bedbbcde..55dcc799226 100644 --- a/lib/libcrypto/evp/e_camellia.c +++ b/lib/libcrypto/evp/e_camellia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: e_camellia.c,v 1.19 2024/01/04 17:38:36 tb Exp $ */ +/* $OpenBSD: e_camellia.c,v 1.20 2024/04/09 13:52:41 beck Exp $ */ /* ==================================================================== * Copyright (c) 2006 The OpenSSL Project. All rights reserved. * @@ -178,6 +178,7 @@ EVP_camellia_128_cbc(void) { return &camellia_128_cbc; } +LCRYPTO_ALIAS(EVP_camellia_128_cbc); static const EVP_CIPHER camellia_128_cfb128 = { .nid = NID_camellia_128_cfb128, @@ -199,6 +200,7 @@ EVP_camellia_128_cfb128(void) { return &camellia_128_cfb128; } +LCRYPTO_ALIAS(EVP_camellia_128_cfb128); static const EVP_CIPHER camellia_128_ofb = { .nid = NID_camellia_128_ofb128, @@ -220,6 +222,7 @@ EVP_camellia_128_ofb(void) { return &camellia_128_ofb; } +LCRYPTO_ALIAS(EVP_camellia_128_ofb); static const EVP_CIPHER camellia_128_ecb = { .nid = NID_camellia_128_ecb, @@ -241,6 +244,7 @@ EVP_camellia_128_ecb(void) { return &camellia_128_ecb; } +LCRYPTO_ALIAS(EVP_camellia_128_ecb); static int camellia_192_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) @@ -332,6 +336,7 @@ EVP_camellia_192_cbc(void) { return &camellia_192_cbc; } +LCRYPTO_ALIAS(EVP_camellia_192_cbc); static const EVP_CIPHER camellia_192_cfb128 = { .nid = NID_camellia_192_cfb128, @@ -353,6 +358,7 @@ EVP_camellia_192_cfb128(void) { return &camellia_192_cfb128; } +LCRYPTO_ALIAS(EVP_camellia_192_cfb128); static const EVP_CIPHER camellia_192_ofb = { .nid = NID_camellia_192_ofb128, @@ -374,6 +380,7 @@ EVP_camellia_192_ofb(void) { return &camellia_192_ofb; } +LCRYPTO_ALIAS(EVP_camellia_192_ofb); static const EVP_CIPHER camellia_192_ecb = { .nid = NID_camellia_192_ecb, @@ -395,6 +402,7 @@ EVP_camellia_192_ecb(void) { return &camellia_192_ecb; } +LCRYPTO_ALIAS(EVP_camellia_192_ecb); static int camellia_256_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) @@ -486,6 +494,7 @@ EVP_camellia_256_cbc(void) { return &camellia_256_cbc; } +LCRYPTO_ALIAS(EVP_camellia_256_cbc); static const EVP_CIPHER camellia_256_cfb128 = { .nid = NID_camellia_256_cfb128, @@ -507,6 +516,7 @@ EVP_camellia_256_cfb128(void) { return &camellia_256_cfb128; } +LCRYPTO_ALIAS(EVP_camellia_256_cfb128); static const EVP_CIPHER camellia_256_ofb = { .nid = NID_camellia_256_ofb128, @@ -528,6 +538,7 @@ EVP_camellia_256_ofb(void) { return &camellia_256_ofb; } +LCRYPTO_ALIAS(EVP_camellia_256_ofb); static const EVP_CIPHER camellia_256_ecb = { .nid = NID_camellia_256_ecb, @@ -549,6 +560,7 @@ EVP_camellia_256_ecb(void) { return &camellia_256_ecb; } +LCRYPTO_ALIAS(EVP_camellia_256_ecb); static int camellia_128_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) @@ -592,6 +604,7 @@ EVP_camellia_128_cfb1(void) { return &camellia_128_cfb1; } +LCRYPTO_ALIAS(EVP_camellia_128_cfb1); static int camellia_192_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) @@ -635,6 +648,7 @@ EVP_camellia_192_cfb1(void) { return &camellia_192_cfb1; } +LCRYPTO_ALIAS(EVP_camellia_192_cfb1); static int camellia_256_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) @@ -678,6 +692,7 @@ EVP_camellia_256_cfb1(void) { return &camellia_256_cfb1; } +LCRYPTO_ALIAS(EVP_camellia_256_cfb1); static int @@ -720,6 +735,7 @@ EVP_camellia_128_cfb8(void) { return &camellia_128_cfb8; } +LCRYPTO_ALIAS(EVP_camellia_128_cfb8); static int camellia_192_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) @@ -761,6 +777,7 @@ EVP_camellia_192_cfb8(void) { return &camellia_192_cfb8; } +LCRYPTO_ALIAS(EVP_camellia_192_cfb8); static int camellia_256_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) @@ -802,4 +819,5 @@ EVP_camellia_256_cfb8(void) { return &camellia_256_cfb8; } +LCRYPTO_ALIAS(EVP_camellia_256_cfb8); #endif diff --git a/lib/libcrypto/evp/e_cast.c b/lib/libcrypto/evp/e_cast.c index 5c3e5048356..1575a7a5bba 100644 --- a/lib/libcrypto/evp/e_cast.c +++ b/lib/libcrypto/evp/e_cast.c @@ -1,4 +1,4 @@ -/* $OpenBSD: e_cast.c,v 1.17 2024/01/04 17:38:36 tb Exp $ */ +/* $OpenBSD: e_cast.c,v 1.18 2024/04/09 13:52:41 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -177,6 +177,7 @@ EVP_cast5_cbc(void) { return &cast5_cbc; } +LCRYPTO_ALIAS(EVP_cast5_cbc); static const EVP_CIPHER cast5_cfb64 = { .nid = NID_cast5_cfb64, @@ -198,6 +199,7 @@ EVP_cast5_cfb64(void) { return &cast5_cfb64; } +LCRYPTO_ALIAS(EVP_cast5_cfb64); static const EVP_CIPHER cast5_ofb = { .nid = NID_cast5_ofb64, @@ -219,6 +221,7 @@ EVP_cast5_ofb(void) { return &cast5_ofb; } +LCRYPTO_ALIAS(EVP_cast5_ofb); static const EVP_CIPHER cast5_ecb = { .nid = NID_cast5_ecb, @@ -240,4 +243,5 @@ EVP_cast5_ecb(void) { return &cast5_ecb; } +LCRYPTO_ALIAS(EVP_cast5_ecb); #endif diff --git a/lib/libcrypto/evp/e_chacha.c b/lib/libcrypto/evp/e_chacha.c index 5cd03c7c8df..4c801b39209 100644 --- a/lib/libcrypto/evp/e_chacha.c +++ b/lib/libcrypto/evp/e_chacha.c @@ -1,4 +1,4 @@ -/* $OpenBSD: e_chacha.c,v 1.13 2023/08/24 04:20:57 tb Exp $ */ +/* $OpenBSD: e_chacha.c,v 1.14 2024/04/09 13:52:41 beck Exp $ */ /* * Copyright (c) 2014 Joel Sing * @@ -72,5 +72,6 @@ EVP_chacha20(void) { return (&chacha20_cipher); } +LCRYPTO_ALIAS(EVP_chacha20); #endif diff --git a/lib/libcrypto/evp/e_chacha20poly1305.c b/lib/libcrypto/evp/e_chacha20poly1305.c index 796824aeeb8..cc2e0157e68 100644 --- a/lib/libcrypto/evp/e_chacha20poly1305.c +++ b/lib/libcrypto/evp/e_chacha20poly1305.c @@ -1,4 +1,4 @@ -/* $OpenBSD: e_chacha20poly1305.c,v 1.34 2023/12/30 18:24:09 tb Exp $ */ +/* $OpenBSD: e_chacha20poly1305.c,v 1.35 2024/04/09 13:52:41 beck Exp $ */ /* * Copyright (c) 2022 Joel Sing @@ -349,6 +349,7 @@ EVP_aead_chacha20_poly1305(void) { return &aead_chacha20_poly1305; } +LCRYPTO_ALIAS(EVP_aead_chacha20_poly1305); static const EVP_AEAD aead_xchacha20_poly1305 = { .key_len = 32, @@ -367,6 +368,7 @@ EVP_aead_xchacha20_poly1305(void) { return &aead_xchacha20_poly1305; } +LCRYPTO_ALIAS(EVP_aead_xchacha20_poly1305); struct chacha20_poly1305_ctx { ChaCha_ctx chacha; @@ -614,5 +616,6 @@ EVP_chacha20_poly1305(void) { return &cipher_chacha20_poly1305; } +LCRYPTO_ALIAS(EVP_chacha20_poly1305); #endif /* !OPENSSL_NO_CHACHA && !OPENSSL_NO_POLY1305 */ diff --git a/lib/libcrypto/evp/e_des.c b/lib/libcrypto/evp/e_des.c index 7a0b24c1abe..fb335e95b19 100644 --- a/lib/libcrypto/evp/e_des.c +++ b/lib/libcrypto/evp/e_des.c @@ -1,4 +1,4 @@ -/* $OpenBSD: e_des.c,v 1.23 2024/01/04 17:38:36 tb Exp $ */ +/* $OpenBSD: e_des.c,v 1.24 2024/04/09 13:52:41 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -241,6 +241,7 @@ EVP_des_cbc(void) { return &des_cbc; } +LCRYPTO_ALIAS(EVP_des_cbc); static const EVP_CIPHER des_cfb64 = { .nid = NID_des_cfb64, @@ -262,6 +263,7 @@ EVP_des_cfb64(void) { return &des_cfb64; } +LCRYPTO_ALIAS(EVP_des_cfb64); static const EVP_CIPHER des_ofb = { .nid = NID_des_ofb64, @@ -283,6 +285,7 @@ EVP_des_ofb(void) { return &des_ofb; } +LCRYPTO_ALIAS(EVP_des_ofb); static const EVP_CIPHER des_ecb = { .nid = NID_des_ecb, @@ -304,6 +307,7 @@ EVP_des_ecb(void) { return &des_ecb; } +LCRYPTO_ALIAS(EVP_des_ecb); static const EVP_CIPHER des_cfb1 = { .nid = NID_des_cfb1, @@ -325,6 +329,7 @@ EVP_des_cfb1(void) { return &des_cfb1; } +LCRYPTO_ALIAS(EVP_des_cfb1); static const EVP_CIPHER des_cfb8 = { .nid = NID_des_cfb8, @@ -346,4 +351,5 @@ EVP_des_cfb8(void) { return &des_cfb8; } +LCRYPTO_ALIAS(EVP_des_cfb8); #endif diff --git a/lib/libcrypto/evp/e_des3.c b/lib/libcrypto/evp/e_des3.c index f283be29126..48fbcdb366b 100644 --- a/lib/libcrypto/evp/e_des3.c +++ b/lib/libcrypto/evp/e_des3.c @@ -1,4 +1,4 @@ -/* $OpenBSD: e_des3.c,v 1.29 2024/01/04 17:38:36 tb Exp $ */ +/* $OpenBSD: e_des3.c,v 1.30 2024/04/09 13:52:41 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -273,6 +273,7 @@ EVP_des_ede_cbc(void) { return &des_ede_cbc; } +LCRYPTO_ALIAS(EVP_des_ede_cbc); static const EVP_CIPHER des_ede_cfb64 = { .nid = NID_des_ede_cfb64, @@ -294,6 +295,7 @@ EVP_des_ede_cfb64(void) { return &des_ede_cfb64; } +LCRYPTO_ALIAS(EVP_des_ede_cfb64); static const EVP_CIPHER des_ede_ofb = { .nid = NID_des_ede_ofb64, @@ -315,6 +317,7 @@ EVP_des_ede_ofb(void) { return &des_ede_ofb; } +LCRYPTO_ALIAS(EVP_des_ede_ofb); static const EVP_CIPHER des_ede_ecb = { .nid = NID_des_ede_ecb, @@ -336,6 +339,7 @@ EVP_des_ede_ecb(void) { return &des_ede_ecb; } +LCRYPTO_ALIAS(EVP_des_ede_ecb); #define des_ede3_cfb64_cipher des_ede_cfb64_cipher @@ -363,6 +367,7 @@ EVP_des_ede3_cbc(void) { return &des_ede3_cbc; } +LCRYPTO_ALIAS(EVP_des_ede3_cbc); static const EVP_CIPHER des_ede3_cfb64 = { .nid = NID_des_ede3_cfb64, @@ -384,6 +389,7 @@ EVP_des_ede3_cfb64(void) { return &des_ede3_cfb64; } +LCRYPTO_ALIAS(EVP_des_ede3_cfb64); static const EVP_CIPHER des_ede3_ofb = { .nid = NID_des_ede3_ofb64, @@ -405,6 +411,7 @@ EVP_des_ede3_ofb(void) { return &des_ede3_ofb; } +LCRYPTO_ALIAS(EVP_des_ede3_ofb); static const EVP_CIPHER des_ede3_ecb = { .nid = NID_des_ede3_ecb, @@ -426,6 +433,7 @@ EVP_des_ede3_ecb(void) { return &des_ede3_ecb; } +LCRYPTO_ALIAS(EVP_des_ede3_ecb); static const EVP_CIPHER des_ede3_cfb1 = { @@ -448,6 +456,7 @@ EVP_des_ede3_cfb1(void) { return &des_ede3_cfb1; } +LCRYPTO_ALIAS(EVP_des_ede3_cfb1); static const EVP_CIPHER des_ede3_cfb8 = { @@ -470,16 +479,19 @@ EVP_des_ede3_cfb8(void) { return &des_ede3_cfb8; } +LCRYPTO_ALIAS(EVP_des_ede3_cfb8); const EVP_CIPHER * EVP_des_ede(void) { return &des_ede_ecb; } +LCRYPTO_ALIAS(EVP_des_ede); const EVP_CIPHER * EVP_des_ede3(void) { return &des_ede3_ecb; } +LCRYPTO_ALIAS(EVP_des_ede3); #endif diff --git a/lib/libcrypto/evp/e_idea.c b/lib/libcrypto/evp/e_idea.c index 025a1f50874..86cf77602a4 100644 --- a/lib/libcrypto/evp/e_idea.c +++ b/lib/libcrypto/evp/e_idea.c @@ -1,4 +1,4 @@ -/* $OpenBSD: e_idea.c,v 1.21 2024/01/04 17:38:36 tb Exp $ */ +/* $OpenBSD: e_idea.c,v 1.22 2024/04/09 13:52:41 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -196,6 +196,7 @@ EVP_idea_cbc(void) { return &idea_cbc; } +LCRYPTO_ALIAS(EVP_idea_cbc); static const EVP_CIPHER idea_cfb64 = { .nid = NID_idea_cfb64, @@ -217,6 +218,7 @@ EVP_idea_cfb64(void) { return &idea_cfb64; } +LCRYPTO_ALIAS(EVP_idea_cfb64); static const EVP_CIPHER idea_ofb = { .nid = NID_idea_ofb64, @@ -238,6 +240,7 @@ EVP_idea_ofb(void) { return &idea_ofb; } +LCRYPTO_ALIAS(EVP_idea_ofb); static const EVP_CIPHER idea_ecb = { .nid = NID_idea_ecb, @@ -259,4 +262,5 @@ EVP_idea_ecb(void) { return &idea_ecb; } +LCRYPTO_ALIAS(EVP_idea_ecb); #endif diff --git a/lib/libcrypto/evp/e_null.c b/lib/libcrypto/evp/e_null.c index be46c1ccacc..bcb8a1e5608 100644 --- a/lib/libcrypto/evp/e_null.c +++ b/lib/libcrypto/evp/e_null.c @@ -1,4 +1,4 @@ -/* $OpenBSD: e_null.c,v 1.20 2024/01/07 15:42:57 tb Exp $ */ +/* $OpenBSD: e_null.c,v 1.21 2024/04/09 13:52:41 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -89,6 +89,7 @@ EVP_enc_null(void) { return (&n_cipher); } +LCRYPTO_ALIAS(EVP_enc_null); static int null_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, diff --git a/lib/libcrypto/evp/e_rc2.c b/lib/libcrypto/evp/e_rc2.c index 25caef6e3ae..dc404cff209 100644 --- a/lib/libcrypto/evp/e_rc2.c +++ b/lib/libcrypto/evp/e_rc2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: e_rc2.c,v 1.28 2024/03/26 06:58:21 tb Exp $ */ +/* $OpenBSD: e_rc2.c,v 1.29 2024/04/09 13:52:41 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -179,6 +179,7 @@ EVP_rc2_cbc(void) { return &rc2_cbc; } +LCRYPTO_ALIAS(EVP_rc2_cbc); static const EVP_CIPHER rc2_cfb64 = { .nid = NID_rc2_cfb64, @@ -200,6 +201,7 @@ EVP_rc2_cfb64(void) { return &rc2_cfb64; } +LCRYPTO_ALIAS(EVP_rc2_cfb64); static const EVP_CIPHER rc2_ofb = { .nid = NID_rc2_ofb64, @@ -221,6 +223,7 @@ EVP_rc2_ofb(void) { return &rc2_ofb; } +LCRYPTO_ALIAS(EVP_rc2_ofb); static const EVP_CIPHER rc2_ecb = { .nid = NID_rc2_ecb, @@ -242,6 +245,7 @@ EVP_rc2_ecb(void) { return &rc2_ecb; } +LCRYPTO_ALIAS(EVP_rc2_ecb); #define RC2_40_MAGIC 0xa0 #define RC2_64_MAGIC 0x78 @@ -282,12 +286,14 @@ EVP_rc2_64_cbc(void) { return (&r2_64_cbc_cipher); } +LCRYPTO_ALIAS(EVP_rc2_64_cbc); const EVP_CIPHER * EVP_rc2_40_cbc(void) { return (&r2_40_cbc_cipher); } +LCRYPTO_ALIAS(EVP_rc2_40_cbc); static int rc2_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, diff --git a/lib/libcrypto/evp/e_rc4.c b/lib/libcrypto/evp/e_rc4.c index c0f12fb03cf..df074834160 100644 --- a/lib/libcrypto/evp/e_rc4.c +++ b/lib/libcrypto/evp/e_rc4.c @@ -1,4 +1,4 @@ -/* $OpenBSD: e_rc4.c,v 1.19 2024/01/07 15:42:57 tb Exp $ */ +/* $OpenBSD: e_rc4.c,v 1.20 2024/04/09 13:52:41 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -117,12 +117,14 @@ EVP_rc4(void) { return (&r4_cipher); } +LCRYPTO_ALIAS(EVP_rc4); const EVP_CIPHER * EVP_rc4_40(void) { return (&r4_40_cipher); } +LCRYPTO_ALIAS(EVP_rc4_40); static int rc4_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, diff --git a/lib/libcrypto/evp/e_sm4.c b/lib/libcrypto/evp/e_sm4.c index 85b4d3ca04d..cde2f6c64b2 100644 --- a/lib/libcrypto/evp/e_sm4.c +++ b/lib/libcrypto/evp/e_sm4.c @@ -1,4 +1,4 @@ -/* $OpenBSD: e_sm4.c,v 1.12 2024/01/04 17:38:36 tb Exp $ */ +/* $OpenBSD: e_sm4.c,v 1.13 2024/04/09 13:52:41 beck Exp $ */ /* * Copyright (c) 2017, 2019 Ribose Inc * @@ -164,6 +164,7 @@ EVP_sm4_cbc(void) { return &sm4_cbc; } +LCRYPTO_ALIAS(EVP_sm4_cbc); static const EVP_CIPHER sm4_cfb128 = { .nid = NID_sm4_cfb128, @@ -185,6 +186,7 @@ EVP_sm4_cfb128(void) { return &sm4_cfb128; } +LCRYPTO_ALIAS(EVP_sm4_cfb128); static const EVP_CIPHER sm4_ofb = { .nid = NID_sm4_ofb128, @@ -206,6 +208,7 @@ EVP_sm4_ofb(void) { return &sm4_ofb; } +LCRYPTO_ALIAS(EVP_sm4_ofb); static const EVP_CIPHER sm4_ecb = { .nid = NID_sm4_ecb, @@ -227,6 +230,7 @@ EVP_sm4_ecb(void) { return &sm4_ecb; } +LCRYPTO_ALIAS(EVP_sm4_ecb); static int sm4_ctr_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, @@ -259,4 +263,5 @@ EVP_sm4_ctr(void) { return &sm4_ctr_mode; } +LCRYPTO_ALIAS(EVP_sm4_ctr); #endif diff --git a/lib/libcrypto/evp/e_xcbc_d.c b/lib/libcrypto/evp/e_xcbc_d.c index dc01cbb9825..1e3bee07912 100644 --- a/lib/libcrypto/evp/e_xcbc_d.c +++ b/lib/libcrypto/evp/e_xcbc_d.c @@ -1,4 +1,4 @@ -/* $OpenBSD: e_xcbc_d.c,v 1.17 2024/01/07 15:42:57 tb Exp $ */ +/* $OpenBSD: e_xcbc_d.c,v 1.18 2024/04/09 13:52:41 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -103,6 +103,7 @@ EVP_desx_cbc(void) { return (&d_xcbc_cipher); } +LCRYPTO_ALIAS(EVP_desx_cbc); static int desx_cbc_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, diff --git a/lib/libcrypto/evp/evp_aead.c b/lib/libcrypto/evp/evp_aead.c index 3579533e5b6..b35f5157ed2 100644 --- a/lib/libcrypto/evp/evp_aead.c +++ b/lib/libcrypto/evp/evp_aead.c @@ -1,4 +1,4 @@ -/* $OpenBSD: evp_aead.c,v 1.10 2023/07/07 19:37:53 beck Exp $ */ +/* $OpenBSD: evp_aead.c,v 1.11 2024/04/09 13:52:41 beck Exp $ */ /* * Copyright (c) 2014, Google Inc. * @@ -28,24 +28,28 @@ EVP_AEAD_key_length(const EVP_AEAD *aead) { return aead->key_len; } +LCRYPTO_ALIAS(EVP_AEAD_key_length); size_t EVP_AEAD_nonce_length(const EVP_AEAD *aead) { return aead->nonce_len; } +LCRYPTO_ALIAS(EVP_AEAD_nonce_length); size_t EVP_AEAD_max_overhead(const EVP_AEAD *aead) { return aead->overhead; } +LCRYPTO_ALIAS(EVP_AEAD_max_overhead); size_t EVP_AEAD_max_tag_len(const EVP_AEAD *aead) { return aead->max_tag_len; } +LCRYPTO_ALIAS(EVP_AEAD_max_tag_len); int EVP_AEAD_CTX_init(EVP_AEAD_CTX *ctx, const EVP_AEAD *aead, @@ -58,6 +62,7 @@ EVP_AEAD_CTX_init(EVP_AEAD_CTX *ctx, const EVP_AEAD *aead, } return aead->init(ctx, key, key_len, tag_len); } +LCRYPTO_ALIAS(EVP_AEAD_CTX_init); void EVP_AEAD_CTX_cleanup(EVP_AEAD_CTX *ctx) @@ -67,12 +72,14 @@ EVP_AEAD_CTX_cleanup(EVP_AEAD_CTX *ctx) ctx->aead->cleanup(ctx); ctx->aead = NULL; } +LCRYPTO_ALIAS(EVP_AEAD_CTX_cleanup); EVP_AEAD_CTX * EVP_AEAD_CTX_new(void) { return calloc(1, sizeof(EVP_AEAD_CTX)); } +LCRYPTO_ALIAS(EVP_AEAD_CTX_new); void EVP_AEAD_CTX_free(EVP_AEAD_CTX *ctx) @@ -83,6 +90,7 @@ EVP_AEAD_CTX_free(EVP_AEAD_CTX *ctx) EVP_AEAD_CTX_cleanup(ctx); free(ctx); } +LCRYPTO_ALIAS(EVP_AEAD_CTX_free); /* check_alias returns 0 if out points within the buffer determined by in * and in_len and 1 otherwise. @@ -133,6 +141,7 @@ error: *out_len = 0; return 0; } +LCRYPTO_ALIAS(EVP_AEAD_CTX_seal); int EVP_AEAD_CTX_open(const EVP_AEAD_CTX *ctx, unsigned char *out, size_t *out_len, @@ -158,3 +167,4 @@ error: *out_len = 0; return 0; } +LCRYPTO_ALIAS(EVP_AEAD_CTX_open); diff --git a/lib/libcrypto/evp/evp_cipher.c b/lib/libcrypto/evp/evp_cipher.c index 48aaea0f1b7..c4b5034c259 100644 --- a/lib/libcrypto/evp/evp_cipher.c +++ b/lib/libcrypto/evp/evp_cipher.c @@ -1,4 +1,4 @@ -/* $OpenBSD: evp_cipher.c,v 1.21 2024/03/02 09:55:30 tb Exp $ */ +/* $OpenBSD: evp_cipher.c,v 1.22 2024/04/09 13:52:41 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -127,6 +127,7 @@ EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, { return EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, enc); } +LCRYPTO_ALIAS(EVP_CipherInit); int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *engine, @@ -242,6 +243,7 @@ EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *engine, return 1; } +LCRYPTO_ALIAS(EVP_CipherInit_ex); int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len, @@ -252,6 +254,7 @@ EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len, return EVP_DecryptUpdate(ctx, out, out_len, in, in_len); } +LCRYPTO_ALIAS(EVP_CipherUpdate); int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len) @@ -270,6 +273,7 @@ EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len) return EVP_DecryptFinal_ex(ctx, out, out_len); } +LCRYPTO_ALIAS(EVP_CipherFinal_ex); int EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, @@ -277,6 +281,7 @@ EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, { return EVP_CipherInit(ctx, cipher, key, iv, 1); } +LCRYPTO_ALIAS(EVP_EncryptInit); int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *engine, @@ -284,6 +289,7 @@ EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *engine { return EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, 1); } +LCRYPTO_ALIAS(EVP_EncryptInit_ex); /* * EVP_Cipher() is an implementation detail of EVP_Cipher{Update,Final}(). @@ -303,6 +309,7 @@ EVP_Cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, { return ctx->cipher->do_cipher(ctx, out, in, in_len); } +LCRYPTO_ALIAS(EVP_Cipher); static int evp_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len, @@ -413,6 +420,7 @@ EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len, return 1; } +LCRYPTO_ALIAS(EVP_EncryptUpdate); int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len) @@ -453,6 +461,7 @@ EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len) return evp_cipher(ctx, out, out_len, ctx->buf, block_size); } +LCRYPTO_ALIAS(EVP_EncryptFinal_ex); int EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, @@ -460,6 +469,7 @@ EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, { return EVP_CipherInit(ctx, cipher, key, iv, 0); } +LCRYPTO_ALIAS(EVP_DecryptInit); int EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *engine, @@ -467,6 +477,7 @@ EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *engine { return EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, 0); } +LCRYPTO_ALIAS(EVP_DecryptInit_ex); int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len, @@ -536,6 +547,7 @@ EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len, return 1; } +LCRYPTO_ALIAS(EVP_DecryptUpdate); int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len) @@ -594,12 +606,14 @@ EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len) return 1; } +LCRYPTO_ALIAS(EVP_DecryptFinal_ex); EVP_CIPHER_CTX * EVP_CIPHER_CTX_new(void) { return calloc(1, sizeof(EVP_CIPHER_CTX)); } +LCRYPTO_ALIAS(EVP_CIPHER_CTX_new); void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx) @@ -611,6 +625,7 @@ EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx) free(ctx); } +LCRYPTO_ALIAS(EVP_CIPHER_CTX_free); void EVP_CIPHER_CTX_legacy_clear(EVP_CIPHER_CTX *ctx) @@ -629,6 +644,7 @@ EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *ctx) { return EVP_CIPHER_CTX_cleanup(ctx); } +LCRYPTO_ALIAS(EVP_CIPHER_CTX_reset); int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *ctx) @@ -651,6 +667,7 @@ EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *ctx) return 1; } +LCRYPTO_ALIAS(EVP_CIPHER_CTX_cleanup); int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr) @@ -674,6 +691,7 @@ EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr) } return ret; } +LCRYPTO_ALIAS(EVP_CIPHER_CTX_ctrl); int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key) @@ -683,6 +701,7 @@ EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key) arc4random_buf(key, ctx->key_len); return 1; } +LCRYPTO_ALIAS(EVP_CIPHER_CTX_rand_key); int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in) @@ -722,6 +741,7 @@ EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in) return 1; } +LCRYPTO_ALIAS(EVP_CIPHER_CTX_copy); /* * EVP_CIPHER_CTX accessors. @@ -732,12 +752,14 @@ EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx) { return ctx->cipher; } +LCRYPTO_ALIAS(EVP_CIPHER_CTX_cipher); int EVP_CIPHER_CTX_encrypting(const EVP_CIPHER_CTX *ctx) { return ctx->encrypt; } +LCRYPTO_ALIAS(EVP_CIPHER_CTX_encrypting); int EVP_CIPHER_CTX_get_iv(const EVP_CIPHER_CTX *ctx, unsigned char *iv, size_t len) @@ -757,6 +779,7 @@ EVP_CIPHER_CTX_get_iv(const EVP_CIPHER_CTX *ctx, unsigned char *iv, size_t len) } return 1; } +LCRYPTO_ALIAS(EVP_CIPHER_CTX_get_iv); int EVP_CIPHER_CTX_set_iv(EVP_CIPHER_CTX *ctx, const unsigned char *iv, size_t len) @@ -776,30 +799,35 @@ EVP_CIPHER_CTX_set_iv(EVP_CIPHER_CTX *ctx, const unsigned char *iv, size_t len) } return 1; } +LCRYPTO_ALIAS(EVP_CIPHER_CTX_set_iv); unsigned char * EVP_CIPHER_CTX_buf_noconst(EVP_CIPHER_CTX *ctx) { return ctx->buf; } +LCRYPTO_ALIAS(EVP_CIPHER_CTX_buf_noconst); void * EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx) { return ctx->app_data; } +LCRYPTO_ALIAS(EVP_CIPHER_CTX_get_app_data); void EVP_CIPHER_CTX_set_app_data(EVP_CIPHER_CTX *ctx, void *data) { ctx->app_data = data; } +LCRYPTO_ALIAS(EVP_CIPHER_CTX_set_app_data); int EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx) { return ctx->key_len; } +LCRYPTO_ALIAS(EVP_CIPHER_CTX_key_length); int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *ctx, int key_len) @@ -813,6 +841,7 @@ EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *ctx, int key_len) EVPerror(EVP_R_INVALID_KEY_LENGTH); return 0; } +LCRYPTO_ALIAS(EVP_CIPHER_CTX_set_key_length); int EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *ctx, int pad) @@ -823,30 +852,35 @@ EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *ctx, int pad) ctx->flags |= EVP_CIPH_NO_PADDING; return 1; } +LCRYPTO_ALIAS(EVP_CIPHER_CTX_set_padding); void EVP_CIPHER_CTX_set_flags(EVP_CIPHER_CTX *ctx, int flags) { ctx->flags |= flags; } +LCRYPTO_ALIAS(EVP_CIPHER_CTX_set_flags); void EVP_CIPHER_CTX_clear_flags(EVP_CIPHER_CTX *ctx, int flags) { ctx->flags &= ~flags; } +LCRYPTO_ALIAS(EVP_CIPHER_CTX_clear_flags); int EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx, int flags) { return (ctx->flags & flags); } +LCRYPTO_ALIAS(EVP_CIPHER_CTX_test_flags); void * EVP_CIPHER_CTX_get_cipher_data(const EVP_CIPHER_CTX *ctx) { return ctx->cipher_data; } +LCRYPTO_ALIAS(EVP_CIPHER_CTX_get_cipher_data); void * EVP_CIPHER_CTX_set_cipher_data(EVP_CIPHER_CTX *ctx, void *cipher_data) @@ -858,6 +892,7 @@ EVP_CIPHER_CTX_set_cipher_data(EVP_CIPHER_CTX *ctx, void *cipher_data) return old_cipher_data; } +LCRYPTO_ALIAS(EVP_CIPHER_CTX_set_cipher_data); /* * EVP_CIPHER_CTX getters that reach into the cipher attached to the context. @@ -868,12 +903,14 @@ EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx) { return ctx->cipher->nid; } +LCRYPTO_ALIAS(EVP_CIPHER_CTX_nid); int EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *ctx) { return ctx->cipher->block_size; } +LCRYPTO_ALIAS(EVP_CIPHER_CTX_block_size); int EVP_CIPHER_CTX_iv_length(const EVP_CIPHER_CTX *ctx) @@ -893,12 +930,14 @@ EVP_CIPHER_CTX_iv_length(const EVP_CIPHER_CTX *ctx) return iv_length; } +LCRYPTO_ALIAS(EVP_CIPHER_CTX_iv_length); unsigned long EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx) { return ctx->cipher->flags; } +LCRYPTO_ALIAS(EVP_CIPHER_CTX_flags); /* * Used by CMS and its predecessors. Only GOST and RC2 have a custom method. @@ -1020,6 +1059,7 @@ EVP_CIPHER_type(const EVP_CIPHER *cipher) return nid; } } +LCRYPTO_ALIAS(EVP_CIPHER_type); /* * Accessors. First the trivial getters, then the setters for the method API. @@ -1030,30 +1070,35 @@ EVP_CIPHER_nid(const EVP_CIPHER *cipher) { return cipher->nid; } +LCRYPTO_ALIAS(EVP_CIPHER_nid); int EVP_CIPHER_block_size(const EVP_CIPHER *cipher) { return cipher->block_size; } +LCRYPTO_ALIAS(EVP_CIPHER_block_size); int EVP_CIPHER_key_length(const EVP_CIPHER *cipher) { return cipher->key_len; } +LCRYPTO_ALIAS(EVP_CIPHER_key_length); int EVP_CIPHER_iv_length(const EVP_CIPHER *cipher) { return cipher->iv_len; } +LCRYPTO_ALIAS(EVP_CIPHER_iv_length); unsigned long EVP_CIPHER_flags(const EVP_CIPHER *cipher) { return cipher->flags; } +LCRYPTO_ALIAS(EVP_CIPHER_flags); EVP_CIPHER * EVP_CIPHER_meth_new(int cipher_type, int block_size, int key_len) @@ -1076,6 +1121,7 @@ EVP_CIPHER_meth_new(int cipher_type, int block_size, int key_len) return cipher; } +LCRYPTO_ALIAS(EVP_CIPHER_meth_new); EVP_CIPHER * EVP_CIPHER_meth_dup(const EVP_CIPHER *cipher) @@ -1089,12 +1135,14 @@ EVP_CIPHER_meth_dup(const EVP_CIPHER *cipher) return copy; } +LCRYPTO_ALIAS(EVP_CIPHER_meth_dup); void EVP_CIPHER_meth_free(EVP_CIPHER *cipher) { free(cipher); } +LCRYPTO_ALIAS(EVP_CIPHER_meth_free); int EVP_CIPHER_meth_set_iv_length(EVP_CIPHER *cipher, int iv_len) @@ -1103,6 +1151,7 @@ EVP_CIPHER_meth_set_iv_length(EVP_CIPHER *cipher, int iv_len) return 1; } +LCRYPTO_ALIAS(EVP_CIPHER_meth_set_iv_length); int EVP_CIPHER_meth_set_flags(EVP_CIPHER *cipher, unsigned long flags) @@ -1111,6 +1160,7 @@ EVP_CIPHER_meth_set_flags(EVP_CIPHER *cipher, unsigned long flags) return 1; } +LCRYPTO_ALIAS(EVP_CIPHER_meth_set_flags); int EVP_CIPHER_meth_set_impl_ctx_size(EVP_CIPHER *cipher, int ctx_size) @@ -1119,6 +1169,7 @@ EVP_CIPHER_meth_set_impl_ctx_size(EVP_CIPHER *cipher, int ctx_size) return 1; } +LCRYPTO_ALIAS(EVP_CIPHER_meth_set_impl_ctx_size); int EVP_CIPHER_meth_set_init(EVP_CIPHER *cipher, @@ -1129,6 +1180,7 @@ EVP_CIPHER_meth_set_init(EVP_CIPHER *cipher, return 1; } +LCRYPTO_ALIAS(EVP_CIPHER_meth_set_init); int EVP_CIPHER_meth_set_do_cipher(EVP_CIPHER *cipher, @@ -1139,6 +1191,7 @@ EVP_CIPHER_meth_set_do_cipher(EVP_CIPHER *cipher, return 1; } +LCRYPTO_ALIAS(EVP_CIPHER_meth_set_do_cipher); int EVP_CIPHER_meth_set_cleanup(EVP_CIPHER *cipher, @@ -1148,6 +1201,7 @@ EVP_CIPHER_meth_set_cleanup(EVP_CIPHER *cipher, return 1; } +LCRYPTO_ALIAS(EVP_CIPHER_meth_set_cleanup); int EVP_CIPHER_meth_set_set_asn1_params(EVP_CIPHER *cipher, @@ -1157,6 +1211,7 @@ EVP_CIPHER_meth_set_set_asn1_params(EVP_CIPHER *cipher, return 1; } +LCRYPTO_ALIAS(EVP_CIPHER_meth_set_set_asn1_params); int EVP_CIPHER_meth_set_get_asn1_params(EVP_CIPHER *cipher, @@ -1166,6 +1221,7 @@ EVP_CIPHER_meth_set_get_asn1_params(EVP_CIPHER *cipher, return 1; } +LCRYPTO_ALIAS(EVP_CIPHER_meth_set_get_asn1_params); int EVP_CIPHER_meth_set_ctrl(EVP_CIPHER *cipher, @@ -1175,3 +1231,4 @@ EVP_CIPHER_meth_set_ctrl(EVP_CIPHER *cipher, return 1; } +LCRYPTO_ALIAS(EVP_CIPHER_meth_set_ctrl); diff --git a/lib/libcrypto/evp/evp_digest.c b/lib/libcrypto/evp/evp_digest.c index d360760295b..3eb6c258bff 100644 --- a/lib/libcrypto/evp/evp_digest.c +++ b/lib/libcrypto/evp/evp_digest.c @@ -1,4 +1,4 @@ -/* $OpenBSD: evp_digest.c,v 1.12 2024/03/02 09:59:56 tb Exp $ */ +/* $OpenBSD: evp_digest.c,v 1.13 2024/04/09 13:52:41 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -126,6 +126,7 @@ EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type) EVP_MD_CTX_legacy_clear(ctx); return EVP_DigestInit_ex(ctx, type, NULL); } +LCRYPTO_ALIAS(EVP_DigestInit); int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl) @@ -161,12 +162,14 @@ EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl) return 1; return ctx->digest->init(ctx); } +LCRYPTO_ALIAS(EVP_DigestInit_ex); int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *data, size_t count) { return ctx->update(ctx, data, count); } +LCRYPTO_ALIAS(EVP_DigestUpdate); /* The caller can assume that this removes any secret data from the context */ int @@ -178,6 +181,7 @@ EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *size) EVP_MD_CTX_cleanup(ctx); return ret; } +LCRYPTO_ALIAS(EVP_DigestFinal); /* The caller can assume that this removes any secret data from the context */ int @@ -199,6 +203,7 @@ EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *size) memset(ctx->md_data, 0, ctx->digest->ctx_size); return ret; } +LCRYPTO_ALIAS(EVP_DigestFinal_ex); int EVP_Digest(const void *data, size_t count, @@ -216,12 +221,14 @@ EVP_Digest(const void *data, size_t count, return ret; } +LCRYPTO_ALIAS(EVP_Digest); EVP_MD_CTX * EVP_MD_CTX_new(void) { return calloc(1, sizeof(EVP_MD_CTX)); } +LCRYPTO_ALIAS(EVP_MD_CTX_new); void EVP_MD_CTX_free(EVP_MD_CTX *ctx) @@ -233,18 +240,21 @@ EVP_MD_CTX_free(EVP_MD_CTX *ctx) free(ctx); } +LCRYPTO_ALIAS(EVP_MD_CTX_free); EVP_MD_CTX * EVP_MD_CTX_create(void) { return EVP_MD_CTX_new(); } +LCRYPTO_ALIAS(EVP_MD_CTX_create); void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx) { EVP_MD_CTX_free(ctx); } +LCRYPTO_ALIAS(EVP_MD_CTX_destroy); void EVP_MD_CTX_legacy_clear(EVP_MD_CTX *ctx) @@ -263,6 +273,7 @@ EVP_MD_CTX_reset(EVP_MD_CTX *ctx) { return EVP_MD_CTX_cleanup(ctx); } +LCRYPTO_ALIAS(EVP_MD_CTX_reset); int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx) @@ -290,6 +301,7 @@ EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx) return 1; } +LCRYPTO_ALIAS(EVP_MD_CTX_cleanup); int EVP_MD_CTX_copy(EVP_MD_CTX *out, const EVP_MD_CTX *in) @@ -297,6 +309,7 @@ EVP_MD_CTX_copy(EVP_MD_CTX *out, const EVP_MD_CTX *in) EVP_MD_CTX_legacy_clear(out); return EVP_MD_CTX_copy_ex(out, in); } +LCRYPTO_ALIAS(EVP_MD_CTX_copy); int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in) @@ -352,6 +365,7 @@ EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in) return 1; } +LCRYPTO_ALIAS(EVP_MD_CTX_copy_ex); int EVP_MD_CTX_ctrl(EVP_MD_CTX *ctx, int type, int arg, void *ptr) @@ -375,6 +389,7 @@ EVP_MD_CTX_ctrl(EVP_MD_CTX *ctx, int type, int arg, void *ptr) } return ret; } +LCRYPTO_ALIAS(EVP_MD_CTX_ctrl); const EVP_MD * EVP_MD_CTX_md(const EVP_MD_CTX *ctx) @@ -383,36 +398,42 @@ EVP_MD_CTX_md(const EVP_MD_CTX *ctx) return NULL; return ctx->digest; } +LCRYPTO_ALIAS(EVP_MD_CTX_md); void EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags) { ctx->flags &= ~flags; } +LCRYPTO_ALIAS(EVP_MD_CTX_clear_flags); void EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags) { ctx->flags |= flags; } +LCRYPTO_ALIAS(EVP_MD_CTX_set_flags); int EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags) { return (ctx->flags & flags); } +LCRYPTO_ALIAS(EVP_MD_CTX_test_flags); void * EVP_MD_CTX_md_data(const EVP_MD_CTX *ctx) { return ctx->md_data; } +LCRYPTO_ALIAS(EVP_MD_CTX_md_data); EVP_PKEY_CTX * EVP_MD_CTX_pkey_ctx(const EVP_MD_CTX *ctx) { return ctx->pctx; } +LCRYPTO_ALIAS(EVP_MD_CTX_pkey_ctx); void EVP_MD_CTX_set_pkey_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pctx) @@ -436,18 +457,21 @@ EVP_MD_CTX_set_pkey_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pctx) EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_KEEP_PKEY_CTX); } } +LCRYPTO_ALIAS(EVP_MD_CTX_set_pkey_ctx); int EVP_MD_type(const EVP_MD *md) { return md->type; } +LCRYPTO_ALIAS(EVP_MD_type); int EVP_MD_pkey_type(const EVP_MD *md) { return md->pkey_type; } +LCRYPTO_ALIAS(EVP_MD_pkey_type); int EVP_MD_size(const EVP_MD *md) @@ -458,15 +482,18 @@ EVP_MD_size(const EVP_MD *md) } return md->md_size; } +LCRYPTO_ALIAS(EVP_MD_size); unsigned long EVP_MD_flags(const EVP_MD *md) { return md->flags; } +LCRYPTO_ALIAS(EVP_MD_flags); int EVP_MD_block_size(const EVP_MD *md) { return md->block_size; } +LCRYPTO_ALIAS(EVP_MD_block_size); diff --git a/lib/libcrypto/evp/evp_encode.c b/lib/libcrypto/evp/evp_encode.c index 199bdfa27e7..ae6ec476e31 100644 --- a/lib/libcrypto/evp/evp_encode.c +++ b/lib/libcrypto/evp/evp_encode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: evp_encode.c,v 1.2 2023/12/29 10:31:50 tb Exp $ */ +/* $OpenBSD: evp_encode.c,v 1.3 2024/04/09 13:52:41 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -128,12 +128,14 @@ EVP_ENCODE_CTX_new(void) { return calloc(1, sizeof(EVP_ENCODE_CTX)); } +LCRYPTO_ALIAS(EVP_ENCODE_CTX_new); void EVP_ENCODE_CTX_free(EVP_ENCODE_CTX *ctx) { free(ctx); } +LCRYPTO_ALIAS(EVP_ENCODE_CTX_free); void EVP_EncodeInit(EVP_ENCODE_CTX *ctx) @@ -142,6 +144,7 @@ EVP_EncodeInit(EVP_ENCODE_CTX *ctx) ctx->num = 0; ctx->line_num = 0; } +LCRYPTO_ALIAS(EVP_EncodeInit); int EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, @@ -192,6 +195,7 @@ EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, return 1; } +LCRYPTO_ALIAS(EVP_EncodeUpdate); void EVP_EncodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl) @@ -206,6 +210,7 @@ EVP_EncodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl) } *outl = ret; } +LCRYPTO_ALIAS(EVP_EncodeFinal); int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int dlen) @@ -238,6 +243,7 @@ EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int dlen) *t = '\0'; return (ret); } +LCRYPTO_ALIAS(EVP_EncodeBlock); void EVP_DecodeInit(EVP_ENCODE_CTX *ctx) @@ -247,6 +253,7 @@ EVP_DecodeInit(EVP_ENCODE_CTX *ctx) ctx->line_num = 0; ctx->expect_nl = 0; } +LCRYPTO_ALIAS(EVP_DecodeInit); int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, @@ -355,6 +362,7 @@ EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, ctx->num = n; return (rv); } +LCRYPTO_ALIAS(EVP_DecodeUpdate); int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n) @@ -395,6 +403,7 @@ EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n) } return (ret); } +LCRYPTO_ALIAS(EVP_DecodeBlock); int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl) @@ -412,3 +421,4 @@ EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl) } else return (1); } +LCRYPTO_ALIAS(EVP_DecodeFinal); diff --git a/lib/libcrypto/evp/evp_err.c b/lib/libcrypto/evp/evp_err.c index 039e17e6cf6..07515f4d992 100644 --- a/lib/libcrypto/evp/evp_err.c +++ b/lib/libcrypto/evp/evp_err.c @@ -1,4 +1,4 @@ -/* $OpenBSD: evp_err.c,v 1.32 2023/07/07 19:37:53 beck Exp $ */ +/* $OpenBSD: evp_err.c,v 1.33 2024/04/09 13:52:41 beck Exp $ */ /* ==================================================================== * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. * @@ -164,3 +164,4 @@ ERR_load_EVP_strings(void) } #endif } +LCRYPTO_ALIAS(ERR_load_EVP_strings); diff --git a/lib/libcrypto/evp/evp_key.c b/lib/libcrypto/evp/evp_key.c index da103c853fb..e7c7ec32948 100644 --- a/lib/libcrypto/evp/evp_key.c +++ b/lib/libcrypto/evp/evp_key.c @@ -1,4 +1,4 @@ -/* $OpenBSD: evp_key.c,v 1.35 2024/03/25 10:58:06 joshua Exp $ */ +/* $OpenBSD: evp_key.c,v 1.36 2024/04/09 13:52:41 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -78,6 +78,7 @@ EVP_set_pw_prompt(const char *prompt) else strlcpy(prompt_string, prompt, sizeof(prompt_string)); } +LCRYPTO_ALIAS(EVP_set_pw_prompt); char * EVP_get_pw_prompt(void) @@ -87,12 +88,14 @@ EVP_get_pw_prompt(void) return prompt_string; } +LCRYPTO_ALIAS(EVP_get_pw_prompt); int EVP_read_pw_string(char *buf, int len, const char *prompt, int verify) { return EVP_read_pw_string_min(buf, 0, len, prompt, verify); } +LCRYPTO_ALIAS(EVP_read_pw_string); int EVP_read_pw_string_min(char *buf, int min, int len, const char *prompt, @@ -129,6 +132,7 @@ EVP_read_pw_string_min(char *buf, int min, int len, const char *prompt, return ret; } +LCRYPTO_ALIAS(EVP_read_pw_string_min); int EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md, @@ -216,3 +220,4 @@ err: explicit_bzero(md_buf, sizeof md_buf); return rv; } +LCRYPTO_ALIAS(EVP_BytesToKey); diff --git a/lib/libcrypto/evp/evp_names.c b/lib/libcrypto/evp/evp_names.c index d1e21d27934..99ad53e3ac8 100644 --- a/lib/libcrypto/evp/evp_names.c +++ b/lib/libcrypto/evp/evp_names.c @@ -1,4 +1,4 @@ -/* $OpenBSD: evp_names.c,v 1.15 2024/03/24 13:56:35 jca Exp $ */ +/* $OpenBSD: evp_names.c,v 1.16 2024/04/09 13:52:41 beck Exp $ */ /* * Copyright (c) 2023 Theo Buehler * @@ -1495,6 +1495,7 @@ EVP_CIPHER_do_all_sorted(void (*fn)(const EVP_CIPHER *, const char *, fn(evp_cipher, cipher->name, NULL, arg); } } +LCRYPTO_ALIAS(EVP_CIPHER_do_all_sorted); void EVP_CIPHER_do_all(void (*fn)(const EVP_CIPHER *, const char *, const char *, @@ -1502,6 +1503,7 @@ EVP_CIPHER_do_all(void (*fn)(const EVP_CIPHER *, const char *, const char *, { EVP_CIPHER_do_all_sorted(fn, arg); } +LCRYPTO_ALIAS(EVP_CIPHER_do_all); void EVP_MD_do_all_sorted(void (*fn)(const EVP_MD *, const char *, const char *, @@ -1525,6 +1527,7 @@ EVP_MD_do_all_sorted(void (*fn)(const EVP_MD *, const char *, const char *, fn(evp_md, digest->name, NULL, arg); } } +LCRYPTO_ALIAS(EVP_MD_do_all_sorted); void EVP_MD_do_all(void (*fn)(const EVP_MD *, const char *, const char *, void *), @@ -1532,6 +1535,7 @@ EVP_MD_do_all(void (*fn)(const EVP_MD *, const char *, const char *, void *), { EVP_MD_do_all_sorted(fn, arg); } +LCRYPTO_ALIAS(EVP_MD_do_all); /* * The OBJ_NAME API is completely misnamed. It has little to do with objects @@ -1652,6 +1656,7 @@ EVP_get_cipherbyname(const char *name) return cipher->cipher(); } +LCRYPTO_ALIAS(EVP_get_cipherbyname); static int digest_cmp(const void *a, const void *b) @@ -1676,6 +1681,7 @@ EVP_get_digestbyname(const char *name) return digest->digest(); } +LCRYPTO_ALIAS(EVP_get_digestbyname); /* * XXX - this is here because most of its job was to clean up the dynamic @@ -1687,3 +1693,4 @@ void EVP_cleanup(void) { } +LCRYPTO_ALIAS(EVP_cleanup); diff --git a/lib/libcrypto/evp/evp_pbe.c b/lib/libcrypto/evp/evp_pbe.c index 81fa0446ed9..88ceb140336 100644 --- a/lib/libcrypto/evp/evp_pbe.c +++ b/lib/libcrypto/evp/evp_pbe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: evp_pbe.c,v 1.49 2024/03/25 11:38:47 joshua Exp $ */ +/* $OpenBSD: evp_pbe.c,v 1.50 2024/04/09 13:52:41 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -398,6 +398,7 @@ PKCS5_PBKDF2_HMAC(const char *pass, int passlen, const unsigned char *salt, HMAC_CTX_cleanup(&hctx_tpl); return 1; } +LCRYPTO_ALIAS(PKCS5_PBKDF2_HMAC); int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen, const unsigned char *salt, @@ -406,6 +407,7 @@ PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen, const unsigned char *salt, return PKCS5_PBKDF2_HMAC(pass, passlen, salt, saltlen, iter, EVP_sha1(), keylen, out); } +LCRYPTO_ALIAS(PKCS5_PBKDF2_HMAC_SHA1); /* * Now the key derivation function itself. This is a bit evil because diff --git a/lib/libcrypto/evp/m_md4.c b/lib/libcrypto/evp/m_md4.c index 199dba84896..a9d31509487 100644 --- a/lib/libcrypto/evp/m_md4.c +++ b/lib/libcrypto/evp/m_md4.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m_md4.c,v 1.21 2023/07/07 19:37:53 beck Exp $ */ +/* $OpenBSD: m_md4.c,v 1.22 2024/04/09 13:52:41 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -110,4 +110,5 @@ EVP_md4(void) { return (&md4_md); } +LCRYPTO_ALIAS(EVP_md4); #endif diff --git a/lib/libcrypto/evp/m_md5.c b/lib/libcrypto/evp/m_md5.c index 0dfad89aaf2..1bba8c4e1b4 100644 --- a/lib/libcrypto/evp/m_md5.c +++ b/lib/libcrypto/evp/m_md5.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m_md5.c,v 1.20 2023/07/07 19:37:53 beck Exp $ */ +/* $OpenBSD: m_md5.c,v 1.21 2024/04/09 13:52:41 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -110,4 +110,5 @@ EVP_md5(void) { return (&md5_md); } +LCRYPTO_ALIAS(EVP_md5); #endif diff --git a/lib/libcrypto/evp/m_md5_sha1.c b/lib/libcrypto/evp/m_md5_sha1.c index 7dd1ae1278d..87a801f013a 100644 --- a/lib/libcrypto/evp/m_md5_sha1.c +++ b/lib/libcrypto/evp/m_md5_sha1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m_md5_sha1.c,v 1.8 2023/09/02 04:55:18 tb Exp $ */ +/* $OpenBSD: m_md5_sha1.c,v 1.9 2024/04/09 13:52:41 beck Exp $ */ /* * Copyright (c) 2017 Joel Sing * @@ -87,3 +87,4 @@ EVP_md5_sha1(void) { return &md5_sha1_md; } +LCRYPTO_ALIAS(EVP_md5_sha1); diff --git a/lib/libcrypto/evp/m_null.c b/lib/libcrypto/evp/m_null.c index 28634d2da58..65af387eaa3 100644 --- a/lib/libcrypto/evp/m_null.c +++ b/lib/libcrypto/evp/m_null.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m_null.c,v 1.14 2023/07/07 19:37:53 beck Exp $ */ +/* $OpenBSD: m_null.c,v 1.15 2024/04/09 13:52:41 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -101,3 +101,4 @@ EVP_md_null(void) { return (&null_md); } +LCRYPTO_ALIAS(EVP_md_null); diff --git a/lib/libcrypto/evp/m_ripemd.c b/lib/libcrypto/evp/m_ripemd.c index 638d0cd2743..d7715108688 100644 --- a/lib/libcrypto/evp/m_ripemd.c +++ b/lib/libcrypto/evp/m_ripemd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m_ripemd.c,v 1.17 2023/07/07 19:37:53 beck Exp $ */ +/* $OpenBSD: m_ripemd.c,v 1.18 2024/04/09 13:52:41 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -110,4 +110,5 @@ EVP_ripemd160(void) { return (&ripemd160_md); } +LCRYPTO_ALIAS(EVP_ripemd160); #endif diff --git a/lib/libcrypto/evp/m_sha1.c b/lib/libcrypto/evp/m_sha1.c index c65e0515c88..cdceb99aaf3 100644 --- a/lib/libcrypto/evp/m_sha1.c +++ b/lib/libcrypto/evp/m_sha1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m_sha1.c,v 1.25 2023/07/07 19:37:53 beck Exp $ */ +/* $OpenBSD: m_sha1.c,v 1.26 2024/04/09 13:52:41 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -110,6 +110,7 @@ EVP_sha1(void) { return &sha1_md; } +LCRYPTO_ALIAS(EVP_sha1); #endif #ifndef OPENSSL_NO_SHA256 @@ -155,6 +156,7 @@ EVP_sha224(void) { return &sha224_md; } +LCRYPTO_ALIAS(EVP_sha224); static int sha256_init(EVP_MD_CTX *ctx) @@ -193,6 +195,7 @@ EVP_sha256(void) { return &sha256_md; } +LCRYPTO_ALIAS(EVP_sha256); #endif /* ifndef OPENSSL_NO_SHA256 */ #ifndef OPENSSL_NO_SHA512 @@ -234,6 +237,7 @@ EVP_sha384(void) { return &sha384_md; } +LCRYPTO_ALIAS(EVP_sha384); static int sha512_init(EVP_MD_CTX *ctx) @@ -272,6 +276,7 @@ EVP_sha512(void) { return &sha512_md; } +LCRYPTO_ALIAS(EVP_sha512); static int sha512_224_init(EVP_MD_CTX *ctx) @@ -310,6 +315,7 @@ EVP_sha512_224(void) { return &sha512_224_md; } +LCRYPTO_ALIAS(EVP_sha512_224); static int sha512_256_init(EVP_MD_CTX *ctx) @@ -348,4 +354,5 @@ EVP_sha512_256(void) { return &sha512_256_md; } +LCRYPTO_ALIAS(EVP_sha512_256); #endif /* ifndef OPENSSL_NO_SHA512 */ diff --git a/lib/libcrypto/evp/m_sha3.c b/lib/libcrypto/evp/m_sha3.c index 67f94f79569..a21833b605f 100644 --- a/lib/libcrypto/evp/m_sha3.c +++ b/lib/libcrypto/evp/m_sha3.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m_sha3.c,v 1.3 2023/07/07 19:37:53 beck Exp $ */ +/* $OpenBSD: m_sha3.c,v 1.4 2024/04/09 13:52:41 beck Exp $ */ /* * Copyright (c) 2023 Joel Sing * @@ -57,6 +57,7 @@ EVP_sha3_224(void) { return &sha3_224_md; } +LCRYPTO_ALIAS(EVP_sha3_224); static int sha3_256_init(EVP_MD_CTX *ctx) @@ -95,6 +96,7 @@ EVP_sha3_256(void) { return &sha3_256_md; } +LCRYPTO_ALIAS(EVP_sha3_256); static int sha3_384_init(EVP_MD_CTX *ctx) @@ -133,6 +135,7 @@ EVP_sha3_384(void) { return &sha3_384_md; } +LCRYPTO_ALIAS(EVP_sha3_384); static int sha3_512_init(EVP_MD_CTX *ctx) @@ -171,3 +174,4 @@ EVP_sha3_512(void) { return &sha3_512_md; } +LCRYPTO_ALIAS(EVP_sha3_512); diff --git a/lib/libcrypto/evp/m_sigver.c b/lib/libcrypto/evp/m_sigver.c index d427e05db0d..a3353854f16 100644 --- a/lib/libcrypto/evp/m_sigver.c +++ b/lib/libcrypto/evp/m_sigver.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m_sigver.c,v 1.26 2024/03/27 07:36:59 tb Exp $ */ +/* $OpenBSD: m_sigver.c,v 1.27 2024/04/09 13:52:41 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2006. */ @@ -128,6 +128,7 @@ EVP_DigestSignInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, const EVP_MD *type, { return do_sigver_init(ctx, pctx, type, pkey, 0); } +LCRYPTO_ALIAS(EVP_DigestSignInit); int EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, const EVP_MD *type, @@ -135,6 +136,7 @@ EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, const EVP_MD *type, { return do_sigver_init(ctx, pctx, type, pkey, 1); } +LCRYPTO_ALIAS(EVP_DigestVerifyInit); static int evp_digestsignfinal_sigctx_custom(EVP_MD_CTX *ctx, unsigned char *sigret, @@ -215,6 +217,7 @@ EVP_DigestSignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, size_t *siglen) return ret; } +LCRYPTO_ALIAS(EVP_DigestSignFinal); int EVP_DigestSign(EVP_MD_CTX *ctx, unsigned char *sigret, size_t *siglen, @@ -231,6 +234,7 @@ EVP_DigestSign(EVP_MD_CTX *ctx, unsigned char *sigret, size_t *siglen, return EVP_DigestSignFinal(ctx, sigret, siglen); } +LCRYPTO_ALIAS(EVP_DigestSign); int EVP_DigestVerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sig, size_t siglen) @@ -249,6 +253,7 @@ EVP_DigestVerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sig, size_t siglen) return r; return EVP_PKEY_verify(ctx->pctx, sig, siglen, md, mdlen); } +LCRYPTO_ALIAS(EVP_DigestVerifyFinal); int EVP_DigestVerify(EVP_MD_CTX *ctx, const unsigned char *sigret, size_t siglen, @@ -263,3 +268,4 @@ EVP_DigestVerify(EVP_MD_CTX *ctx, const unsigned char *sigret, size_t siglen, return EVP_DigestVerifyFinal(ctx, sigret, siglen); } +LCRYPTO_ALIAS(EVP_DigestVerify); diff --git a/lib/libcrypto/evp/m_sm3.c b/lib/libcrypto/evp/m_sm3.c index ea30d8d2224..672d06f9fd3 100644 --- a/lib/libcrypto/evp/m_sm3.c +++ b/lib/libcrypto/evp/m_sm3.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m_sm3.c,v 1.6 2023/07/07 19:37:53 beck Exp $ */ +/* $OpenBSD: m_sm3.c,v 1.7 2024/04/09 13:52:41 beck Exp $ */ /* * Copyright (c) 2018, Ribose Inc * @@ -64,5 +64,6 @@ EVP_sm3(void) { return &sm3_md; } +LCRYPTO_ALIAS(EVP_sm3); #endif /* OPENSSL_NO_SM3 */ diff --git a/lib/libcrypto/evp/m_wp.c b/lib/libcrypto/evp/m_wp.c index 44d13b1484c..6755d56e447 100644 --- a/lib/libcrypto/evp/m_wp.c +++ b/lib/libcrypto/evp/m_wp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m_wp.c,v 1.13 2023/07/07 19:37:54 beck Exp $ */ +/* $OpenBSD: m_wp.c,v 1.14 2024/04/09 13:52:41 beck Exp $ */ #include @@ -50,4 +50,5 @@ EVP_whirlpool(void) { return (&whirlpool_md); } +LCRYPTO_ALIAS(EVP_whirlpool); #endif diff --git a/lib/libcrypto/evp/p_legacy.c b/lib/libcrypto/evp/p_legacy.c index adb6dc9174a..01cfdbcd6a8 100644 --- a/lib/libcrypto/evp/p_legacy.c +++ b/lib/libcrypto/evp/p_legacy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: p_legacy.c,v 1.5 2024/03/28 01:42:02 tb Exp $ */ +/* $OpenBSD: p_legacy.c,v 1.6 2024/04/09 13:52:41 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -77,6 +77,7 @@ EVP_PKEY_decrypt_old(unsigned char *to, const unsigned char *from, int from_len, return RSA_private_decrypt(from_len, from, to, pkey->pkey.rsa, RSA_PKCS1_PADDING); } +LCRYPTO_ALIAS(EVP_PKEY_decrypt_old); int EVP_PKEY_encrypt_old(unsigned char *to, const unsigned char *from, int from_len, @@ -90,6 +91,7 @@ EVP_PKEY_encrypt_old(unsigned char *to, const unsigned char *from, int from_len, return RSA_public_encrypt(from_len, from, to, pkey->pkey.rsa, RSA_PKCS1_PADDING); } +LCRYPTO_ALIAS(EVP_PKEY_encrypt_old); int EVP_OpenInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, @@ -135,6 +137,7 @@ err: freezero(key, size); return (ret); } +LCRYPTO_ALIAS(EVP_OpenInit); int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) @@ -146,6 +149,7 @@ EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) i = EVP_DecryptInit_ex(ctx, NULL, NULL, NULL, NULL); return (i); } +LCRYPTO_ALIAS(EVP_OpenFinal); int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, unsigned char **ek, @@ -181,6 +185,7 @@ EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, unsigned char **ek, } return (npubk); } +LCRYPTO_ALIAS(EVP_SealInit); int EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) @@ -192,3 +197,4 @@ EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) i = EVP_EncryptInit_ex(ctx, NULL, NULL, NULL, NULL); return i; } +LCRYPTO_ALIAS(EVP_SealFinal); diff --git a/lib/libcrypto/evp/p_lib.c b/lib/libcrypto/evp/p_lib.c index 8bf820560cb..4a6a6db4ccd 100644 --- a/lib/libcrypto/evp/p_lib.c +++ b/lib/libcrypto/evp/p_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: p_lib.c,v 1.59 2024/03/02 11:17:27 tb Exp $ */ +/* $OpenBSD: p_lib.c,v 1.60 2024/04/09 13:52:41 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -170,6 +170,7 @@ EVP_PKEY_asn1_get_count(void) { return N_ASN1_METHODS; } +LCRYPTO_ALIAS(EVP_PKEY_asn1_get_count); const EVP_PKEY_ASN1_METHOD * EVP_PKEY_asn1_get0(int idx) @@ -179,6 +180,7 @@ EVP_PKEY_asn1_get0(int idx) return asn1_methods[idx]; } +LCRYPTO_ALIAS(EVP_PKEY_asn1_get0); const EVP_PKEY_ASN1_METHOD * EVP_PKEY_asn1_find(ENGINE **engine, int pkey_id) @@ -195,6 +197,7 @@ EVP_PKEY_asn1_find(ENGINE **engine, int pkey_id) return NULL; } +LCRYPTO_ALIAS(EVP_PKEY_asn1_find); const EVP_PKEY_ASN1_METHOD * EVP_PKEY_asn1_find_str(ENGINE **engine, const char *str, int len) @@ -224,6 +227,7 @@ EVP_PKEY_asn1_find_str(ENGINE **engine, const char *str, int len) return NULL; } +LCRYPTO_ALIAS(EVP_PKEY_asn1_find_str); int EVP_PKEY_asn1_get0_info(int *pkey_id, int *pkey_base_id, int *pkey_flags, @@ -246,12 +250,14 @@ EVP_PKEY_asn1_get0_info(int *pkey_id, int *pkey_base_id, int *pkey_flags, return 1; } +LCRYPTO_ALIAS(EVP_PKEY_asn1_get0_info); const EVP_PKEY_ASN1_METHOD* EVP_PKEY_get0_asn1(const EVP_PKEY *pkey) { return pkey->ameth; } +LCRYPTO_ALIAS(EVP_PKEY_get0_asn1); int EVP_PKEY_bits(const EVP_PKEY *pkey) @@ -260,6 +266,7 @@ EVP_PKEY_bits(const EVP_PKEY *pkey) return pkey->ameth->pkey_bits(pkey); return 0; } +LCRYPTO_ALIAS(EVP_PKEY_bits); int EVP_PKEY_security_bits(const EVP_PKEY *pkey) @@ -271,6 +278,7 @@ EVP_PKEY_security_bits(const EVP_PKEY *pkey) return pkey->ameth->pkey_security_bits(pkey); } +LCRYPTO_ALIAS(EVP_PKEY_security_bits); int EVP_PKEY_size(const EVP_PKEY *pkey) @@ -279,6 +287,7 @@ EVP_PKEY_size(const EVP_PKEY *pkey) return pkey->ameth->pkey_size(pkey); return 0; } +LCRYPTO_ALIAS(EVP_PKEY_size); int EVP_PKEY_save_parameters(EVP_PKEY *pkey, int mode) @@ -303,6 +312,7 @@ EVP_PKEY_save_parameters(EVP_PKEY *pkey, int mode) #endif return (0); } +LCRYPTO_ALIAS(EVP_PKEY_save_parameters); int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from) @@ -322,6 +332,7 @@ EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from) err: return 0; } +LCRYPTO_ALIAS(EVP_PKEY_copy_parameters); int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey) @@ -330,6 +341,7 @@ EVP_PKEY_missing_parameters(const EVP_PKEY *pkey) return pkey->ameth->param_missing(pkey); return 0; } +LCRYPTO_ALIAS(EVP_PKEY_missing_parameters); int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b) @@ -340,6 +352,7 @@ EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b) return a->ameth->param_cmp(a, b); return -2; } +LCRYPTO_ALIAS(EVP_PKEY_cmp_parameters); int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b) @@ -362,6 +375,7 @@ EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b) return -2; } +LCRYPTO_ALIAS(EVP_PKEY_cmp); EVP_PKEY * EVP_PKEY_new(void) @@ -379,12 +393,14 @@ EVP_PKEY_new(void) return pkey; } +LCRYPTO_ALIAS(EVP_PKEY_new); int EVP_PKEY_up_ref(EVP_PKEY *pkey) { return CRYPTO_add(&pkey->references, 1, CRYPTO_LOCK_EVP_PKEY) > 1; } +LCRYPTO_ALIAS(EVP_PKEY_up_ref); static void evp_pkey_free_pkey_ptr(EVP_PKEY *pkey) @@ -409,6 +425,7 @@ EVP_PKEY_free(EVP_PKEY *pkey) sk_X509_ATTRIBUTE_pop_free(pkey->attributes, X509_ATTRIBUTE_free); freezero(pkey, sizeof(*pkey)); } +LCRYPTO_ALIAS(EVP_PKEY_free); int EVP_PKEY_set_type(EVP_PKEY *pkey, int type) @@ -428,6 +445,7 @@ EVP_PKEY_set_type(EVP_PKEY *pkey, int type) return 1; } +LCRYPTO_ALIAS(EVP_PKEY_set_type); int EVP_PKEY_set_type_str(EVP_PKEY *pkey, const char *str, int len) @@ -447,6 +465,7 @@ EVP_PKEY_set_type_str(EVP_PKEY *pkey, const char *str, int len) return 1; } +LCRYPTO_ALIAS(EVP_PKEY_set_type_str); int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key) @@ -456,6 +475,7 @@ EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key) return (pkey->pkey.ptr = key) != NULL; } +LCRYPTO_ALIAS(EVP_PKEY_assign); EVP_PKEY * EVP_PKEY_new_raw_private_key(int type, ENGINE *engine, @@ -485,6 +505,7 @@ EVP_PKEY_new_raw_private_key(int type, ENGINE *engine, return NULL; } +LCRYPTO_ALIAS(EVP_PKEY_new_raw_private_key); EVP_PKEY * EVP_PKEY_new_raw_public_key(int type, ENGINE *engine, @@ -514,6 +535,7 @@ EVP_PKEY_new_raw_public_key(int type, ENGINE *engine, return NULL; } +LCRYPTO_ALIAS(EVP_PKEY_new_raw_public_key); int EVP_PKEY_get_raw_private_key(const EVP_PKEY *pkey, @@ -530,6 +552,7 @@ EVP_PKEY_get_raw_private_key(const EVP_PKEY *pkey, return 1; } +LCRYPTO_ALIAS(EVP_PKEY_get_raw_private_key); int EVP_PKEY_get_raw_public_key(const EVP_PKEY *pkey, @@ -546,6 +569,7 @@ EVP_PKEY_get_raw_public_key(const EVP_PKEY *pkey, return 1; } +LCRYPTO_ALIAS(EVP_PKEY_get_raw_public_key); EVP_PKEY * EVP_PKEY_new_CMAC_key(ENGINE *e, const unsigned char *priv, size_t len, @@ -577,12 +601,14 @@ EVP_PKEY_new_CMAC_key(ENGINE *e, const unsigned char *priv, size_t len, return NULL; } +LCRYPTO_ALIAS(EVP_PKEY_new_CMAC_key); void * EVP_PKEY_get0(const EVP_PKEY *pkey) { return pkey->pkey.ptr; } +LCRYPTO_ALIAS(EVP_PKEY_get0); const unsigned char * EVP_PKEY_get0_hmac(const EVP_PKEY *pkey, size_t *len) @@ -599,6 +625,7 @@ EVP_PKEY_get0_hmac(const EVP_PKEY *pkey, size_t *len) return os->data; } +LCRYPTO_ALIAS(EVP_PKEY_get0_hmac); #ifndef OPENSSL_NO_RSA RSA * @@ -610,6 +637,7 @@ EVP_PKEY_get0_RSA(EVP_PKEY *pkey) EVPerror(EVP_R_EXPECTING_AN_RSA_KEY); return NULL; } +LCRYPTO_ALIAS(EVP_PKEY_get0_RSA); RSA * EVP_PKEY_get1_RSA(EVP_PKEY *pkey) @@ -623,6 +651,7 @@ EVP_PKEY_get1_RSA(EVP_PKEY *pkey) return rsa; } +LCRYPTO_ALIAS(EVP_PKEY_get1_RSA); int EVP_PKEY_set1_RSA(EVP_PKEY *pkey, RSA *key) @@ -632,6 +661,7 @@ EVP_PKEY_set1_RSA(EVP_PKEY *pkey, RSA *key) RSA_up_ref(key); return ret; } +LCRYPTO_ALIAS(EVP_PKEY_set1_RSA); #endif #ifndef OPENSSL_NO_DSA @@ -644,6 +674,7 @@ EVP_PKEY_get0_DSA(EVP_PKEY *pkey) } return pkey->pkey.dsa; } +LCRYPTO_ALIAS(EVP_PKEY_get0_DSA); DSA * EVP_PKEY_get1_DSA(EVP_PKEY *pkey) @@ -657,6 +688,7 @@ EVP_PKEY_get1_DSA(EVP_PKEY *pkey) return dsa; } +LCRYPTO_ALIAS(EVP_PKEY_get1_DSA); int EVP_PKEY_set1_DSA(EVP_PKEY *pkey, DSA *key) @@ -666,6 +698,7 @@ EVP_PKEY_set1_DSA(EVP_PKEY *pkey, DSA *key) DSA_up_ref(key); return ret; } +LCRYPTO_ALIAS(EVP_PKEY_set1_DSA); #endif #ifndef OPENSSL_NO_EC @@ -678,6 +711,7 @@ EVP_PKEY_get0_EC_KEY(EVP_PKEY *pkey) } return pkey->pkey.ec; } +LCRYPTO_ALIAS(EVP_PKEY_get0_EC_KEY); EC_KEY * EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey) @@ -691,6 +725,7 @@ EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey) return key; } +LCRYPTO_ALIAS(EVP_PKEY_get1_EC_KEY); int EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, EC_KEY *key) @@ -700,6 +735,7 @@ EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, EC_KEY *key) EC_KEY_up_ref(key); return ret; } +LCRYPTO_ALIAS(EVP_PKEY_set1_EC_KEY); #endif @@ -713,6 +749,7 @@ EVP_PKEY_get0_DH(EVP_PKEY *pkey) } return pkey->pkey.dh; } +LCRYPTO_ALIAS(EVP_PKEY_get0_DH); DH * EVP_PKEY_get1_DH(EVP_PKEY *pkey) @@ -726,6 +763,7 @@ EVP_PKEY_get1_DH(EVP_PKEY *pkey) return dh; } +LCRYPTO_ALIAS(EVP_PKEY_get1_DH); int EVP_PKEY_set1_DH(EVP_PKEY *pkey, DH *key) @@ -735,6 +773,7 @@ EVP_PKEY_set1_DH(EVP_PKEY *pkey, DH *key) DH_up_ref(key); return ret; } +LCRYPTO_ALIAS(EVP_PKEY_set1_DH); #endif int @@ -747,18 +786,21 @@ EVP_PKEY_type(int type) return NID_undef; } +LCRYPTO_ALIAS(EVP_PKEY_type); int EVP_PKEY_id(const EVP_PKEY *pkey) { return pkey->type; } +LCRYPTO_ALIAS(EVP_PKEY_id); int EVP_PKEY_base_id(const EVP_PKEY *pkey) { return EVP_PKEY_type(pkey->type); } +LCRYPTO_ALIAS(EVP_PKEY_base_id); static int unsup_alg(BIO *out, const EVP_PKEY *pkey, int indent, const char *kstr) @@ -779,6 +821,7 @@ EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey, int indent, return unsup_alg(out, pkey, indent, "Public Key"); } +LCRYPTO_ALIAS(EVP_PKEY_print_public); int EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey, int indent, @@ -789,6 +832,7 @@ EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey, int indent, return unsup_alg(out, pkey, indent, "Private Key"); } +LCRYPTO_ALIAS(EVP_PKEY_print_private); int EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey, int indent, @@ -798,6 +842,7 @@ EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey, int indent, return pkey->ameth->param_print(out, pkey, indent, pctx); return unsup_alg(out, pkey, indent, "Parameters"); } +LCRYPTO_ALIAS(EVP_PKEY_print_params); int EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid) @@ -807,3 +852,4 @@ EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid) return pkey->ameth->pkey_ctrl(pkey, ASN1_PKEY_CTRL_DEFAULT_MD_NID, 0, pnid); } +LCRYPTO_ALIAS(EVP_PKEY_get_default_digest_nid); diff --git a/lib/libcrypto/evp/p_sign.c b/lib/libcrypto/evp/p_sign.c index 70290ed2169..7f472ea7164 100644 --- a/lib/libcrypto/evp/p_sign.c +++ b/lib/libcrypto/evp/p_sign.c @@ -1,4 +1,4 @@ -/* $OpenBSD: p_sign.c,v 1.21 2024/03/26 06:08:51 joshua Exp $ */ +/* $OpenBSD: p_sign.c,v 1.22 2024/04/09 13:52:41 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -104,3 +104,4 @@ EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen, EVP_PKEY_CTX_free(pkctx); return ret; } +LCRYPTO_ALIAS(EVP_SignFinal); diff --git a/lib/libcrypto/evp/p_verify.c b/lib/libcrypto/evp/p_verify.c index 04b7c39c65b..02132e2c380 100644 --- a/lib/libcrypto/evp/p_verify.c +++ b/lib/libcrypto/evp/p_verify.c @@ -1,4 +1,4 @@ -/* $OpenBSD: p_verify.c,v 1.20 2024/03/26 05:50:49 joshua Exp $ */ +/* $OpenBSD: p_verify.c,v 1.21 2024/04/09 13:52:41 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -96,3 +96,4 @@ EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf, EVP_PKEY_CTX_free(pkctx); return ret; } +LCRYPTO_ALIAS(EVP_VerifyFinal); diff --git a/lib/libcrypto/evp/pmeth_fn.c b/lib/libcrypto/evp/pmeth_fn.c index a304752e63c..f8ed555fda0 100644 --- a/lib/libcrypto/evp/pmeth_fn.c +++ b/lib/libcrypto/evp/pmeth_fn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmeth_fn.c,v 1.9 2023/07/07 19:37:54 beck Exp $ */ +/* $OpenBSD: pmeth_fn.c,v 1.10 2024/04/09 13:52:41 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2006. */ @@ -98,6 +98,7 @@ EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx) ctx->operation = EVP_PKEY_OP_UNDEFINED; return ret; } +LCRYPTO_ALIAS(EVP_PKEY_sign_init); int EVP_PKEY_sign(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen, @@ -114,6 +115,7 @@ EVP_PKEY_sign(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen, M_check_autoarg(ctx, sig, siglen, EVP_F_EVP_PKEY_SIGN) return ctx->pmeth->sign(ctx, sig, siglen, tbs, tbslen); } +LCRYPTO_ALIAS(EVP_PKEY_sign); int EVP_PKEY_verify_init(EVP_PKEY_CTX *ctx) @@ -132,6 +134,7 @@ EVP_PKEY_verify_init(EVP_PKEY_CTX *ctx) ctx->operation = EVP_PKEY_OP_UNDEFINED; return ret; } +LCRYPTO_ALIAS(EVP_PKEY_verify_init); int EVP_PKEY_verify(EVP_PKEY_CTX *ctx, const unsigned char *sig, size_t siglen, @@ -147,6 +150,7 @@ EVP_PKEY_verify(EVP_PKEY_CTX *ctx, const unsigned char *sig, size_t siglen, } return ctx->pmeth->verify(ctx, sig, siglen, tbs, tbslen); } +LCRYPTO_ALIAS(EVP_PKEY_verify); int EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx) @@ -165,6 +169,7 @@ EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx) ctx->operation = EVP_PKEY_OP_UNDEFINED; return ret; } +LCRYPTO_ALIAS(EVP_PKEY_verify_recover_init); int EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx, unsigned char *rout, size_t *routlen, @@ -181,6 +186,7 @@ EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx, unsigned char *rout, size_t *routlen, M_check_autoarg(ctx, rout, routlen, EVP_F_EVP_PKEY_VERIFY_RECOVER) return ctx->pmeth->verify_recover(ctx, rout, routlen, sig, siglen); } +LCRYPTO_ALIAS(EVP_PKEY_verify_recover); int EVP_PKEY_encrypt_init(EVP_PKEY_CTX *ctx) @@ -199,6 +205,7 @@ EVP_PKEY_encrypt_init(EVP_PKEY_CTX *ctx) ctx->operation = EVP_PKEY_OP_UNDEFINED; return ret; } +LCRYPTO_ALIAS(EVP_PKEY_encrypt_init); int EVP_PKEY_encrypt(EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen, @@ -215,6 +222,7 @@ EVP_PKEY_encrypt(EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen, M_check_autoarg(ctx, out, outlen, EVP_F_EVP_PKEY_ENCRYPT) return ctx->pmeth->encrypt(ctx, out, outlen, in, inlen); } +LCRYPTO_ALIAS(EVP_PKEY_encrypt); int EVP_PKEY_decrypt_init(EVP_PKEY_CTX *ctx) @@ -233,6 +241,7 @@ EVP_PKEY_decrypt_init(EVP_PKEY_CTX *ctx) ctx->operation = EVP_PKEY_OP_UNDEFINED; return ret; } +LCRYPTO_ALIAS(EVP_PKEY_decrypt_init); int EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen, @@ -249,6 +258,7 @@ EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen, M_check_autoarg(ctx, out, outlen, EVP_F_EVP_PKEY_DECRYPT) return ctx->pmeth->decrypt(ctx, out, outlen, in, inlen); } +LCRYPTO_ALIAS(EVP_PKEY_decrypt); int EVP_PKEY_derive_init(EVP_PKEY_CTX *ctx) @@ -267,6 +277,7 @@ EVP_PKEY_derive_init(EVP_PKEY_CTX *ctx) ctx->operation = EVP_PKEY_OP_UNDEFINED; return ret; } +LCRYPTO_ALIAS(EVP_PKEY_derive_init); int EVP_PKEY_derive_set_peer(EVP_PKEY_CTX *ctx, EVP_PKEY *peer) @@ -328,6 +339,7 @@ EVP_PKEY_derive_set_peer(EVP_PKEY_CTX *ctx, EVP_PKEY *peer) CRYPTO_add(&peer->references, 1, CRYPTO_LOCK_EVP_PKEY); return 1; } +LCRYPTO_ALIAS(EVP_PKEY_derive_set_peer); int EVP_PKEY_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *pkeylen) @@ -343,3 +355,4 @@ EVP_PKEY_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *pkeylen) M_check_autoarg(ctx, key, pkeylen, EVP_F_EVP_PKEY_DERIVE) return ctx->pmeth->derive(ctx, key, pkeylen); } +LCRYPTO_ALIAS(EVP_PKEY_derive); diff --git a/lib/libcrypto/evp/pmeth_gn.c b/lib/libcrypto/evp/pmeth_gn.c index ce7b107c7ad..2711ba1a9e8 100644 --- a/lib/libcrypto/evp/pmeth_gn.c +++ b/lib/libcrypto/evp/pmeth_gn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmeth_gn.c,v 1.15 2024/01/01 18:33:04 tb Exp $ */ +/* $OpenBSD: pmeth_gn.c,v 1.16 2024/04/09 13:52:41 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2006. */ @@ -85,6 +85,7 @@ EVP_PKEY_paramgen_init(EVP_PKEY_CTX *ctx) ctx->operation = EVP_PKEY_OP_UNDEFINED; return ret; } +LCRYPTO_ALIAS(EVP_PKEY_paramgen_init); int EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey) @@ -114,6 +115,7 @@ EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey) } return ret; } +LCRYPTO_ALIAS(EVP_PKEY_paramgen); int EVP_PKEY_keygen_init(EVP_PKEY_CTX *ctx) @@ -132,6 +134,7 @@ EVP_PKEY_keygen_init(EVP_PKEY_CTX *ctx) ctx->operation = EVP_PKEY_OP_UNDEFINED; return ret; } +LCRYPTO_ALIAS(EVP_PKEY_keygen_init); int EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey) @@ -160,18 +163,21 @@ EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey) } return ret; } +LCRYPTO_ALIAS(EVP_PKEY_keygen); void EVP_PKEY_CTX_set_cb(EVP_PKEY_CTX *ctx, EVP_PKEY_gen_cb *cb) { ctx->pkey_gencb = cb; } +LCRYPTO_ALIAS(EVP_PKEY_CTX_set_cb); EVP_PKEY_gen_cb * EVP_PKEY_CTX_get_cb(EVP_PKEY_CTX *ctx) { return ctx->pkey_gencb; } +LCRYPTO_ALIAS(EVP_PKEY_CTX_get_cb); /* "translation callback" to call EVP_PKEY_CTX callbacks using BN_GENCB * style callbacks. @@ -201,6 +207,7 @@ EVP_PKEY_CTX_get_keygen_info(EVP_PKEY_CTX *ctx, int idx) return 0; return ctx->keygen_info[idx]; } +LCRYPTO_ALIAS(EVP_PKEY_CTX_get_keygen_info); EVP_PKEY * EVP_PKEY_new_mac_key(int type, ENGINE *e, const unsigned char *key, int keylen) @@ -223,6 +230,7 @@ merr: EVP_PKEY_CTX_free(mac_ctx); return mac_key; } +LCRYPTO_ALIAS(EVP_PKEY_new_mac_key); int EVP_PKEY_check(EVP_PKEY_CTX *ctx) @@ -244,6 +252,7 @@ EVP_PKEY_check(EVP_PKEY_CTX *ctx) return pkey->ameth->pkey_check(pkey); } +LCRYPTO_ALIAS(EVP_PKEY_check); int EVP_PKEY_public_check(EVP_PKEY_CTX *ctx) @@ -265,6 +274,7 @@ EVP_PKEY_public_check(EVP_PKEY_CTX *ctx) return pkey->ameth->pkey_public_check(pkey); } +LCRYPTO_ALIAS(EVP_PKEY_public_check); int EVP_PKEY_param_check(EVP_PKEY_CTX *ctx) @@ -286,3 +296,4 @@ EVP_PKEY_param_check(EVP_PKEY_CTX *ctx) return pkey->ameth->pkey_param_check(pkey); } +LCRYPTO_ALIAS(EVP_PKEY_param_check); diff --git a/lib/libcrypto/evp/pmeth_lib.c b/lib/libcrypto/evp/pmeth_lib.c index a2a9ad9c7bb..a0a193da7a4 100644 --- a/lib/libcrypto/evp/pmeth_lib.c +++ b/lib/libcrypto/evp/pmeth_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmeth_lib.c,v 1.39 2024/03/02 11:17:27 tb Exp $ */ +/* $OpenBSD: pmeth_lib.c,v 1.40 2024/04/09 13:52:41 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2006. */ @@ -155,12 +155,14 @@ EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *engine) { return evp_pkey_ctx_new(pkey, -1); } +LCRYPTO_ALIAS(EVP_PKEY_CTX_new); EVP_PKEY_CTX * EVP_PKEY_CTX_new_id(int nid, ENGINE *engine) { return evp_pkey_ctx_new(NULL, nid); } +LCRYPTO_ALIAS(EVP_PKEY_CTX_new_id); EVP_PKEY_CTX * EVP_PKEY_CTX_dup(EVP_PKEY_CTX *pctx) @@ -192,6 +194,7 @@ EVP_PKEY_CTX_dup(EVP_PKEY_CTX *pctx) EVP_PKEY_CTX_free(rctx); return NULL; } +LCRYPTO_ALIAS(EVP_PKEY_CTX_dup); void EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx) @@ -204,6 +207,7 @@ EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx) EVP_PKEY_free(ctx->peerkey); free(ctx); } +LCRYPTO_ALIAS(EVP_PKEY_CTX_free); int EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype, int cmd, @@ -236,6 +240,7 @@ EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype, int cmd, return ret; } +LCRYPTO_ALIAS(EVP_PKEY_CTX_ctrl); int EVP_PKEY_CTX_ctrl_str(EVP_PKEY_CTX *ctx, const char *name, const char *value) @@ -250,6 +255,7 @@ EVP_PKEY_CTX_ctrl_str(EVP_PKEY_CTX *ctx, const char *name, const char *value) } return ctx->pmeth->ctrl_str(ctx, name, value); } +LCRYPTO_ALIAS(EVP_PKEY_CTX_ctrl_str); int EVP_PKEY_CTX_str2ctrl(EVP_PKEY_CTX *ctx, int cmd, const char *str) @@ -300,6 +306,7 @@ EVP_PKEY_CTX_get_operation(EVP_PKEY_CTX *ctx) { return ctx->operation; } +LCRYPTO_ALIAS(EVP_PKEY_CTX_get_operation); void EVP_PKEY_CTX_set0_keygen_info(EVP_PKEY_CTX *ctx, int *dat, int datlen) @@ -307,39 +314,46 @@ EVP_PKEY_CTX_set0_keygen_info(EVP_PKEY_CTX *ctx, int *dat, int datlen) ctx->keygen_info = dat; ctx->keygen_info_count = datlen; } +LCRYPTO_ALIAS(EVP_PKEY_CTX_set0_keygen_info); void EVP_PKEY_CTX_set_data(EVP_PKEY_CTX *ctx, void *data) { ctx->data = data; } +LCRYPTO_ALIAS(EVP_PKEY_CTX_set_data); void * EVP_PKEY_CTX_get_data(EVP_PKEY_CTX *ctx) { return ctx->data; } +LCRYPTO_ALIAS(EVP_PKEY_CTX_get_data); EVP_PKEY * EVP_PKEY_CTX_get0_pkey(EVP_PKEY_CTX *ctx) { return ctx->pkey; } +LCRYPTO_ALIAS(EVP_PKEY_CTX_get0_pkey); EVP_PKEY * EVP_PKEY_CTX_get0_peerkey(EVP_PKEY_CTX *ctx) { return ctx->peerkey; } +LCRYPTO_ALIAS(EVP_PKEY_CTX_get0_peerkey); void EVP_PKEY_CTX_set_app_data(EVP_PKEY_CTX *ctx, void *data) { ctx->app_data = data; } +LCRYPTO_ALIAS(EVP_PKEY_CTX_set_app_data); void * EVP_PKEY_CTX_get_app_data(EVP_PKEY_CTX *ctx) { return ctx->app_data; } +LCRYPTO_ALIAS(EVP_PKEY_CTX_get_app_data); diff --git a/lib/libcrypto/hidden/openssl/evp.h b/lib/libcrypto/hidden/openssl/evp.h new file mode 100644 index 00000000000..f5f0cc6dd63 --- /dev/null +++ b/lib/libcrypto/hidden/openssl/evp.h @@ -0,0 +1,378 @@ +/* $OpenBSD: evp.h,v 1.3 2024/04/09 13:52:42 beck Exp $ */ +/* + * Copyright (c) 2024 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_EVP_H +#define _LIBCRYPTO_EVP_H + +#ifndef _MSC_VER +#include_next +#else +#include "../include/openssl/evp.h" +#endif +#include "crypto_namespace.h" + +LCRYPTO_USED(EVP_MD_type); +LCRYPTO_USED(EVP_MD_pkey_type); +LCRYPTO_USED(EVP_MD_size); +LCRYPTO_USED(EVP_MD_block_size); +LCRYPTO_USED(EVP_MD_flags); +LCRYPTO_USED(EVP_MD_CTX_md); +LCRYPTO_USED(EVP_MD_CTX_md_data); +LCRYPTO_USED(EVP_MD_CTX_pkey_ctx); +LCRYPTO_USED(EVP_MD_CTX_set_pkey_ctx); +LCRYPTO_USED(EVP_CIPHER_nid); +LCRYPTO_USED(EVP_CIPHER_block_size); +LCRYPTO_USED(EVP_CIPHER_key_length); +LCRYPTO_USED(EVP_CIPHER_iv_length); +LCRYPTO_USED(EVP_CIPHER_flags); +LCRYPTO_USED(EVP_CIPHER_CTX_cipher); +LCRYPTO_USED(EVP_CIPHER_CTX_encrypting); +LCRYPTO_USED(EVP_CIPHER_CTX_nid); +LCRYPTO_USED(EVP_CIPHER_CTX_block_size); +LCRYPTO_USED(EVP_CIPHER_CTX_key_length); +LCRYPTO_USED(EVP_CIPHER_CTX_iv_length); +LCRYPTO_USED(EVP_CIPHER_CTX_get_iv); +LCRYPTO_USED(EVP_CIPHER_CTX_set_iv); +LCRYPTO_USED(EVP_CIPHER_CTX_copy); +LCRYPTO_USED(EVP_CIPHER_CTX_get_app_data); +LCRYPTO_USED(EVP_CIPHER_CTX_set_app_data); +LCRYPTO_USED(EVP_CIPHER_CTX_get_cipher_data); +LCRYPTO_USED(EVP_CIPHER_CTX_set_cipher_data); +LCRYPTO_USED(EVP_CIPHER_CTX_buf_noconst); +LCRYPTO_USED(EVP_CIPHER_CTX_flags); +LCRYPTO_USED(EVP_CIPHER_meth_new); +LCRYPTO_USED(EVP_CIPHER_meth_dup); +LCRYPTO_USED(EVP_CIPHER_meth_free); +LCRYPTO_USED(EVP_CIPHER_meth_set_iv_length); +LCRYPTO_USED(EVP_CIPHER_meth_set_flags); +LCRYPTO_USED(EVP_CIPHER_meth_set_impl_ctx_size); +LCRYPTO_USED(EVP_CIPHER_meth_set_init); +LCRYPTO_USED(EVP_CIPHER_meth_set_do_cipher); +LCRYPTO_USED(EVP_CIPHER_meth_set_cleanup); +LCRYPTO_USED(EVP_CIPHER_meth_set_set_asn1_params); +LCRYPTO_USED(EVP_CIPHER_meth_set_get_asn1_params); +LCRYPTO_USED(EVP_CIPHER_meth_set_ctrl); +LCRYPTO_USED(EVP_PKEY_new_raw_private_key); +LCRYPTO_USED(EVP_PKEY_new_raw_public_key); +LCRYPTO_USED(EVP_PKEY_get_raw_private_key); +LCRYPTO_USED(EVP_PKEY_get_raw_public_key); +LCRYPTO_USED(EVP_Cipher); +LCRYPTO_USED(EVP_MD_CTX_new); +LCRYPTO_USED(EVP_MD_CTX_free); +LCRYPTO_USED(EVP_MD_CTX_reset); +LCRYPTO_USED(EVP_MD_CTX_create); +LCRYPTO_USED(EVP_MD_CTX_destroy); +LCRYPTO_USED(EVP_MD_CTX_cleanup); +LCRYPTO_USED(EVP_MD_CTX_copy_ex); +LCRYPTO_USED(EVP_MD_CTX_set_flags); +LCRYPTO_USED(EVP_MD_CTX_clear_flags); +LCRYPTO_USED(EVP_MD_CTX_ctrl); +LCRYPTO_USED(EVP_MD_CTX_test_flags); +LCRYPTO_USED(EVP_DigestInit_ex); +LCRYPTO_USED(EVP_DigestUpdate); +LCRYPTO_USED(EVP_DigestFinal_ex); +LCRYPTO_USED(EVP_Digest); +LCRYPTO_USED(EVP_MD_CTX_copy); +LCRYPTO_USED(EVP_DigestInit); +LCRYPTO_USED(EVP_DigestFinal); +LCRYPTO_USED(EVP_read_pw_string); +LCRYPTO_USED(EVP_read_pw_string_min); +LCRYPTO_USED(EVP_set_pw_prompt); +LCRYPTO_USED(EVP_get_pw_prompt); +LCRYPTO_USED(EVP_BytesToKey); +LCRYPTO_USED(EVP_CIPHER_CTX_set_flags); +LCRYPTO_USED(EVP_CIPHER_CTX_clear_flags); +LCRYPTO_USED(EVP_CIPHER_CTX_test_flags); +LCRYPTO_USED(EVP_EncryptInit); +LCRYPTO_USED(EVP_EncryptInit_ex); +LCRYPTO_USED(EVP_EncryptUpdate); +LCRYPTO_USED(EVP_EncryptFinal_ex); +LCRYPTO_USED(EVP_DecryptInit); +LCRYPTO_USED(EVP_DecryptInit_ex); +LCRYPTO_USED(EVP_DecryptUpdate); +LCRYPTO_USED(EVP_DecryptFinal_ex); +LCRYPTO_USED(EVP_CipherInit); +LCRYPTO_USED(EVP_CipherInit_ex); +LCRYPTO_USED(EVP_CipherUpdate); +LCRYPTO_USED(EVP_CipherFinal_ex); +LCRYPTO_USED(EVP_SignFinal); +LCRYPTO_USED(EVP_VerifyFinal); +LCRYPTO_USED(EVP_DigestSignInit); +LCRYPTO_USED(EVP_DigestSignFinal); +LCRYPTO_USED(EVP_DigestSign); +LCRYPTO_USED(EVP_DigestVerifyInit); +LCRYPTO_USED(EVP_DigestVerifyFinal); +LCRYPTO_USED(EVP_DigestVerify); +LCRYPTO_USED(EVP_OpenInit); +LCRYPTO_USED(EVP_OpenFinal); +LCRYPTO_USED(EVP_SealInit); +LCRYPTO_USED(EVP_SealFinal); +LCRYPTO_USED(EVP_ENCODE_CTX_new); +LCRYPTO_USED(EVP_ENCODE_CTX_free); +LCRYPTO_USED(EVP_EncodeInit); +LCRYPTO_USED(EVP_EncodeUpdate); +LCRYPTO_USED(EVP_EncodeFinal); +LCRYPTO_USED(EVP_EncodeBlock); +LCRYPTO_USED(EVP_DecodeInit); +LCRYPTO_USED(EVP_DecodeUpdate); +LCRYPTO_USED(EVP_DecodeFinal); +LCRYPTO_USED(EVP_DecodeBlock); +LCRYPTO_USED(EVP_CIPHER_CTX_cleanup); +LCRYPTO_USED(EVP_CIPHER_CTX_new); +LCRYPTO_USED(EVP_CIPHER_CTX_free); +LCRYPTO_USED(EVP_CIPHER_CTX_reset); +LCRYPTO_USED(EVP_CIPHER_CTX_set_key_length); +LCRYPTO_USED(EVP_CIPHER_CTX_set_padding); +LCRYPTO_USED(EVP_CIPHER_CTX_ctrl); +LCRYPTO_USED(EVP_CIPHER_CTX_rand_key); +LCRYPTO_USED(BIO_f_md); +LCRYPTO_USED(BIO_f_base64); +LCRYPTO_USED(BIO_f_cipher); +LCRYPTO_USED(BIO_set_cipher); +LCRYPTO_USED(EVP_md_null); +LCRYPTO_USED(EVP_md4); +LCRYPTO_USED(EVP_md5); +LCRYPTO_USED(EVP_md5_sha1); +LCRYPTO_USED(EVP_sha1); +LCRYPTO_USED(EVP_sha224); +LCRYPTO_USED(EVP_sha256); +LCRYPTO_USED(EVP_sha384); +LCRYPTO_USED(EVP_sha512); +LCRYPTO_USED(EVP_sha512_224); +LCRYPTO_USED(EVP_sha512_256); +LCRYPTO_USED(EVP_sha3_224); +LCRYPTO_USED(EVP_sha3_256); +LCRYPTO_USED(EVP_sha3_384); +LCRYPTO_USED(EVP_sha3_512); +LCRYPTO_USED(EVP_sm3); +LCRYPTO_USED(EVP_ripemd160); +LCRYPTO_USED(EVP_whirlpool); +LCRYPTO_USED(EVP_enc_null); +LCRYPTO_USED(EVP_des_ecb); +LCRYPTO_USED(EVP_des_ede); +LCRYPTO_USED(EVP_des_ede3); +LCRYPTO_USED(EVP_des_ede_ecb); +LCRYPTO_USED(EVP_des_ede3_ecb); +LCRYPTO_USED(EVP_des_cfb64); +LCRYPTO_USED(EVP_des_cfb1); +LCRYPTO_USED(EVP_des_cfb8); +LCRYPTO_USED(EVP_des_ede_cfb64); +LCRYPTO_USED(EVP_des_ede3_cfb64); +LCRYPTO_USED(EVP_des_ede3_cfb1); +LCRYPTO_USED(EVP_des_ede3_cfb8); +LCRYPTO_USED(EVP_des_ofb); +LCRYPTO_USED(EVP_des_ede_ofb); +LCRYPTO_USED(EVP_des_ede3_ofb); +LCRYPTO_USED(EVP_des_cbc); +LCRYPTO_USED(EVP_des_ede_cbc); +LCRYPTO_USED(EVP_des_ede3_cbc); +LCRYPTO_USED(EVP_desx_cbc); +LCRYPTO_USED(EVP_rc4); +LCRYPTO_USED(EVP_rc4_40); +LCRYPTO_USED(EVP_idea_ecb); +LCRYPTO_USED(EVP_idea_cfb64); +LCRYPTO_USED(EVP_idea_ofb); +LCRYPTO_USED(EVP_idea_cbc); +LCRYPTO_USED(EVP_rc2_ecb); +LCRYPTO_USED(EVP_rc2_cbc); +LCRYPTO_USED(EVP_rc2_40_cbc); +LCRYPTO_USED(EVP_rc2_64_cbc); +LCRYPTO_USED(EVP_rc2_cfb64); +LCRYPTO_USED(EVP_rc2_ofb); +LCRYPTO_USED(EVP_bf_ecb); +LCRYPTO_USED(EVP_bf_cbc); +LCRYPTO_USED(EVP_bf_cfb64); +LCRYPTO_USED(EVP_bf_ofb); +LCRYPTO_USED(EVP_cast5_ecb); +LCRYPTO_USED(EVP_cast5_cbc); +LCRYPTO_USED(EVP_cast5_cfb64); +LCRYPTO_USED(EVP_cast5_ofb); +LCRYPTO_USED(EVP_aes_128_ecb); +LCRYPTO_USED(EVP_aes_128_cbc); +LCRYPTO_USED(EVP_aes_128_cfb1); +LCRYPTO_USED(EVP_aes_128_cfb8); +LCRYPTO_USED(EVP_aes_128_cfb128); +LCRYPTO_USED(EVP_aes_128_ofb); +LCRYPTO_USED(EVP_aes_128_ctr); +LCRYPTO_USED(EVP_aes_128_ccm); +LCRYPTO_USED(EVP_aes_128_gcm); +LCRYPTO_USED(EVP_aes_128_wrap); +LCRYPTO_USED(EVP_aes_128_xts); +LCRYPTO_USED(EVP_aes_192_ecb); +LCRYPTO_USED(EVP_aes_192_cbc); +LCRYPTO_USED(EVP_aes_192_cfb1); +LCRYPTO_USED(EVP_aes_192_cfb8); +LCRYPTO_USED(EVP_aes_192_cfb128); +LCRYPTO_USED(EVP_aes_192_ofb); +LCRYPTO_USED(EVP_aes_192_ctr); +LCRYPTO_USED(EVP_aes_192_ccm); +LCRYPTO_USED(EVP_aes_192_gcm); +LCRYPTO_USED(EVP_aes_192_wrap); +LCRYPTO_USED(EVP_aes_256_ecb); +LCRYPTO_USED(EVP_aes_256_cbc); +LCRYPTO_USED(EVP_aes_256_cfb1); +LCRYPTO_USED(EVP_aes_256_cfb8); +LCRYPTO_USED(EVP_aes_256_cfb128); +LCRYPTO_USED(EVP_aes_256_ofb); +LCRYPTO_USED(EVP_aes_256_ctr); +LCRYPTO_USED(EVP_aes_256_ccm); +LCRYPTO_USED(EVP_aes_256_gcm); +LCRYPTO_USED(EVP_aes_256_wrap); +LCRYPTO_USED(EVP_aes_256_xts); +LCRYPTO_USED(EVP_chacha20_poly1305); +LCRYPTO_USED(EVP_camellia_128_ecb); +LCRYPTO_USED(EVP_camellia_128_cbc); +LCRYPTO_USED(EVP_camellia_128_cfb1); +LCRYPTO_USED(EVP_camellia_128_cfb8); +LCRYPTO_USED(EVP_camellia_128_cfb128); +LCRYPTO_USED(EVP_camellia_128_ofb); +LCRYPTO_USED(EVP_camellia_192_ecb); +LCRYPTO_USED(EVP_camellia_192_cbc); +LCRYPTO_USED(EVP_camellia_192_cfb1); +LCRYPTO_USED(EVP_camellia_192_cfb8); +LCRYPTO_USED(EVP_camellia_192_cfb128); +LCRYPTO_USED(EVP_camellia_192_ofb); +LCRYPTO_USED(EVP_camellia_256_ecb); +LCRYPTO_USED(EVP_camellia_256_cbc); +LCRYPTO_USED(EVP_camellia_256_cfb1); +LCRYPTO_USED(EVP_camellia_256_cfb8); +LCRYPTO_USED(EVP_camellia_256_cfb128); +LCRYPTO_USED(EVP_camellia_256_ofb); +LCRYPTO_USED(EVP_chacha20); +LCRYPTO_USED(EVP_sm4_ecb); +LCRYPTO_USED(EVP_sm4_cbc); +LCRYPTO_USED(EVP_sm4_cfb128); +LCRYPTO_USED(EVP_sm4_ofb); +LCRYPTO_USED(EVP_sm4_ctr); +LCRYPTO_USED(OPENSSL_add_all_algorithms_noconf); +LCRYPTO_USED(OPENSSL_add_all_algorithms_conf); +LCRYPTO_USED(OpenSSL_add_all_ciphers); +LCRYPTO_USED(OpenSSL_add_all_digests); +LCRYPTO_USED(EVP_get_cipherbyname); +LCRYPTO_USED(EVP_get_digestbyname); +LCRYPTO_USED(EVP_cleanup); +LCRYPTO_USED(EVP_CIPHER_do_all); +LCRYPTO_USED(EVP_CIPHER_do_all_sorted); +LCRYPTO_USED(EVP_MD_do_all); +LCRYPTO_USED(EVP_MD_do_all_sorted); +LCRYPTO_USED(EVP_PKEY_decrypt_old); +LCRYPTO_USED(EVP_PKEY_encrypt_old); +LCRYPTO_USED(EVP_PKEY_type); +LCRYPTO_USED(EVP_PKEY_id); +LCRYPTO_USED(EVP_PKEY_base_id); +LCRYPTO_USED(EVP_PKEY_bits); +LCRYPTO_USED(EVP_PKEY_security_bits); +LCRYPTO_USED(EVP_PKEY_size); +LCRYPTO_USED(EVP_PKEY_set_type); +LCRYPTO_USED(EVP_PKEY_set_type_str); +LCRYPTO_USED(EVP_PKEY_assign); +LCRYPTO_USED(EVP_PKEY_get0); +LCRYPTO_USED(EVP_PKEY_get0_hmac); +LCRYPTO_USED(EVP_PKEY_get0_RSA); +LCRYPTO_USED(EVP_PKEY_get1_RSA); +LCRYPTO_USED(EVP_PKEY_set1_RSA); +LCRYPTO_USED(EVP_PKEY_get0_DSA); +LCRYPTO_USED(EVP_PKEY_get1_DSA); +LCRYPTO_USED(EVP_PKEY_set1_DSA); +LCRYPTO_USED(EVP_PKEY_get0_DH); +LCRYPTO_USED(EVP_PKEY_get1_DH); +LCRYPTO_USED(EVP_PKEY_set1_DH); +LCRYPTO_USED(EVP_PKEY_get0_EC_KEY); +LCRYPTO_USED(EVP_PKEY_get1_EC_KEY); +LCRYPTO_USED(EVP_PKEY_set1_EC_KEY); +LCRYPTO_USED(EVP_PKEY_new); +LCRYPTO_USED(EVP_PKEY_free); +LCRYPTO_USED(EVP_PKEY_up_ref); +LCRYPTO_USED(d2i_PublicKey); +LCRYPTO_USED(i2d_PublicKey); +LCRYPTO_USED(d2i_PrivateKey); +LCRYPTO_USED(d2i_AutoPrivateKey); +LCRYPTO_USED(i2d_PrivateKey); +LCRYPTO_USED(EVP_PKEY_copy_parameters); +LCRYPTO_USED(EVP_PKEY_missing_parameters); +LCRYPTO_USED(EVP_PKEY_save_parameters); +LCRYPTO_USED(EVP_PKEY_cmp_parameters); +LCRYPTO_USED(EVP_PKEY_cmp); +LCRYPTO_USED(EVP_PKEY_print_public); +LCRYPTO_USED(EVP_PKEY_print_private); +LCRYPTO_USED(EVP_PKEY_print_params); +LCRYPTO_USED(EVP_PKEY_get_default_digest_nid); +LCRYPTO_USED(EVP_CIPHER_type); +LCRYPTO_USED(PKCS5_PBKDF2_HMAC_SHA1); +LCRYPTO_USED(PKCS5_PBKDF2_HMAC); +LCRYPTO_USED(EVP_PKEY_asn1_get_count); +LCRYPTO_USED(EVP_PKEY_asn1_get0); +LCRYPTO_USED(EVP_PKEY_asn1_find); +LCRYPTO_USED(EVP_PKEY_asn1_find_str); +LCRYPTO_USED(EVP_PKEY_asn1_get0_info); +LCRYPTO_USED(EVP_PKEY_get0_asn1); +LCRYPTO_USED(EVP_PKEY_CTX_new); +LCRYPTO_USED(EVP_PKEY_CTX_new_id); +LCRYPTO_USED(EVP_PKEY_CTX_dup); +LCRYPTO_USED(EVP_PKEY_CTX_free); +LCRYPTO_USED(EVP_PKEY_CTX_ctrl); +LCRYPTO_USED(EVP_PKEY_CTX_ctrl_str); +LCRYPTO_USED(EVP_PKEY_CTX_get_operation); +LCRYPTO_USED(EVP_PKEY_CTX_set0_keygen_info); +LCRYPTO_USED(EVP_PKEY_new_mac_key); +LCRYPTO_USED(EVP_PKEY_new_CMAC_key); +LCRYPTO_USED(EVP_PKEY_CTX_set_data); +LCRYPTO_USED(EVP_PKEY_CTX_get_data); +LCRYPTO_USED(EVP_PKEY_CTX_get0_pkey); +LCRYPTO_USED(EVP_PKEY_CTX_get0_peerkey); +LCRYPTO_USED(EVP_PKEY_CTX_set_app_data); +LCRYPTO_USED(EVP_PKEY_CTX_get_app_data); +LCRYPTO_USED(EVP_PKEY_sign_init); +LCRYPTO_USED(EVP_PKEY_sign); +LCRYPTO_USED(EVP_PKEY_verify_init); +LCRYPTO_USED(EVP_PKEY_verify); +LCRYPTO_USED(EVP_PKEY_verify_recover_init); +LCRYPTO_USED(EVP_PKEY_verify_recover); +LCRYPTO_USED(EVP_PKEY_encrypt_init); +LCRYPTO_USED(EVP_PKEY_encrypt); +LCRYPTO_USED(EVP_PKEY_decrypt_init); +LCRYPTO_USED(EVP_PKEY_decrypt); +LCRYPTO_USED(EVP_PKEY_derive_init); +LCRYPTO_USED(EVP_PKEY_derive_set_peer); +LCRYPTO_USED(EVP_PKEY_derive); +LCRYPTO_USED(EVP_PKEY_paramgen_init); +LCRYPTO_USED(EVP_PKEY_paramgen); +LCRYPTO_USED(EVP_PKEY_keygen_init); +LCRYPTO_USED(EVP_PKEY_keygen); +LCRYPTO_USED(EVP_PKEY_check); +LCRYPTO_USED(EVP_PKEY_public_check); +LCRYPTO_USED(EVP_PKEY_param_check); +LCRYPTO_USED(EVP_PKEY_CTX_set_cb); +LCRYPTO_USED(EVP_PKEY_CTX_get_cb); +LCRYPTO_USED(EVP_PKEY_CTX_get_keygen_info); +LCRYPTO_USED(EVP_aead_aes_128_gcm); +LCRYPTO_USED(EVP_aead_aes_256_gcm); +LCRYPTO_USED(EVP_aead_chacha20_poly1305); +LCRYPTO_USED(EVP_aead_xchacha20_poly1305); +LCRYPTO_USED(EVP_AEAD_key_length); +LCRYPTO_USED(EVP_AEAD_nonce_length); +LCRYPTO_USED(EVP_AEAD_max_overhead); +LCRYPTO_USED(EVP_AEAD_max_tag_len); +LCRYPTO_USED(EVP_AEAD_CTX_new); +LCRYPTO_USED(EVP_AEAD_CTX_free); +LCRYPTO_USED(EVP_AEAD_CTX_init); +LCRYPTO_USED(EVP_AEAD_CTX_cleanup); +LCRYPTO_USED(EVP_AEAD_CTX_seal); +LCRYPTO_USED(EVP_AEAD_CTX_open); +LCRYPTO_USED(ERR_load_EVP_strings); + +#endif /* _LIBCRYPTO_EVP_H */