diff options
| author | beck <> | 2023-07-07 13:54:46 +0000 |
|---|---|---|
| committer | beck <> | 2023-07-07 13:54:46 +0000 |
| commit | f9fcde20a6214da85e802190ccd3a2bf5f891559 (patch) | |
| tree | 8637b2fb4bca234d55b598e035f23335be46ce49 /src/lib/libcrypto/evp | |
| parent | 96c313e4aac4001ae9818efee3f34856cdf873b0 (diff) | |
| download | openbsd-f9fcde20a6214da85e802190ccd3a2bf5f891559.tar.gz openbsd-f9fcde20a6214da85e802190ccd3a2bf5f891559.tar.bz2 openbsd-f9fcde20a6214da85e802190ccd3a2bf5f891559.zip | |
Hide symbols in hkdf, evp, err, ecdsa, and ec
(part 2 of commit)
ok jsing@
Diffstat (limited to 'src/lib/libcrypto/evp')
57 files changed, 470 insertions, 57 deletions
diff --git a/src/lib/libcrypto/evp/bio_b64.c b/src/lib/libcrypto/evp/bio_b64.c index 8880a28375..5eceda0993 100644 --- a/src/lib/libcrypto/evp/bio_b64.c +++ b/src/lib/libcrypto/evp/bio_b64.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: bio_b64.c,v 1.26 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: bio_b64.c,v 1.27 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -111,6 +111,7 @@ BIO_f_base64(void) | |||
| 111 | { | 111 | { |
| 112 | return (&methods_b64); | 112 | return (&methods_b64); |
| 113 | } | 113 | } |
| 114 | LCRYPTO_ALIAS(BIO_f_base64); | ||
| 114 | 115 | ||
| 115 | static int | 116 | static int |
| 116 | b64_new(BIO *bi) | 117 | b64_new(BIO *bi) |
diff --git a/src/lib/libcrypto/evp/bio_enc.c b/src/lib/libcrypto/evp/bio_enc.c index 098b1ea32b..747e64ed7f 100644 --- a/src/lib/libcrypto/evp/bio_enc.c +++ b/src/lib/libcrypto/evp/bio_enc.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: bio_enc.c,v 1.27 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: bio_enc.c,v 1.28 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -106,6 +106,7 @@ BIO_f_cipher(void) | |||
| 106 | { | 106 | { |
| 107 | return (&methods_enc); | 107 | return (&methods_enc); |
| 108 | } | 108 | } |
| 109 | LCRYPTO_ALIAS(BIO_f_cipher); | ||
| 109 | 110 | ||
| 110 | static int | 111 | static int |
| 111 | enc_new(BIO *bi) | 112 | enc_new(BIO *bi) |
| @@ -416,3 +417,4 @@ BIO_set_cipher(BIO *b, const EVP_CIPHER *c, const unsigned char *k, | |||
| 416 | 417 | ||
| 417 | return 1; | 418 | return 1; |
| 418 | } | 419 | } |
| 420 | LCRYPTO_ALIAS(BIO_set_cipher); | ||
diff --git a/src/lib/libcrypto/evp/bio_md.c b/src/lib/libcrypto/evp/bio_md.c index 4b7ca44551..83d6c3732c 100644 --- a/src/lib/libcrypto/evp/bio_md.c +++ b/src/lib/libcrypto/evp/bio_md.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: bio_md.c,v 1.19 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: bio_md.c,v 1.20 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -94,6 +94,7 @@ BIO_f_md(void) | |||
| 94 | { | 94 | { |
| 95 | return (&methods_md); | 95 | return (&methods_md); |
| 96 | } | 96 | } |
| 97 | LCRYPTO_ALIAS(BIO_f_md); | ||
| 97 | 98 | ||
| 98 | static int | 99 | static int |
| 99 | md_new(BIO *bi) | 100 | md_new(BIO *bi) |
diff --git a/src/lib/libcrypto/evp/c_all.c b/src/lib/libcrypto/evp/c_all.c index 936d7e810f..5efcd5f237 100644 --- a/src/lib/libcrypto/evp/c_all.c +++ b/src/lib/libcrypto/evp/c_all.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: c_all.c,v 1.29 2023/04/25 15:48:48 tb Exp $ */ | 1 | /* $OpenBSD: c_all.c,v 1.30 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -251,6 +251,7 @@ OpenSSL_add_all_ciphers(void) | |||
| 251 | static pthread_once_t add_all_ciphers_once = PTHREAD_ONCE_INIT; | 251 | static pthread_once_t add_all_ciphers_once = PTHREAD_ONCE_INIT; |
| 252 | (void) pthread_once(&add_all_ciphers_once, OpenSSL_add_all_ciphers_internal); | 252 | (void) pthread_once(&add_all_ciphers_once, OpenSSL_add_all_ciphers_internal); |
| 253 | } | 253 | } |
| 254 | LCRYPTO_ALIAS(OpenSSL_add_all_ciphers); | ||
| 254 | 255 | ||
| 255 | static void | 256 | static void |
| 256 | OpenSSL_add_all_digests_internal(void) | 257 | OpenSSL_add_all_digests_internal(void) |
| @@ -313,6 +314,7 @@ OpenSSL_add_all_digests(void) | |||
| 313 | static pthread_once_t add_all_digests_once = PTHREAD_ONCE_INIT; | 314 | static pthread_once_t add_all_digests_once = PTHREAD_ONCE_INIT; |
| 314 | (void) pthread_once(&add_all_digests_once, OpenSSL_add_all_digests_internal); | 315 | (void) pthread_once(&add_all_digests_once, OpenSSL_add_all_digests_internal); |
| 315 | } | 316 | } |
| 317 | LCRYPTO_ALIAS(OpenSSL_add_all_digests); | ||
| 316 | 318 | ||
| 317 | void | 319 | void |
| 318 | OPENSSL_add_all_algorithms_noconf(void) | 320 | OPENSSL_add_all_algorithms_noconf(void) |
| @@ -321,6 +323,7 @@ OPENSSL_add_all_algorithms_noconf(void) | |||
| 321 | OpenSSL_add_all_ciphers(); | 323 | OpenSSL_add_all_ciphers(); |
| 322 | OpenSSL_add_all_digests(); | 324 | OpenSSL_add_all_digests(); |
| 323 | } | 325 | } |
| 326 | LCRYPTO_ALIAS(OPENSSL_add_all_algorithms_noconf); | ||
| 324 | 327 | ||
| 325 | void | 328 | void |
| 326 | OPENSSL_add_all_algorithms_conf(void) | 329 | OPENSSL_add_all_algorithms_conf(void) |
| @@ -328,3 +331,4 @@ OPENSSL_add_all_algorithms_conf(void) | |||
| 328 | OPENSSL_add_all_algorithms_noconf(); | 331 | OPENSSL_add_all_algorithms_noconf(); |
| 329 | OPENSSL_config(NULL); | 332 | OPENSSL_config(NULL); |
| 330 | } | 333 | } |
| 334 | LCRYPTO_ALIAS(OPENSSL_add_all_algorithms_conf); | ||
diff --git a/src/lib/libcrypto/evp/cipher_method_lib.c b/src/lib/libcrypto/evp/cipher_method_lib.c index 55dc6b788c..9e4fd483a3 100644 --- a/src/lib/libcrypto/evp/cipher_method_lib.c +++ b/src/lib/libcrypto/evp/cipher_method_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: cipher_method_lib.c,v 1.8 2023/03/01 11:27:37 tb Exp $ */ | 1 | /* $OpenBSD: cipher_method_lib.c,v 1.9 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Written by Richard Levitte (levitte@openssl.org) for the OpenSSL project | 3 | * Written by Richard Levitte (levitte@openssl.org) for the OpenSSL project |
| 4 | * 2015. | 4 | * 2015. |
| @@ -77,6 +77,7 @@ EVP_CIPHER_meth_new(int cipher_type, int block_size, int key_len) | |||
| 77 | 77 | ||
| 78 | return cipher; | 78 | return cipher; |
| 79 | } | 79 | } |
| 80 | LCRYPTO_ALIAS(EVP_CIPHER_meth_new); | ||
| 80 | 81 | ||
| 81 | EVP_CIPHER * | 82 | EVP_CIPHER * |
| 82 | EVP_CIPHER_meth_dup(const EVP_CIPHER *cipher) | 83 | EVP_CIPHER_meth_dup(const EVP_CIPHER *cipher) |
| @@ -90,12 +91,14 @@ EVP_CIPHER_meth_dup(const EVP_CIPHER *cipher) | |||
| 90 | 91 | ||
| 91 | return copy; | 92 | return copy; |
| 92 | } | 93 | } |
| 94 | LCRYPTO_ALIAS(EVP_CIPHER_meth_dup); | ||
| 93 | 95 | ||
| 94 | void | 96 | void |
| 95 | EVP_CIPHER_meth_free(EVP_CIPHER *cipher) | 97 | EVP_CIPHER_meth_free(EVP_CIPHER *cipher) |
| 96 | { | 98 | { |
| 97 | free(cipher); | 99 | free(cipher); |
| 98 | } | 100 | } |
| 101 | LCRYPTO_ALIAS(EVP_CIPHER_meth_free); | ||
| 99 | 102 | ||
| 100 | int | 103 | int |
| 101 | EVP_CIPHER_meth_set_iv_length(EVP_CIPHER *cipher, int iv_len) | 104 | EVP_CIPHER_meth_set_iv_length(EVP_CIPHER *cipher, int iv_len) |
| @@ -104,6 +107,7 @@ EVP_CIPHER_meth_set_iv_length(EVP_CIPHER *cipher, int iv_len) | |||
| 104 | 107 | ||
| 105 | return 1; | 108 | return 1; |
| 106 | } | 109 | } |
| 110 | LCRYPTO_ALIAS(EVP_CIPHER_meth_set_iv_length); | ||
| 107 | 111 | ||
| 108 | int | 112 | int |
| 109 | EVP_CIPHER_meth_set_flags(EVP_CIPHER *cipher, unsigned long flags) | 113 | EVP_CIPHER_meth_set_flags(EVP_CIPHER *cipher, unsigned long flags) |
| @@ -112,6 +116,7 @@ EVP_CIPHER_meth_set_flags(EVP_CIPHER *cipher, unsigned long flags) | |||
| 112 | 116 | ||
| 113 | return 1; | 117 | return 1; |
| 114 | } | 118 | } |
| 119 | LCRYPTO_ALIAS(EVP_CIPHER_meth_set_flags); | ||
| 115 | 120 | ||
| 116 | int | 121 | int |
| 117 | EVP_CIPHER_meth_set_impl_ctx_size(EVP_CIPHER *cipher, int ctx_size) | 122 | EVP_CIPHER_meth_set_impl_ctx_size(EVP_CIPHER *cipher, int ctx_size) |
| @@ -120,6 +125,7 @@ EVP_CIPHER_meth_set_impl_ctx_size(EVP_CIPHER *cipher, int ctx_size) | |||
| 120 | 125 | ||
| 121 | return 1; | 126 | return 1; |
| 122 | } | 127 | } |
| 128 | LCRYPTO_ALIAS(EVP_CIPHER_meth_set_impl_ctx_size); | ||
| 123 | 129 | ||
| 124 | int | 130 | int |
| 125 | EVP_CIPHER_meth_set_init(EVP_CIPHER *cipher, | 131 | EVP_CIPHER_meth_set_init(EVP_CIPHER *cipher, |
| @@ -130,6 +136,7 @@ EVP_CIPHER_meth_set_init(EVP_CIPHER *cipher, | |||
| 130 | 136 | ||
| 131 | return 1; | 137 | return 1; |
| 132 | } | 138 | } |
| 139 | LCRYPTO_ALIAS(EVP_CIPHER_meth_set_init); | ||
| 133 | 140 | ||
| 134 | int | 141 | int |
| 135 | EVP_CIPHER_meth_set_do_cipher(EVP_CIPHER *cipher, | 142 | EVP_CIPHER_meth_set_do_cipher(EVP_CIPHER *cipher, |
| @@ -140,6 +147,7 @@ EVP_CIPHER_meth_set_do_cipher(EVP_CIPHER *cipher, | |||
| 140 | 147 | ||
| 141 | return 1; | 148 | return 1; |
| 142 | } | 149 | } |
| 150 | LCRYPTO_ALIAS(EVP_CIPHER_meth_set_do_cipher); | ||
| 143 | 151 | ||
| 144 | int | 152 | int |
| 145 | EVP_CIPHER_meth_set_cleanup(EVP_CIPHER *cipher, | 153 | EVP_CIPHER_meth_set_cleanup(EVP_CIPHER *cipher, |
| @@ -149,6 +157,7 @@ EVP_CIPHER_meth_set_cleanup(EVP_CIPHER *cipher, | |||
| 149 | 157 | ||
| 150 | return 1; | 158 | return 1; |
| 151 | } | 159 | } |
| 160 | LCRYPTO_ALIAS(EVP_CIPHER_meth_set_cleanup); | ||
| 152 | 161 | ||
| 153 | int | 162 | int |
| 154 | EVP_CIPHER_meth_set_set_asn1_params(EVP_CIPHER *cipher, | 163 | EVP_CIPHER_meth_set_set_asn1_params(EVP_CIPHER *cipher, |
| @@ -158,6 +167,7 @@ EVP_CIPHER_meth_set_set_asn1_params(EVP_CIPHER *cipher, | |||
| 158 | 167 | ||
| 159 | return 1; | 168 | return 1; |
| 160 | } | 169 | } |
| 170 | LCRYPTO_ALIAS(EVP_CIPHER_meth_set_set_asn1_params); | ||
| 161 | 171 | ||
| 162 | int | 172 | int |
| 163 | EVP_CIPHER_meth_set_get_asn1_params(EVP_CIPHER *cipher, | 173 | EVP_CIPHER_meth_set_get_asn1_params(EVP_CIPHER *cipher, |
| @@ -167,6 +177,7 @@ EVP_CIPHER_meth_set_get_asn1_params(EVP_CIPHER *cipher, | |||
| 167 | 177 | ||
| 168 | return 1; | 178 | return 1; |
| 169 | } | 179 | } |
| 180 | LCRYPTO_ALIAS(EVP_CIPHER_meth_set_get_asn1_params); | ||
| 170 | 181 | ||
| 171 | int | 182 | int |
| 172 | EVP_CIPHER_meth_set_ctrl(EVP_CIPHER *cipher, | 183 | EVP_CIPHER_meth_set_ctrl(EVP_CIPHER *cipher, |
| @@ -176,3 +187,4 @@ EVP_CIPHER_meth_set_ctrl(EVP_CIPHER *cipher, | |||
| 176 | 187 | ||
| 177 | return 1; | 188 | return 1; |
| 178 | } | 189 | } |
| 190 | LCRYPTO_ALIAS(EVP_CIPHER_meth_set_ctrl); | ||
diff --git a/src/lib/libcrypto/evp/digest.c b/src/lib/libcrypto/evp/digest.c index 7c129f025d..6615aa4a35 100644 --- a/src/lib/libcrypto/evp/digest.c +++ b/src/lib/libcrypto/evp/digest.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: digest.c,v 1.36 2022/12/26 07:18:52 jmc Exp $ */ | 1 | /* $OpenBSD: digest.c,v 1.37 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -130,6 +130,7 @@ EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type) | |||
| 130 | EVP_MD_CTX_init(ctx); | 130 | EVP_MD_CTX_init(ctx); |
| 131 | return EVP_DigestInit_ex(ctx, type, NULL); | 131 | return EVP_DigestInit_ex(ctx, type, NULL); |
| 132 | } | 132 | } |
| 133 | LCRYPTO_ALIAS(EVP_DigestInit); | ||
| 133 | 134 | ||
| 134 | int | 135 | int |
| 135 | EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl) | 136 | EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl) |
| @@ -211,12 +212,14 @@ skip_to_init: | |||
| 211 | return 1; | 212 | return 1; |
| 212 | return ctx->digest->init(ctx); | 213 | return ctx->digest->init(ctx); |
| 213 | } | 214 | } |
| 215 | LCRYPTO_ALIAS(EVP_DigestInit_ex); | ||
| 214 | 216 | ||
| 215 | int | 217 | int |
| 216 | EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *data, size_t count) | 218 | EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *data, size_t count) |
| 217 | { | 219 | { |
| 218 | return ctx->update(ctx, data, count); | 220 | return ctx->update(ctx, data, count); |
| 219 | } | 221 | } |
| 222 | LCRYPTO_ALIAS(EVP_DigestUpdate); | ||
| 220 | 223 | ||
| 221 | /* The caller can assume that this removes any secret data from the context */ | 224 | /* The caller can assume that this removes any secret data from the context */ |
| 222 | int | 225 | int |
| @@ -228,6 +231,7 @@ EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *size) | |||
| 228 | EVP_MD_CTX_cleanup(ctx); | 231 | EVP_MD_CTX_cleanup(ctx); |
| 229 | return ret; | 232 | return ret; |
| 230 | } | 233 | } |
| 234 | LCRYPTO_ALIAS(EVP_DigestFinal); | ||
| 231 | 235 | ||
| 232 | /* The caller can assume that this removes any secret data from the context */ | 236 | /* The caller can assume that this removes any secret data from the context */ |
| 233 | int | 237 | int |
| @@ -249,6 +253,7 @@ EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *size) | |||
| 249 | memset(ctx->md_data, 0, ctx->digest->ctx_size); | 253 | memset(ctx->md_data, 0, ctx->digest->ctx_size); |
| 250 | return ret; | 254 | return ret; |
| 251 | } | 255 | } |
| 256 | LCRYPTO_ALIAS(EVP_DigestFinal_ex); | ||
| 252 | 257 | ||
| 253 | int | 258 | int |
| 254 | EVP_MD_CTX_copy(EVP_MD_CTX *out, const EVP_MD_CTX *in) | 259 | EVP_MD_CTX_copy(EVP_MD_CTX *out, const EVP_MD_CTX *in) |
| @@ -256,6 +261,7 @@ EVP_MD_CTX_copy(EVP_MD_CTX *out, const EVP_MD_CTX *in) | |||
| 256 | EVP_MD_CTX_init(out); | 261 | EVP_MD_CTX_init(out); |
| 257 | return EVP_MD_CTX_copy_ex(out, in); | 262 | return EVP_MD_CTX_copy_ex(out, in); |
| 258 | } | 263 | } |
| 264 | LCRYPTO_ALIAS(EVP_MD_CTX_copy); | ||
| 259 | 265 | ||
| 260 | int | 266 | int |
| 261 | EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in) | 267 | EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in) |
| @@ -318,6 +324,7 @@ EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in) | |||
| 318 | 324 | ||
| 319 | return 1; | 325 | return 1; |
| 320 | } | 326 | } |
| 327 | LCRYPTO_ALIAS(EVP_MD_CTX_copy_ex); | ||
| 321 | 328 | ||
| 322 | int | 329 | int |
| 323 | EVP_Digest(const void *data, size_t count, | 330 | EVP_Digest(const void *data, size_t count, |
| @@ -335,12 +342,14 @@ EVP_Digest(const void *data, size_t count, | |||
| 335 | 342 | ||
| 336 | return ret; | 343 | return ret; |
| 337 | } | 344 | } |
| 345 | LCRYPTO_ALIAS(EVP_Digest); | ||
| 338 | 346 | ||
| 339 | EVP_MD_CTX * | 347 | EVP_MD_CTX * |
| 340 | EVP_MD_CTX_new(void) | 348 | EVP_MD_CTX_new(void) |
| 341 | { | 349 | { |
| 342 | return calloc(1, sizeof(EVP_MD_CTX)); | 350 | return calloc(1, sizeof(EVP_MD_CTX)); |
| 343 | } | 351 | } |
| 352 | LCRYPTO_ALIAS(EVP_MD_CTX_new); | ||
| 344 | 353 | ||
| 345 | void | 354 | void |
| 346 | EVP_MD_CTX_free(EVP_MD_CTX *ctx) | 355 | EVP_MD_CTX_free(EVP_MD_CTX *ctx) |
| @@ -352,30 +361,35 @@ EVP_MD_CTX_free(EVP_MD_CTX *ctx) | |||
| 352 | 361 | ||
| 353 | free(ctx); | 362 | free(ctx); |
| 354 | } | 363 | } |
| 364 | LCRYPTO_ALIAS(EVP_MD_CTX_free); | ||
| 355 | 365 | ||
| 356 | void | 366 | void |
| 357 | EVP_MD_CTX_init(EVP_MD_CTX *ctx) | 367 | EVP_MD_CTX_init(EVP_MD_CTX *ctx) |
| 358 | { | 368 | { |
| 359 | memset(ctx, 0, sizeof(*ctx)); | 369 | memset(ctx, 0, sizeof(*ctx)); |
| 360 | } | 370 | } |
| 371 | LCRYPTO_ALIAS(EVP_MD_CTX_init); | ||
| 361 | 372 | ||
| 362 | int | 373 | int |
| 363 | EVP_MD_CTX_reset(EVP_MD_CTX *ctx) | 374 | EVP_MD_CTX_reset(EVP_MD_CTX *ctx) |
| 364 | { | 375 | { |
| 365 | return EVP_MD_CTX_cleanup(ctx); | 376 | return EVP_MD_CTX_cleanup(ctx); |
| 366 | } | 377 | } |
| 378 | LCRYPTO_ALIAS(EVP_MD_CTX_reset); | ||
| 367 | 379 | ||
| 368 | EVP_MD_CTX * | 380 | EVP_MD_CTX * |
| 369 | EVP_MD_CTX_create(void) | 381 | EVP_MD_CTX_create(void) |
| 370 | { | 382 | { |
| 371 | return EVP_MD_CTX_new(); | 383 | return EVP_MD_CTX_new(); |
| 372 | } | 384 | } |
| 385 | LCRYPTO_ALIAS(EVP_MD_CTX_create); | ||
| 373 | 386 | ||
| 374 | void | 387 | void |
| 375 | EVP_MD_CTX_destroy(EVP_MD_CTX *ctx) | 388 | EVP_MD_CTX_destroy(EVP_MD_CTX *ctx) |
| 376 | { | 389 | { |
| 377 | EVP_MD_CTX_free(ctx); | 390 | EVP_MD_CTX_free(ctx); |
| 378 | } | 391 | } |
| 392 | LCRYPTO_ALIAS(EVP_MD_CTX_destroy); | ||
| 379 | 393 | ||
| 380 | /* This call frees resources associated with the context */ | 394 | /* This call frees resources associated with the context */ |
| 381 | int | 395 | int |
| @@ -404,6 +418,7 @@ EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx) | |||
| 404 | 418 | ||
| 405 | return 1; | 419 | return 1; |
| 406 | } | 420 | } |
| 421 | LCRYPTO_ALIAS(EVP_MD_CTX_cleanup); | ||
| 407 | 422 | ||
| 408 | int | 423 | int |
| 409 | EVP_MD_CTX_ctrl(EVP_MD_CTX *ctx, int type, int arg, void *ptr) | 424 | EVP_MD_CTX_ctrl(EVP_MD_CTX *ctx, int type, int arg, void *ptr) |
| @@ -427,3 +442,4 @@ EVP_MD_CTX_ctrl(EVP_MD_CTX *ctx, int type, int arg, void *ptr) | |||
| 427 | } | 442 | } |
| 428 | return ret; | 443 | return ret; |
| 429 | } | 444 | } |
| 445 | LCRYPTO_ALIAS(EVP_MD_CTX_ctrl); | ||
diff --git a/src/lib/libcrypto/evp/e_aes.c b/src/lib/libcrypto/evp/e_aes.c index 790b26384d..35c8d944ed 100644 --- a/src/lib/libcrypto/evp/e_aes.c +++ b/src/lib/libcrypto/evp/e_aes.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: e_aes.c,v 1.51 2023/03/01 11:16:06 tb Exp $ */ | 1 | /* $OpenBSD: e_aes.c,v 1.52 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* ==================================================================== | 2 | /* ==================================================================== |
| 3 | * Copyright (c) 2001-2011 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 2001-2011 The OpenSSL Project. All rights reserved. |
| 4 | * | 4 | * |
| @@ -572,6 +572,7 @@ EVP_aes_128_cbc(void) | |||
| 572 | return &aes_128_cbc; | 572 | return &aes_128_cbc; |
| 573 | #endif | 573 | #endif |
| 574 | } | 574 | } |
| 575 | LCRYPTO_ALIAS(EVP_aes_128_cbc); | ||
| 575 | 576 | ||
| 576 | #ifdef AESNI_CAPABLE | 577 | #ifdef AESNI_CAPABLE |
| 577 | static const EVP_CIPHER aesni_128_ecb = { | 578 | static const EVP_CIPHER aesni_128_ecb = { |
| @@ -606,6 +607,7 @@ EVP_aes_128_ecb(void) | |||
| 606 | return &aes_128_ecb; | 607 | return &aes_128_ecb; |
| 607 | #endif | 608 | #endif |
| 608 | } | 609 | } |
| 610 | LCRYPTO_ALIAS(EVP_aes_128_ecb); | ||
| 609 | 611 | ||
| 610 | #ifdef AESNI_CAPABLE | 612 | #ifdef AESNI_CAPABLE |
| 611 | static const EVP_CIPHER aesni_128_ofb = { | 613 | static const EVP_CIPHER aesni_128_ofb = { |
| @@ -640,6 +642,7 @@ EVP_aes_128_ofb(void) | |||
| 640 | return &aes_128_ofb; | 642 | return &aes_128_ofb; |
| 641 | #endif | 643 | #endif |
| 642 | } | 644 | } |
| 645 | LCRYPTO_ALIAS(EVP_aes_128_ofb); | ||
| 643 | 646 | ||
| 644 | #ifdef AESNI_CAPABLE | 647 | #ifdef AESNI_CAPABLE |
| 645 | static const EVP_CIPHER aesni_128_cfb = { | 648 | static const EVP_CIPHER aesni_128_cfb = { |
| @@ -708,6 +711,7 @@ EVP_aes_128_cfb1(void) | |||
| 708 | return &aes_128_cfb1; | 711 | return &aes_128_cfb1; |
| 709 | #endif | 712 | #endif |
| 710 | } | 713 | } |
| 714 | LCRYPTO_ALIAS(EVP_aes_128_cfb1); | ||
| 711 | 715 | ||
| 712 | #ifdef AESNI_CAPABLE | 716 | #ifdef AESNI_CAPABLE |
| 713 | static const EVP_CIPHER aesni_128_cfb8 = { | 717 | static const EVP_CIPHER aesni_128_cfb8 = { |
| @@ -742,6 +746,7 @@ EVP_aes_128_cfb8(void) | |||
| 742 | return &aes_128_cfb8; | 746 | return &aes_128_cfb8; |
| 743 | #endif | 747 | #endif |
| 744 | } | 748 | } |
| 749 | LCRYPTO_ALIAS(EVP_aes_128_cfb8); | ||
| 745 | 750 | ||
| 746 | #ifdef AESNI_CAPABLE | 751 | #ifdef AESNI_CAPABLE |
| 747 | static const EVP_CIPHER aesni_128_ctr = { | 752 | static const EVP_CIPHER aesni_128_ctr = { |
| @@ -776,6 +781,7 @@ EVP_aes_128_ctr(void) | |||
| 776 | return &aes_128_ctr; | 781 | return &aes_128_ctr; |
| 777 | #endif | 782 | #endif |
| 778 | } | 783 | } |
| 784 | LCRYPTO_ALIAS(EVP_aes_128_ctr); | ||
| 779 | 785 | ||
| 780 | 786 | ||
| 781 | #ifdef AESNI_CAPABLE | 787 | #ifdef AESNI_CAPABLE |
| @@ -811,6 +817,7 @@ EVP_aes_192_cbc(void) | |||
| 811 | return &aes_192_cbc; | 817 | return &aes_192_cbc; |
| 812 | #endif | 818 | #endif |
| 813 | } | 819 | } |
| 820 | LCRYPTO_ALIAS(EVP_aes_192_cbc); | ||
| 814 | 821 | ||
| 815 | #ifdef AESNI_CAPABLE | 822 | #ifdef AESNI_CAPABLE |
| 816 | static const EVP_CIPHER aesni_192_ecb = { | 823 | static const EVP_CIPHER aesni_192_ecb = { |
| @@ -845,6 +852,7 @@ EVP_aes_192_ecb(void) | |||
| 845 | return &aes_192_ecb; | 852 | return &aes_192_ecb; |
| 846 | #endif | 853 | #endif |
| 847 | } | 854 | } |
| 855 | LCRYPTO_ALIAS(EVP_aes_192_ecb); | ||
| 848 | 856 | ||
| 849 | #ifdef AESNI_CAPABLE | 857 | #ifdef AESNI_CAPABLE |
| 850 | static const EVP_CIPHER aesni_192_ofb = { | 858 | static const EVP_CIPHER aesni_192_ofb = { |
| @@ -879,6 +887,7 @@ EVP_aes_192_ofb(void) | |||
| 879 | return &aes_192_ofb; | 887 | return &aes_192_ofb; |
| 880 | #endif | 888 | #endif |
| 881 | } | 889 | } |
| 890 | LCRYPTO_ALIAS(EVP_aes_192_ofb); | ||
| 882 | 891 | ||
| 883 | #ifdef AESNI_CAPABLE | 892 | #ifdef AESNI_CAPABLE |
| 884 | static const EVP_CIPHER aesni_192_cfb = { | 893 | static const EVP_CIPHER aesni_192_cfb = { |
| @@ -947,6 +956,7 @@ EVP_aes_192_cfb1(void) | |||
| 947 | return &aes_192_cfb1; | 956 | return &aes_192_cfb1; |
| 948 | #endif | 957 | #endif |
| 949 | } | 958 | } |
| 959 | LCRYPTO_ALIAS(EVP_aes_192_cfb1); | ||
| 950 | 960 | ||
| 951 | #ifdef AESNI_CAPABLE | 961 | #ifdef AESNI_CAPABLE |
| 952 | static const EVP_CIPHER aesni_192_cfb8 = { | 962 | static const EVP_CIPHER aesni_192_cfb8 = { |
| @@ -981,6 +991,7 @@ EVP_aes_192_cfb8(void) | |||
| 981 | return &aes_192_cfb8; | 991 | return &aes_192_cfb8; |
| 982 | #endif | 992 | #endif |
| 983 | } | 993 | } |
| 994 | LCRYPTO_ALIAS(EVP_aes_192_cfb8); | ||
| 984 | 995 | ||
| 985 | #ifdef AESNI_CAPABLE | 996 | #ifdef AESNI_CAPABLE |
| 986 | static const EVP_CIPHER aesni_192_ctr = { | 997 | static const EVP_CIPHER aesni_192_ctr = { |
| @@ -1015,6 +1026,7 @@ EVP_aes_192_ctr(void) | |||
| 1015 | return &aes_192_ctr; | 1026 | return &aes_192_ctr; |
| 1016 | #endif | 1027 | #endif |
| 1017 | } | 1028 | } |
| 1029 | LCRYPTO_ALIAS(EVP_aes_192_ctr); | ||
| 1018 | 1030 | ||
| 1019 | 1031 | ||
| 1020 | #ifdef AESNI_CAPABLE | 1032 | #ifdef AESNI_CAPABLE |
| @@ -1050,6 +1062,7 @@ EVP_aes_256_cbc(void) | |||
| 1050 | return &aes_256_cbc; | 1062 | return &aes_256_cbc; |
| 1051 | #endif | 1063 | #endif |
| 1052 | } | 1064 | } |
| 1065 | LCRYPTO_ALIAS(EVP_aes_256_cbc); | ||
| 1053 | 1066 | ||
| 1054 | #ifdef AESNI_CAPABLE | 1067 | #ifdef AESNI_CAPABLE |
| 1055 | static const EVP_CIPHER aesni_256_ecb = { | 1068 | static const EVP_CIPHER aesni_256_ecb = { |
| @@ -1084,6 +1097,7 @@ EVP_aes_256_ecb(void) | |||
| 1084 | return &aes_256_ecb; | 1097 | return &aes_256_ecb; |
| 1085 | #endif | 1098 | #endif |
| 1086 | } | 1099 | } |
| 1100 | LCRYPTO_ALIAS(EVP_aes_256_ecb); | ||
| 1087 | 1101 | ||
| 1088 | #ifdef AESNI_CAPABLE | 1102 | #ifdef AESNI_CAPABLE |
| 1089 | static const EVP_CIPHER aesni_256_ofb = { | 1103 | static const EVP_CIPHER aesni_256_ofb = { |
| @@ -1118,6 +1132,7 @@ EVP_aes_256_ofb(void) | |||
| 1118 | return &aes_256_ofb; | 1132 | return &aes_256_ofb; |
| 1119 | #endif | 1133 | #endif |
| 1120 | } | 1134 | } |
| 1135 | LCRYPTO_ALIAS(EVP_aes_256_ofb); | ||
| 1121 | 1136 | ||
| 1122 | #ifdef AESNI_CAPABLE | 1137 | #ifdef AESNI_CAPABLE |
| 1123 | static const EVP_CIPHER aesni_256_cfb = { | 1138 | static const EVP_CIPHER aesni_256_cfb = { |
| @@ -1186,6 +1201,7 @@ EVP_aes_256_cfb1(void) | |||
| 1186 | return &aes_256_cfb1; | 1201 | return &aes_256_cfb1; |
| 1187 | #endif | 1202 | #endif |
| 1188 | } | 1203 | } |
| 1204 | LCRYPTO_ALIAS(EVP_aes_256_cfb1); | ||
| 1189 | 1205 | ||
| 1190 | #ifdef AESNI_CAPABLE | 1206 | #ifdef AESNI_CAPABLE |
| 1191 | static const EVP_CIPHER aesni_256_cfb8 = { | 1207 | static const EVP_CIPHER aesni_256_cfb8 = { |
| @@ -1220,6 +1236,7 @@ EVP_aes_256_cfb8(void) | |||
| 1220 | return &aes_256_cfb8; | 1236 | return &aes_256_cfb8; |
| 1221 | #endif | 1237 | #endif |
| 1222 | } | 1238 | } |
| 1239 | LCRYPTO_ALIAS(EVP_aes_256_cfb8); | ||
| 1223 | 1240 | ||
| 1224 | #ifdef AESNI_CAPABLE | 1241 | #ifdef AESNI_CAPABLE |
| 1225 | static const EVP_CIPHER aesni_256_ctr = { | 1242 | static const EVP_CIPHER aesni_256_ctr = { |
| @@ -1254,6 +1271,7 @@ EVP_aes_256_ctr(void) | |||
| 1254 | return &aes_256_ctr; | 1271 | return &aes_256_ctr; |
| 1255 | #endif | 1272 | #endif |
| 1256 | } | 1273 | } |
| 1274 | LCRYPTO_ALIAS(EVP_aes_256_ctr); | ||
| 1257 | 1275 | ||
| 1258 | static int | 1276 | static int |
| 1259 | aes_gcm_cleanup(EVP_CIPHER_CTX *c) | 1277 | aes_gcm_cleanup(EVP_CIPHER_CTX *c) |
| @@ -1672,6 +1690,7 @@ EVP_aes_128_gcm(void) | |||
| 1672 | return &aes_128_gcm; | 1690 | return &aes_128_gcm; |
| 1673 | #endif | 1691 | #endif |
| 1674 | } | 1692 | } |
| 1693 | LCRYPTO_ALIAS(EVP_aes_128_gcm); | ||
| 1675 | 1694 | ||
| 1676 | #ifdef AESNI_CAPABLE | 1695 | #ifdef AESNI_CAPABLE |
| 1677 | static const EVP_CIPHER aesni_192_gcm = { | 1696 | static const EVP_CIPHER aesni_192_gcm = { |
| @@ -1710,6 +1729,7 @@ EVP_aes_192_gcm(void) | |||
| 1710 | return &aes_192_gcm; | 1729 | return &aes_192_gcm; |
| 1711 | #endif | 1730 | #endif |
| 1712 | } | 1731 | } |
| 1732 | LCRYPTO_ALIAS(EVP_aes_192_gcm); | ||
| 1713 | 1733 | ||
| 1714 | #ifdef AESNI_CAPABLE | 1734 | #ifdef AESNI_CAPABLE |
| 1715 | static const EVP_CIPHER aesni_256_gcm = { | 1735 | static const EVP_CIPHER aesni_256_gcm = { |
| @@ -1748,6 +1768,7 @@ EVP_aes_256_gcm(void) | |||
| 1748 | return &aes_256_gcm; | 1768 | return &aes_256_gcm; |
| 1749 | #endif | 1769 | #endif |
| 1750 | } | 1770 | } |
| 1771 | LCRYPTO_ALIAS(EVP_aes_256_gcm); | ||
| 1751 | 1772 | ||
| 1752 | static int | 1773 | static int |
| 1753 | aes_xts_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) | 1774 | aes_xts_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) |
| @@ -1914,6 +1935,7 @@ EVP_aes_128_xts(void) | |||
| 1914 | return &aes_128_xts; | 1935 | return &aes_128_xts; |
| 1915 | #endif | 1936 | #endif |
| 1916 | } | 1937 | } |
| 1938 | LCRYPTO_ALIAS(EVP_aes_128_xts); | ||
| 1917 | 1939 | ||
| 1918 | #ifdef AESNI_CAPABLE | 1940 | #ifdef AESNI_CAPABLE |
| 1919 | static const EVP_CIPHER aesni_256_xts = { | 1941 | static const EVP_CIPHER aesni_256_xts = { |
| @@ -1952,6 +1974,7 @@ EVP_aes_256_xts(void) | |||
| 1952 | return &aes_256_xts; | 1974 | return &aes_256_xts; |
| 1953 | #endif | 1975 | #endif |
| 1954 | } | 1976 | } |
| 1977 | LCRYPTO_ALIAS(EVP_aes_256_xts); | ||
| 1955 | 1978 | ||
| 1956 | static int | 1979 | static int |
| 1957 | aes_ccm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) | 1980 | aes_ccm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) |
| @@ -2148,6 +2171,7 @@ EVP_aes_128_ccm(void) | |||
| 2148 | return &aes_128_ccm; | 2171 | return &aes_128_ccm; |
| 2149 | #endif | 2172 | #endif |
| 2150 | } | 2173 | } |
| 2174 | LCRYPTO_ALIAS(EVP_aes_128_ccm); | ||
| 2151 | 2175 | ||
| 2152 | #ifdef AESNI_CAPABLE | 2176 | #ifdef AESNI_CAPABLE |
| 2153 | static const EVP_CIPHER aesni_192_ccm = { | 2177 | static const EVP_CIPHER aesni_192_ccm = { |
| @@ -2186,6 +2210,7 @@ EVP_aes_192_ccm(void) | |||
| 2186 | return &aes_192_ccm; | 2210 | return &aes_192_ccm; |
| 2187 | #endif | 2211 | #endif |
| 2188 | } | 2212 | } |
| 2213 | LCRYPTO_ALIAS(EVP_aes_192_ccm); | ||
| 2189 | 2214 | ||
| 2190 | #ifdef AESNI_CAPABLE | 2215 | #ifdef AESNI_CAPABLE |
| 2191 | static const EVP_CIPHER aesni_256_ccm = { | 2216 | static const EVP_CIPHER aesni_256_ccm = { |
| @@ -2224,6 +2249,7 @@ EVP_aes_256_ccm(void) | |||
| 2224 | return &aes_256_ccm; | 2249 | return &aes_256_ccm; |
| 2225 | #endif | 2250 | #endif |
| 2226 | } | 2251 | } |
| 2252 | LCRYPTO_ALIAS(EVP_aes_256_ccm); | ||
| 2227 | 2253 | ||
| 2228 | #define EVP_AEAD_AES_GCM_TAG_LEN 16 | 2254 | #define EVP_AEAD_AES_GCM_TAG_LEN 16 |
| 2229 | 2255 | ||
| @@ -2414,12 +2440,14 @@ EVP_aead_aes_128_gcm(void) | |||
| 2414 | { | 2440 | { |
| 2415 | return &aead_aes_128_gcm; | 2441 | return &aead_aes_128_gcm; |
| 2416 | } | 2442 | } |
| 2443 | LCRYPTO_ALIAS(EVP_aead_aes_128_gcm); | ||
| 2417 | 2444 | ||
| 2418 | const EVP_AEAD * | 2445 | const EVP_AEAD * |
| 2419 | EVP_aead_aes_256_gcm(void) | 2446 | EVP_aead_aes_256_gcm(void) |
| 2420 | { | 2447 | { |
| 2421 | return &aead_aes_256_gcm; | 2448 | return &aead_aes_256_gcm; |
| 2422 | } | 2449 | } |
| 2450 | LCRYPTO_ALIAS(EVP_aead_aes_256_gcm); | ||
| 2423 | 2451 | ||
| 2424 | typedef struct { | 2452 | typedef struct { |
| 2425 | union { | 2453 | union { |
| @@ -2545,6 +2573,7 @@ EVP_aes_128_wrap(void) | |||
| 2545 | { | 2573 | { |
| 2546 | return &aes_128_wrap; | 2574 | return &aes_128_wrap; |
| 2547 | } | 2575 | } |
| 2576 | LCRYPTO_ALIAS(EVP_aes_128_wrap); | ||
| 2548 | 2577 | ||
| 2549 | static const EVP_CIPHER aes_192_wrap = { | 2578 | static const EVP_CIPHER aes_192_wrap = { |
| 2550 | .nid = NID_id_aes192_wrap, | 2579 | .nid = NID_id_aes192_wrap, |
| @@ -2567,6 +2596,7 @@ EVP_aes_192_wrap(void) | |||
| 2567 | { | 2596 | { |
| 2568 | return &aes_192_wrap; | 2597 | return &aes_192_wrap; |
| 2569 | } | 2598 | } |
| 2599 | LCRYPTO_ALIAS(EVP_aes_192_wrap); | ||
| 2570 | 2600 | ||
| 2571 | static const EVP_CIPHER aes_256_wrap = { | 2601 | static const EVP_CIPHER aes_256_wrap = { |
| 2572 | .nid = NID_id_aes256_wrap, | 2602 | .nid = NID_id_aes256_wrap, |
| @@ -2589,5 +2619,6 @@ EVP_aes_256_wrap(void) | |||
| 2589 | { | 2619 | { |
| 2590 | return &aes_256_wrap; | 2620 | return &aes_256_wrap; |
| 2591 | } | 2621 | } |
| 2622 | LCRYPTO_ALIAS(EVP_aes_256_wrap); | ||
| 2592 | 2623 | ||
| 2593 | #endif | 2624 | #endif |
diff --git a/src/lib/libcrypto/evp/e_aes_cbc_hmac_sha1.c b/src/lib/libcrypto/evp/e_aes_cbc_hmac_sha1.c index 9cde386150..b905b359c9 100644 --- a/src/lib/libcrypto/evp/e_aes_cbc_hmac_sha1.c +++ b/src/lib/libcrypto/evp/e_aes_cbc_hmac_sha1.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: e_aes_cbc_hmac_sha1.c,v 1.17 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: e_aes_cbc_hmac_sha1.c,v 1.18 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* ==================================================================== | 2 | /* ==================================================================== |
| 3 | * Copyright (c) 2011-2013 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 2011-2013 The OpenSSL Project. All rights reserved. |
| 4 | * | 4 | * |
| @@ -581,6 +581,7 @@ EVP_aes_128_cbc_hmac_sha1(void) | |||
| 581 | return (OPENSSL_cpu_caps() & CPUCAP_MASK_AESNI) ? | 581 | return (OPENSSL_cpu_caps() & CPUCAP_MASK_AESNI) ? |
| 582 | &aesni_128_cbc_hmac_sha1_cipher : NULL; | 582 | &aesni_128_cbc_hmac_sha1_cipher : NULL; |
| 583 | } | 583 | } |
| 584 | LCRYPTO_ALIAS(EVP_aes_128_cbc_hmac_sha1); | ||
| 584 | 585 | ||
| 585 | const EVP_CIPHER * | 586 | const EVP_CIPHER * |
| 586 | EVP_aes_256_cbc_hmac_sha1(void) | 587 | EVP_aes_256_cbc_hmac_sha1(void) |
| @@ -588,17 +589,20 @@ EVP_aes_256_cbc_hmac_sha1(void) | |||
| 588 | return (OPENSSL_cpu_caps() & CPUCAP_MASK_AESNI) ? | 589 | return (OPENSSL_cpu_caps() & CPUCAP_MASK_AESNI) ? |
| 589 | &aesni_256_cbc_hmac_sha1_cipher : NULL; | 590 | &aesni_256_cbc_hmac_sha1_cipher : NULL; |
| 590 | } | 591 | } |
| 592 | LCRYPTO_ALIAS(EVP_aes_256_cbc_hmac_sha1); | ||
| 591 | #else | 593 | #else |
| 592 | const EVP_CIPHER * | 594 | const EVP_CIPHER * |
| 593 | EVP_aes_128_cbc_hmac_sha1(void) | 595 | EVP_aes_128_cbc_hmac_sha1(void) |
| 594 | { | 596 | { |
| 595 | return NULL; | 597 | return NULL; |
| 596 | } | 598 | } |
| 599 | LCRYPTO_ALIAS(EVP_aes_128_cbc_hmac_sha1); | ||
| 597 | 600 | ||
| 598 | const EVP_CIPHER * | 601 | const EVP_CIPHER * |
| 599 | EVP_aes_256_cbc_hmac_sha1(void) | 602 | EVP_aes_256_cbc_hmac_sha1(void) |
| 600 | { | 603 | { |
| 601 | return NULL; | 604 | return NULL; |
| 602 | } | 605 | } |
| 606 | LCRYPTO_ALIAS(EVP_aes_256_cbc_hmac_sha1); | ||
| 603 | #endif | 607 | #endif |
| 604 | #endif | 608 | #endif |
diff --git a/src/lib/libcrypto/evp/e_bf.c b/src/lib/libcrypto/evp/e_bf.c index c2ab3178a5..4e671fab3e 100644 --- a/src/lib/libcrypto/evp/e_bf.c +++ b/src/lib/libcrypto/evp/e_bf.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: e_bf.c,v 1.15 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: e_bf.c,v 1.16 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -178,6 +178,7 @@ EVP_bf_cbc(void) | |||
| 178 | { | 178 | { |
| 179 | return &bf_cbc; | 179 | return &bf_cbc; |
| 180 | } | 180 | } |
| 181 | LCRYPTO_ALIAS(EVP_bf_cbc); | ||
| 181 | 182 | ||
| 182 | static const EVP_CIPHER bf_cfb64 = { | 183 | static const EVP_CIPHER bf_cfb64 = { |
| 183 | .nid = NID_bf_cfb64, | 184 | .nid = NID_bf_cfb64, |
| @@ -200,6 +201,7 @@ EVP_bf_cfb64(void) | |||
| 200 | { | 201 | { |
| 201 | return &bf_cfb64; | 202 | return &bf_cfb64; |
| 202 | } | 203 | } |
| 204 | LCRYPTO_ALIAS(EVP_bf_cfb64); | ||
| 203 | 205 | ||
| 204 | static const EVP_CIPHER bf_ofb = { | 206 | static const EVP_CIPHER bf_ofb = { |
| 205 | .nid = NID_bf_ofb64, | 207 | .nid = NID_bf_ofb64, |
| @@ -222,6 +224,7 @@ EVP_bf_ofb(void) | |||
| 222 | { | 224 | { |
| 223 | return &bf_ofb; | 225 | return &bf_ofb; |
| 224 | } | 226 | } |
| 227 | LCRYPTO_ALIAS(EVP_bf_ofb); | ||
| 225 | 228 | ||
| 226 | static const EVP_CIPHER bf_ecb = { | 229 | static const EVP_CIPHER bf_ecb = { |
| 227 | .nid = NID_bf_ecb, | 230 | .nid = NID_bf_ecb, |
| @@ -244,4 +247,5 @@ EVP_bf_ecb(void) | |||
| 244 | { | 247 | { |
| 245 | return &bf_ecb; | 248 | return &bf_ecb; |
| 246 | } | 249 | } |
| 250 | LCRYPTO_ALIAS(EVP_bf_ecb); | ||
| 247 | #endif | 251 | #endif |
diff --git a/src/lib/libcrypto/evp/e_camellia.c b/src/lib/libcrypto/evp/e_camellia.c index 884f8cef2a..0ab6e9ca60 100644 --- a/src/lib/libcrypto/evp/e_camellia.c +++ b/src/lib/libcrypto/evp/e_camellia.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: e_camellia.c,v 1.16 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: e_camellia.c,v 1.17 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* ==================================================================== | 2 | /* ==================================================================== |
| 3 | * Copyright (c) 2006 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 2006 The OpenSSL Project. All rights reserved. |
| 4 | * | 4 | * |
| @@ -179,6 +179,7 @@ EVP_camellia_128_cbc(void) | |||
| 179 | { | 179 | { |
| 180 | return &camellia_128_cbc; | 180 | return &camellia_128_cbc; |
| 181 | } | 181 | } |
| 182 | LCRYPTO_ALIAS(EVP_camellia_128_cbc); | ||
| 182 | 183 | ||
| 183 | static const EVP_CIPHER camellia_128_cfb128 = { | 184 | static const EVP_CIPHER camellia_128_cfb128 = { |
| 184 | .nid = NID_camellia_128_cfb128, | 185 | .nid = NID_camellia_128_cfb128, |
| @@ -201,6 +202,7 @@ EVP_camellia_128_cfb128(void) | |||
| 201 | { | 202 | { |
| 202 | return &camellia_128_cfb128; | 203 | return &camellia_128_cfb128; |
| 203 | } | 204 | } |
| 205 | LCRYPTO_ALIAS(EVP_camellia_128_cfb128); | ||
| 204 | 206 | ||
| 205 | static const EVP_CIPHER camellia_128_ofb = { | 207 | static const EVP_CIPHER camellia_128_ofb = { |
| 206 | .nid = NID_camellia_128_ofb128, | 208 | .nid = NID_camellia_128_ofb128, |
| @@ -223,6 +225,7 @@ EVP_camellia_128_ofb(void) | |||
| 223 | { | 225 | { |
| 224 | return &camellia_128_ofb; | 226 | return &camellia_128_ofb; |
| 225 | } | 227 | } |
| 228 | LCRYPTO_ALIAS(EVP_camellia_128_ofb); | ||
| 226 | 229 | ||
| 227 | static const EVP_CIPHER camellia_128_ecb = { | 230 | static const EVP_CIPHER camellia_128_ecb = { |
| 228 | .nid = NID_camellia_128_ecb, | 231 | .nid = NID_camellia_128_ecb, |
| @@ -245,6 +248,7 @@ EVP_camellia_128_ecb(void) | |||
| 245 | { | 248 | { |
| 246 | return &camellia_128_ecb; | 249 | return &camellia_128_ecb; |
| 247 | } | 250 | } |
| 251 | LCRYPTO_ALIAS(EVP_camellia_128_ecb); | ||
| 248 | 252 | ||
| 249 | static int | 253 | static int |
| 250 | camellia_192_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) | 254 | camellia_192_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) |
| @@ -337,6 +341,7 @@ EVP_camellia_192_cbc(void) | |||
| 337 | { | 341 | { |
| 338 | return &camellia_192_cbc; | 342 | return &camellia_192_cbc; |
| 339 | } | 343 | } |
| 344 | LCRYPTO_ALIAS(EVP_camellia_192_cbc); | ||
| 340 | 345 | ||
| 341 | static const EVP_CIPHER camellia_192_cfb128 = { | 346 | static const EVP_CIPHER camellia_192_cfb128 = { |
| 342 | .nid = NID_camellia_192_cfb128, | 347 | .nid = NID_camellia_192_cfb128, |
| @@ -359,6 +364,7 @@ EVP_camellia_192_cfb128(void) | |||
| 359 | { | 364 | { |
| 360 | return &camellia_192_cfb128; | 365 | return &camellia_192_cfb128; |
| 361 | } | 366 | } |
| 367 | LCRYPTO_ALIAS(EVP_camellia_192_cfb128); | ||
| 362 | 368 | ||
| 363 | static const EVP_CIPHER camellia_192_ofb = { | 369 | static const EVP_CIPHER camellia_192_ofb = { |
| 364 | .nid = NID_camellia_192_ofb128, | 370 | .nid = NID_camellia_192_ofb128, |
| @@ -381,6 +387,7 @@ EVP_camellia_192_ofb(void) | |||
| 381 | { | 387 | { |
| 382 | return &camellia_192_ofb; | 388 | return &camellia_192_ofb; |
| 383 | } | 389 | } |
| 390 | LCRYPTO_ALIAS(EVP_camellia_192_ofb); | ||
| 384 | 391 | ||
| 385 | static const EVP_CIPHER camellia_192_ecb = { | 392 | static const EVP_CIPHER camellia_192_ecb = { |
| 386 | .nid = NID_camellia_192_ecb, | 393 | .nid = NID_camellia_192_ecb, |
| @@ -403,6 +410,7 @@ EVP_camellia_192_ecb(void) | |||
| 403 | { | 410 | { |
| 404 | return &camellia_192_ecb; | 411 | return &camellia_192_ecb; |
| 405 | } | 412 | } |
| 413 | LCRYPTO_ALIAS(EVP_camellia_192_ecb); | ||
| 406 | 414 | ||
| 407 | static int | 415 | static int |
| 408 | camellia_256_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) | 416 | camellia_256_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) |
| @@ -495,6 +503,7 @@ EVP_camellia_256_cbc(void) | |||
| 495 | { | 503 | { |
| 496 | return &camellia_256_cbc; | 504 | return &camellia_256_cbc; |
| 497 | } | 505 | } |
| 506 | LCRYPTO_ALIAS(EVP_camellia_256_cbc); | ||
| 498 | 507 | ||
| 499 | static const EVP_CIPHER camellia_256_cfb128 = { | 508 | static const EVP_CIPHER camellia_256_cfb128 = { |
| 500 | .nid = NID_camellia_256_cfb128, | 509 | .nid = NID_camellia_256_cfb128, |
| @@ -517,6 +526,7 @@ EVP_camellia_256_cfb128(void) | |||
| 517 | { | 526 | { |
| 518 | return &camellia_256_cfb128; | 527 | return &camellia_256_cfb128; |
| 519 | } | 528 | } |
| 529 | LCRYPTO_ALIAS(EVP_camellia_256_cfb128); | ||
| 520 | 530 | ||
| 521 | static const EVP_CIPHER camellia_256_ofb = { | 531 | static const EVP_CIPHER camellia_256_ofb = { |
| 522 | .nid = NID_camellia_256_ofb128, | 532 | .nid = NID_camellia_256_ofb128, |
| @@ -539,6 +549,7 @@ EVP_camellia_256_ofb(void) | |||
| 539 | { | 549 | { |
| 540 | return &camellia_256_ofb; | 550 | return &camellia_256_ofb; |
| 541 | } | 551 | } |
| 552 | LCRYPTO_ALIAS(EVP_camellia_256_ofb); | ||
| 542 | 553 | ||
| 543 | static const EVP_CIPHER camellia_256_ecb = { | 554 | static const EVP_CIPHER camellia_256_ecb = { |
| 544 | .nid = NID_camellia_256_ecb, | 555 | .nid = NID_camellia_256_ecb, |
| @@ -561,6 +572,7 @@ EVP_camellia_256_ecb(void) | |||
| 561 | { | 572 | { |
| 562 | return &camellia_256_ecb; | 573 | return &camellia_256_ecb; |
| 563 | } | 574 | } |
| 575 | LCRYPTO_ALIAS(EVP_camellia_256_ecb); | ||
| 564 | 576 | ||
| 565 | static int | 577 | static int |
| 566 | camellia_128_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) | 578 | camellia_128_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) |
| @@ -605,6 +617,7 @@ EVP_camellia_128_cfb1(void) | |||
| 605 | { | 617 | { |
| 606 | return &camellia_128_cfb1; | 618 | return &camellia_128_cfb1; |
| 607 | } | 619 | } |
| 620 | LCRYPTO_ALIAS(EVP_camellia_128_cfb1); | ||
| 608 | 621 | ||
| 609 | static int | 622 | static int |
| 610 | camellia_192_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) | 623 | camellia_192_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) |
| @@ -649,6 +662,7 @@ EVP_camellia_192_cfb1(void) | |||
| 649 | { | 662 | { |
| 650 | return &camellia_192_cfb1; | 663 | return &camellia_192_cfb1; |
| 651 | } | 664 | } |
| 665 | LCRYPTO_ALIAS(EVP_camellia_192_cfb1); | ||
| 652 | 666 | ||
| 653 | static int | 667 | static int |
| 654 | camellia_256_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) | 668 | camellia_256_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) |
| @@ -693,6 +707,7 @@ EVP_camellia_256_cfb1(void) | |||
| 693 | { | 707 | { |
| 694 | return &camellia_256_cfb1; | 708 | return &camellia_256_cfb1; |
| 695 | } | 709 | } |
| 710 | LCRYPTO_ALIAS(EVP_camellia_256_cfb1); | ||
| 696 | 711 | ||
| 697 | 712 | ||
| 698 | static int | 713 | static int |
| @@ -736,6 +751,7 @@ EVP_camellia_128_cfb8(void) | |||
| 736 | { | 751 | { |
| 737 | return &camellia_128_cfb8; | 752 | return &camellia_128_cfb8; |
| 738 | } | 753 | } |
| 754 | LCRYPTO_ALIAS(EVP_camellia_128_cfb8); | ||
| 739 | 755 | ||
| 740 | static int | 756 | static int |
| 741 | camellia_192_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) | 757 | camellia_192_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) |
| @@ -778,6 +794,7 @@ EVP_camellia_192_cfb8(void) | |||
| 778 | { | 794 | { |
| 779 | return &camellia_192_cfb8; | 795 | return &camellia_192_cfb8; |
| 780 | } | 796 | } |
| 797 | LCRYPTO_ALIAS(EVP_camellia_192_cfb8); | ||
| 781 | 798 | ||
| 782 | static int | 799 | static int |
| 783 | camellia_256_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) | 800 | camellia_256_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) |
| @@ -820,4 +837,5 @@ EVP_camellia_256_cfb8(void) | |||
| 820 | { | 837 | { |
| 821 | return &camellia_256_cfb8; | 838 | return &camellia_256_cfb8; |
| 822 | } | 839 | } |
| 840 | LCRYPTO_ALIAS(EVP_camellia_256_cfb8); | ||
| 823 | #endif | 841 | #endif |
diff --git a/src/lib/libcrypto/evp/e_cast.c b/src/lib/libcrypto/evp/e_cast.c index 98683e1d01..8f62ba6f29 100644 --- a/src/lib/libcrypto/evp/e_cast.c +++ b/src/lib/libcrypto/evp/e_cast.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: e_cast.c,v 1.14 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: e_cast.c,v 1.15 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -178,6 +178,7 @@ EVP_cast5_cbc(void) | |||
| 178 | { | 178 | { |
| 179 | return &cast5_cbc; | 179 | return &cast5_cbc; |
| 180 | } | 180 | } |
| 181 | LCRYPTO_ALIAS(EVP_cast5_cbc); | ||
| 181 | 182 | ||
| 182 | static const EVP_CIPHER cast5_cfb64 = { | 183 | static const EVP_CIPHER cast5_cfb64 = { |
| 183 | .nid = NID_cast5_cfb64, | 184 | .nid = NID_cast5_cfb64, |
| @@ -200,6 +201,7 @@ EVP_cast5_cfb64(void) | |||
| 200 | { | 201 | { |
| 201 | return &cast5_cfb64; | 202 | return &cast5_cfb64; |
| 202 | } | 203 | } |
| 204 | LCRYPTO_ALIAS(EVP_cast5_cfb64); | ||
| 203 | 205 | ||
| 204 | static const EVP_CIPHER cast5_ofb = { | 206 | static const EVP_CIPHER cast5_ofb = { |
| 205 | .nid = NID_cast5_ofb64, | 207 | .nid = NID_cast5_ofb64, |
| @@ -222,6 +224,7 @@ EVP_cast5_ofb(void) | |||
| 222 | { | 224 | { |
| 223 | return &cast5_ofb; | 225 | return &cast5_ofb; |
| 224 | } | 226 | } |
| 227 | LCRYPTO_ALIAS(EVP_cast5_ofb); | ||
| 225 | 228 | ||
| 226 | static const EVP_CIPHER cast5_ecb = { | 229 | static const EVP_CIPHER cast5_ecb = { |
| 227 | .nid = NID_cast5_ecb, | 230 | .nid = NID_cast5_ecb, |
| @@ -244,4 +247,5 @@ EVP_cast5_ecb(void) | |||
| 244 | { | 247 | { |
| 245 | return &cast5_ecb; | 248 | return &cast5_ecb; |
| 246 | } | 249 | } |
| 250 | LCRYPTO_ALIAS(EVP_cast5_ecb); | ||
| 247 | #endif | 251 | #endif |
diff --git a/src/lib/libcrypto/evp/e_chacha.c b/src/lib/libcrypto/evp/e_chacha.c index f27ed1d37d..f781d66339 100644 --- a/src/lib/libcrypto/evp/e_chacha.c +++ b/src/lib/libcrypto/evp/e_chacha.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: e_chacha.c,v 1.10 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: e_chacha.c,v 1.11 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -74,5 +74,6 @@ EVP_chacha20(void) | |||
| 74 | { | 74 | { |
| 75 | return (&chacha20_cipher); | 75 | return (&chacha20_cipher); |
| 76 | } | 76 | } |
| 77 | LCRYPTO_ALIAS(EVP_chacha20); | ||
| 77 | 78 | ||
| 78 | #endif | 79 | #endif |
diff --git a/src/lib/libcrypto/evp/e_chacha20poly1305.c b/src/lib/libcrypto/evp/e_chacha20poly1305.c index 1bd04c1f1f..4b8f47cefc 100644 --- a/src/lib/libcrypto/evp/e_chacha20poly1305.c +++ b/src/lib/libcrypto/evp/e_chacha20poly1305.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: e_chacha20poly1305.c,v 1.28 2023/03/01 11:16:06 tb Exp $ */ | 1 | /* $OpenBSD: e_chacha20poly1305.c,v 1.29 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | 2 | ||
| 3 | /* | 3 | /* |
| 4 | * Copyright (c) 2022 Joel Sing <jsing@openbsd.org> | 4 | * Copyright (c) 2022 Joel Sing <jsing@openbsd.org> |
| @@ -348,6 +348,7 @@ EVP_aead_chacha20_poly1305() | |||
| 348 | { | 348 | { |
| 349 | return &aead_chacha20_poly1305; | 349 | return &aead_chacha20_poly1305; |
| 350 | } | 350 | } |
| 351 | LCRYPTO_ALIAS(EVP_aead_chacha20_poly1305); | ||
| 351 | 352 | ||
| 352 | static const EVP_AEAD aead_xchacha20_poly1305 = { | 353 | static const EVP_AEAD aead_xchacha20_poly1305 = { |
| 353 | .key_len = 32, | 354 | .key_len = 32, |
| @@ -366,6 +367,7 @@ EVP_aead_xchacha20_poly1305() | |||
| 366 | { | 367 | { |
| 367 | return &aead_xchacha20_poly1305; | 368 | return &aead_xchacha20_poly1305; |
| 368 | } | 369 | } |
| 370 | LCRYPTO_ALIAS(EVP_aead_xchacha20_poly1305); | ||
| 369 | 371 | ||
| 370 | struct chacha20_poly1305_ctx { | 372 | struct chacha20_poly1305_ctx { |
| 371 | ChaCha_ctx chacha; | 373 | ChaCha_ctx chacha; |
| @@ -606,5 +608,6 @@ EVP_chacha20_poly1305(void) | |||
| 606 | { | 608 | { |
| 607 | return &cipher_chacha20_poly1305; | 609 | return &cipher_chacha20_poly1305; |
| 608 | } | 610 | } |
| 611 | LCRYPTO_ALIAS(EVP_chacha20_poly1305); | ||
| 609 | 612 | ||
| 610 | #endif /* !OPENSSL_NO_CHACHA && !OPENSSL_NO_POLY1305 */ | 613 | #endif /* !OPENSSL_NO_CHACHA && !OPENSSL_NO_POLY1305 */ |
diff --git a/src/lib/libcrypto/evp/e_des.c b/src/lib/libcrypto/evp/e_des.c index dffabc8125..c87de1a690 100644 --- a/src/lib/libcrypto/evp/e_des.c +++ b/src/lib/libcrypto/evp/e_des.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: e_des.c,v 1.20 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: e_des.c,v 1.21 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -242,6 +242,7 @@ EVP_des_cbc(void) | |||
| 242 | { | 242 | { |
| 243 | return &des_cbc; | 243 | return &des_cbc; |
| 244 | } | 244 | } |
| 245 | LCRYPTO_ALIAS(EVP_des_cbc); | ||
| 245 | 246 | ||
| 246 | static const EVP_CIPHER des_cfb64 = { | 247 | static const EVP_CIPHER des_cfb64 = { |
| 247 | .nid = NID_des_cfb64, | 248 | .nid = NID_des_cfb64, |
| @@ -264,6 +265,7 @@ EVP_des_cfb64(void) | |||
| 264 | { | 265 | { |
| 265 | return &des_cfb64; | 266 | return &des_cfb64; |
| 266 | } | 267 | } |
| 268 | LCRYPTO_ALIAS(EVP_des_cfb64); | ||
| 267 | 269 | ||
| 268 | static const EVP_CIPHER des_ofb = { | 270 | static const EVP_CIPHER des_ofb = { |
| 269 | .nid = NID_des_ofb64, | 271 | .nid = NID_des_ofb64, |
| @@ -286,6 +288,7 @@ EVP_des_ofb(void) | |||
| 286 | { | 288 | { |
| 287 | return &des_ofb; | 289 | return &des_ofb; |
| 288 | } | 290 | } |
| 291 | LCRYPTO_ALIAS(EVP_des_ofb); | ||
| 289 | 292 | ||
| 290 | static const EVP_CIPHER des_ecb = { | 293 | static const EVP_CIPHER des_ecb = { |
| 291 | .nid = NID_des_ecb, | 294 | .nid = NID_des_ecb, |
| @@ -308,6 +311,7 @@ EVP_des_ecb(void) | |||
| 308 | { | 311 | { |
| 309 | return &des_ecb; | 312 | return &des_ecb; |
| 310 | } | 313 | } |
| 314 | LCRYPTO_ALIAS(EVP_des_ecb); | ||
| 311 | 315 | ||
| 312 | static const EVP_CIPHER des_cfb1 = { | 316 | static const EVP_CIPHER des_cfb1 = { |
| 313 | .nid = NID_des_cfb1, | 317 | .nid = NID_des_cfb1, |
| @@ -330,6 +334,7 @@ EVP_des_cfb1(void) | |||
| 330 | { | 334 | { |
| 331 | return &des_cfb1; | 335 | return &des_cfb1; |
| 332 | } | 336 | } |
| 337 | LCRYPTO_ALIAS(EVP_des_cfb1); | ||
| 333 | 338 | ||
| 334 | static const EVP_CIPHER des_cfb8 = { | 339 | static const EVP_CIPHER des_cfb8 = { |
| 335 | .nid = NID_des_cfb8, | 340 | .nid = NID_des_cfb8, |
| @@ -352,4 +357,5 @@ EVP_des_cfb8(void) | |||
| 352 | { | 357 | { |
| 353 | return &des_cfb8; | 358 | return &des_cfb8; |
| 354 | } | 359 | } |
| 360 | LCRYPTO_ALIAS(EVP_des_cfb8); | ||
| 355 | #endif | 361 | #endif |
diff --git a/src/lib/libcrypto/evp/e_des3.c b/src/lib/libcrypto/evp/e_des3.c index d6c7537aea..d345c354c0 100644 --- a/src/lib/libcrypto/evp/e_des3.c +++ b/src/lib/libcrypto/evp/e_des3.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: e_des3.c,v 1.26 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: e_des3.c,v 1.27 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -274,6 +274,7 @@ EVP_des_ede_cbc(void) | |||
| 274 | { | 274 | { |
| 275 | return &des_ede_cbc; | 275 | return &des_ede_cbc; |
| 276 | } | 276 | } |
| 277 | LCRYPTO_ALIAS(EVP_des_ede_cbc); | ||
| 277 | 278 | ||
| 278 | static const EVP_CIPHER des_ede_cfb64 = { | 279 | static const EVP_CIPHER des_ede_cfb64 = { |
| 279 | .nid = NID_des_ede_cfb64, | 280 | .nid = NID_des_ede_cfb64, |
| @@ -296,6 +297,7 @@ EVP_des_ede_cfb64(void) | |||
| 296 | { | 297 | { |
| 297 | return &des_ede_cfb64; | 298 | return &des_ede_cfb64; |
| 298 | } | 299 | } |
| 300 | LCRYPTO_ALIAS(EVP_des_ede_cfb64); | ||
| 299 | 301 | ||
| 300 | static const EVP_CIPHER des_ede_ofb = { | 302 | static const EVP_CIPHER des_ede_ofb = { |
| 301 | .nid = NID_des_ede_ofb64, | 303 | .nid = NID_des_ede_ofb64, |
| @@ -318,6 +320,7 @@ EVP_des_ede_ofb(void) | |||
| 318 | { | 320 | { |
| 319 | return &des_ede_ofb; | 321 | return &des_ede_ofb; |
| 320 | } | 322 | } |
| 323 | LCRYPTO_ALIAS(EVP_des_ede_ofb); | ||
| 321 | 324 | ||
| 322 | static const EVP_CIPHER des_ede_ecb = { | 325 | static const EVP_CIPHER des_ede_ecb = { |
| 323 | .nid = NID_des_ede_ecb, | 326 | .nid = NID_des_ede_ecb, |
| @@ -340,6 +343,7 @@ EVP_des_ede_ecb(void) | |||
| 340 | { | 343 | { |
| 341 | return &des_ede_ecb; | 344 | return &des_ede_ecb; |
| 342 | } | 345 | } |
| 346 | LCRYPTO_ALIAS(EVP_des_ede_ecb); | ||
| 343 | 347 | ||
| 344 | 348 | ||
| 345 | #define des_ede3_cfb64_cipher des_ede_cfb64_cipher | 349 | #define des_ede3_cfb64_cipher des_ede_cfb64_cipher |
| @@ -368,6 +372,7 @@ EVP_des_ede3_cbc(void) | |||
| 368 | { | 372 | { |
| 369 | return &des_ede3_cbc; | 373 | return &des_ede3_cbc; |
| 370 | } | 374 | } |
| 375 | LCRYPTO_ALIAS(EVP_des_ede3_cbc); | ||
| 371 | 376 | ||
| 372 | static const EVP_CIPHER des_ede3_cfb64 = { | 377 | static const EVP_CIPHER des_ede3_cfb64 = { |
| 373 | .nid = NID_des_ede3_cfb64, | 378 | .nid = NID_des_ede3_cfb64, |
| @@ -390,6 +395,7 @@ EVP_des_ede3_cfb64(void) | |||
| 390 | { | 395 | { |
| 391 | return &des_ede3_cfb64; | 396 | return &des_ede3_cfb64; |
| 392 | } | 397 | } |
| 398 | LCRYPTO_ALIAS(EVP_des_ede3_cfb64); | ||
| 393 | 399 | ||
| 394 | static const EVP_CIPHER des_ede3_ofb = { | 400 | static const EVP_CIPHER des_ede3_ofb = { |
| 395 | .nid = NID_des_ede3_ofb64, | 401 | .nid = NID_des_ede3_ofb64, |
| @@ -412,6 +418,7 @@ EVP_des_ede3_ofb(void) | |||
| 412 | { | 418 | { |
| 413 | return &des_ede3_ofb; | 419 | return &des_ede3_ofb; |
| 414 | } | 420 | } |
| 421 | LCRYPTO_ALIAS(EVP_des_ede3_ofb); | ||
| 415 | 422 | ||
| 416 | static const EVP_CIPHER des_ede3_ecb = { | 423 | static const EVP_CIPHER des_ede3_ecb = { |
| 417 | .nid = NID_des_ede3_ecb, | 424 | .nid = NID_des_ede3_ecb, |
| @@ -434,6 +441,7 @@ EVP_des_ede3_ecb(void) | |||
| 434 | { | 441 | { |
| 435 | return &des_ede3_ecb; | 442 | return &des_ede3_ecb; |
| 436 | } | 443 | } |
| 444 | LCRYPTO_ALIAS(EVP_des_ede3_ecb); | ||
| 437 | 445 | ||
| 438 | 446 | ||
| 439 | static const EVP_CIPHER des_ede3_cfb1 = { | 447 | static const EVP_CIPHER des_ede3_cfb1 = { |
| @@ -457,6 +465,7 @@ EVP_des_ede3_cfb1(void) | |||
| 457 | { | 465 | { |
| 458 | return &des_ede3_cfb1; | 466 | return &des_ede3_cfb1; |
| 459 | } | 467 | } |
| 468 | LCRYPTO_ALIAS(EVP_des_ede3_cfb1); | ||
| 460 | 469 | ||
| 461 | 470 | ||
| 462 | static const EVP_CIPHER des_ede3_cfb8 = { | 471 | static const EVP_CIPHER des_ede3_cfb8 = { |
| @@ -480,16 +489,19 @@ EVP_des_ede3_cfb8(void) | |||
| 480 | { | 489 | { |
| 481 | return &des_ede3_cfb8; | 490 | return &des_ede3_cfb8; |
| 482 | } | 491 | } |
| 492 | LCRYPTO_ALIAS(EVP_des_ede3_cfb8); | ||
| 483 | 493 | ||
| 484 | const EVP_CIPHER * | 494 | const EVP_CIPHER * |
| 485 | EVP_des_ede(void) | 495 | EVP_des_ede(void) |
| 486 | { | 496 | { |
| 487 | return &des_ede_ecb; | 497 | return &des_ede_ecb; |
| 488 | } | 498 | } |
| 499 | LCRYPTO_ALIAS(EVP_des_ede); | ||
| 489 | 500 | ||
| 490 | const EVP_CIPHER * | 501 | const EVP_CIPHER * |
| 491 | EVP_des_ede3(void) | 502 | EVP_des_ede3(void) |
| 492 | { | 503 | { |
| 493 | return &des_ede3_ecb; | 504 | return &des_ede3_ecb; |
| 494 | } | 505 | } |
| 506 | LCRYPTO_ALIAS(EVP_des_ede3); | ||
| 495 | #endif | 507 | #endif |
diff --git a/src/lib/libcrypto/evp/e_gost2814789.c b/src/lib/libcrypto/evp/e_gost2814789.c index 6344a11e9b..fdbc662810 100644 --- a/src/lib/libcrypto/evp/e_gost2814789.c +++ b/src/lib/libcrypto/evp/e_gost2814789.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: e_gost2814789.c,v 1.11 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: e_gost2814789.c,v 1.12 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 3 | * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> |
| 4 | * Copyright (c) 2005-2006 Cryptocom LTD | 4 | * Copyright (c) 2005-2006 Cryptocom LTD |
| @@ -268,6 +268,7 @@ EVP_gost2814789_ecb(void) | |||
| 268 | { | 268 | { |
| 269 | return &gost2814789_ecb; | 269 | return &gost2814789_ecb; |
| 270 | } | 270 | } |
| 271 | LCRYPTO_ALIAS(EVP_gost2814789_ecb); | ||
| 271 | 272 | ||
| 272 | static const EVP_CIPHER gost2814789_cfb64 = { | 273 | static const EVP_CIPHER gost2814789_cfb64 = { |
| 273 | .nid = NID_gost89_cfb64, | 274 | .nid = NID_gost89_cfb64, |
| @@ -290,6 +291,7 @@ EVP_gost2814789_cfb64(void) | |||
| 290 | { | 291 | { |
| 291 | return &gost2814789_cfb64; | 292 | return &gost2814789_cfb64; |
| 292 | } | 293 | } |
| 294 | LCRYPTO_ALIAS(EVP_gost2814789_cfb64); | ||
| 293 | 295 | ||
| 294 | static const EVP_CIPHER gost2814789_cnt = { | 296 | static const EVP_CIPHER gost2814789_cnt = { |
| 295 | .nid = NID_gost89_cnt, | 297 | .nid = NID_gost89_cnt, |
| @@ -312,4 +314,5 @@ EVP_gost2814789_cnt(void) | |||
| 312 | { | 314 | { |
| 313 | return &gost2814789_cnt; | 315 | return &gost2814789_cnt; |
| 314 | } | 316 | } |
| 317 | LCRYPTO_ALIAS(EVP_gost2814789_cnt); | ||
| 315 | #endif | 318 | #endif |
diff --git a/src/lib/libcrypto/evp/e_idea.c b/src/lib/libcrypto/evp/e_idea.c index b8349ee9cb..e330888ba6 100644 --- a/src/lib/libcrypto/evp/e_idea.c +++ b/src/lib/libcrypto/evp/e_idea.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: e_idea.c,v 1.18 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: e_idea.c,v 1.19 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -197,6 +197,7 @@ EVP_idea_cbc(void) | |||
| 197 | { | 197 | { |
| 198 | return &idea_cbc; | 198 | return &idea_cbc; |
| 199 | } | 199 | } |
| 200 | LCRYPTO_ALIAS(EVP_idea_cbc); | ||
| 200 | 201 | ||
| 201 | static const EVP_CIPHER idea_cfb64 = { | 202 | static const EVP_CIPHER idea_cfb64 = { |
| 202 | .nid = NID_idea_cfb64, | 203 | .nid = NID_idea_cfb64, |
| @@ -219,6 +220,7 @@ EVP_idea_cfb64(void) | |||
| 219 | { | 220 | { |
| 220 | return &idea_cfb64; | 221 | return &idea_cfb64; |
| 221 | } | 222 | } |
| 223 | LCRYPTO_ALIAS(EVP_idea_cfb64); | ||
| 222 | 224 | ||
| 223 | static const EVP_CIPHER idea_ofb = { | 225 | static const EVP_CIPHER idea_ofb = { |
| 224 | .nid = NID_idea_ofb64, | 226 | .nid = NID_idea_ofb64, |
| @@ -241,6 +243,7 @@ EVP_idea_ofb(void) | |||
| 241 | { | 243 | { |
| 242 | return &idea_ofb; | 244 | return &idea_ofb; |
| 243 | } | 245 | } |
| 246 | LCRYPTO_ALIAS(EVP_idea_ofb); | ||
| 244 | 247 | ||
| 245 | static const EVP_CIPHER idea_ecb = { | 248 | static const EVP_CIPHER idea_ecb = { |
| 246 | .nid = NID_idea_ecb, | 249 | .nid = NID_idea_ecb, |
| @@ -263,4 +266,5 @@ EVP_idea_ecb(void) | |||
| 263 | { | 266 | { |
| 264 | return &idea_ecb; | 267 | return &idea_ecb; |
| 265 | } | 268 | } |
| 269 | LCRYPTO_ALIAS(EVP_idea_ecb); | ||
| 266 | #endif | 270 | #endif |
diff --git a/src/lib/libcrypto/evp/e_null.c b/src/lib/libcrypto/evp/e_null.c index ddd633dc7c..3daadb1479 100644 --- a/src/lib/libcrypto/evp/e_null.c +++ b/src/lib/libcrypto/evp/e_null.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: e_null.c,v 1.16 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: e_null.c,v 1.17 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -88,6 +88,7 @@ EVP_enc_null(void) | |||
| 88 | { | 88 | { |
| 89 | return (&n_cipher); | 89 | return (&n_cipher); |
| 90 | } | 90 | } |
| 91 | LCRYPTO_ALIAS(EVP_enc_null); | ||
| 91 | 92 | ||
| 92 | static int | 93 | static int |
| 93 | null_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | 94 | null_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, |
diff --git a/src/lib/libcrypto/evp/e_rc2.c b/src/lib/libcrypto/evp/e_rc2.c index 78697d08c6..540c94cdfd 100644 --- a/src/lib/libcrypto/evp/e_rc2.c +++ b/src/lib/libcrypto/evp/e_rc2.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: e_rc2.c,v 1.20 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: e_rc2.c,v 1.21 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -180,6 +180,7 @@ EVP_rc2_cbc(void) | |||
| 180 | { | 180 | { |
| 181 | return &rc2_cbc; | 181 | return &rc2_cbc; |
| 182 | } | 182 | } |
| 183 | LCRYPTO_ALIAS(EVP_rc2_cbc); | ||
| 183 | 184 | ||
| 184 | static const EVP_CIPHER rc2_cfb64 = { | 185 | static const EVP_CIPHER rc2_cfb64 = { |
| 185 | .nid = NID_rc2_cfb64, | 186 | .nid = NID_rc2_cfb64, |
| @@ -202,6 +203,7 @@ EVP_rc2_cfb64(void) | |||
| 202 | { | 203 | { |
| 203 | return &rc2_cfb64; | 204 | return &rc2_cfb64; |
| 204 | } | 205 | } |
| 206 | LCRYPTO_ALIAS(EVP_rc2_cfb64); | ||
| 205 | 207 | ||
| 206 | static const EVP_CIPHER rc2_ofb = { | 208 | static const EVP_CIPHER rc2_ofb = { |
| 207 | .nid = NID_rc2_ofb64, | 209 | .nid = NID_rc2_ofb64, |
| @@ -224,6 +226,7 @@ EVP_rc2_ofb(void) | |||
| 224 | { | 226 | { |
| 225 | return &rc2_ofb; | 227 | return &rc2_ofb; |
| 226 | } | 228 | } |
| 229 | LCRYPTO_ALIAS(EVP_rc2_ofb); | ||
| 227 | 230 | ||
| 228 | static const EVP_CIPHER rc2_ecb = { | 231 | static const EVP_CIPHER rc2_ecb = { |
| 229 | .nid = NID_rc2_ecb, | 232 | .nid = NID_rc2_ecb, |
| @@ -246,6 +249,7 @@ EVP_rc2_ecb(void) | |||
| 246 | { | 249 | { |
| 247 | return &rc2_ecb; | 250 | return &rc2_ecb; |
| 248 | } | 251 | } |
| 252 | LCRYPTO_ALIAS(EVP_rc2_ecb); | ||
| 249 | 253 | ||
| 250 | #define RC2_40_MAGIC 0xa0 | 254 | #define RC2_40_MAGIC 0xa0 |
| 251 | #define RC2_64_MAGIC 0x78 | 255 | #define RC2_64_MAGIC 0x78 |
| @@ -284,12 +288,14 @@ EVP_rc2_64_cbc(void) | |||
| 284 | { | 288 | { |
| 285 | return (&r2_64_cbc_cipher); | 289 | return (&r2_64_cbc_cipher); |
| 286 | } | 290 | } |
| 291 | LCRYPTO_ALIAS(EVP_rc2_64_cbc); | ||
| 287 | 292 | ||
| 288 | const EVP_CIPHER * | 293 | const EVP_CIPHER * |
| 289 | EVP_rc2_40_cbc(void) | 294 | EVP_rc2_40_cbc(void) |
| 290 | { | 295 | { |
| 291 | return (&r2_40_cbc_cipher); | 296 | return (&r2_40_cbc_cipher); |
| 292 | } | 297 | } |
| 298 | LCRYPTO_ALIAS(EVP_rc2_40_cbc); | ||
| 293 | 299 | ||
| 294 | static int | 300 | static int |
| 295 | rc2_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | 301 | rc2_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, |
diff --git a/src/lib/libcrypto/evp/e_rc4.c b/src/lib/libcrypto/evp/e_rc4.c index 7afc6af9cd..d79bfa729a 100644 --- a/src/lib/libcrypto/evp/e_rc4.c +++ b/src/lib/libcrypto/evp/e_rc4.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: e_rc4.c,v 1.15 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: e_rc4.c,v 1.16 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -115,12 +115,14 @@ EVP_rc4(void) | |||
| 115 | { | 115 | { |
| 116 | return (&r4_cipher); | 116 | return (&r4_cipher); |
| 117 | } | 117 | } |
| 118 | LCRYPTO_ALIAS(EVP_rc4); | ||
| 118 | 119 | ||
| 119 | const EVP_CIPHER * | 120 | const EVP_CIPHER * |
| 120 | EVP_rc4_40(void) | 121 | EVP_rc4_40(void) |
| 121 | { | 122 | { |
| 122 | return (&r4_40_cipher); | 123 | return (&r4_40_cipher); |
| 123 | } | 124 | } |
| 125 | LCRYPTO_ALIAS(EVP_rc4_40); | ||
| 124 | 126 | ||
| 125 | static int | 127 | static int |
| 126 | rc4_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | 128 | rc4_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, |
diff --git a/src/lib/libcrypto/evp/e_rc4_hmac_md5.c b/src/lib/libcrypto/evp/e_rc4_hmac_md5.c index b3be57d5f2..1d0bced2df 100644 --- a/src/lib/libcrypto/evp/e_rc4_hmac_md5.c +++ b/src/lib/libcrypto/evp/e_rc4_hmac_md5.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: e_rc4_hmac_md5.c,v 1.10 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: e_rc4_hmac_md5.c,v 1.11 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* ==================================================================== | 2 | /* ==================================================================== |
| 3 | * Copyright (c) 2011 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 2011 The OpenSSL Project. All rights reserved. |
| 4 | * | 4 | * |
| @@ -304,4 +304,5 @@ EVP_rc4_hmac_md5(void) | |||
| 304 | { | 304 | { |
| 305 | return (&r4_hmac_md5_cipher); | 305 | return (&r4_hmac_md5_cipher); |
| 306 | } | 306 | } |
| 307 | LCRYPTO_ALIAS(EVP_rc4_hmac_md5); | ||
| 307 | #endif | 308 | #endif |
diff --git a/src/lib/libcrypto/evp/e_sm4.c b/src/lib/libcrypto/evp/e_sm4.c index 0d37448109..705a914821 100644 --- a/src/lib/libcrypto/evp/e_sm4.c +++ b/src/lib/libcrypto/evp/e_sm4.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: e_sm4.c,v 1.7 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: e_sm4.c,v 1.8 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2017, 2019 Ribose Inc | 3 | * Copyright (c) 2017, 2019 Ribose Inc |
| 4 | * | 4 | * |
| @@ -165,6 +165,7 @@ EVP_sm4_cbc(void) | |||
| 165 | { | 165 | { |
| 166 | return &sm4_cbc; | 166 | return &sm4_cbc; |
| 167 | } | 167 | } |
| 168 | LCRYPTO_ALIAS(EVP_sm4_cbc); | ||
| 168 | 169 | ||
| 169 | static const EVP_CIPHER sm4_cfb128 = { | 170 | static const EVP_CIPHER sm4_cfb128 = { |
| 170 | .nid = NID_sm4_cfb128, | 171 | .nid = NID_sm4_cfb128, |
| @@ -187,6 +188,7 @@ EVP_sm4_cfb128(void) | |||
| 187 | { | 188 | { |
| 188 | return &sm4_cfb128; | 189 | return &sm4_cfb128; |
| 189 | } | 190 | } |
| 191 | LCRYPTO_ALIAS(EVP_sm4_cfb128); | ||
| 190 | 192 | ||
| 191 | static const EVP_CIPHER sm4_ofb = { | 193 | static const EVP_CIPHER sm4_ofb = { |
| 192 | .nid = NID_sm4_ofb128, | 194 | .nid = NID_sm4_ofb128, |
| @@ -209,6 +211,7 @@ EVP_sm4_ofb(void) | |||
| 209 | { | 211 | { |
| 210 | return &sm4_ofb; | 212 | return &sm4_ofb; |
| 211 | } | 213 | } |
| 214 | LCRYPTO_ALIAS(EVP_sm4_ofb); | ||
| 212 | 215 | ||
| 213 | static const EVP_CIPHER sm4_ecb = { | 216 | static const EVP_CIPHER sm4_ecb = { |
| 214 | .nid = NID_sm4_ecb, | 217 | .nid = NID_sm4_ecb, |
| @@ -231,6 +234,7 @@ EVP_sm4_ecb(void) | |||
| 231 | { | 234 | { |
| 232 | return &sm4_ecb; | 235 | return &sm4_ecb; |
| 233 | } | 236 | } |
| 237 | LCRYPTO_ALIAS(EVP_sm4_ecb); | ||
| 234 | 238 | ||
| 235 | static int | 239 | static int |
| 236 | sm4_ctr_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, | 240 | sm4_ctr_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, |
| @@ -264,4 +268,5 @@ EVP_sm4_ctr(void) | |||
| 264 | { | 268 | { |
| 265 | return &sm4_ctr_mode; | 269 | return &sm4_ctr_mode; |
| 266 | } | 270 | } |
| 271 | LCRYPTO_ALIAS(EVP_sm4_ctr); | ||
| 267 | #endif | 272 | #endif |
diff --git a/src/lib/libcrypto/evp/e_xcbc_d.c b/src/lib/libcrypto/evp/e_xcbc_d.c index bbbc3a1ee9..c7810a2c22 100644 --- a/src/lib/libcrypto/evp/e_xcbc_d.c +++ b/src/lib/libcrypto/evp/e_xcbc_d.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: e_xcbc_d.c,v 1.13 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: e_xcbc_d.c,v 1.14 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -102,6 +102,7 @@ EVP_desx_cbc(void) | |||
| 102 | { | 102 | { |
| 103 | return (&d_xcbc_cipher); | 103 | return (&d_xcbc_cipher); |
| 104 | } | 104 | } |
| 105 | LCRYPTO_ALIAS(EVP_desx_cbc); | ||
| 105 | 106 | ||
| 106 | static int | 107 | static int |
| 107 | desx_cbc_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | 108 | desx_cbc_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, |
diff --git a/src/lib/libcrypto/evp/encode.c b/src/lib/libcrypto/evp/encode.c index 718bdb5fc4..10cb51217a 100644 --- a/src/lib/libcrypto/evp/encode.c +++ b/src/lib/libcrypto/evp/encode.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: encode.c,v 1.30 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: encode.c,v 1.31 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -128,12 +128,14 @@ EVP_ENCODE_CTX_new(void) | |||
| 128 | { | 128 | { |
| 129 | return calloc(1, sizeof(EVP_ENCODE_CTX)); | 129 | return calloc(1, sizeof(EVP_ENCODE_CTX)); |
| 130 | } | 130 | } |
| 131 | LCRYPTO_ALIAS(EVP_ENCODE_CTX_new); | ||
| 131 | 132 | ||
| 132 | void | 133 | void |
| 133 | EVP_ENCODE_CTX_free(EVP_ENCODE_CTX *ctx) | 134 | EVP_ENCODE_CTX_free(EVP_ENCODE_CTX *ctx) |
| 134 | { | 135 | { |
| 135 | free(ctx); | 136 | free(ctx); |
| 136 | } | 137 | } |
| 138 | LCRYPTO_ALIAS(EVP_ENCODE_CTX_free); | ||
| 137 | 139 | ||
| 138 | void | 140 | void |
| 139 | EVP_EncodeInit(EVP_ENCODE_CTX *ctx) | 141 | EVP_EncodeInit(EVP_ENCODE_CTX *ctx) |
| @@ -142,6 +144,7 @@ EVP_EncodeInit(EVP_ENCODE_CTX *ctx) | |||
| 142 | ctx->num = 0; | 144 | ctx->num = 0; |
| 143 | ctx->line_num = 0; | 145 | ctx->line_num = 0; |
| 144 | } | 146 | } |
| 147 | LCRYPTO_ALIAS(EVP_EncodeInit); | ||
| 145 | 148 | ||
| 146 | int | 149 | int |
| 147 | EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, | 150 | 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, | |||
| 192 | 195 | ||
| 193 | return 1; | 196 | return 1; |
| 194 | } | 197 | } |
| 198 | LCRYPTO_ALIAS(EVP_EncodeUpdate); | ||
| 195 | 199 | ||
| 196 | void | 200 | void |
| 197 | EVP_EncodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl) | 201 | 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) | |||
| 206 | } | 210 | } |
| 207 | *outl = ret; | 211 | *outl = ret; |
| 208 | } | 212 | } |
| 213 | LCRYPTO_ALIAS(EVP_EncodeFinal); | ||
| 209 | 214 | ||
| 210 | int | 215 | int |
| 211 | EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int dlen) | 216 | 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) | |||
| 238 | *t = '\0'; | 243 | *t = '\0'; |
| 239 | return (ret); | 244 | return (ret); |
| 240 | } | 245 | } |
| 246 | LCRYPTO_ALIAS(EVP_EncodeBlock); | ||
| 241 | 247 | ||
| 242 | void | 248 | void |
| 243 | EVP_DecodeInit(EVP_ENCODE_CTX *ctx) | 249 | EVP_DecodeInit(EVP_ENCODE_CTX *ctx) |
| @@ -247,6 +253,7 @@ EVP_DecodeInit(EVP_ENCODE_CTX *ctx) | |||
| 247 | ctx->line_num = 0; | 253 | ctx->line_num = 0; |
| 248 | ctx->expect_nl = 0; | 254 | ctx->expect_nl = 0; |
| 249 | } | 255 | } |
| 256 | LCRYPTO_ALIAS(EVP_DecodeInit); | ||
| 250 | 257 | ||
| 251 | int | 258 | int |
| 252 | EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, | 259 | 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, | |||
| 355 | ctx->num = n; | 362 | ctx->num = n; |
| 356 | return (rv); | 363 | return (rv); |
| 357 | } | 364 | } |
| 365 | LCRYPTO_ALIAS(EVP_DecodeUpdate); | ||
| 358 | 366 | ||
| 359 | int | 367 | int |
| 360 | EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n) | 368 | 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) | |||
| 395 | } | 403 | } |
| 396 | return (ret); | 404 | return (ret); |
| 397 | } | 405 | } |
| 406 | LCRYPTO_ALIAS(EVP_DecodeBlock); | ||
| 398 | 407 | ||
| 399 | int | 408 | int |
| 400 | EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl) | 409 | 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) | |||
| 412 | } else | 421 | } else |
| 413 | return (1); | 422 | return (1); |
| 414 | } | 423 | } |
| 424 | LCRYPTO_ALIAS(EVP_DecodeFinal); | ||
diff --git a/src/lib/libcrypto/evp/evp_aead.c b/src/lib/libcrypto/evp/evp_aead.c index 58f1c8722d..8b39c7f923 100644 --- a/src/lib/libcrypto/evp/evp_aead.c +++ b/src/lib/libcrypto/evp/evp_aead.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: evp_aead.c,v 1.8 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: evp_aead.c,v 1.9 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014, Google Inc. | 3 | * Copyright (c) 2014, Google Inc. |
| 4 | * | 4 | * |
| @@ -28,24 +28,28 @@ EVP_AEAD_key_length(const EVP_AEAD *aead) | |||
| 28 | { | 28 | { |
| 29 | return aead->key_len; | 29 | return aead->key_len; |
| 30 | } | 30 | } |
| 31 | LCRYPTO_ALIAS(EVP_AEAD_key_length); | ||
| 31 | 32 | ||
| 32 | size_t | 33 | size_t |
| 33 | EVP_AEAD_nonce_length(const EVP_AEAD *aead) | 34 | EVP_AEAD_nonce_length(const EVP_AEAD *aead) |
| 34 | { | 35 | { |
| 35 | return aead->nonce_len; | 36 | return aead->nonce_len; |
| 36 | } | 37 | } |
| 38 | LCRYPTO_ALIAS(EVP_AEAD_nonce_length); | ||
| 37 | 39 | ||
| 38 | size_t | 40 | size_t |
| 39 | EVP_AEAD_max_overhead(const EVP_AEAD *aead) | 41 | EVP_AEAD_max_overhead(const EVP_AEAD *aead) |
| 40 | { | 42 | { |
| 41 | return aead->overhead; | 43 | return aead->overhead; |
| 42 | } | 44 | } |
| 45 | LCRYPTO_ALIAS(EVP_AEAD_max_overhead); | ||
| 43 | 46 | ||
| 44 | size_t | 47 | size_t |
| 45 | EVP_AEAD_max_tag_len(const EVP_AEAD *aead) | 48 | EVP_AEAD_max_tag_len(const EVP_AEAD *aead) |
| 46 | { | 49 | { |
| 47 | return aead->max_tag_len; | 50 | return aead->max_tag_len; |
| 48 | } | 51 | } |
| 52 | LCRYPTO_ALIAS(EVP_AEAD_max_tag_len); | ||
| 49 | 53 | ||
| 50 | int | 54 | int |
| 51 | EVP_AEAD_CTX_init(EVP_AEAD_CTX *ctx, const EVP_AEAD *aead, | 55 | 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, | |||
| 58 | } | 62 | } |
| 59 | return aead->init(ctx, key, key_len, tag_len); | 63 | return aead->init(ctx, key, key_len, tag_len); |
| 60 | } | 64 | } |
| 65 | LCRYPTO_ALIAS(EVP_AEAD_CTX_init); | ||
| 61 | 66 | ||
| 62 | void | 67 | void |
| 63 | EVP_AEAD_CTX_cleanup(EVP_AEAD_CTX *ctx) | 68 | EVP_AEAD_CTX_cleanup(EVP_AEAD_CTX *ctx) |
| @@ -67,12 +72,14 @@ EVP_AEAD_CTX_cleanup(EVP_AEAD_CTX *ctx) | |||
| 67 | ctx->aead->cleanup(ctx); | 72 | ctx->aead->cleanup(ctx); |
| 68 | ctx->aead = NULL; | 73 | ctx->aead = NULL; |
| 69 | } | 74 | } |
| 75 | LCRYPTO_ALIAS(EVP_AEAD_CTX_cleanup); | ||
| 70 | 76 | ||
| 71 | EVP_AEAD_CTX * | 77 | EVP_AEAD_CTX * |
| 72 | EVP_AEAD_CTX_new(void) | 78 | EVP_AEAD_CTX_new(void) |
| 73 | { | 79 | { |
| 74 | return calloc(1, sizeof(EVP_AEAD_CTX)); | 80 | return calloc(1, sizeof(EVP_AEAD_CTX)); |
| 75 | } | 81 | } |
| 82 | LCRYPTO_ALIAS(EVP_AEAD_CTX_new); | ||
| 76 | 83 | ||
| 77 | void | 84 | void |
| 78 | EVP_AEAD_CTX_free(EVP_AEAD_CTX *ctx) | 85 | EVP_AEAD_CTX_free(EVP_AEAD_CTX *ctx) |
| @@ -83,6 +90,7 @@ EVP_AEAD_CTX_free(EVP_AEAD_CTX *ctx) | |||
| 83 | EVP_AEAD_CTX_cleanup(ctx); | 90 | EVP_AEAD_CTX_cleanup(ctx); |
| 84 | free(ctx); | 91 | free(ctx); |
| 85 | } | 92 | } |
| 93 | LCRYPTO_ALIAS(EVP_AEAD_CTX_free); | ||
| 86 | 94 | ||
| 87 | /* check_alias returns 0 if out points within the buffer determined by in | 95 | /* check_alias returns 0 if out points within the buffer determined by in |
| 88 | * and in_len and 1 otherwise. | 96 | * and in_len and 1 otherwise. |
| @@ -133,6 +141,7 @@ error: | |||
| 133 | *out_len = 0; | 141 | *out_len = 0; |
| 134 | return 0; | 142 | return 0; |
| 135 | } | 143 | } |
| 144 | LCRYPTO_ALIAS(EVP_AEAD_CTX_seal); | ||
| 136 | 145 | ||
| 137 | int | 146 | int |
| 138 | EVP_AEAD_CTX_open(const EVP_AEAD_CTX *ctx, unsigned char *out, size_t *out_len, | 147 | EVP_AEAD_CTX_open(const EVP_AEAD_CTX *ctx, unsigned char *out, size_t *out_len, |
| @@ -158,3 +167,4 @@ error: | |||
| 158 | *out_len = 0; | 167 | *out_len = 0; |
| 159 | return 0; | 168 | return 0; |
| 160 | } | 169 | } |
| 170 | LCRYPTO_ALIAS(EVP_AEAD_CTX_open); | ||
diff --git a/src/lib/libcrypto/evp/evp_enc.c b/src/lib/libcrypto/evp/evp_enc.c index df818e3a62..f9b8deddf5 100644 --- a/src/lib/libcrypto/evp/evp_enc.c +++ b/src/lib/libcrypto/evp/evp_enc.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: evp_enc.c,v 1.50 2023/03/01 11:16:06 tb Exp $ */ | 1 | /* $OpenBSD: evp_enc.c,v 1.51 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -82,6 +82,7 @@ EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, | |||
| 82 | EVP_CIPHER_CTX_init(ctx); | 82 | EVP_CIPHER_CTX_init(ctx); |
| 83 | return EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, enc); | 83 | return EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, enc); |
| 84 | } | 84 | } |
| 85 | LCRYPTO_ALIAS(EVP_CipherInit); | ||
| 85 | 86 | ||
| 86 | int | 87 | int |
| 87 | EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl, | 88 | EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl, |
| @@ -230,6 +231,7 @@ skip_to_init: | |||
| 230 | ctx->block_mask = ctx->cipher->block_size - 1; | 231 | ctx->block_mask = ctx->cipher->block_size - 1; |
| 231 | return 1; | 232 | return 1; |
| 232 | } | 233 | } |
| 234 | LCRYPTO_ALIAS(EVP_CipherInit_ex); | ||
| 233 | 235 | ||
| 234 | int | 236 | int |
| 235 | EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, | 237 | EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, |
| @@ -240,6 +242,7 @@ EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, | |||
| 240 | else | 242 | else |
| 241 | return EVP_DecryptUpdate(ctx, out, outl, in, inl); | 243 | return EVP_DecryptUpdate(ctx, out, outl, in, inl); |
| 242 | } | 244 | } |
| 245 | LCRYPTO_ALIAS(EVP_CipherUpdate); | ||
| 243 | 246 | ||
| 244 | int | 247 | int |
| 245 | EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | 248 | EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) |
| @@ -249,6 +252,7 @@ EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | |||
| 249 | else | 252 | else |
| 250 | return EVP_DecryptFinal_ex(ctx, out, outl); | 253 | return EVP_DecryptFinal_ex(ctx, out, outl); |
| 251 | } | 254 | } |
| 255 | LCRYPTO_ALIAS(EVP_CipherFinal_ex); | ||
| 252 | 256 | ||
| 253 | __warn_references(EVP_CipherFinal, | 257 | __warn_references(EVP_CipherFinal, |
| 254 | "EVP_CipherFinal is often misused, please use EVP_CipherFinal_ex and EVP_CIPHER_CTX_cleanup"); | 258 | "EVP_CipherFinal is often misused, please use EVP_CipherFinal_ex and EVP_CIPHER_CTX_cleanup"); |
| @@ -263,6 +267,7 @@ EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | |||
| 263 | ret = EVP_DecryptFinal_ex(ctx, out, outl); | 267 | ret = EVP_DecryptFinal_ex(ctx, out, outl); |
| 264 | return ret; | 268 | return ret; |
| 265 | } | 269 | } |
| 270 | LCRYPTO_ALIAS(EVP_CipherFinal); | ||
| 266 | 271 | ||
| 267 | int | 272 | int |
| 268 | EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, | 273 | EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, |
| @@ -270,6 +275,7 @@ EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, | |||
| 270 | { | 275 | { |
| 271 | return EVP_CipherInit(ctx, cipher, key, iv, 1); | 276 | return EVP_CipherInit(ctx, cipher, key, iv, 1); |
| 272 | } | 277 | } |
| 278 | LCRYPTO_ALIAS(EVP_EncryptInit); | ||
| 273 | 279 | ||
| 274 | int | 280 | int |
| 275 | EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl, | 281 | EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl, |
| @@ -277,6 +283,7 @@ EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl, | |||
| 277 | { | 283 | { |
| 278 | return EVP_CipherInit_ex(ctx, cipher, impl, key, iv, 1); | 284 | return EVP_CipherInit_ex(ctx, cipher, impl, key, iv, 1); |
| 279 | } | 285 | } |
| 286 | LCRYPTO_ALIAS(EVP_EncryptInit_ex); | ||
| 280 | 287 | ||
| 281 | int | 288 | int |
| 282 | EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, | 289 | EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, |
| @@ -284,6 +291,7 @@ EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, | |||
| 284 | { | 291 | { |
| 285 | return EVP_CipherInit(ctx, cipher, key, iv, 0); | 292 | return EVP_CipherInit(ctx, cipher, key, iv, 0); |
| 286 | } | 293 | } |
| 294 | LCRYPTO_ALIAS(EVP_DecryptInit); | ||
| 287 | 295 | ||
| 288 | int | 296 | int |
| 289 | EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl, | 297 | EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl, |
| @@ -291,6 +299,7 @@ EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl, | |||
| 291 | { | 299 | { |
| 292 | return EVP_CipherInit_ex(ctx, cipher, impl, key, iv, 0); | 300 | return EVP_CipherInit_ex(ctx, cipher, impl, key, iv, 0); |
| 293 | } | 301 | } |
| 302 | LCRYPTO_ALIAS(EVP_DecryptInit_ex); | ||
| 294 | 303 | ||
| 295 | int | 304 | int |
| 296 | EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, | 305 | EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, |
| @@ -373,6 +382,7 @@ EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, | |||
| 373 | ctx->buf_len = i; | 382 | ctx->buf_len = i; |
| 374 | return 1; | 383 | return 1; |
| 375 | } | 384 | } |
| 385 | LCRYPTO_ALIAS(EVP_EncryptUpdate); | ||
| 376 | 386 | ||
| 377 | __warn_references(EVP_EncryptFinal, | 387 | __warn_references(EVP_EncryptFinal, |
| 378 | "EVP_EncryptFinal is often misused, please use EVP_EncryptFinal_ex and EVP_CIPHER_CTX_cleanup"); | 388 | "EVP_EncryptFinal is often misused, please use EVP_EncryptFinal_ex and EVP_CIPHER_CTX_cleanup"); |
| @@ -385,6 +395,7 @@ EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | |||
| 385 | ret = EVP_EncryptFinal_ex(ctx, out, outl); | 395 | ret = EVP_EncryptFinal_ex(ctx, out, outl); |
| 386 | return ret; | 396 | return ret; |
| 387 | } | 397 | } |
| 398 | LCRYPTO_ALIAS(EVP_EncryptFinal); | ||
| 388 | 399 | ||
| 389 | int | 400 | int |
| 390 | EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | 401 | EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) |
| @@ -431,6 +442,7 @@ EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | |||
| 431 | 442 | ||
| 432 | return ret; | 443 | return ret; |
| 433 | } | 444 | } |
| 445 | LCRYPTO_ALIAS(EVP_EncryptFinal_ex); | ||
| 434 | 446 | ||
| 435 | int | 447 | int |
| 436 | EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, | 448 | EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, |
| @@ -501,6 +513,7 @@ EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, | |||
| 501 | 513 | ||
| 502 | return 1; | 514 | return 1; |
| 503 | } | 515 | } |
| 516 | LCRYPTO_ALIAS(EVP_DecryptUpdate); | ||
| 504 | 517 | ||
| 505 | __warn_references(EVP_DecryptFinal, | 518 | __warn_references(EVP_DecryptFinal, |
| 506 | "EVP_DecryptFinal is often misused, please use EVP_DecryptFinal_ex and EVP_CIPHER_CTX_cleanup"); | 519 | "EVP_DecryptFinal is often misused, please use EVP_DecryptFinal_ex and EVP_CIPHER_CTX_cleanup"); |
| @@ -513,6 +526,7 @@ EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | |||
| 513 | ret = EVP_DecryptFinal_ex(ctx, out, outl); | 526 | ret = EVP_DecryptFinal_ex(ctx, out, outl); |
| 514 | return ret; | 527 | return ret; |
| 515 | } | 528 | } |
| 529 | LCRYPTO_ALIAS(EVP_DecryptFinal); | ||
| 516 | 530 | ||
| 517 | int | 531 | int |
| 518 | EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | 532 | EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) |
| @@ -567,12 +581,14 @@ EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | |||
| 567 | *outl = 0; | 581 | *outl = 0; |
| 568 | return (1); | 582 | return (1); |
| 569 | } | 583 | } |
| 584 | LCRYPTO_ALIAS(EVP_DecryptFinal_ex); | ||
| 570 | 585 | ||
| 571 | EVP_CIPHER_CTX * | 586 | EVP_CIPHER_CTX * |
| 572 | EVP_CIPHER_CTX_new(void) | 587 | EVP_CIPHER_CTX_new(void) |
| 573 | { | 588 | { |
| 574 | return calloc(1, sizeof(EVP_CIPHER_CTX)); | 589 | return calloc(1, sizeof(EVP_CIPHER_CTX)); |
| 575 | } | 590 | } |
| 591 | LCRYPTO_ALIAS(EVP_CIPHER_CTX_new); | ||
| 576 | 592 | ||
| 577 | void | 593 | void |
| 578 | EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx) | 594 | EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx) |
| @@ -584,18 +600,21 @@ EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx) | |||
| 584 | 600 | ||
| 585 | free(ctx); | 601 | free(ctx); |
| 586 | } | 602 | } |
| 603 | LCRYPTO_ALIAS(EVP_CIPHER_CTX_free); | ||
| 587 | 604 | ||
| 588 | void | 605 | void |
| 589 | EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *ctx) | 606 | EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *ctx) |
| 590 | { | 607 | { |
| 591 | memset(ctx, 0, sizeof(EVP_CIPHER_CTX)); | 608 | memset(ctx, 0, sizeof(EVP_CIPHER_CTX)); |
| 592 | } | 609 | } |
| 610 | LCRYPTO_ALIAS(EVP_CIPHER_CTX_init); | ||
| 593 | 611 | ||
| 594 | int | 612 | int |
| 595 | EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *a) | 613 | EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *a) |
| 596 | { | 614 | { |
| 597 | return EVP_CIPHER_CTX_cleanup(a); | 615 | return EVP_CIPHER_CTX_cleanup(a); |
| 598 | } | 616 | } |
| 617 | LCRYPTO_ALIAS(EVP_CIPHER_CTX_reset); | ||
| 599 | 618 | ||
| 600 | int | 619 | int |
| 601 | EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *c) | 620 | EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *c) |
| @@ -619,6 +638,7 @@ EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *c) | |||
| 619 | 638 | ||
| 620 | return 1; | 639 | return 1; |
| 621 | } | 640 | } |
| 641 | LCRYPTO_ALIAS(EVP_CIPHER_CTX_cleanup); | ||
| 622 | 642 | ||
| 623 | int | 643 | int |
| 624 | EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *c, int keylen) | 644 | EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *c, int keylen) |
| @@ -635,6 +655,7 @@ EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *c, int keylen) | |||
| 635 | EVPerror(EVP_R_INVALID_KEY_LENGTH); | 655 | EVPerror(EVP_R_INVALID_KEY_LENGTH); |
| 636 | return 0; | 656 | return 0; |
| 637 | } | 657 | } |
| 658 | LCRYPTO_ALIAS(EVP_CIPHER_CTX_set_key_length); | ||
| 638 | 659 | ||
| 639 | int | 660 | int |
| 640 | EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *ctx, int pad) | 661 | EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *ctx, int pad) |
| @@ -645,6 +666,7 @@ EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *ctx, int pad) | |||
| 645 | ctx->flags |= EVP_CIPH_NO_PADDING; | 666 | ctx->flags |= EVP_CIPH_NO_PADDING; |
| 646 | return 1; | 667 | return 1; |
| 647 | } | 668 | } |
| 669 | LCRYPTO_ALIAS(EVP_CIPHER_CTX_set_padding); | ||
| 648 | 670 | ||
| 649 | int | 671 | int |
| 650 | EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr) | 672 | EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr) |
| @@ -668,6 +690,7 @@ EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr) | |||
| 668 | } | 690 | } |
| 669 | return ret; | 691 | return ret; |
| 670 | } | 692 | } |
| 693 | LCRYPTO_ALIAS(EVP_CIPHER_CTX_ctrl); | ||
| 671 | 694 | ||
| 672 | int | 695 | int |
| 673 | EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key) | 696 | EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key) |
| @@ -677,6 +700,7 @@ EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key) | |||
| 677 | arc4random_buf(key, ctx->key_len); | 700 | arc4random_buf(key, ctx->key_len); |
| 678 | return 1; | 701 | return 1; |
| 679 | } | 702 | } |
| 703 | LCRYPTO_ALIAS(EVP_CIPHER_CTX_rand_key); | ||
| 680 | 704 | ||
| 681 | int | 705 | int |
| 682 | EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in) | 706 | EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in) |
| @@ -723,3 +747,4 @@ EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in) | |||
| 723 | 747 | ||
| 724 | return 1; | 748 | return 1; |
| 725 | } | 749 | } |
| 750 | LCRYPTO_ALIAS(EVP_CIPHER_CTX_copy); | ||
diff --git a/src/lib/libcrypto/evp/evp_err.c b/src/lib/libcrypto/evp/evp_err.c index 9cf89f47fb..8835215c14 100644 --- a/src/lib/libcrypto/evp/evp_err.c +++ b/src/lib/libcrypto/evp/evp_err.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: evp_err.c,v 1.30 2022/11/10 15:17:30 jsing Exp $ */ | 1 | /* $OpenBSD: evp_err.c,v 1.31 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* ==================================================================== | 2 | /* ==================================================================== |
| 3 | * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. |
| 4 | * | 4 | * |
| @@ -164,3 +164,4 @@ ERR_load_EVP_strings(void) | |||
| 164 | } | 164 | } |
| 165 | #endif | 165 | #endif |
| 166 | } | 166 | } |
| 167 | LCRYPTO_ALIAS(ERR_load_EVP_strings); | ||
diff --git a/src/lib/libcrypto/evp/evp_key.c b/src/lib/libcrypto/evp/evp_key.c index 6fc8588cde..148fd2fe92 100644 --- a/src/lib/libcrypto/evp/evp_key.c +++ b/src/lib/libcrypto/evp/evp_key.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: evp_key.c,v 1.28 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: evp_key.c,v 1.29 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -79,6 +79,7 @@ EVP_set_pw_prompt(const char *prompt) | |||
| 79 | strlcpy(prompt_string, prompt, sizeof(prompt_string)); | 79 | strlcpy(prompt_string, prompt, sizeof(prompt_string)); |
| 80 | } | 80 | } |
| 81 | } | 81 | } |
| 82 | LCRYPTO_ALIAS(EVP_set_pw_prompt); | ||
| 82 | 83 | ||
| 83 | char * | 84 | char * |
| 84 | EVP_get_pw_prompt(void) | 85 | EVP_get_pw_prompt(void) |
| @@ -88,12 +89,14 @@ EVP_get_pw_prompt(void) | |||
| 88 | else | 89 | else |
| 89 | return (prompt_string); | 90 | return (prompt_string); |
| 90 | } | 91 | } |
| 92 | LCRYPTO_ALIAS(EVP_get_pw_prompt); | ||
| 91 | 93 | ||
| 92 | int | 94 | int |
| 93 | EVP_read_pw_string(char *buf, int len, const char *prompt, int verify) | 95 | EVP_read_pw_string(char *buf, int len, const char *prompt, int verify) |
| 94 | { | 96 | { |
| 95 | return EVP_read_pw_string_min(buf, 0, len, prompt, verify); | 97 | return EVP_read_pw_string_min(buf, 0, len, prompt, verify); |
| 96 | } | 98 | } |
| 99 | LCRYPTO_ALIAS(EVP_read_pw_string); | ||
| 97 | 100 | ||
| 98 | int | 101 | int |
| 99 | EVP_read_pw_string_min(char *buf, int min, int len, const char *prompt, | 102 | EVP_read_pw_string_min(char *buf, int min, int len, const char *prompt, |
| @@ -125,6 +128,7 @@ EVP_read_pw_string_min(char *buf, int min, int len, const char *prompt, | |||
| 125 | explicit_bzero(buff, BUFSIZ); | 128 | explicit_bzero(buff, BUFSIZ); |
| 126 | return ret; | 129 | return ret; |
| 127 | } | 130 | } |
| 131 | LCRYPTO_ALIAS(EVP_read_pw_string_min); | ||
| 128 | 132 | ||
| 129 | int | 133 | int |
| 130 | EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md, | 134 | EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md, |
| @@ -210,3 +214,4 @@ err: | |||
| 210 | explicit_bzero(md_buf, sizeof md_buf); | 214 | explicit_bzero(md_buf, sizeof md_buf); |
| 211 | return rv; | 215 | return rv; |
| 212 | } | 216 | } |
| 217 | LCRYPTO_ALIAS(EVP_BytesToKey); | ||
diff --git a/src/lib/libcrypto/evp/evp_lib.c b/src/lib/libcrypto/evp/evp_lib.c index f64842b86f..d6b929c0e3 100644 --- a/src/lib/libcrypto/evp/evp_lib.c +++ b/src/lib/libcrypto/evp/evp_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: evp_lib.c,v 1.25 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: evp_lib.c,v 1.26 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -79,6 +79,7 @@ EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type) | |||
| 79 | ret = -1; | 79 | ret = -1; |
| 80 | return (ret); | 80 | return (ret); |
| 81 | } | 81 | } |
| 82 | LCRYPTO_ALIAS(EVP_CIPHER_param_to_asn1); | ||
| 82 | 83 | ||
| 83 | int | 84 | int |
| 84 | EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type) | 85 | EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type) |
| @@ -93,6 +94,7 @@ EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type) | |||
| 93 | ret = -1; | 94 | ret = -1; |
| 94 | return (ret); | 95 | return (ret); |
| 95 | } | 96 | } |
| 97 | LCRYPTO_ALIAS(EVP_CIPHER_asn1_to_param); | ||
| 96 | 98 | ||
| 97 | int | 99 | int |
| 98 | EVP_CIPHER_get_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type) | 100 | EVP_CIPHER_get_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type) |
| @@ -114,6 +116,7 @@ EVP_CIPHER_get_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type) | |||
| 114 | } | 116 | } |
| 115 | return (i); | 117 | return (i); |
| 116 | } | 118 | } |
| 119 | LCRYPTO_ALIAS(EVP_CIPHER_get_asn1_iv); | ||
| 117 | 120 | ||
| 118 | int | 121 | int |
| 119 | EVP_CIPHER_set_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type) | 122 | EVP_CIPHER_set_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type) |
| @@ -131,6 +134,7 @@ EVP_CIPHER_set_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type) | |||
| 131 | } | 134 | } |
| 132 | return (i); | 135 | return (i); |
| 133 | } | 136 | } |
| 137 | LCRYPTO_ALIAS(EVP_CIPHER_set_asn1_iv); | ||
| 134 | 138 | ||
| 135 | /* Convert the various cipher NIDs and dummies to a proper OID NID */ | 139 | /* Convert the various cipher NIDs and dummies to a proper OID NID */ |
| 136 | int | 140 | int |
| @@ -184,18 +188,21 @@ EVP_CIPHER_type(const EVP_CIPHER *ctx) | |||
| 184 | return nid; | 188 | return nid; |
| 185 | } | 189 | } |
| 186 | } | 190 | } |
| 191 | LCRYPTO_ALIAS(EVP_CIPHER_type); | ||
| 187 | 192 | ||
| 188 | int | 193 | int |
| 189 | EVP_CIPHER_block_size(const EVP_CIPHER *e) | 194 | EVP_CIPHER_block_size(const EVP_CIPHER *e) |
| 190 | { | 195 | { |
| 191 | return e->block_size; | 196 | return e->block_size; |
| 192 | } | 197 | } |
| 198 | LCRYPTO_ALIAS(EVP_CIPHER_block_size); | ||
| 193 | 199 | ||
| 194 | int | 200 | int |
| 195 | EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *ctx) | 201 | EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *ctx) |
| 196 | { | 202 | { |
| 197 | return ctx->cipher->block_size; | 203 | return ctx->cipher->block_size; |
| 198 | } | 204 | } |
| 205 | LCRYPTO_ALIAS(EVP_CIPHER_CTX_block_size); | ||
| 199 | 206 | ||
| 200 | int | 207 | int |
| 201 | EVP_Cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, | 208 | EVP_Cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, |
| @@ -203,48 +210,56 @@ EVP_Cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, | |||
| 203 | { | 210 | { |
| 204 | return ctx->cipher->do_cipher(ctx, out, in, inl); | 211 | return ctx->cipher->do_cipher(ctx, out, in, inl); |
| 205 | } | 212 | } |
| 213 | LCRYPTO_ALIAS(EVP_Cipher); | ||
| 206 | 214 | ||
| 207 | const EVP_CIPHER * | 215 | const EVP_CIPHER * |
| 208 | EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx) | 216 | EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx) |
| 209 | { | 217 | { |
| 210 | return ctx->cipher; | 218 | return ctx->cipher; |
| 211 | } | 219 | } |
| 220 | LCRYPTO_ALIAS(EVP_CIPHER_CTX_cipher); | ||
| 212 | 221 | ||
| 213 | int | 222 | int |
| 214 | EVP_CIPHER_CTX_encrypting(const EVP_CIPHER_CTX *ctx) | 223 | EVP_CIPHER_CTX_encrypting(const EVP_CIPHER_CTX *ctx) |
| 215 | { | 224 | { |
| 216 | return ctx->encrypt; | 225 | return ctx->encrypt; |
| 217 | } | 226 | } |
| 227 | LCRYPTO_ALIAS(EVP_CIPHER_CTX_encrypting); | ||
| 218 | 228 | ||
| 219 | unsigned long | 229 | unsigned long |
| 220 | EVP_CIPHER_flags(const EVP_CIPHER *cipher) | 230 | EVP_CIPHER_flags(const EVP_CIPHER *cipher) |
| 221 | { | 231 | { |
| 222 | return cipher->flags; | 232 | return cipher->flags; |
| 223 | } | 233 | } |
| 234 | LCRYPTO_ALIAS(EVP_CIPHER_flags); | ||
| 224 | 235 | ||
| 225 | unsigned long | 236 | unsigned long |
| 226 | EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx) | 237 | EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx) |
| 227 | { | 238 | { |
| 228 | return ctx->cipher->flags; | 239 | return ctx->cipher->flags; |
| 229 | } | 240 | } |
| 241 | LCRYPTO_ALIAS(EVP_CIPHER_CTX_flags); | ||
| 230 | 242 | ||
| 231 | void * | 243 | void * |
| 232 | EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx) | 244 | EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx) |
| 233 | { | 245 | { |
| 234 | return ctx->app_data; | 246 | return ctx->app_data; |
| 235 | } | 247 | } |
| 248 | LCRYPTO_ALIAS(EVP_CIPHER_CTX_get_app_data); | ||
| 236 | 249 | ||
| 237 | void | 250 | void |
| 238 | EVP_CIPHER_CTX_set_app_data(EVP_CIPHER_CTX *ctx, void *data) | 251 | EVP_CIPHER_CTX_set_app_data(EVP_CIPHER_CTX *ctx, void *data) |
| 239 | { | 252 | { |
| 240 | ctx->app_data = data; | 253 | ctx->app_data = data; |
| 241 | } | 254 | } |
| 255 | LCRYPTO_ALIAS(EVP_CIPHER_CTX_set_app_data); | ||
| 242 | 256 | ||
| 243 | void * | 257 | void * |
| 244 | EVP_CIPHER_CTX_get_cipher_data(const EVP_CIPHER_CTX *ctx) | 258 | EVP_CIPHER_CTX_get_cipher_data(const EVP_CIPHER_CTX *ctx) |
| 245 | { | 259 | { |
| 246 | return ctx->cipher_data; | 260 | return ctx->cipher_data; |
| 247 | } | 261 | } |
| 262 | LCRYPTO_ALIAS(EVP_CIPHER_CTX_get_cipher_data); | ||
| 248 | 263 | ||
| 249 | void * | 264 | void * |
| 250 | EVP_CIPHER_CTX_set_cipher_data(EVP_CIPHER_CTX *ctx, void *cipher_data) | 265 | EVP_CIPHER_CTX_set_cipher_data(EVP_CIPHER_CTX *ctx, void *cipher_data) |
| @@ -256,48 +271,56 @@ EVP_CIPHER_CTX_set_cipher_data(EVP_CIPHER_CTX *ctx, void *cipher_data) | |||
| 256 | 271 | ||
| 257 | return old_cipher_data; | 272 | return old_cipher_data; |
| 258 | } | 273 | } |
| 274 | LCRYPTO_ALIAS(EVP_CIPHER_CTX_set_cipher_data); | ||
| 259 | 275 | ||
| 260 | int | 276 | int |
| 261 | EVP_CIPHER_iv_length(const EVP_CIPHER *cipher) | 277 | EVP_CIPHER_iv_length(const EVP_CIPHER *cipher) |
| 262 | { | 278 | { |
| 263 | return cipher->iv_len; | 279 | return cipher->iv_len; |
| 264 | } | 280 | } |
| 281 | LCRYPTO_ALIAS(EVP_CIPHER_iv_length); | ||
| 265 | 282 | ||
| 266 | int | 283 | int |
| 267 | EVP_CIPHER_CTX_iv_length(const EVP_CIPHER_CTX *ctx) | 284 | EVP_CIPHER_CTX_iv_length(const EVP_CIPHER_CTX *ctx) |
| 268 | { | 285 | { |
| 269 | return ctx->cipher->iv_len; | 286 | return ctx->cipher->iv_len; |
| 270 | } | 287 | } |
| 288 | LCRYPTO_ALIAS(EVP_CIPHER_CTX_iv_length); | ||
| 271 | 289 | ||
| 272 | unsigned char * | 290 | unsigned char * |
| 273 | EVP_CIPHER_CTX_buf_noconst(EVP_CIPHER_CTX *ctx) | 291 | EVP_CIPHER_CTX_buf_noconst(EVP_CIPHER_CTX *ctx) |
| 274 | { | 292 | { |
| 275 | return ctx->buf; | 293 | return ctx->buf; |
| 276 | } | 294 | } |
| 295 | LCRYPTO_ALIAS(EVP_CIPHER_CTX_buf_noconst); | ||
| 277 | 296 | ||
| 278 | int | 297 | int |
| 279 | EVP_CIPHER_key_length(const EVP_CIPHER *cipher) | 298 | EVP_CIPHER_key_length(const EVP_CIPHER *cipher) |
| 280 | { | 299 | { |
| 281 | return cipher->key_len; | 300 | return cipher->key_len; |
| 282 | } | 301 | } |
| 302 | LCRYPTO_ALIAS(EVP_CIPHER_key_length); | ||
| 283 | 303 | ||
| 284 | int | 304 | int |
| 285 | EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx) | 305 | EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx) |
| 286 | { | 306 | { |
| 287 | return ctx->key_len; | 307 | return ctx->key_len; |
| 288 | } | 308 | } |
| 309 | LCRYPTO_ALIAS(EVP_CIPHER_CTX_key_length); | ||
| 289 | 310 | ||
| 290 | int | 311 | int |
| 291 | EVP_CIPHER_nid(const EVP_CIPHER *cipher) | 312 | EVP_CIPHER_nid(const EVP_CIPHER *cipher) |
| 292 | { | 313 | { |
| 293 | return cipher->nid; | 314 | return cipher->nid; |
| 294 | } | 315 | } |
| 316 | LCRYPTO_ALIAS(EVP_CIPHER_nid); | ||
| 295 | 317 | ||
| 296 | int | 318 | int |
| 297 | EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx) | 319 | EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx) |
| 298 | { | 320 | { |
| 299 | return ctx->cipher->nid; | 321 | return ctx->cipher->nid; |
| 300 | } | 322 | } |
| 323 | LCRYPTO_ALIAS(EVP_CIPHER_CTX_nid); | ||
| 301 | 324 | ||
| 302 | int | 325 | int |
| 303 | EVP_CIPHER_CTX_get_iv(const EVP_CIPHER_CTX *ctx, unsigned char *iv, size_t len) | 326 | EVP_CIPHER_CTX_get_iv(const EVP_CIPHER_CTX *ctx, unsigned char *iv, size_t len) |
| @@ -317,6 +340,7 @@ EVP_CIPHER_CTX_get_iv(const EVP_CIPHER_CTX *ctx, unsigned char *iv, size_t len) | |||
| 317 | } | 340 | } |
| 318 | return 1; | 341 | return 1; |
| 319 | } | 342 | } |
| 343 | LCRYPTO_ALIAS(EVP_CIPHER_CTX_get_iv); | ||
| 320 | 344 | ||
| 321 | int | 345 | int |
| 322 | EVP_CIPHER_CTX_set_iv(EVP_CIPHER_CTX *ctx, const unsigned char *iv, size_t len) | 346 | EVP_CIPHER_CTX_set_iv(EVP_CIPHER_CTX *ctx, const unsigned char *iv, size_t len) |
| @@ -336,24 +360,28 @@ EVP_CIPHER_CTX_set_iv(EVP_CIPHER_CTX *ctx, const unsigned char *iv, size_t len) | |||
| 336 | } | 360 | } |
| 337 | return 1; | 361 | return 1; |
| 338 | } | 362 | } |
| 363 | LCRYPTO_ALIAS(EVP_CIPHER_CTX_set_iv); | ||
| 339 | 364 | ||
| 340 | int | 365 | int |
| 341 | EVP_MD_block_size(const EVP_MD *md) | 366 | EVP_MD_block_size(const EVP_MD *md) |
| 342 | { | 367 | { |
| 343 | return md->block_size; | 368 | return md->block_size; |
| 344 | } | 369 | } |
| 370 | LCRYPTO_ALIAS(EVP_MD_block_size); | ||
| 345 | 371 | ||
| 346 | int | 372 | int |
| 347 | EVP_MD_type(const EVP_MD *md) | 373 | EVP_MD_type(const EVP_MD *md) |
| 348 | { | 374 | { |
| 349 | return md->type; | 375 | return md->type; |
| 350 | } | 376 | } |
| 377 | LCRYPTO_ALIAS(EVP_MD_type); | ||
| 351 | 378 | ||
| 352 | int | 379 | int |
| 353 | EVP_MD_pkey_type(const EVP_MD *md) | 380 | EVP_MD_pkey_type(const EVP_MD *md) |
| 354 | { | 381 | { |
| 355 | return md->pkey_type; | 382 | return md->pkey_type; |
| 356 | } | 383 | } |
| 384 | LCRYPTO_ALIAS(EVP_MD_pkey_type); | ||
| 357 | 385 | ||
| 358 | int | 386 | int |
| 359 | EVP_MD_size(const EVP_MD *md) | 387 | EVP_MD_size(const EVP_MD *md) |
| @@ -364,12 +392,14 @@ EVP_MD_size(const EVP_MD *md) | |||
| 364 | } | 392 | } |
| 365 | return md->md_size; | 393 | return md->md_size; |
| 366 | } | 394 | } |
| 395 | LCRYPTO_ALIAS(EVP_MD_size); | ||
| 367 | 396 | ||
| 368 | unsigned long | 397 | unsigned long |
| 369 | EVP_MD_flags(const EVP_MD *md) | 398 | EVP_MD_flags(const EVP_MD *md) |
| 370 | { | 399 | { |
| 371 | return md->flags; | 400 | return md->flags; |
| 372 | } | 401 | } |
| 402 | LCRYPTO_ALIAS(EVP_MD_flags); | ||
| 373 | 403 | ||
| 374 | EVP_MD * | 404 | EVP_MD * |
| 375 | EVP_MD_meth_new(int md_type, int pkey_type) | 405 | EVP_MD_meth_new(int md_type, int pkey_type) |
| @@ -384,6 +414,7 @@ EVP_MD_meth_new(int md_type, int pkey_type) | |||
| 384 | 414 | ||
| 385 | return md; | 415 | return md; |
| 386 | } | 416 | } |
| 417 | LCRYPTO_ALIAS(EVP_MD_meth_new); | ||
| 387 | 418 | ||
| 388 | EVP_MD * | 419 | EVP_MD * |
| 389 | EVP_MD_meth_dup(const EVP_MD *md) | 420 | EVP_MD_meth_dup(const EVP_MD *md) |
| @@ -397,12 +428,14 @@ EVP_MD_meth_dup(const EVP_MD *md) | |||
| 397 | 428 | ||
| 398 | return to; | 429 | return to; |
| 399 | } | 430 | } |
| 431 | LCRYPTO_ALIAS(EVP_MD_meth_dup); | ||
| 400 | 432 | ||
| 401 | void | 433 | void |
| 402 | EVP_MD_meth_free(EVP_MD *md) | 434 | EVP_MD_meth_free(EVP_MD *md) |
| 403 | { | 435 | { |
| 404 | freezero(md, sizeof(*md)); | 436 | freezero(md, sizeof(*md)); |
| 405 | } | 437 | } |
| 438 | LCRYPTO_ALIAS(EVP_MD_meth_free); | ||
| 406 | 439 | ||
| 407 | int | 440 | int |
| 408 | EVP_MD_meth_set_input_blocksize(EVP_MD *md, int blocksize) | 441 | EVP_MD_meth_set_input_blocksize(EVP_MD *md, int blocksize) |
| @@ -410,6 +443,7 @@ EVP_MD_meth_set_input_blocksize(EVP_MD *md, int blocksize) | |||
| 410 | md->block_size = blocksize; | 443 | md->block_size = blocksize; |
| 411 | return 1; | 444 | return 1; |
| 412 | } | 445 | } |
| 446 | LCRYPTO_ALIAS(EVP_MD_meth_set_input_blocksize); | ||
| 413 | 447 | ||
| 414 | int | 448 | int |
| 415 | EVP_MD_meth_set_result_size(EVP_MD *md, int result_size) | 449 | EVP_MD_meth_set_result_size(EVP_MD *md, int result_size) |
| @@ -417,6 +451,7 @@ EVP_MD_meth_set_result_size(EVP_MD *md, int result_size) | |||
| 417 | md->md_size = result_size; | 451 | md->md_size = result_size; |
| 418 | return 1; | 452 | return 1; |
| 419 | } | 453 | } |
| 454 | LCRYPTO_ALIAS(EVP_MD_meth_set_result_size); | ||
| 420 | 455 | ||
| 421 | int | 456 | int |
| 422 | EVP_MD_meth_set_app_datasize(EVP_MD *md, int datasize) | 457 | EVP_MD_meth_set_app_datasize(EVP_MD *md, int datasize) |
| @@ -424,6 +459,7 @@ EVP_MD_meth_set_app_datasize(EVP_MD *md, int datasize) | |||
| 424 | md->ctx_size = datasize; | 459 | md->ctx_size = datasize; |
| 425 | return 1; | 460 | return 1; |
| 426 | } | 461 | } |
| 462 | LCRYPTO_ALIAS(EVP_MD_meth_set_app_datasize); | ||
| 427 | 463 | ||
| 428 | int | 464 | int |
| 429 | EVP_MD_meth_set_flags(EVP_MD *md, unsigned long flags) | 465 | EVP_MD_meth_set_flags(EVP_MD *md, unsigned long flags) |
| @@ -431,6 +467,7 @@ EVP_MD_meth_set_flags(EVP_MD *md, unsigned long flags) | |||
| 431 | md->flags = flags; | 467 | md->flags = flags; |
| 432 | return 1; | 468 | return 1; |
| 433 | } | 469 | } |
| 470 | LCRYPTO_ALIAS(EVP_MD_meth_set_flags); | ||
| 434 | 471 | ||
| 435 | int | 472 | int |
| 436 | EVP_MD_meth_set_init(EVP_MD *md, int (*init)(EVP_MD_CTX *ctx)) | 473 | EVP_MD_meth_set_init(EVP_MD *md, int (*init)(EVP_MD_CTX *ctx)) |
| @@ -438,6 +475,7 @@ EVP_MD_meth_set_init(EVP_MD *md, int (*init)(EVP_MD_CTX *ctx)) | |||
| 438 | md->init = init; | 475 | md->init = init; |
| 439 | return 1; | 476 | return 1; |
| 440 | } | 477 | } |
| 478 | LCRYPTO_ALIAS(EVP_MD_meth_set_init); | ||
| 441 | 479 | ||
| 442 | int | 480 | int |
| 443 | EVP_MD_meth_set_update(EVP_MD *md, | 481 | EVP_MD_meth_set_update(EVP_MD *md, |
| @@ -446,6 +484,7 @@ EVP_MD_meth_set_update(EVP_MD *md, | |||
| 446 | md->update = update; | 484 | md->update = update; |
| 447 | return 1; | 485 | return 1; |
| 448 | } | 486 | } |
| 487 | LCRYPTO_ALIAS(EVP_MD_meth_set_update); | ||
| 449 | 488 | ||
| 450 | int | 489 | int |
| 451 | EVP_MD_meth_set_final(EVP_MD *md, | 490 | EVP_MD_meth_set_final(EVP_MD *md, |
| @@ -454,6 +493,7 @@ EVP_MD_meth_set_final(EVP_MD *md, | |||
| 454 | md->final = final; | 493 | md->final = final; |
| 455 | return 1; | 494 | return 1; |
| 456 | } | 495 | } |
| 496 | LCRYPTO_ALIAS(EVP_MD_meth_set_final); | ||
| 457 | 497 | ||
| 458 | int | 498 | int |
| 459 | EVP_MD_meth_set_copy(EVP_MD *md, | 499 | EVP_MD_meth_set_copy(EVP_MD *md, |
| @@ -462,6 +502,7 @@ EVP_MD_meth_set_copy(EVP_MD *md, | |||
| 462 | md->copy = copy; | 502 | md->copy = copy; |
| 463 | return 1; | 503 | return 1; |
| 464 | } | 504 | } |
| 505 | LCRYPTO_ALIAS(EVP_MD_meth_set_copy); | ||
| 465 | 506 | ||
| 466 | int | 507 | int |
| 467 | EVP_MD_meth_set_cleanup(EVP_MD *md, | 508 | EVP_MD_meth_set_cleanup(EVP_MD *md, |
| @@ -470,6 +511,7 @@ EVP_MD_meth_set_cleanup(EVP_MD *md, | |||
| 470 | md->cleanup = cleanup; | 511 | md->cleanup = cleanup; |
| 471 | return 1; | 512 | return 1; |
| 472 | } | 513 | } |
| 514 | LCRYPTO_ALIAS(EVP_MD_meth_set_cleanup); | ||
| 473 | 515 | ||
| 474 | int | 516 | int |
| 475 | EVP_MD_meth_set_ctrl(EVP_MD *md, | 517 | EVP_MD_meth_set_ctrl(EVP_MD *md, |
| @@ -478,6 +520,7 @@ EVP_MD_meth_set_ctrl(EVP_MD *md, | |||
| 478 | md->md_ctrl = ctrl; | 520 | md->md_ctrl = ctrl; |
| 479 | return 1; | 521 | return 1; |
| 480 | } | 522 | } |
| 523 | LCRYPTO_ALIAS(EVP_MD_meth_set_ctrl); | ||
| 481 | 524 | ||
| 482 | const EVP_MD * | 525 | const EVP_MD * |
| 483 | EVP_MD_CTX_md(const EVP_MD_CTX *ctx) | 526 | EVP_MD_CTX_md(const EVP_MD_CTX *ctx) |
| @@ -486,18 +529,21 @@ EVP_MD_CTX_md(const EVP_MD_CTX *ctx) | |||
| 486 | return NULL; | 529 | return NULL; |
| 487 | return ctx->digest; | 530 | return ctx->digest; |
| 488 | } | 531 | } |
| 532 | LCRYPTO_ALIAS(EVP_MD_CTX_md); | ||
| 489 | 533 | ||
| 490 | void * | 534 | void * |
| 491 | EVP_MD_CTX_md_data(const EVP_MD_CTX *ctx) | 535 | EVP_MD_CTX_md_data(const EVP_MD_CTX *ctx) |
| 492 | { | 536 | { |
| 493 | return ctx->md_data; | 537 | return ctx->md_data; |
| 494 | } | 538 | } |
| 539 | LCRYPTO_ALIAS(EVP_MD_CTX_md_data); | ||
| 495 | 540 | ||
| 496 | EVP_PKEY_CTX * | 541 | EVP_PKEY_CTX * |
| 497 | EVP_MD_CTX_pkey_ctx(const EVP_MD_CTX *ctx) | 542 | EVP_MD_CTX_pkey_ctx(const EVP_MD_CTX *ctx) |
| 498 | { | 543 | { |
| 499 | return ctx->pctx; | 544 | return ctx->pctx; |
| 500 | } | 545 | } |
| 546 | LCRYPTO_ALIAS(EVP_MD_CTX_pkey_ctx); | ||
| 501 | 547 | ||
| 502 | void | 548 | void |
| 503 | EVP_MD_CTX_set_pkey_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pctx) | 549 | EVP_MD_CTX_set_pkey_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pctx) |
| @@ -521,39 +567,46 @@ EVP_MD_CTX_set_pkey_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pctx) | |||
| 521 | EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_KEEP_PKEY_CTX); | 567 | EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_KEEP_PKEY_CTX); |
| 522 | } | 568 | } |
| 523 | } | 569 | } |
| 570 | LCRYPTO_ALIAS(EVP_MD_CTX_set_pkey_ctx); | ||
| 524 | 571 | ||
| 525 | void | 572 | void |
| 526 | EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags) | 573 | EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags) |
| 527 | { | 574 | { |
| 528 | ctx->flags |= flags; | 575 | ctx->flags |= flags; |
| 529 | } | 576 | } |
| 577 | LCRYPTO_ALIAS(EVP_MD_CTX_set_flags); | ||
| 530 | 578 | ||
| 531 | void | 579 | void |
| 532 | EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags) | 580 | EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags) |
| 533 | { | 581 | { |
| 534 | ctx->flags &= ~flags; | 582 | ctx->flags &= ~flags; |
| 535 | } | 583 | } |
| 584 | LCRYPTO_ALIAS(EVP_MD_CTX_clear_flags); | ||
| 536 | 585 | ||
| 537 | int | 586 | int |
| 538 | EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags) | 587 | EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags) |
| 539 | { | 588 | { |
| 540 | return (ctx->flags & flags); | 589 | return (ctx->flags & flags); |
| 541 | } | 590 | } |
| 591 | LCRYPTO_ALIAS(EVP_MD_CTX_test_flags); | ||
| 542 | 592 | ||
| 543 | void | 593 | void |
| 544 | EVP_CIPHER_CTX_set_flags(EVP_CIPHER_CTX *ctx, int flags) | 594 | EVP_CIPHER_CTX_set_flags(EVP_CIPHER_CTX *ctx, int flags) |
| 545 | { | 595 | { |
| 546 | ctx->flags |= flags; | 596 | ctx->flags |= flags; |
| 547 | } | 597 | } |
| 598 | LCRYPTO_ALIAS(EVP_CIPHER_CTX_set_flags); | ||
| 548 | 599 | ||
| 549 | void | 600 | void |
| 550 | EVP_CIPHER_CTX_clear_flags(EVP_CIPHER_CTX *ctx, int flags) | 601 | EVP_CIPHER_CTX_clear_flags(EVP_CIPHER_CTX *ctx, int flags) |
| 551 | { | 602 | { |
| 552 | ctx->flags &= ~flags; | 603 | ctx->flags &= ~flags; |
| 553 | } | 604 | } |
| 605 | LCRYPTO_ALIAS(EVP_CIPHER_CTX_clear_flags); | ||
| 554 | 606 | ||
| 555 | int | 607 | int |
| 556 | EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx, int flags) | 608 | EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx, int flags) |
| 557 | { | 609 | { |
| 558 | return (ctx->flags & flags); | 610 | return (ctx->flags & flags); |
| 559 | } | 611 | } |
| 612 | LCRYPTO_ALIAS(EVP_CIPHER_CTX_test_flags); | ||
diff --git a/src/lib/libcrypto/evp/evp_pbe.c b/src/lib/libcrypto/evp/evp_pbe.c index 565955524a..5592521e62 100644 --- a/src/lib/libcrypto/evp/evp_pbe.c +++ b/src/lib/libcrypto/evp/evp_pbe.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: evp_pbe.c,v 1.27 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: evp_pbe.c,v 1.28 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| @@ -170,6 +170,7 @@ EVP_PBE_CipherInit(ASN1_OBJECT *pbe_obj, const char *pass, int passlen, | |||
| 170 | } | 170 | } |
| 171 | return 1; | 171 | return 1; |
| 172 | } | 172 | } |
| 173 | LCRYPTO_ALIAS(EVP_PBE_CipherInit); | ||
| 173 | 174 | ||
| 174 | static int pbe2_cmp_BSEARCH_CMP_FN(const void *, const void *); | 175 | static int pbe2_cmp_BSEARCH_CMP_FN(const void *, const void *); |
| 175 | static int pbe2_cmp(EVP_PBE_CTL const *, EVP_PBE_CTL const *); | 176 | static int pbe2_cmp(EVP_PBE_CTL const *, EVP_PBE_CTL const *); |
| @@ -246,6 +247,7 @@ EVP_PBE_alg_add_type(int pbe_type, int pbe_nid, int cipher_nid, int md_nid, | |||
| 246 | } | 247 | } |
| 247 | return 1; | 248 | return 1; |
| 248 | } | 249 | } |
| 250 | LCRYPTO_ALIAS(EVP_PBE_alg_add_type); | ||
| 249 | 251 | ||
| 250 | int | 252 | int |
| 251 | EVP_PBE_alg_add(int nid, const EVP_CIPHER *cipher, const EVP_MD *md, | 253 | EVP_PBE_alg_add(int nid, const EVP_CIPHER *cipher, const EVP_MD *md, |
| @@ -265,6 +267,7 @@ EVP_PBE_alg_add(int nid, const EVP_CIPHER *cipher, const EVP_MD *md, | |||
| 265 | return EVP_PBE_alg_add_type(EVP_PBE_TYPE_OUTER, nid, | 267 | return EVP_PBE_alg_add_type(EVP_PBE_TYPE_OUTER, nid, |
| 266 | cipher_nid, md_nid, keygen); | 268 | cipher_nid, md_nid, keygen); |
| 267 | } | 269 | } |
| 270 | LCRYPTO_ALIAS(EVP_PBE_alg_add); | ||
| 268 | 271 | ||
| 269 | int | 272 | int |
| 270 | EVP_PBE_find(int type, int pbe_nid, | 273 | EVP_PBE_find(int type, int pbe_nid, |
| @@ -297,6 +300,7 @@ EVP_PBE_find(int type, int pbe_nid, | |||
| 297 | *pkeygen = pbetmp->keygen; | 300 | *pkeygen = pbetmp->keygen; |
| 298 | return 1; | 301 | return 1; |
| 299 | } | 302 | } |
| 303 | LCRYPTO_ALIAS(EVP_PBE_find); | ||
| 300 | 304 | ||
| 301 | static void | 305 | static void |
| 302 | free_evp_pbe_ctl(EVP_PBE_CTL *pbe) | 306 | free_evp_pbe_ctl(EVP_PBE_CTL *pbe) |
| @@ -310,3 +314,4 @@ EVP_PBE_cleanup(void) | |||
| 310 | sk_EVP_PBE_CTL_pop_free(pbe_algs, free_evp_pbe_ctl); | 314 | sk_EVP_PBE_CTL_pop_free(pbe_algs, free_evp_pbe_ctl); |
| 311 | pbe_algs = NULL; | 315 | pbe_algs = NULL; |
| 312 | } | 316 | } |
| 317 | LCRYPTO_ALIAS(EVP_PBE_cleanup); | ||
diff --git a/src/lib/libcrypto/evp/evp_pkey.c b/src/lib/libcrypto/evp/evp_pkey.c index d2fbdee46c..31a59e2536 100644 --- a/src/lib/libcrypto/evp/evp_pkey.c +++ b/src/lib/libcrypto/evp/evp_pkey.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: evp_pkey.c,v 1.25 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: evp_pkey.c,v 1.26 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| @@ -105,6 +105,7 @@ error: | |||
| 105 | EVP_PKEY_free(pkey); | 105 | EVP_PKEY_free(pkey); |
| 106 | return NULL; | 106 | return NULL; |
| 107 | } | 107 | } |
| 108 | LCRYPTO_ALIAS(EVP_PKCS82PKEY); | ||
| 108 | 109 | ||
| 109 | /* Turn a private key into a PKCS8 structure */ | 110 | /* Turn a private key into a PKCS8 structure */ |
| 110 | 111 | ||
| @@ -138,6 +139,7 @@ error: | |||
| 138 | PKCS8_PRIV_KEY_INFO_free(p8); | 139 | PKCS8_PRIV_KEY_INFO_free(p8); |
| 139 | return NULL; | 140 | return NULL; |
| 140 | } | 141 | } |
| 142 | LCRYPTO_ALIAS(EVP_PKEY2PKCS8); | ||
| 141 | 143 | ||
| 142 | /* EVP_PKEY attribute functions */ | 144 | /* EVP_PKEY attribute functions */ |
| 143 | 145 | ||
| @@ -146,12 +148,14 @@ EVP_PKEY_get_attr_count(const EVP_PKEY *key) | |||
| 146 | { | 148 | { |
| 147 | return X509at_get_attr_count(key->attributes); | 149 | return X509at_get_attr_count(key->attributes); |
| 148 | } | 150 | } |
| 151 | LCRYPTO_ALIAS(EVP_PKEY_get_attr_count); | ||
| 149 | 152 | ||
| 150 | int | 153 | int |
| 151 | EVP_PKEY_get_attr_by_NID(const EVP_PKEY *key, int nid, int lastpos) | 154 | EVP_PKEY_get_attr_by_NID(const EVP_PKEY *key, int nid, int lastpos) |
| 152 | { | 155 | { |
| 153 | return X509at_get_attr_by_NID(key->attributes, nid, lastpos); | 156 | return X509at_get_attr_by_NID(key->attributes, nid, lastpos); |
| 154 | } | 157 | } |
| 158 | LCRYPTO_ALIAS(EVP_PKEY_get_attr_by_NID); | ||
| 155 | 159 | ||
| 156 | int | 160 | int |
| 157 | EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, const ASN1_OBJECT *obj, | 161 | EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, const ASN1_OBJECT *obj, |
| @@ -159,18 +163,21 @@ EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, const ASN1_OBJECT *obj, | |||
| 159 | { | 163 | { |
| 160 | return X509at_get_attr_by_OBJ(key->attributes, obj, lastpos); | 164 | return X509at_get_attr_by_OBJ(key->attributes, obj, lastpos); |
| 161 | } | 165 | } |
| 166 | LCRYPTO_ALIAS(EVP_PKEY_get_attr_by_OBJ); | ||
| 162 | 167 | ||
| 163 | X509_ATTRIBUTE * | 168 | X509_ATTRIBUTE * |
| 164 | EVP_PKEY_get_attr(const EVP_PKEY *key, int loc) | 169 | EVP_PKEY_get_attr(const EVP_PKEY *key, int loc) |
| 165 | { | 170 | { |
| 166 | return X509at_get_attr(key->attributes, loc); | 171 | return X509at_get_attr(key->attributes, loc); |
| 167 | } | 172 | } |
| 173 | LCRYPTO_ALIAS(EVP_PKEY_get_attr); | ||
| 168 | 174 | ||
| 169 | X509_ATTRIBUTE * | 175 | X509_ATTRIBUTE * |
| 170 | EVP_PKEY_delete_attr(EVP_PKEY *key, int loc) | 176 | EVP_PKEY_delete_attr(EVP_PKEY *key, int loc) |
| 171 | { | 177 | { |
| 172 | return X509at_delete_attr(key->attributes, loc); | 178 | return X509at_delete_attr(key->attributes, loc); |
| 173 | } | 179 | } |
| 180 | LCRYPTO_ALIAS(EVP_PKEY_delete_attr); | ||
| 174 | 181 | ||
| 175 | int | 182 | int |
| 176 | EVP_PKEY_add1_attr(EVP_PKEY *key, X509_ATTRIBUTE *attr) | 183 | EVP_PKEY_add1_attr(EVP_PKEY *key, X509_ATTRIBUTE *attr) |
| @@ -179,6 +186,7 @@ EVP_PKEY_add1_attr(EVP_PKEY *key, X509_ATTRIBUTE *attr) | |||
| 179 | return 1; | 186 | return 1; |
| 180 | return 0; | 187 | return 0; |
| 181 | } | 188 | } |
| 189 | LCRYPTO_ALIAS(EVP_PKEY_add1_attr); | ||
| 182 | 190 | ||
| 183 | int | 191 | int |
| 184 | EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *key, const ASN1_OBJECT *obj, int type, | 192 | EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *key, const ASN1_OBJECT *obj, int type, |
| @@ -188,6 +196,7 @@ EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *key, const ASN1_OBJECT *obj, int type, | |||
| 188 | return 1; | 196 | return 1; |
| 189 | return 0; | 197 | return 0; |
| 190 | } | 198 | } |
| 199 | LCRYPTO_ALIAS(EVP_PKEY_add1_attr_by_OBJ); | ||
| 191 | 200 | ||
| 192 | int | 201 | int |
| 193 | EVP_PKEY_add1_attr_by_NID(EVP_PKEY *key, int nid, int type, | 202 | EVP_PKEY_add1_attr_by_NID(EVP_PKEY *key, int nid, int type, |
| @@ -197,6 +206,7 @@ EVP_PKEY_add1_attr_by_NID(EVP_PKEY *key, int nid, int type, | |||
| 197 | return 1; | 206 | return 1; |
| 198 | return 0; | 207 | return 0; |
| 199 | } | 208 | } |
| 209 | LCRYPTO_ALIAS(EVP_PKEY_add1_attr_by_NID); | ||
| 200 | 210 | ||
| 201 | int | 211 | int |
| 202 | EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key, const char *attrname, int type, | 212 | EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key, const char *attrname, int type, |
| @@ -207,3 +217,4 @@ EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key, const char *attrname, int type, | |||
| 207 | return 1; | 217 | return 1; |
| 208 | return 0; | 218 | return 0; |
| 209 | } | 219 | } |
| 220 | LCRYPTO_ALIAS(EVP_PKEY_add1_attr_by_txt); | ||
diff --git a/src/lib/libcrypto/evp/m_gost2814789.c b/src/lib/libcrypto/evp/m_gost2814789.c index ca303dab9f..69f927c5a7 100644 --- a/src/lib/libcrypto/evp/m_gost2814789.c +++ b/src/lib/libcrypto/evp/m_gost2814789.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: m_gost2814789.c,v 1.4 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: m_gost2814789.c,v 1.5 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 3 | * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> |
| 4 | * Copyright (c) 2005-2006 Cryptocom LTD | 4 | * Copyright (c) 2005-2006 Cryptocom LTD |
| @@ -110,4 +110,5 @@ EVP_gost2814789imit(void) | |||
| 110 | { | 110 | { |
| 111 | return (&gost2814789imit_md); | 111 | return (&gost2814789imit_md); |
| 112 | } | 112 | } |
| 113 | LCRYPTO_ALIAS(EVP_gost2814789imit); | ||
| 113 | #endif | 114 | #endif |
diff --git a/src/lib/libcrypto/evp/m_gostr341194.c b/src/lib/libcrypto/evp/m_gostr341194.c index 33e96a5a2c..e2a65a3147 100644 --- a/src/lib/libcrypto/evp/m_gostr341194.c +++ b/src/lib/libcrypto/evp/m_gostr341194.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: m_gostr341194.c,v 1.5 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: m_gostr341194.c,v 1.6 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 3 | * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> |
| 4 | * Copyright (c) 2005-2006 Cryptocom LTD | 4 | * Copyright (c) 2005-2006 Cryptocom LTD |
| @@ -97,4 +97,5 @@ EVP_gostr341194(void) | |||
| 97 | { | 97 | { |
| 98 | return (&gostr341194_md); | 98 | return (&gostr341194_md); |
| 99 | } | 99 | } |
| 100 | LCRYPTO_ALIAS(EVP_gostr341194); | ||
| 100 | #endif | 101 | #endif |
diff --git a/src/lib/libcrypto/evp/m_md4.c b/src/lib/libcrypto/evp/m_md4.c index c1e0256b38..d86ed426d3 100644 --- a/src/lib/libcrypto/evp/m_md4.c +++ b/src/lib/libcrypto/evp/m_md4.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: m_md4.c,v 1.19 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: m_md4.c,v 1.20 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -110,4 +110,5 @@ EVP_md4(void) | |||
| 110 | { | 110 | { |
| 111 | return (&md4_md); | 111 | return (&md4_md); |
| 112 | } | 112 | } |
| 113 | LCRYPTO_ALIAS(EVP_md4); | ||
| 113 | #endif | 114 | #endif |
diff --git a/src/lib/libcrypto/evp/m_md5.c b/src/lib/libcrypto/evp/m_md5.c index b66b25bab8..18a78016c6 100644 --- a/src/lib/libcrypto/evp/m_md5.c +++ b/src/lib/libcrypto/evp/m_md5.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: m_md5.c,v 1.18 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: m_md5.c,v 1.19 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -110,4 +110,5 @@ EVP_md5(void) | |||
| 110 | { | 110 | { |
| 111 | return (&md5_md); | 111 | return (&md5_md); |
| 112 | } | 112 | } |
| 113 | LCRYPTO_ALIAS(EVP_md5); | ||
| 113 | #endif | 114 | #endif |
diff --git a/src/lib/libcrypto/evp/m_md5_sha1.c b/src/lib/libcrypto/evp/m_md5_sha1.c index b1944b881e..32a6f56a1b 100644 --- a/src/lib/libcrypto/evp/m_md5_sha1.c +++ b/src/lib/libcrypto/evp/m_md5_sha1.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: m_md5_sha1.c,v 1.5 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: m_md5_sha1.c,v 1.6 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2017 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2017 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -87,3 +87,4 @@ EVP_md5_sha1(void) | |||
| 87 | { | 87 | { |
| 88 | return &md5_sha1_md; | 88 | return &md5_sha1_md; |
| 89 | } | 89 | } |
| 90 | LCRYPTO_ALIAS(EVP_md5_sha1); | ||
diff --git a/src/lib/libcrypto/evp/m_null.c b/src/lib/libcrypto/evp/m_null.c index d09c0007f3..884a47927e 100644 --- a/src/lib/libcrypto/evp/m_null.c +++ b/src/lib/libcrypto/evp/m_null.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: m_null.c,v 1.12 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: m_null.c,v 1.13 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -101,3 +101,4 @@ EVP_md_null(void) | |||
| 101 | { | 101 | { |
| 102 | return (&null_md); | 102 | return (&null_md); |
| 103 | } | 103 | } |
| 104 | LCRYPTO_ALIAS(EVP_md_null); | ||
diff --git a/src/lib/libcrypto/evp/m_ripemd.c b/src/lib/libcrypto/evp/m_ripemd.c index 896de59d1c..3cba1dcf1b 100644 --- a/src/lib/libcrypto/evp/m_ripemd.c +++ b/src/lib/libcrypto/evp/m_ripemd.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: m_ripemd.c,v 1.15 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: m_ripemd.c,v 1.16 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -110,4 +110,5 @@ EVP_ripemd160(void) | |||
| 110 | { | 110 | { |
| 111 | return (&ripemd160_md); | 111 | return (&ripemd160_md); |
| 112 | } | 112 | } |
| 113 | LCRYPTO_ALIAS(EVP_ripemd160); | ||
| 113 | #endif | 114 | #endif |
diff --git a/src/lib/libcrypto/evp/m_sha1.c b/src/lib/libcrypto/evp/m_sha1.c index b7f4705d86..631e19549e 100644 --- a/src/lib/libcrypto/evp/m_sha1.c +++ b/src/lib/libcrypto/evp/m_sha1.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: m_sha1.c,v 1.23 2023/04/16 16:42:06 jsing Exp $ */ | 1 | /* $OpenBSD: m_sha1.c,v 1.24 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -110,6 +110,7 @@ EVP_sha1(void) | |||
| 110 | { | 110 | { |
| 111 | return &sha1_md; | 111 | return &sha1_md; |
| 112 | } | 112 | } |
| 113 | LCRYPTO_ALIAS(EVP_sha1); | ||
| 113 | #endif | 114 | #endif |
| 114 | 115 | ||
| 115 | #ifndef OPENSSL_NO_SHA256 | 116 | #ifndef OPENSSL_NO_SHA256 |
| @@ -155,6 +156,7 @@ EVP_sha224(void) | |||
| 155 | { | 156 | { |
| 156 | return &sha224_md; | 157 | return &sha224_md; |
| 157 | } | 158 | } |
| 159 | LCRYPTO_ALIAS(EVP_sha224); | ||
| 158 | 160 | ||
| 159 | static int | 161 | static int |
| 160 | sha256_init(EVP_MD_CTX *ctx) | 162 | sha256_init(EVP_MD_CTX *ctx) |
| @@ -193,6 +195,7 @@ EVP_sha256(void) | |||
| 193 | { | 195 | { |
| 194 | return &sha256_md; | 196 | return &sha256_md; |
| 195 | } | 197 | } |
| 198 | LCRYPTO_ALIAS(EVP_sha256); | ||
| 196 | #endif /* ifndef OPENSSL_NO_SHA256 */ | 199 | #endif /* ifndef OPENSSL_NO_SHA256 */ |
| 197 | 200 | ||
| 198 | #ifndef OPENSSL_NO_SHA512 | 201 | #ifndef OPENSSL_NO_SHA512 |
| @@ -234,6 +237,7 @@ EVP_sha384(void) | |||
| 234 | { | 237 | { |
| 235 | return &sha384_md; | 238 | return &sha384_md; |
| 236 | } | 239 | } |
| 240 | LCRYPTO_ALIAS(EVP_sha384); | ||
| 237 | 241 | ||
| 238 | static int | 242 | static int |
| 239 | sha512_init(EVP_MD_CTX *ctx) | 243 | sha512_init(EVP_MD_CTX *ctx) |
| @@ -272,6 +276,7 @@ EVP_sha512(void) | |||
| 272 | { | 276 | { |
| 273 | return &sha512_md; | 277 | return &sha512_md; |
| 274 | } | 278 | } |
| 279 | LCRYPTO_ALIAS(EVP_sha512); | ||
| 275 | 280 | ||
| 276 | static int | 281 | static int |
| 277 | sha512_224_init(EVP_MD_CTX *ctx) | 282 | sha512_224_init(EVP_MD_CTX *ctx) |
| @@ -310,6 +315,7 @@ EVP_sha512_224(void) | |||
| 310 | { | 315 | { |
| 311 | return &sha512_224_md; | 316 | return &sha512_224_md; |
| 312 | } | 317 | } |
| 318 | LCRYPTO_ALIAS(EVP_sha512_224); | ||
| 313 | 319 | ||
| 314 | static int | 320 | static int |
| 315 | sha512_256_init(EVP_MD_CTX *ctx) | 321 | sha512_256_init(EVP_MD_CTX *ctx) |
| @@ -348,4 +354,5 @@ EVP_sha512_256(void) | |||
| 348 | { | 354 | { |
| 349 | return &sha512_256_md; | 355 | return &sha512_256_md; |
| 350 | } | 356 | } |
| 357 | LCRYPTO_ALIAS(EVP_sha512_256); | ||
| 351 | #endif /* ifndef OPENSSL_NO_SHA512 */ | 358 | #endif /* ifndef OPENSSL_NO_SHA512 */ |
diff --git a/src/lib/libcrypto/evp/m_sha3.c b/src/lib/libcrypto/evp/m_sha3.c index 9944ec979d..9137629823 100644 --- a/src/lib/libcrypto/evp/m_sha3.c +++ b/src/lib/libcrypto/evp/m_sha3.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: m_sha3.c,v 1.1 2023/04/16 17:06:19 jsing Exp $ */ | 1 | /* $OpenBSD: m_sha3.c,v 1.2 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2023 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2023 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -57,6 +57,7 @@ EVP_sha3_224(void) | |||
| 57 | { | 57 | { |
| 58 | return &sha3_224_md; | 58 | return &sha3_224_md; |
| 59 | } | 59 | } |
| 60 | LCRYPTO_ALIAS(EVP_sha3_224); | ||
| 60 | 61 | ||
| 61 | static int | 62 | static int |
| 62 | sha3_256_init(EVP_MD_CTX *ctx) | 63 | sha3_256_init(EVP_MD_CTX *ctx) |
| @@ -95,6 +96,7 @@ EVP_sha3_256(void) | |||
| 95 | { | 96 | { |
| 96 | return &sha3_256_md; | 97 | return &sha3_256_md; |
| 97 | } | 98 | } |
| 99 | LCRYPTO_ALIAS(EVP_sha3_256); | ||
| 98 | 100 | ||
| 99 | static int | 101 | static int |
| 100 | sha3_384_init(EVP_MD_CTX *ctx) | 102 | sha3_384_init(EVP_MD_CTX *ctx) |
| @@ -133,6 +135,7 @@ EVP_sha3_384(void) | |||
| 133 | { | 135 | { |
| 134 | return &sha3_384_md; | 136 | return &sha3_384_md; |
| 135 | } | 137 | } |
| 138 | LCRYPTO_ALIAS(EVP_sha3_384); | ||
| 136 | 139 | ||
| 137 | static int | 140 | static int |
| 138 | sha3_512_init(EVP_MD_CTX *ctx) | 141 | sha3_512_init(EVP_MD_CTX *ctx) |
| @@ -171,3 +174,4 @@ EVP_sha3_512(void) | |||
| 171 | { | 174 | { |
| 172 | return &sha3_512_md; | 175 | return &sha3_512_md; |
| 173 | } | 176 | } |
| 177 | LCRYPTO_ALIAS(EVP_sha3_512); | ||
diff --git a/src/lib/libcrypto/evp/m_sigver.c b/src/lib/libcrypto/evp/m_sigver.c index 49b1ce29b7..950e4a2a2f 100644 --- a/src/lib/libcrypto/evp/m_sigver.c +++ b/src/lib/libcrypto/evp/m_sigver.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: m_sigver.c,v 1.11 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: m_sigver.c,v 1.12 2023/07/07 13:54:45 beck Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 2006. | 3 | * project 2006. |
| 4 | */ | 4 | */ |
| @@ -133,6 +133,7 @@ EVP_DigestSignInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, const EVP_MD *type, | |||
| 133 | { | 133 | { |
| 134 | return do_sigver_init(ctx, pctx, type, e, pkey, 0); | 134 | return do_sigver_init(ctx, pctx, type, e, pkey, 0); |
| 135 | } | 135 | } |
| 136 | LCRYPTO_ALIAS(EVP_DigestSignInit); | ||
| 136 | 137 | ||
| 137 | int | 138 | int |
| 138 | EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, const EVP_MD *type, | 139 | EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, const EVP_MD *type, |
| @@ -140,6 +141,7 @@ EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, const EVP_MD *type, | |||
| 140 | { | 141 | { |
| 141 | return do_sigver_init(ctx, pctx, type, e, pkey, 1); | 142 | return do_sigver_init(ctx, pctx, type, e, pkey, 1); |
| 142 | } | 143 | } |
| 144 | LCRYPTO_ALIAS(EVP_DigestVerifyInit); | ||
| 143 | 145 | ||
| 144 | int | 146 | int |
| 145 | EVP_DigestSignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, size_t *siglen) | 147 | EVP_DigestSignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, size_t *siglen) |
| @@ -198,6 +200,7 @@ EVP_DigestSignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, size_t *siglen) | |||
| 198 | } | 200 | } |
| 199 | return 1; | 201 | return 1; |
| 200 | } | 202 | } |
| 203 | LCRYPTO_ALIAS(EVP_DigestSignFinal); | ||
| 201 | 204 | ||
| 202 | int | 205 | int |
| 203 | EVP_DigestSign(EVP_MD_CTX *ctx, unsigned char *sigret, size_t *siglen, | 206 | EVP_DigestSign(EVP_MD_CTX *ctx, unsigned char *sigret, size_t *siglen, |
| @@ -214,6 +217,7 @@ EVP_DigestSign(EVP_MD_CTX *ctx, unsigned char *sigret, size_t *siglen, | |||
| 214 | 217 | ||
| 215 | return EVP_DigestSignFinal(ctx, sigret, siglen); | 218 | return EVP_DigestSignFinal(ctx, sigret, siglen); |
| 216 | } | 219 | } |
| 220 | LCRYPTO_ALIAS(EVP_DigestSign); | ||
| 217 | 221 | ||
| 218 | int | 222 | int |
| 219 | EVP_DigestVerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sig, size_t siglen) | 223 | EVP_DigestVerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sig, size_t siglen) |
| @@ -241,6 +245,7 @@ EVP_DigestVerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sig, size_t siglen) | |||
| 241 | return r; | 245 | return r; |
| 242 | return EVP_PKEY_verify(ctx->pctx, sig, siglen, md, mdlen); | 246 | return EVP_PKEY_verify(ctx->pctx, sig, siglen, md, mdlen); |
| 243 | } | 247 | } |
| 248 | LCRYPTO_ALIAS(EVP_DigestVerifyFinal); | ||
| 244 | 249 | ||
| 245 | int | 250 | int |
| 246 | EVP_DigestVerify(EVP_MD_CTX *ctx, const unsigned char *sigret, size_t siglen, | 251 | EVP_DigestVerify(EVP_MD_CTX *ctx, const unsigned char *sigret, size_t siglen, |
| @@ -255,3 +260,4 @@ EVP_DigestVerify(EVP_MD_CTX *ctx, const unsigned char *sigret, size_t siglen, | |||
| 255 | 260 | ||
| 256 | return EVP_DigestVerifyFinal(ctx, sigret, siglen); | 261 | return EVP_DigestVerifyFinal(ctx, sigret, siglen); |
| 257 | } | 262 | } |
| 263 | LCRYPTO_ALIAS(EVP_DigestVerify); | ||
diff --git a/src/lib/libcrypto/evp/m_sm3.c b/src/lib/libcrypto/evp/m_sm3.c index bf0ef527eb..169a492d68 100644 --- a/src/lib/libcrypto/evp/m_sm3.c +++ b/src/lib/libcrypto/evp/m_sm3.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: m_sm3.c,v 1.4 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: m_sm3.c,v 1.5 2023/07/07 13:54:46 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2018, Ribose Inc | 3 | * Copyright (c) 2018, Ribose Inc |
| 4 | * | 4 | * |
| @@ -64,5 +64,6 @@ EVP_sm3(void) | |||
| 64 | { | 64 | { |
| 65 | return &sm3_md; | 65 | return &sm3_md; |
| 66 | } | 66 | } |
| 67 | LCRYPTO_ALIAS(EVP_sm3); | ||
| 67 | 68 | ||
| 68 | #endif /* OPENSSL_NO_SM3 */ | 69 | #endif /* OPENSSL_NO_SM3 */ |
diff --git a/src/lib/libcrypto/evp/m_streebog.c b/src/lib/libcrypto/evp/m_streebog.c index 5a0dece599..ce41e4ca8f 100644 --- a/src/lib/libcrypto/evp/m_streebog.c +++ b/src/lib/libcrypto/evp/m_streebog.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: m_streebog.c,v 1.5 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: m_streebog.c,v 1.6 2023/07/07 13:54:46 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 3 | * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> |
| 4 | * Copyright (c) 2005-2006 Cryptocom LTD | 4 | * Copyright (c) 2005-2006 Cryptocom LTD |
| @@ -124,10 +124,12 @@ EVP_streebog256(void) | |||
| 124 | { | 124 | { |
| 125 | return (&streebog256_md); | 125 | return (&streebog256_md); |
| 126 | } | 126 | } |
| 127 | LCRYPTO_ALIAS(EVP_streebog256); | ||
| 127 | 128 | ||
| 128 | const EVP_MD * | 129 | const EVP_MD * |
| 129 | EVP_streebog512(void) | 130 | EVP_streebog512(void) |
| 130 | { | 131 | { |
| 131 | return (&streebog512_md); | 132 | return (&streebog512_md); |
| 132 | } | 133 | } |
| 134 | LCRYPTO_ALIAS(EVP_streebog512); | ||
| 133 | #endif | 135 | #endif |
diff --git a/src/lib/libcrypto/evp/m_wp.c b/src/lib/libcrypto/evp/m_wp.c index 2e0b46d5d3..9bd43370e6 100644 --- a/src/lib/libcrypto/evp/m_wp.c +++ b/src/lib/libcrypto/evp/m_wp.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: m_wp.c,v 1.11 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: m_wp.c,v 1.12 2023/07/07 13:54:46 beck Exp $ */ |
| 2 | 2 | ||
| 3 | #include <stdio.h> | 3 | #include <stdio.h> |
| 4 | 4 | ||
| @@ -50,4 +50,5 @@ EVP_whirlpool(void) | |||
| 50 | { | 50 | { |
| 51 | return (&whirlpool_md); | 51 | return (&whirlpool_md); |
| 52 | } | 52 | } |
| 53 | LCRYPTO_ALIAS(EVP_whirlpool); | ||
| 53 | #endif | 54 | #endif |
diff --git a/src/lib/libcrypto/evp/names.c b/src/lib/libcrypto/evp/names.c index 10ce13bb89..c6109a5356 100644 --- a/src/lib/libcrypto/evp/names.c +++ b/src/lib/libcrypto/evp/names.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: names.c,v 1.17 2023/06/29 06:11:33 tb Exp $ */ | 1 | /* $OpenBSD: names.c,v 1.18 2023/07/07 13:54:46 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -84,6 +84,7 @@ EVP_add_cipher(const EVP_CIPHER *c) | |||
| 84 | (const char *)c); | 84 | (const char *)c); |
| 85 | return (r); | 85 | return (r); |
| 86 | } | 86 | } |
| 87 | LCRYPTO_ALIAS(EVP_add_cipher); | ||
| 87 | 88 | ||
| 88 | int | 89 | int |
| 89 | EVP_add_digest(const EVP_MD *md) | 90 | EVP_add_digest(const EVP_MD *md) |
| @@ -112,6 +113,7 @@ EVP_add_digest(const EVP_MD *md) | |||
| 112 | } | 113 | } |
| 113 | return (r); | 114 | return (r); |
| 114 | } | 115 | } |
| 116 | LCRYPTO_ALIAS(EVP_add_digest); | ||
| 115 | 117 | ||
| 116 | const EVP_CIPHER * | 118 | const EVP_CIPHER * |
| 117 | EVP_get_cipherbyname(const char *name) | 119 | EVP_get_cipherbyname(const char *name) |
| @@ -124,6 +126,7 @@ EVP_get_cipherbyname(const char *name) | |||
| 124 | cp = (const EVP_CIPHER *)OBJ_NAME_get(name, OBJ_NAME_TYPE_CIPHER_METH); | 126 | cp = (const EVP_CIPHER *)OBJ_NAME_get(name, OBJ_NAME_TYPE_CIPHER_METH); |
| 125 | return (cp); | 127 | return (cp); |
| 126 | } | 128 | } |
| 129 | LCRYPTO_ALIAS(EVP_get_cipherbyname); | ||
| 127 | 130 | ||
| 128 | const EVP_MD * | 131 | const EVP_MD * |
| 129 | EVP_get_digestbyname(const char *name) | 132 | EVP_get_digestbyname(const char *name) |
| @@ -136,6 +139,7 @@ EVP_get_digestbyname(const char *name) | |||
| 136 | cp = (const EVP_MD *)OBJ_NAME_get(name, OBJ_NAME_TYPE_MD_METH); | 139 | cp = (const EVP_MD *)OBJ_NAME_get(name, OBJ_NAME_TYPE_MD_METH); |
| 137 | return (cp); | 140 | return (cp); |
| 138 | } | 141 | } |
| 142 | LCRYPTO_ALIAS(EVP_get_digestbyname); | ||
| 139 | 143 | ||
| 140 | void | 144 | void |
| 141 | EVP_cleanup(void) | 145 | EVP_cleanup(void) |
| @@ -154,6 +158,7 @@ EVP_cleanup(void) | |||
| 154 | } | 158 | } |
| 155 | OBJ_sigid_free(); | 159 | OBJ_sigid_free(); |
| 156 | } | 160 | } |
| 161 | LCRYPTO_ALIAS(EVP_cleanup); | ||
| 157 | 162 | ||
| 158 | struct doall_cipher { | 163 | struct doall_cipher { |
| 159 | void *arg; | 164 | void *arg; |
| @@ -185,6 +190,7 @@ EVP_CIPHER_do_all(void (*fn)(const EVP_CIPHER *ciph, const char *from, | |||
| 185 | dc.arg = arg; | 190 | dc.arg = arg; |
| 186 | OBJ_NAME_do_all(OBJ_NAME_TYPE_CIPHER_METH, do_all_cipher_fn, &dc); | 191 | OBJ_NAME_do_all(OBJ_NAME_TYPE_CIPHER_METH, do_all_cipher_fn, &dc); |
| 187 | } | 192 | } |
| 193 | LCRYPTO_ALIAS(EVP_CIPHER_do_all); | ||
| 188 | 194 | ||
| 189 | void | 195 | void |
| 190 | EVP_CIPHER_do_all_sorted(void (*fn)(const EVP_CIPHER *ciph, const char *from, | 196 | EVP_CIPHER_do_all_sorted(void (*fn)(const EVP_CIPHER *ciph, const char *from, |
| @@ -200,6 +206,7 @@ EVP_CIPHER_do_all_sorted(void (*fn)(const EVP_CIPHER *ciph, const char *from, | |||
| 200 | OBJ_NAME_do_all_sorted(OBJ_NAME_TYPE_CIPHER_METH, | 206 | OBJ_NAME_do_all_sorted(OBJ_NAME_TYPE_CIPHER_METH, |
| 201 | do_all_cipher_fn, &dc); | 207 | do_all_cipher_fn, &dc); |
| 202 | } | 208 | } |
| 209 | LCRYPTO_ALIAS(EVP_CIPHER_do_all_sorted); | ||
| 203 | 210 | ||
| 204 | struct doall_md { | 211 | struct doall_md { |
| 205 | void *arg; | 212 | void *arg; |
| @@ -231,6 +238,7 @@ EVP_MD_do_all(void (*fn)(const EVP_MD *md, const char *from, const char *to, | |||
| 231 | dc.arg = arg; | 238 | dc.arg = arg; |
| 232 | OBJ_NAME_do_all(OBJ_NAME_TYPE_MD_METH, do_all_md_fn, &dc); | 239 | OBJ_NAME_do_all(OBJ_NAME_TYPE_MD_METH, do_all_md_fn, &dc); |
| 233 | } | 240 | } |
| 241 | LCRYPTO_ALIAS(EVP_MD_do_all); | ||
| 234 | 242 | ||
| 235 | void | 243 | void |
| 236 | EVP_MD_do_all_sorted(void (*fn)(const EVP_MD *md, | 244 | EVP_MD_do_all_sorted(void (*fn)(const EVP_MD *md, |
| @@ -245,3 +253,4 @@ EVP_MD_do_all_sorted(void (*fn)(const EVP_MD *md, | |||
| 245 | dc.arg = arg; | 253 | dc.arg = arg; |
| 246 | OBJ_NAME_do_all_sorted(OBJ_NAME_TYPE_MD_METH, do_all_md_fn, &dc); | 254 | OBJ_NAME_do_all_sorted(OBJ_NAME_TYPE_MD_METH, do_all_md_fn, &dc); |
| 247 | } | 255 | } |
| 256 | LCRYPTO_ALIAS(EVP_MD_do_all_sorted); | ||
diff --git a/src/lib/libcrypto/evp/p5_crpt.c b/src/lib/libcrypto/evp/p5_crpt.c index e85a60f50e..cf30ad9176 100644 --- a/src/lib/libcrypto/evp/p5_crpt.c +++ b/src/lib/libcrypto/evp/p5_crpt.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: p5_crpt.c,v 1.21 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: p5_crpt.c,v 1.22 2023/07/07 13:54:46 beck Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| @@ -73,6 +73,7 @@ void | |||
| 73 | PKCS5_PBE_add(void) | 73 | PKCS5_PBE_add(void) |
| 74 | { | 74 | { |
| 75 | } | 75 | } |
| 76 | LCRYPTO_ALIAS(PKCS5_PBE_add); | ||
| 76 | 77 | ||
| 77 | int | 78 | int |
| 78 | PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *cctx, const char *pass, int passlen, | 79 | PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *cctx, const char *pass, int passlen, |
| @@ -161,3 +162,4 @@ err: | |||
| 161 | PBEPARAM_free(pbe); | 162 | PBEPARAM_free(pbe); |
| 162 | return rv; | 163 | return rv; |
| 163 | } | 164 | } |
| 165 | LCRYPTO_ALIAS(PKCS5_PBE_keyivgen); | ||
diff --git a/src/lib/libcrypto/evp/p5_crpt2.c b/src/lib/libcrypto/evp/p5_crpt2.c index 6c0cf529a4..a6fcc30fa4 100644 --- a/src/lib/libcrypto/evp/p5_crpt2.c +++ b/src/lib/libcrypto/evp/p5_crpt2.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: p5_crpt2.c,v 1.25 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: p5_crpt2.c,v 1.26 2023/07/07 13:54:46 beck Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| @@ -149,6 +149,7 @@ PKCS5_PBKDF2_HMAC(const char *pass, int passlen, const unsigned char *salt, | |||
| 149 | HMAC_CTX_cleanup(&hctx_tpl); | 149 | HMAC_CTX_cleanup(&hctx_tpl); |
| 150 | return 1; | 150 | return 1; |
| 151 | } | 151 | } |
| 152 | LCRYPTO_ALIAS(PKCS5_PBKDF2_HMAC); | ||
| 152 | 153 | ||
| 153 | int | 154 | int |
| 154 | PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen, const unsigned char *salt, | 155 | PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen, const unsigned char *salt, |
| @@ -157,6 +158,7 @@ PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen, const unsigned char *salt, | |||
| 157 | return PKCS5_PBKDF2_HMAC(pass, passlen, salt, saltlen, iter, | 158 | return PKCS5_PBKDF2_HMAC(pass, passlen, salt, saltlen, iter, |
| 158 | EVP_sha1(), keylen, out); | 159 | EVP_sha1(), keylen, out); |
| 159 | } | 160 | } |
| 161 | LCRYPTO_ALIAS(PKCS5_PBKDF2_HMAC_SHA1); | ||
| 160 | 162 | ||
| 161 | /* Now the key derivation function itself. This is a bit evil because | 163 | /* Now the key derivation function itself. This is a bit evil because |
| 162 | * it has to check the ASN1 parameters are valid: and there are quite a | 164 | * it has to check the ASN1 parameters are valid: and there are quite a |
| @@ -218,6 +220,7 @@ err: | |||
| 218 | PBE2PARAM_free(pbe2); | 220 | PBE2PARAM_free(pbe2); |
| 219 | return rv; | 221 | return rv; |
| 220 | } | 222 | } |
| 223 | LCRYPTO_ALIAS(PKCS5_v2_PBE_keyivgen); | ||
| 221 | 224 | ||
| 222 | int | 225 | int |
| 223 | PKCS5_v2_PBKDF2_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, | 226 | PKCS5_v2_PBKDF2_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, |
diff --git a/src/lib/libcrypto/evp/p_dec.c b/src/lib/libcrypto/evp/p_dec.c index 33dd301911..7225606c31 100644 --- a/src/lib/libcrypto/evp/p_dec.c +++ b/src/lib/libcrypto/evp/p_dec.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: p_dec.c,v 1.13 2022/11/26 16:08:52 tb Exp $ */ | 1 | /* $OpenBSD: p_dec.c,v 1.14 2023/07/07 13:54:46 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -92,3 +92,4 @@ err: | |||
| 92 | #endif | 92 | #endif |
| 93 | return (ret); | 93 | return (ret); |
| 94 | } | 94 | } |
| 95 | LCRYPTO_ALIAS(EVP_PKEY_decrypt_old); | ||
diff --git a/src/lib/libcrypto/evp/p_enc.c b/src/lib/libcrypto/evp/p_enc.c index 4685f55cad..c2a16234e8 100644 --- a/src/lib/libcrypto/evp/p_enc.c +++ b/src/lib/libcrypto/evp/p_enc.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: p_enc.c,v 1.13 2022/11/26 16:08:53 tb Exp $ */ | 1 | /* $OpenBSD: p_enc.c,v 1.14 2023/07/07 13:54:46 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -89,3 +89,4 @@ err: | |||
| 89 | #endif | 89 | #endif |
| 90 | return (ret); | 90 | return (ret); |
| 91 | } | 91 | } |
| 92 | LCRYPTO_ALIAS(EVP_PKEY_encrypt_old); | ||
diff --git a/src/lib/libcrypto/evp/p_lib.c b/src/lib/libcrypto/evp/p_lib.c index e1760122c6..325fb605df 100644 --- a/src/lib/libcrypto/evp/p_lib.c +++ b/src/lib/libcrypto/evp/p_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: p_lib.c,v 1.32 2022/11/26 16:08:53 tb Exp $ */ | 1 | /* $OpenBSD: p_lib.c,v 1.33 2023/07/07 13:54:46 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -93,6 +93,7 @@ EVP_PKEY_bits(const EVP_PKEY *pkey) | |||
| 93 | return pkey->ameth->pkey_bits(pkey); | 93 | return pkey->ameth->pkey_bits(pkey); |
| 94 | return 0; | 94 | return 0; |
| 95 | } | 95 | } |
| 96 | LCRYPTO_ALIAS(EVP_PKEY_bits); | ||
| 96 | 97 | ||
| 97 | int | 98 | int |
| 98 | EVP_PKEY_security_bits(const EVP_PKEY *pkey) | 99 | EVP_PKEY_security_bits(const EVP_PKEY *pkey) |
| @@ -104,6 +105,7 @@ EVP_PKEY_security_bits(const EVP_PKEY *pkey) | |||
| 104 | 105 | ||
| 105 | return pkey->ameth->pkey_security_bits(pkey); | 106 | return pkey->ameth->pkey_security_bits(pkey); |
| 106 | } | 107 | } |
| 108 | LCRYPTO_ALIAS(EVP_PKEY_security_bits); | ||
| 107 | 109 | ||
| 108 | int | 110 | int |
| 109 | EVP_PKEY_size(const EVP_PKEY *pkey) | 111 | EVP_PKEY_size(const EVP_PKEY *pkey) |
| @@ -112,6 +114,7 @@ EVP_PKEY_size(const EVP_PKEY *pkey) | |||
| 112 | return pkey->ameth->pkey_size(pkey); | 114 | return pkey->ameth->pkey_size(pkey); |
| 113 | return 0; | 115 | return 0; |
| 114 | } | 116 | } |
| 117 | LCRYPTO_ALIAS(EVP_PKEY_size); | ||
| 115 | 118 | ||
| 116 | int | 119 | int |
| 117 | EVP_PKEY_save_parameters(EVP_PKEY *pkey, int mode) | 120 | EVP_PKEY_save_parameters(EVP_PKEY *pkey, int mode) |
| @@ -136,6 +139,7 @@ EVP_PKEY_save_parameters(EVP_PKEY *pkey, int mode) | |||
| 136 | #endif | 139 | #endif |
| 137 | return (0); | 140 | return (0); |
| 138 | } | 141 | } |
| 142 | LCRYPTO_ALIAS(EVP_PKEY_save_parameters); | ||
| 139 | 143 | ||
| 140 | int | 144 | int |
| 141 | EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from) | 145 | EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from) |
| @@ -155,6 +159,7 @@ EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from) | |||
| 155 | err: | 159 | err: |
| 156 | return 0; | 160 | return 0; |
| 157 | } | 161 | } |
| 162 | LCRYPTO_ALIAS(EVP_PKEY_copy_parameters); | ||
| 158 | 163 | ||
| 159 | int | 164 | int |
| 160 | EVP_PKEY_missing_parameters(const EVP_PKEY *pkey) | 165 | EVP_PKEY_missing_parameters(const EVP_PKEY *pkey) |
| @@ -163,6 +168,7 @@ EVP_PKEY_missing_parameters(const EVP_PKEY *pkey) | |||
| 163 | return pkey->ameth->param_missing(pkey); | 168 | return pkey->ameth->param_missing(pkey); |
| 164 | return 0; | 169 | return 0; |
| 165 | } | 170 | } |
| 171 | LCRYPTO_ALIAS(EVP_PKEY_missing_parameters); | ||
| 166 | 172 | ||
| 167 | int | 173 | int |
| 168 | EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b) | 174 | EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b) |
| @@ -173,6 +179,7 @@ EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b) | |||
| 173 | return a->ameth->param_cmp(a, b); | 179 | return a->ameth->param_cmp(a, b); |
| 174 | return -2; | 180 | return -2; |
| 175 | } | 181 | } |
| 182 | LCRYPTO_ALIAS(EVP_PKEY_cmp_parameters); | ||
| 176 | 183 | ||
| 177 | int | 184 | int |
| 178 | EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b) | 185 | EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b) |
| @@ -195,6 +202,7 @@ EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b) | |||
| 195 | 202 | ||
| 196 | return -2; | 203 | return -2; |
| 197 | } | 204 | } |
| 205 | LCRYPTO_ALIAS(EVP_PKEY_cmp); | ||
| 198 | 206 | ||
| 199 | EVP_PKEY * | 207 | EVP_PKEY * |
| 200 | EVP_PKEY_new(void) | 208 | EVP_PKEY_new(void) |
| @@ -216,6 +224,7 @@ EVP_PKEY_new(void) | |||
| 216 | ret->save_parameters = 1; | 224 | ret->save_parameters = 1; |
| 217 | return (ret); | 225 | return (ret); |
| 218 | } | 226 | } |
| 227 | LCRYPTO_ALIAS(EVP_PKEY_new); | ||
| 219 | 228 | ||
| 220 | int | 229 | int |
| 221 | EVP_PKEY_up_ref(EVP_PKEY *pkey) | 230 | EVP_PKEY_up_ref(EVP_PKEY *pkey) |
| @@ -223,6 +232,7 @@ EVP_PKEY_up_ref(EVP_PKEY *pkey) | |||
| 223 | int refs = CRYPTO_add(&pkey->references, 1, CRYPTO_LOCK_EVP_PKEY); | 232 | int refs = CRYPTO_add(&pkey->references, 1, CRYPTO_LOCK_EVP_PKEY); |
| 224 | return ((refs > 1) ? 1 : 0); | 233 | return ((refs > 1) ? 1 : 0); |
| 225 | } | 234 | } |
| 235 | LCRYPTO_ALIAS(EVP_PKEY_up_ref); | ||
| 226 | 236 | ||
| 227 | /* Setup a public key ASN1 method and ENGINE from a NID or a string. | 237 | /* Setup a public key ASN1 method and ENGINE from a NID or a string. |
| 228 | * If pkey is NULL just return 1 or 0 if the algorithm exists. | 238 | * If pkey is NULL just return 1 or 0 if the algorithm exists. |
| @@ -277,6 +287,7 @@ EVP_PKEY_set_type(EVP_PKEY *pkey, int type) | |||
| 277 | { | 287 | { |
| 278 | return pkey_set_type(pkey, NULL, type, NULL, -1); | 288 | return pkey_set_type(pkey, NULL, type, NULL, -1); |
| 279 | } | 289 | } |
| 290 | LCRYPTO_ALIAS(EVP_PKEY_set_type); | ||
| 280 | 291 | ||
| 281 | EVP_PKEY * | 292 | EVP_PKEY * |
| 282 | EVP_PKEY_new_raw_private_key(int type, ENGINE *engine, | 293 | EVP_PKEY_new_raw_private_key(int type, ENGINE *engine, |
| @@ -306,6 +317,7 @@ EVP_PKEY_new_raw_private_key(int type, ENGINE *engine, | |||
| 306 | 317 | ||
| 307 | return NULL; | 318 | return NULL; |
| 308 | } | 319 | } |
| 320 | LCRYPTO_ALIAS(EVP_PKEY_new_raw_private_key); | ||
| 309 | 321 | ||
| 310 | EVP_PKEY * | 322 | EVP_PKEY * |
| 311 | EVP_PKEY_new_raw_public_key(int type, ENGINE *engine, | 323 | EVP_PKEY_new_raw_public_key(int type, ENGINE *engine, |
| @@ -335,6 +347,7 @@ EVP_PKEY_new_raw_public_key(int type, ENGINE *engine, | |||
| 335 | 347 | ||
| 336 | return NULL; | 348 | return NULL; |
| 337 | } | 349 | } |
| 350 | LCRYPTO_ALIAS(EVP_PKEY_new_raw_public_key); | ||
| 338 | 351 | ||
| 339 | int | 352 | int |
| 340 | EVP_PKEY_get_raw_private_key(const EVP_PKEY *pkey, | 353 | EVP_PKEY_get_raw_private_key(const EVP_PKEY *pkey, |
| @@ -351,6 +364,7 @@ EVP_PKEY_get_raw_private_key(const EVP_PKEY *pkey, | |||
| 351 | 364 | ||
| 352 | return 1; | 365 | return 1; |
| 353 | } | 366 | } |
| 367 | LCRYPTO_ALIAS(EVP_PKEY_get_raw_private_key); | ||
| 354 | 368 | ||
| 355 | int | 369 | int |
| 356 | EVP_PKEY_get_raw_public_key(const EVP_PKEY *pkey, | 370 | EVP_PKEY_get_raw_public_key(const EVP_PKEY *pkey, |
| @@ -367,6 +381,7 @@ EVP_PKEY_get_raw_public_key(const EVP_PKEY *pkey, | |||
| 367 | 381 | ||
| 368 | return 1; | 382 | return 1; |
| 369 | } | 383 | } |
| 384 | LCRYPTO_ALIAS(EVP_PKEY_get_raw_public_key); | ||
| 370 | 385 | ||
| 371 | EVP_PKEY * | 386 | EVP_PKEY * |
| 372 | EVP_PKEY_new_CMAC_key(ENGINE *e, const unsigned char *priv, size_t len, | 387 | EVP_PKEY_new_CMAC_key(ENGINE *e, const unsigned char *priv, size_t len, |
| @@ -397,12 +412,14 @@ EVP_PKEY_new_CMAC_key(ENGINE *e, const unsigned char *priv, size_t len, | |||
| 397 | CMAC_CTX_free(cmctx); | 412 | CMAC_CTX_free(cmctx); |
| 398 | return NULL; | 413 | return NULL; |
| 399 | } | 414 | } |
| 415 | LCRYPTO_ALIAS(EVP_PKEY_new_CMAC_key); | ||
| 400 | 416 | ||
| 401 | int | 417 | int |
| 402 | EVP_PKEY_set_type_str(EVP_PKEY *pkey, const char *str, int len) | 418 | EVP_PKEY_set_type_str(EVP_PKEY *pkey, const char *str, int len) |
| 403 | { | 419 | { |
| 404 | return pkey_set_type(pkey, NULL, EVP_PKEY_NONE, str, len); | 420 | return pkey_set_type(pkey, NULL, EVP_PKEY_NONE, str, len); |
| 405 | } | 421 | } |
| 422 | LCRYPTO_ALIAS(EVP_PKEY_set_type_str); | ||
| 406 | 423 | ||
| 407 | int | 424 | int |
| 408 | EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key) | 425 | EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key) |
| @@ -412,12 +429,14 @@ EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key) | |||
| 412 | pkey->pkey.ptr = key; | 429 | pkey->pkey.ptr = key; |
| 413 | return (key != NULL); | 430 | return (key != NULL); |
| 414 | } | 431 | } |
| 432 | LCRYPTO_ALIAS(EVP_PKEY_assign); | ||
| 415 | 433 | ||
| 416 | void * | 434 | void * |
| 417 | EVP_PKEY_get0(const EVP_PKEY *pkey) | 435 | EVP_PKEY_get0(const EVP_PKEY *pkey) |
| 418 | { | 436 | { |
| 419 | return pkey->pkey.ptr; | 437 | return pkey->pkey.ptr; |
| 420 | } | 438 | } |
| 439 | LCRYPTO_ALIAS(EVP_PKEY_get0); | ||
| 421 | 440 | ||
| 422 | const unsigned char * | 441 | const unsigned char * |
| 423 | EVP_PKEY_get0_hmac(const EVP_PKEY *pkey, size_t *len) | 442 | EVP_PKEY_get0_hmac(const EVP_PKEY *pkey, size_t *len) |
| @@ -434,6 +453,7 @@ EVP_PKEY_get0_hmac(const EVP_PKEY *pkey, size_t *len) | |||
| 434 | 453 | ||
| 435 | return os->data; | 454 | return os->data; |
| 436 | } | 455 | } |
| 456 | LCRYPTO_ALIAS(EVP_PKEY_get0_hmac); | ||
| 437 | 457 | ||
| 438 | #ifndef OPENSSL_NO_RSA | 458 | #ifndef OPENSSL_NO_RSA |
| 439 | RSA * | 459 | RSA * |
| @@ -445,6 +465,7 @@ EVP_PKEY_get0_RSA(EVP_PKEY *pkey) | |||
| 445 | } | 465 | } |
| 446 | return pkey->pkey.rsa; | 466 | return pkey->pkey.rsa; |
| 447 | } | 467 | } |
| 468 | LCRYPTO_ALIAS(EVP_PKEY_get0_RSA); | ||
| 448 | 469 | ||
| 449 | RSA * | 470 | RSA * |
| 450 | EVP_PKEY_get1_RSA(EVP_PKEY *pkey) | 471 | EVP_PKEY_get1_RSA(EVP_PKEY *pkey) |
| @@ -456,6 +477,7 @@ EVP_PKEY_get1_RSA(EVP_PKEY *pkey) | |||
| 456 | RSA_up_ref(pkey->pkey.rsa); | 477 | RSA_up_ref(pkey->pkey.rsa); |
| 457 | return pkey->pkey.rsa; | 478 | return pkey->pkey.rsa; |
| 458 | } | 479 | } |
| 480 | LCRYPTO_ALIAS(EVP_PKEY_get1_RSA); | ||
| 459 | 481 | ||
| 460 | int | 482 | int |
| 461 | EVP_PKEY_set1_RSA(EVP_PKEY *pkey, RSA *key) | 483 | EVP_PKEY_set1_RSA(EVP_PKEY *pkey, RSA *key) |
| @@ -465,6 +487,7 @@ EVP_PKEY_set1_RSA(EVP_PKEY *pkey, RSA *key) | |||
| 465 | RSA_up_ref(key); | 487 | RSA_up_ref(key); |
| 466 | return ret; | 488 | return ret; |
| 467 | } | 489 | } |
| 490 | LCRYPTO_ALIAS(EVP_PKEY_set1_RSA); | ||
| 468 | #endif | 491 | #endif |
| 469 | 492 | ||
| 470 | #ifndef OPENSSL_NO_DSA | 493 | #ifndef OPENSSL_NO_DSA |
| @@ -477,6 +500,7 @@ EVP_PKEY_get0_DSA(EVP_PKEY *pkey) | |||
| 477 | } | 500 | } |
| 478 | return pkey->pkey.dsa; | 501 | return pkey->pkey.dsa; |
| 479 | } | 502 | } |
| 503 | LCRYPTO_ALIAS(EVP_PKEY_get0_DSA); | ||
| 480 | 504 | ||
| 481 | DSA * | 505 | DSA * |
| 482 | EVP_PKEY_get1_DSA(EVP_PKEY *pkey) | 506 | EVP_PKEY_get1_DSA(EVP_PKEY *pkey) |
| @@ -488,6 +512,7 @@ EVP_PKEY_get1_DSA(EVP_PKEY *pkey) | |||
| 488 | DSA_up_ref(pkey->pkey.dsa); | 512 | DSA_up_ref(pkey->pkey.dsa); |
| 489 | return pkey->pkey.dsa; | 513 | return pkey->pkey.dsa; |
| 490 | } | 514 | } |
| 515 | LCRYPTO_ALIAS(EVP_PKEY_get1_DSA); | ||
| 491 | 516 | ||
| 492 | int | 517 | int |
| 493 | EVP_PKEY_set1_DSA(EVP_PKEY *pkey, DSA *key) | 518 | EVP_PKEY_set1_DSA(EVP_PKEY *pkey, DSA *key) |
| @@ -497,6 +522,7 @@ EVP_PKEY_set1_DSA(EVP_PKEY *pkey, DSA *key) | |||
| 497 | DSA_up_ref(key); | 522 | DSA_up_ref(key); |
| 498 | return ret; | 523 | return ret; |
| 499 | } | 524 | } |
| 525 | LCRYPTO_ALIAS(EVP_PKEY_set1_DSA); | ||
| 500 | #endif | 526 | #endif |
| 501 | 527 | ||
| 502 | #ifndef OPENSSL_NO_EC | 528 | #ifndef OPENSSL_NO_EC |
| @@ -509,6 +535,7 @@ EVP_PKEY_get0_EC_KEY(EVP_PKEY *pkey) | |||
| 509 | } | 535 | } |
| 510 | return pkey->pkey.ec; | 536 | return pkey->pkey.ec; |
| 511 | } | 537 | } |
| 538 | LCRYPTO_ALIAS(EVP_PKEY_get0_EC_KEY); | ||
| 512 | 539 | ||
| 513 | EC_KEY * | 540 | EC_KEY * |
| 514 | EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey) | 541 | EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey) |
| @@ -520,6 +547,7 @@ EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey) | |||
| 520 | EC_KEY_up_ref(pkey->pkey.ec); | 547 | EC_KEY_up_ref(pkey->pkey.ec); |
| 521 | return pkey->pkey.ec; | 548 | return pkey->pkey.ec; |
| 522 | } | 549 | } |
| 550 | LCRYPTO_ALIAS(EVP_PKEY_get1_EC_KEY); | ||
| 523 | 551 | ||
| 524 | int | 552 | int |
| 525 | EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, EC_KEY *key) | 553 | EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, EC_KEY *key) |
| @@ -529,6 +557,7 @@ EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, EC_KEY *key) | |||
| 529 | EC_KEY_up_ref(key); | 557 | EC_KEY_up_ref(key); |
| 530 | return ret; | 558 | return ret; |
| 531 | } | 559 | } |
| 560 | LCRYPTO_ALIAS(EVP_PKEY_set1_EC_KEY); | ||
| 532 | #endif | 561 | #endif |
| 533 | 562 | ||
| 534 | 563 | ||
| @@ -542,6 +571,7 @@ EVP_PKEY_get0_DH(EVP_PKEY *pkey) | |||
| 542 | } | 571 | } |
| 543 | return pkey->pkey.dh; | 572 | return pkey->pkey.dh; |
| 544 | } | 573 | } |
| 574 | LCRYPTO_ALIAS(EVP_PKEY_get0_DH); | ||
| 545 | 575 | ||
| 546 | DH * | 576 | DH * |
| 547 | EVP_PKEY_get1_DH(EVP_PKEY *pkey) | 577 | EVP_PKEY_get1_DH(EVP_PKEY *pkey) |
| @@ -553,6 +583,7 @@ EVP_PKEY_get1_DH(EVP_PKEY *pkey) | |||
| 553 | DH_up_ref(pkey->pkey.dh); | 583 | DH_up_ref(pkey->pkey.dh); |
| 554 | return pkey->pkey.dh; | 584 | return pkey->pkey.dh; |
| 555 | } | 585 | } |
| 586 | LCRYPTO_ALIAS(EVP_PKEY_get1_DH); | ||
| 556 | 587 | ||
| 557 | int | 588 | int |
| 558 | EVP_PKEY_set1_DH(EVP_PKEY *pkey, DH *key) | 589 | EVP_PKEY_set1_DH(EVP_PKEY *pkey, DH *key) |
| @@ -562,6 +593,7 @@ EVP_PKEY_set1_DH(EVP_PKEY *pkey, DH *key) | |||
| 562 | DH_up_ref(key); | 593 | DH_up_ref(key); |
| 563 | return ret; | 594 | return ret; |
| 564 | } | 595 | } |
| 596 | LCRYPTO_ALIAS(EVP_PKEY_set1_DH); | ||
| 565 | #endif | 597 | #endif |
| 566 | 598 | ||
| 567 | int | 599 | int |
| @@ -580,18 +612,21 @@ EVP_PKEY_type(int type) | |||
| 580 | #endif | 612 | #endif |
| 581 | return ret; | 613 | return ret; |
| 582 | } | 614 | } |
| 615 | LCRYPTO_ALIAS(EVP_PKEY_type); | ||
| 583 | 616 | ||
| 584 | int | 617 | int |
| 585 | EVP_PKEY_id(const EVP_PKEY *pkey) | 618 | EVP_PKEY_id(const EVP_PKEY *pkey) |
| 586 | { | 619 | { |
| 587 | return pkey->type; | 620 | return pkey->type; |
| 588 | } | 621 | } |
| 622 | LCRYPTO_ALIAS(EVP_PKEY_id); | ||
| 589 | 623 | ||
| 590 | int | 624 | int |
| 591 | EVP_PKEY_base_id(const EVP_PKEY *pkey) | 625 | EVP_PKEY_base_id(const EVP_PKEY *pkey) |
| 592 | { | 626 | { |
| 593 | return EVP_PKEY_type(pkey->type); | 627 | return EVP_PKEY_type(pkey->type); |
| 594 | } | 628 | } |
| 629 | LCRYPTO_ALIAS(EVP_PKEY_base_id); | ||
| 595 | 630 | ||
| 596 | void | 631 | void |
| 597 | EVP_PKEY_free(EVP_PKEY *x) | 632 | EVP_PKEY_free(EVP_PKEY *x) |
| @@ -610,6 +645,7 @@ EVP_PKEY_free(EVP_PKEY *x) | |||
| 610 | sk_X509_ATTRIBUTE_pop_free(x->attributes, X509_ATTRIBUTE_free); | 645 | sk_X509_ATTRIBUTE_pop_free(x->attributes, X509_ATTRIBUTE_free); |
| 611 | free(x); | 646 | free(x); |
| 612 | } | 647 | } |
| 648 | LCRYPTO_ALIAS(EVP_PKEY_free); | ||
| 613 | 649 | ||
| 614 | static void | 650 | static void |
| 615 | EVP_PKEY_free_it(EVP_PKEY *x) | 651 | EVP_PKEY_free_it(EVP_PKEY *x) |
| @@ -643,6 +679,7 @@ EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey, int indent, | |||
| 643 | 679 | ||
| 644 | return unsup_alg(out, pkey, indent, "Public Key"); | 680 | return unsup_alg(out, pkey, indent, "Public Key"); |
| 645 | } | 681 | } |
| 682 | LCRYPTO_ALIAS(EVP_PKEY_print_public); | ||
| 646 | 683 | ||
| 647 | int | 684 | int |
| 648 | EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey, int indent, | 685 | EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey, int indent, |
| @@ -653,6 +690,7 @@ EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey, int indent, | |||
| 653 | 690 | ||
| 654 | return unsup_alg(out, pkey, indent, "Private Key"); | 691 | return unsup_alg(out, pkey, indent, "Private Key"); |
| 655 | } | 692 | } |
| 693 | LCRYPTO_ALIAS(EVP_PKEY_print_private); | ||
| 656 | 694 | ||
| 657 | int | 695 | int |
| 658 | EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey, int indent, | 696 | EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey, int indent, |
| @@ -662,6 +700,7 @@ EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey, int indent, | |||
| 662 | return pkey->ameth->param_print(out, pkey, indent, pctx); | 700 | return pkey->ameth->param_print(out, pkey, indent, pctx); |
| 663 | return unsup_alg(out, pkey, indent, "Parameters"); | 701 | return unsup_alg(out, pkey, indent, "Parameters"); |
| 664 | } | 702 | } |
| 703 | LCRYPTO_ALIAS(EVP_PKEY_print_params); | ||
| 665 | 704 | ||
| 666 | int | 705 | int |
| 667 | EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid) | 706 | EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid) |
| @@ -671,3 +710,4 @@ EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid) | |||
| 671 | return pkey->ameth->pkey_ctrl(pkey, ASN1_PKEY_CTRL_DEFAULT_MD_NID, | 710 | return pkey->ameth->pkey_ctrl(pkey, ASN1_PKEY_CTRL_DEFAULT_MD_NID, |
| 672 | 0, pnid); | 711 | 0, pnid); |
| 673 | } | 712 | } |
| 713 | LCRYPTO_ALIAS(EVP_PKEY_get_default_digest_nid); | ||
diff --git a/src/lib/libcrypto/evp/p_open.c b/src/lib/libcrypto/evp/p_open.c index bce900b9ab..5ab36b8ef5 100644 --- a/src/lib/libcrypto/evp/p_open.c +++ b/src/lib/libcrypto/evp/p_open.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: p_open.c,v 1.21 2022/11/26 16:08:53 tb Exp $ */ | 1 | /* $OpenBSD: p_open.c,v 1.22 2023/07/07 13:54:46 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -114,6 +114,7 @@ err: | |||
| 114 | freezero(key, size); | 114 | freezero(key, size); |
| 115 | return (ret); | 115 | return (ret); |
| 116 | } | 116 | } |
| 117 | LCRYPTO_ALIAS(EVP_OpenInit); | ||
| 117 | 118 | ||
| 118 | int | 119 | int |
| 119 | EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | 120 | EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) |
| @@ -125,4 +126,5 @@ EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | |||
| 125 | i = EVP_DecryptInit_ex(ctx, NULL, NULL, NULL, NULL); | 126 | i = EVP_DecryptInit_ex(ctx, NULL, NULL, NULL, NULL); |
| 126 | return (i); | 127 | return (i); |
| 127 | } | 128 | } |
| 129 | LCRYPTO_ALIAS(EVP_OpenFinal); | ||
| 128 | #endif | 130 | #endif |
diff --git a/src/lib/libcrypto/evp/p_seal.c b/src/lib/libcrypto/evp/p_seal.c index 8b9740fbcd..52521e133b 100644 --- a/src/lib/libcrypto/evp/p_seal.c +++ b/src/lib/libcrypto/evp/p_seal.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: p_seal.c,v 1.14 2014/10/22 13:02:04 jsing Exp $ */ | 1 | /* $OpenBSD: p_seal.c,v 1.15 2023/07/07 13:54:46 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -99,6 +99,7 @@ EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, unsigned char **ek, | |||
| 99 | } | 99 | } |
| 100 | return (npubk); | 100 | return (npubk); |
| 101 | } | 101 | } |
| 102 | LCRYPTO_ALIAS(EVP_SealInit); | ||
| 102 | 103 | ||
| 103 | /* MACRO | 104 | /* MACRO |
| 104 | void EVP_SealUpdate(ctx,out,outl,in,inl) | 105 | void EVP_SealUpdate(ctx,out,outl,in,inl) |
| @@ -122,3 +123,4 @@ EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | |||
| 122 | i = EVP_EncryptInit_ex(ctx, NULL, NULL, NULL, NULL); | 123 | i = EVP_EncryptInit_ex(ctx, NULL, NULL, NULL, NULL); |
| 123 | return i; | 124 | return i; |
| 124 | } | 125 | } |
| 126 | LCRYPTO_ALIAS(EVP_SealFinal); | ||
diff --git a/src/lib/libcrypto/evp/p_sign.c b/src/lib/libcrypto/evp/p_sign.c index 1f78d1efef..13655b076f 100644 --- a/src/lib/libcrypto/evp/p_sign.c +++ b/src/lib/libcrypto/evp/p_sign.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: p_sign.c,v 1.17 2022/11/26 16:08:53 tb Exp $ */ | 1 | /* $OpenBSD: p_sign.c,v 1.18 2023/07/07 13:54:46 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -102,3 +102,4 @@ EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen, | |||
| 102 | EVP_PKEY_CTX_free(pkctx); | 102 | EVP_PKEY_CTX_free(pkctx); |
| 103 | return ret; | 103 | return ret; |
| 104 | } | 104 | } |
| 105 | LCRYPTO_ALIAS(EVP_SignFinal); | ||
diff --git a/src/lib/libcrypto/evp/p_verify.c b/src/lib/libcrypto/evp/p_verify.c index 545715325d..601b44e5e0 100644 --- a/src/lib/libcrypto/evp/p_verify.c +++ b/src/lib/libcrypto/evp/p_verify.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: p_verify.c,v 1.16 2022/11/26 16:08:53 tb Exp $ */ | 1 | /* $OpenBSD: p_verify.c,v 1.17 2023/07/07 13:54:46 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -95,3 +95,4 @@ EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf, | |||
| 95 | EVP_PKEY_CTX_free(pkctx); | 95 | EVP_PKEY_CTX_free(pkctx); |
| 96 | return ret; | 96 | return ret; |
| 97 | } | 97 | } |
| 98 | LCRYPTO_ALIAS(EVP_VerifyFinal); | ||
diff --git a/src/lib/libcrypto/evp/pmeth_fn.c b/src/lib/libcrypto/evp/pmeth_fn.c index cab1dfab6f..3025005034 100644 --- a/src/lib/libcrypto/evp/pmeth_fn.c +++ b/src/lib/libcrypto/evp/pmeth_fn.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: pmeth_fn.c,v 1.7 2022/11/26 16:08:53 tb Exp $ */ | 1 | /* $OpenBSD: pmeth_fn.c,v 1.8 2023/07/07 13:54:46 beck Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 2006. | 3 | * project 2006. |
| 4 | */ | 4 | */ |
| @@ -98,6 +98,7 @@ EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx) | |||
| 98 | ctx->operation = EVP_PKEY_OP_UNDEFINED; | 98 | ctx->operation = EVP_PKEY_OP_UNDEFINED; |
| 99 | return ret; | 99 | return ret; |
| 100 | } | 100 | } |
| 101 | LCRYPTO_ALIAS(EVP_PKEY_sign_init); | ||
| 101 | 102 | ||
| 102 | int | 103 | int |
| 103 | EVP_PKEY_sign(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen, | 104 | 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, | |||
| 114 | M_check_autoarg(ctx, sig, siglen, EVP_F_EVP_PKEY_SIGN) | 115 | M_check_autoarg(ctx, sig, siglen, EVP_F_EVP_PKEY_SIGN) |
| 115 | return ctx->pmeth->sign(ctx, sig, siglen, tbs, tbslen); | 116 | return ctx->pmeth->sign(ctx, sig, siglen, tbs, tbslen); |
| 116 | } | 117 | } |
| 118 | LCRYPTO_ALIAS(EVP_PKEY_sign); | ||
| 117 | 119 | ||
| 118 | int | 120 | int |
| 119 | EVP_PKEY_verify_init(EVP_PKEY_CTX *ctx) | 121 | EVP_PKEY_verify_init(EVP_PKEY_CTX *ctx) |
| @@ -132,6 +134,7 @@ EVP_PKEY_verify_init(EVP_PKEY_CTX *ctx) | |||
| 132 | ctx->operation = EVP_PKEY_OP_UNDEFINED; | 134 | ctx->operation = EVP_PKEY_OP_UNDEFINED; |
| 133 | return ret; | 135 | return ret; |
| 134 | } | 136 | } |
| 137 | LCRYPTO_ALIAS(EVP_PKEY_verify_init); | ||
| 135 | 138 | ||
| 136 | int | 139 | int |
| 137 | EVP_PKEY_verify(EVP_PKEY_CTX *ctx, const unsigned char *sig, size_t siglen, | 140 | 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, | |||
| 147 | } | 150 | } |
| 148 | return ctx->pmeth->verify(ctx, sig, siglen, tbs, tbslen); | 151 | return ctx->pmeth->verify(ctx, sig, siglen, tbs, tbslen); |
| 149 | } | 152 | } |
| 153 | LCRYPTO_ALIAS(EVP_PKEY_verify); | ||
| 150 | 154 | ||
| 151 | int | 155 | int |
| 152 | EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx) | 156 | EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx) |
| @@ -165,6 +169,7 @@ EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx) | |||
| 165 | ctx->operation = EVP_PKEY_OP_UNDEFINED; | 169 | ctx->operation = EVP_PKEY_OP_UNDEFINED; |
| 166 | return ret; | 170 | return ret; |
| 167 | } | 171 | } |
| 172 | LCRYPTO_ALIAS(EVP_PKEY_verify_recover_init); | ||
| 168 | 173 | ||
| 169 | int | 174 | int |
| 170 | EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx, unsigned char *rout, size_t *routlen, | 175 | 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, | |||
| 181 | M_check_autoarg(ctx, rout, routlen, EVP_F_EVP_PKEY_VERIFY_RECOVER) | 186 | M_check_autoarg(ctx, rout, routlen, EVP_F_EVP_PKEY_VERIFY_RECOVER) |
| 182 | return ctx->pmeth->verify_recover(ctx, rout, routlen, sig, siglen); | 187 | return ctx->pmeth->verify_recover(ctx, rout, routlen, sig, siglen); |
| 183 | } | 188 | } |
| 189 | LCRYPTO_ALIAS(EVP_PKEY_verify_recover); | ||
| 184 | 190 | ||
| 185 | int | 191 | int |
| 186 | EVP_PKEY_encrypt_init(EVP_PKEY_CTX *ctx) | 192 | EVP_PKEY_encrypt_init(EVP_PKEY_CTX *ctx) |
| @@ -199,6 +205,7 @@ EVP_PKEY_encrypt_init(EVP_PKEY_CTX *ctx) | |||
| 199 | ctx->operation = EVP_PKEY_OP_UNDEFINED; | 205 | ctx->operation = EVP_PKEY_OP_UNDEFINED; |
| 200 | return ret; | 206 | return ret; |
| 201 | } | 207 | } |
| 208 | LCRYPTO_ALIAS(EVP_PKEY_encrypt_init); | ||
| 202 | 209 | ||
| 203 | int | 210 | int |
| 204 | EVP_PKEY_encrypt(EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen, | 211 | 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, | |||
| 215 | M_check_autoarg(ctx, out, outlen, EVP_F_EVP_PKEY_ENCRYPT) | 222 | M_check_autoarg(ctx, out, outlen, EVP_F_EVP_PKEY_ENCRYPT) |
| 216 | return ctx->pmeth->encrypt(ctx, out, outlen, in, inlen); | 223 | return ctx->pmeth->encrypt(ctx, out, outlen, in, inlen); |
| 217 | } | 224 | } |
| 225 | LCRYPTO_ALIAS(EVP_PKEY_encrypt); | ||
| 218 | 226 | ||
| 219 | int | 227 | int |
| 220 | EVP_PKEY_decrypt_init(EVP_PKEY_CTX *ctx) | 228 | EVP_PKEY_decrypt_init(EVP_PKEY_CTX *ctx) |
| @@ -233,6 +241,7 @@ EVP_PKEY_decrypt_init(EVP_PKEY_CTX *ctx) | |||
| 233 | ctx->operation = EVP_PKEY_OP_UNDEFINED; | 241 | ctx->operation = EVP_PKEY_OP_UNDEFINED; |
| 234 | return ret; | 242 | return ret; |
| 235 | } | 243 | } |
| 244 | LCRYPTO_ALIAS(EVP_PKEY_decrypt_init); | ||
| 236 | 245 | ||
| 237 | int | 246 | int |
| 238 | EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen, | 247 | 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, | |||
| 249 | M_check_autoarg(ctx, out, outlen, EVP_F_EVP_PKEY_DECRYPT) | 258 | M_check_autoarg(ctx, out, outlen, EVP_F_EVP_PKEY_DECRYPT) |
| 250 | return ctx->pmeth->decrypt(ctx, out, outlen, in, inlen); | 259 | return ctx->pmeth->decrypt(ctx, out, outlen, in, inlen); |
| 251 | } | 260 | } |
| 261 | LCRYPTO_ALIAS(EVP_PKEY_decrypt); | ||
| 252 | 262 | ||
| 253 | int | 263 | int |
| 254 | EVP_PKEY_derive_init(EVP_PKEY_CTX *ctx) | 264 | EVP_PKEY_derive_init(EVP_PKEY_CTX *ctx) |
| @@ -267,6 +277,7 @@ EVP_PKEY_derive_init(EVP_PKEY_CTX *ctx) | |||
| 267 | ctx->operation = EVP_PKEY_OP_UNDEFINED; | 277 | ctx->operation = EVP_PKEY_OP_UNDEFINED; |
| 268 | return ret; | 278 | return ret; |
| 269 | } | 279 | } |
| 280 | LCRYPTO_ALIAS(EVP_PKEY_derive_init); | ||
| 270 | 281 | ||
| 271 | int | 282 | int |
| 272 | EVP_PKEY_derive_set_peer(EVP_PKEY_CTX *ctx, EVP_PKEY *peer) | 283 | 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) | |||
| 328 | CRYPTO_add(&peer->references, 1, CRYPTO_LOCK_EVP_PKEY); | 339 | CRYPTO_add(&peer->references, 1, CRYPTO_LOCK_EVP_PKEY); |
| 329 | return 1; | 340 | return 1; |
| 330 | } | 341 | } |
| 342 | LCRYPTO_ALIAS(EVP_PKEY_derive_set_peer); | ||
| 331 | 343 | ||
| 332 | int | 344 | int |
| 333 | EVP_PKEY_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *pkeylen) | 345 | 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) | |||
| 343 | M_check_autoarg(ctx, key, pkeylen, EVP_F_EVP_PKEY_DERIVE) | 355 | M_check_autoarg(ctx, key, pkeylen, EVP_F_EVP_PKEY_DERIVE) |
| 344 | return ctx->pmeth->derive(ctx, key, pkeylen); | 356 | return ctx->pmeth->derive(ctx, key, pkeylen); |
| 345 | } | 357 | } |
| 358 | LCRYPTO_ALIAS(EVP_PKEY_derive); | ||
diff --git a/src/lib/libcrypto/evp/pmeth_gn.c b/src/lib/libcrypto/evp/pmeth_gn.c index d31bb7c0b4..2b835cd8fe 100644 --- a/src/lib/libcrypto/evp/pmeth_gn.c +++ b/src/lib/libcrypto/evp/pmeth_gn.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: pmeth_gn.c,v 1.11 2022/11/26 16:08:53 tb Exp $ */ | 1 | /* $OpenBSD: pmeth_gn.c,v 1.12 2023/07/07 13:54:46 beck Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 2006. | 3 | * project 2006. |
| 4 | */ | 4 | */ |
| @@ -85,6 +85,7 @@ EVP_PKEY_paramgen_init(EVP_PKEY_CTX *ctx) | |||
| 85 | ctx->operation = EVP_PKEY_OP_UNDEFINED; | 85 | ctx->operation = EVP_PKEY_OP_UNDEFINED; |
| 86 | return ret; | 86 | return ret; |
| 87 | } | 87 | } |
| 88 | LCRYPTO_ALIAS(EVP_PKEY_paramgen_init); | ||
| 88 | 89 | ||
| 89 | int | 90 | int |
| 90 | EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey) | 91 | EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey) |
| @@ -114,6 +115,7 @@ EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey) | |||
| 114 | } | 115 | } |
| 115 | return ret; | 116 | return ret; |
| 116 | } | 117 | } |
| 118 | LCRYPTO_ALIAS(EVP_PKEY_paramgen); | ||
| 117 | 119 | ||
| 118 | int | 120 | int |
| 119 | EVP_PKEY_keygen_init(EVP_PKEY_CTX *ctx) | 121 | EVP_PKEY_keygen_init(EVP_PKEY_CTX *ctx) |
| @@ -132,6 +134,7 @@ EVP_PKEY_keygen_init(EVP_PKEY_CTX *ctx) | |||
| 132 | ctx->operation = EVP_PKEY_OP_UNDEFINED; | 134 | ctx->operation = EVP_PKEY_OP_UNDEFINED; |
| 133 | return ret; | 135 | return ret; |
| 134 | } | 136 | } |
| 137 | LCRYPTO_ALIAS(EVP_PKEY_keygen_init); | ||
| 135 | 138 | ||
| 136 | int | 139 | int |
| 137 | EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey) | 140 | EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey) |
| @@ -160,18 +163,21 @@ EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey) | |||
| 160 | } | 163 | } |
| 161 | return ret; | 164 | return ret; |
| 162 | } | 165 | } |
| 166 | LCRYPTO_ALIAS(EVP_PKEY_keygen); | ||
| 163 | 167 | ||
| 164 | void | 168 | void |
| 165 | EVP_PKEY_CTX_set_cb(EVP_PKEY_CTX *ctx, EVP_PKEY_gen_cb *cb) | 169 | EVP_PKEY_CTX_set_cb(EVP_PKEY_CTX *ctx, EVP_PKEY_gen_cb *cb) |
| 166 | { | 170 | { |
| 167 | ctx->pkey_gencb = cb; | 171 | ctx->pkey_gencb = cb; |
| 168 | } | 172 | } |
| 173 | LCRYPTO_ALIAS(EVP_PKEY_CTX_set_cb); | ||
| 169 | 174 | ||
| 170 | EVP_PKEY_gen_cb * | 175 | EVP_PKEY_gen_cb * |
| 171 | EVP_PKEY_CTX_get_cb(EVP_PKEY_CTX *ctx) | 176 | EVP_PKEY_CTX_get_cb(EVP_PKEY_CTX *ctx) |
| 172 | { | 177 | { |
| 173 | return ctx->pkey_gencb; | 178 | return ctx->pkey_gencb; |
| 174 | } | 179 | } |
| 180 | LCRYPTO_ALIAS(EVP_PKEY_CTX_get_cb); | ||
| 175 | 181 | ||
| 176 | /* "translation callback" to call EVP_PKEY_CTX callbacks using BN_GENCB | 182 | /* "translation callback" to call EVP_PKEY_CTX callbacks using BN_GENCB |
| 177 | * style callbacks. | 183 | * style callbacks. |
| @@ -201,6 +207,7 @@ EVP_PKEY_CTX_get_keygen_info(EVP_PKEY_CTX *ctx, int idx) | |||
| 201 | return 0; | 207 | return 0; |
| 202 | return ctx->keygen_info[idx]; | 208 | return ctx->keygen_info[idx]; |
| 203 | } | 209 | } |
| 210 | LCRYPTO_ALIAS(EVP_PKEY_CTX_get_keygen_info); | ||
| 204 | 211 | ||
| 205 | EVP_PKEY * | 212 | EVP_PKEY * |
| 206 | EVP_PKEY_new_mac_key(int type, ENGINE *e, const unsigned char *key, int keylen) | 213 | EVP_PKEY_new_mac_key(int type, ENGINE *e, const unsigned char *key, int keylen) |
| @@ -223,6 +230,7 @@ merr: | |||
| 223 | EVP_PKEY_CTX_free(mac_ctx); | 230 | EVP_PKEY_CTX_free(mac_ctx); |
| 224 | return mac_key; | 231 | return mac_key; |
| 225 | } | 232 | } |
| 233 | LCRYPTO_ALIAS(EVP_PKEY_new_mac_key); | ||
| 226 | 234 | ||
| 227 | int | 235 | int |
| 228 | EVP_PKEY_check(EVP_PKEY_CTX *ctx) | 236 | EVP_PKEY_check(EVP_PKEY_CTX *ctx) |
| @@ -244,6 +252,7 @@ EVP_PKEY_check(EVP_PKEY_CTX *ctx) | |||
| 244 | 252 | ||
| 245 | return pkey->ameth->pkey_check(pkey); | 253 | return pkey->ameth->pkey_check(pkey); |
| 246 | } | 254 | } |
| 255 | LCRYPTO_ALIAS(EVP_PKEY_check); | ||
| 247 | 256 | ||
| 248 | int | 257 | int |
| 249 | EVP_PKEY_public_check(EVP_PKEY_CTX *ctx) | 258 | EVP_PKEY_public_check(EVP_PKEY_CTX *ctx) |
| @@ -265,6 +274,7 @@ EVP_PKEY_public_check(EVP_PKEY_CTX *ctx) | |||
| 265 | 274 | ||
| 266 | return pkey->ameth->pkey_public_check(pkey); | 275 | return pkey->ameth->pkey_public_check(pkey); |
| 267 | } | 276 | } |
| 277 | LCRYPTO_ALIAS(EVP_PKEY_public_check); | ||
| 268 | 278 | ||
| 269 | int | 279 | int |
| 270 | EVP_PKEY_param_check(EVP_PKEY_CTX *ctx) | 280 | EVP_PKEY_param_check(EVP_PKEY_CTX *ctx) |
| @@ -286,3 +296,4 @@ EVP_PKEY_param_check(EVP_PKEY_CTX *ctx) | |||
| 286 | 296 | ||
| 287 | return pkey->ameth->pkey_param_check(pkey); | 297 | return pkey->ameth->pkey_param_check(pkey); |
| 288 | } | 298 | } |
| 299 | LCRYPTO_ALIAS(EVP_PKEY_param_check); | ||
diff --git a/src/lib/libcrypto/evp/pmeth_lib.c b/src/lib/libcrypto/evp/pmeth_lib.c index 3341ba1e0f..cad38d4fe9 100644 --- a/src/lib/libcrypto/evp/pmeth_lib.c +++ b/src/lib/libcrypto/evp/pmeth_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: pmeth_lib.c,v 1.31 2023/06/20 14:14:00 tb Exp $ */ | 1 | /* $OpenBSD: pmeth_lib.c,v 1.32 2023/07/07 13:54:46 beck Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 2006. | 3 | * project 2006. |
| 4 | */ | 4 | */ |
| @@ -149,6 +149,7 @@ EVP_PKEY_meth_find(int type) | |||
| 149 | 149 | ||
| 150 | return NULL; | 150 | return NULL; |
| 151 | } | 151 | } |
| 152 | LCRYPTO_ALIAS(EVP_PKEY_meth_find); | ||
| 152 | 153 | ||
| 153 | static EVP_PKEY_CTX * | 154 | static EVP_PKEY_CTX * |
| 154 | evp_pkey_ctx_new(EVP_PKEY *pkey, ENGINE *engine, int id) | 155 | evp_pkey_ctx_new(EVP_PKEY *pkey, ENGINE *engine, int id) |
| @@ -225,6 +226,7 @@ EVP_PKEY_meth_new(int id, int flags) | |||
| 225 | 226 | ||
| 226 | return pmeth; | 227 | return pmeth; |
| 227 | } | 228 | } |
| 229 | LCRYPTO_ALIAS(EVP_PKEY_meth_new); | ||
| 228 | 230 | ||
| 229 | void | 231 | void |
| 230 | EVP_PKEY_meth_get0_info(int *ppkey_id, int *pflags, const EVP_PKEY_METHOD *meth) | 232 | EVP_PKEY_meth_get0_info(int *ppkey_id, int *pflags, const EVP_PKEY_METHOD *meth) |
| @@ -234,6 +236,7 @@ EVP_PKEY_meth_get0_info(int *ppkey_id, int *pflags, const EVP_PKEY_METHOD *meth) | |||
| 234 | if (pflags) | 236 | if (pflags) |
| 235 | *pflags = meth->flags; | 237 | *pflags = meth->flags; |
| 236 | } | 238 | } |
| 239 | LCRYPTO_ALIAS(EVP_PKEY_meth_get0_info); | ||
| 237 | 240 | ||
| 238 | void | 241 | void |
| 239 | EVP_PKEY_meth_copy(EVP_PKEY_METHOD *dst, const EVP_PKEY_METHOD *src) | 242 | EVP_PKEY_meth_copy(EVP_PKEY_METHOD *dst, const EVP_PKEY_METHOD *src) |
| @@ -248,6 +251,7 @@ EVP_PKEY_meth_copy(EVP_PKEY_METHOD *dst, const EVP_PKEY_METHOD *src) | |||
| 248 | dst->pkey_id = preserve.pkey_id; | 251 | dst->pkey_id = preserve.pkey_id; |
| 249 | dst->flags = preserve.flags; | 252 | dst->flags = preserve.flags; |
| 250 | } | 253 | } |
| 254 | LCRYPTO_ALIAS(EVP_PKEY_meth_copy); | ||
| 251 | 255 | ||
| 252 | void | 256 | void |
| 253 | EVP_PKEY_meth_free(EVP_PKEY_METHOD *pmeth) | 257 | EVP_PKEY_meth_free(EVP_PKEY_METHOD *pmeth) |
| @@ -255,18 +259,21 @@ EVP_PKEY_meth_free(EVP_PKEY_METHOD *pmeth) | |||
| 255 | if (pmeth && (pmeth->flags & EVP_PKEY_FLAG_DYNAMIC)) | 259 | if (pmeth && (pmeth->flags & EVP_PKEY_FLAG_DYNAMIC)) |
| 256 | free(pmeth); | 260 | free(pmeth); |
| 257 | } | 261 | } |
| 262 | LCRYPTO_ALIAS(EVP_PKEY_meth_free); | ||
| 258 | 263 | ||
| 259 | EVP_PKEY_CTX * | 264 | EVP_PKEY_CTX * |
| 260 | EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *engine) | 265 | EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *engine) |
| 261 | { | 266 | { |
| 262 | return evp_pkey_ctx_new(pkey, engine, -1); | 267 | return evp_pkey_ctx_new(pkey, engine, -1); |
| 263 | } | 268 | } |
| 269 | LCRYPTO_ALIAS(EVP_PKEY_CTX_new); | ||
| 264 | 270 | ||
| 265 | EVP_PKEY_CTX * | 271 | EVP_PKEY_CTX * |
| 266 | EVP_PKEY_CTX_new_id(int id, ENGINE *engine) | 272 | EVP_PKEY_CTX_new_id(int id, ENGINE *engine) |
| 267 | { | 273 | { |
| 268 | return evp_pkey_ctx_new(NULL, engine, id); | 274 | return evp_pkey_ctx_new(NULL, engine, id); |
| 269 | } | 275 | } |
| 276 | LCRYPTO_ALIAS(EVP_PKEY_CTX_new_id); | ||
| 270 | 277 | ||
| 271 | EVP_PKEY_CTX * | 278 | EVP_PKEY_CTX * |
| 272 | EVP_PKEY_CTX_dup(EVP_PKEY_CTX *pctx) | 279 | EVP_PKEY_CTX_dup(EVP_PKEY_CTX *pctx) |
| @@ -308,6 +315,7 @@ EVP_PKEY_CTX_dup(EVP_PKEY_CTX *pctx) | |||
| 308 | EVP_PKEY_CTX_free(rctx); | 315 | EVP_PKEY_CTX_free(rctx); |
| 309 | return NULL; | 316 | return NULL; |
| 310 | } | 317 | } |
| 318 | LCRYPTO_ALIAS(EVP_PKEY_CTX_dup); | ||
| 311 | 319 | ||
| 312 | int | 320 | int |
| 313 | EVP_PKEY_meth_add0(const EVP_PKEY_METHOD *pmeth) | 321 | EVP_PKEY_meth_add0(const EVP_PKEY_METHOD *pmeth) |
| @@ -323,6 +331,7 @@ EVP_PKEY_meth_add0(const EVP_PKEY_METHOD *pmeth) | |||
| 323 | 331 | ||
| 324 | return 1; | 332 | return 1; |
| 325 | } | 333 | } |
| 334 | LCRYPTO_ALIAS(EVP_PKEY_meth_add0); | ||
| 326 | 335 | ||
| 327 | void | 336 | void |
| 328 | EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx) | 337 | EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx) |
| @@ -338,6 +347,7 @@ EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx) | |||
| 338 | #endif | 347 | #endif |
| 339 | free(ctx); | 348 | free(ctx); |
| 340 | } | 349 | } |
| 350 | LCRYPTO_ALIAS(EVP_PKEY_CTX_free); | ||
| 341 | 351 | ||
| 342 | int | 352 | int |
| 343 | EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype, int cmd, | 353 | EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype, int cmd, |
| @@ -370,6 +380,7 @@ EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype, int cmd, | |||
| 370 | return ret; | 380 | return ret; |
| 371 | 381 | ||
| 372 | } | 382 | } |
| 383 | LCRYPTO_ALIAS(EVP_PKEY_CTX_ctrl); | ||
| 373 | 384 | ||
| 374 | int | 385 | int |
| 375 | EVP_PKEY_CTX_ctrl_str(EVP_PKEY_CTX *ctx, const char *name, const char *value) | 386 | EVP_PKEY_CTX_ctrl_str(EVP_PKEY_CTX *ctx, const char *name, const char *value) |
| @@ -384,6 +395,7 @@ EVP_PKEY_CTX_ctrl_str(EVP_PKEY_CTX *ctx, const char *name, const char *value) | |||
| 384 | } | 395 | } |
| 385 | return ctx->pmeth->ctrl_str(ctx, name, value); | 396 | return ctx->pmeth->ctrl_str(ctx, name, value); |
| 386 | } | 397 | } |
| 398 | LCRYPTO_ALIAS(EVP_PKEY_CTX_ctrl_str); | ||
| 387 | 399 | ||
| 388 | int | 400 | int |
| 389 | EVP_PKEY_CTX_str2ctrl(EVP_PKEY_CTX *ctx, int cmd, const char *str) | 401 | EVP_PKEY_CTX_str2ctrl(EVP_PKEY_CTX *ctx, int cmd, const char *str) |
| @@ -434,6 +446,7 @@ EVP_PKEY_CTX_get_operation(EVP_PKEY_CTX *ctx) | |||
| 434 | { | 446 | { |
| 435 | return ctx->operation; | 447 | return ctx->operation; |
| 436 | } | 448 | } |
| 449 | LCRYPTO_ALIAS(EVP_PKEY_CTX_get_operation); | ||
| 437 | 450 | ||
| 438 | void | 451 | void |
| 439 | EVP_PKEY_CTX_set0_keygen_info(EVP_PKEY_CTX *ctx, int *dat, int datlen) | 452 | EVP_PKEY_CTX_set0_keygen_info(EVP_PKEY_CTX *ctx, int *dat, int datlen) |
| @@ -441,42 +454,49 @@ EVP_PKEY_CTX_set0_keygen_info(EVP_PKEY_CTX *ctx, int *dat, int datlen) | |||
| 441 | ctx->keygen_info = dat; | 454 | ctx->keygen_info = dat; |
| 442 | ctx->keygen_info_count = datlen; | 455 | ctx->keygen_info_count = datlen; |
| 443 | } | 456 | } |
| 457 | LCRYPTO_ALIAS(EVP_PKEY_CTX_set0_keygen_info); | ||
| 444 | 458 | ||
| 445 | void | 459 | void |
| 446 | EVP_PKEY_CTX_set_data(EVP_PKEY_CTX *ctx, void *data) | 460 | EVP_PKEY_CTX_set_data(EVP_PKEY_CTX *ctx, void *data) |
| 447 | { | 461 | { |
| 448 | ctx->data = data; | 462 | ctx->data = data; |
| 449 | } | 463 | } |
| 464 | LCRYPTO_ALIAS(EVP_PKEY_CTX_set_data); | ||
| 450 | 465 | ||
| 451 | void * | 466 | void * |
| 452 | EVP_PKEY_CTX_get_data(EVP_PKEY_CTX *ctx) | 467 | EVP_PKEY_CTX_get_data(EVP_PKEY_CTX *ctx) |
| 453 | { | 468 | { |
| 454 | return ctx->data; | 469 | return ctx->data; |
| 455 | } | 470 | } |
| 471 | LCRYPTO_ALIAS(EVP_PKEY_CTX_get_data); | ||
| 456 | 472 | ||
| 457 | EVP_PKEY * | 473 | EVP_PKEY * |
| 458 | EVP_PKEY_CTX_get0_pkey(EVP_PKEY_CTX *ctx) | 474 | EVP_PKEY_CTX_get0_pkey(EVP_PKEY_CTX *ctx) |
| 459 | { | 475 | { |
| 460 | return ctx->pkey; | 476 | return ctx->pkey; |
| 461 | } | 477 | } |
| 478 | LCRYPTO_ALIAS(EVP_PKEY_CTX_get0_pkey); | ||
| 462 | 479 | ||
| 463 | EVP_PKEY * | 480 | EVP_PKEY * |
| 464 | EVP_PKEY_CTX_get0_peerkey(EVP_PKEY_CTX *ctx) | 481 | EVP_PKEY_CTX_get0_peerkey(EVP_PKEY_CTX *ctx) |
| 465 | { | 482 | { |
| 466 | return ctx->peerkey; | 483 | return ctx->peerkey; |
| 467 | } | 484 | } |
| 485 | LCRYPTO_ALIAS(EVP_PKEY_CTX_get0_peerkey); | ||
| 468 | 486 | ||
| 469 | void | 487 | void |
| 470 | EVP_PKEY_CTX_set_app_data(EVP_PKEY_CTX *ctx, void *data) | 488 | EVP_PKEY_CTX_set_app_data(EVP_PKEY_CTX *ctx, void *data) |
| 471 | { | 489 | { |
| 472 | ctx->app_data = data; | 490 | ctx->app_data = data; |
| 473 | } | 491 | } |
| 492 | LCRYPTO_ALIAS(EVP_PKEY_CTX_set_app_data); | ||
| 474 | 493 | ||
| 475 | void * | 494 | void * |
| 476 | EVP_PKEY_CTX_get_app_data(EVP_PKEY_CTX *ctx) | 495 | EVP_PKEY_CTX_get_app_data(EVP_PKEY_CTX *ctx) |
| 477 | { | 496 | { |
| 478 | return ctx->app_data; | 497 | return ctx->app_data; |
| 479 | } | 498 | } |
| 499 | LCRYPTO_ALIAS(EVP_PKEY_CTX_get_app_data); | ||
| 480 | 500 | ||
| 481 | void | 501 | void |
| 482 | EVP_PKEY_meth_set_init(EVP_PKEY_METHOD *pmeth, | 502 | EVP_PKEY_meth_set_init(EVP_PKEY_METHOD *pmeth, |
| @@ -484,6 +504,7 @@ EVP_PKEY_meth_set_init(EVP_PKEY_METHOD *pmeth, | |||
| 484 | { | 504 | { |
| 485 | pmeth->init = init; | 505 | pmeth->init = init; |
| 486 | } | 506 | } |
| 507 | LCRYPTO_ALIAS(EVP_PKEY_meth_set_init); | ||
| 487 | 508 | ||
| 488 | void | 509 | void |
| 489 | EVP_PKEY_meth_set_copy(EVP_PKEY_METHOD *pmeth, | 510 | EVP_PKEY_meth_set_copy(EVP_PKEY_METHOD *pmeth, |
| @@ -491,6 +512,7 @@ EVP_PKEY_meth_set_copy(EVP_PKEY_METHOD *pmeth, | |||
| 491 | { | 512 | { |
| 492 | pmeth->copy = copy; | 513 | pmeth->copy = copy; |
| 493 | } | 514 | } |
| 515 | LCRYPTO_ALIAS(EVP_PKEY_meth_set_copy); | ||
| 494 | 516 | ||
| 495 | void | 517 | void |
| 496 | EVP_PKEY_meth_set_cleanup(EVP_PKEY_METHOD *pmeth, | 518 | EVP_PKEY_meth_set_cleanup(EVP_PKEY_METHOD *pmeth, |
| @@ -498,6 +520,7 @@ EVP_PKEY_meth_set_cleanup(EVP_PKEY_METHOD *pmeth, | |||
| 498 | { | 520 | { |
| 499 | pmeth->cleanup = cleanup; | 521 | pmeth->cleanup = cleanup; |
| 500 | } | 522 | } |
| 523 | LCRYPTO_ALIAS(EVP_PKEY_meth_set_cleanup); | ||
| 501 | 524 | ||
| 502 | void | 525 | void |
| 503 | EVP_PKEY_meth_set_paramgen(EVP_PKEY_METHOD *pmeth, | 526 | EVP_PKEY_meth_set_paramgen(EVP_PKEY_METHOD *pmeth, |
| @@ -507,6 +530,7 @@ EVP_PKEY_meth_set_paramgen(EVP_PKEY_METHOD *pmeth, | |||
| 507 | pmeth->paramgen_init = paramgen_init; | 530 | pmeth->paramgen_init = paramgen_init; |
| 508 | pmeth->paramgen = paramgen; | 531 | pmeth->paramgen = paramgen; |
| 509 | } | 532 | } |
| 533 | LCRYPTO_ALIAS(EVP_PKEY_meth_set_paramgen); | ||
| 510 | 534 | ||
| 511 | void | 535 | void |
| 512 | EVP_PKEY_meth_set_keygen(EVP_PKEY_METHOD *pmeth, | 536 | EVP_PKEY_meth_set_keygen(EVP_PKEY_METHOD *pmeth, |
| @@ -516,6 +540,7 @@ EVP_PKEY_meth_set_keygen(EVP_PKEY_METHOD *pmeth, | |||
| 516 | pmeth->keygen_init = keygen_init; | 540 | pmeth->keygen_init = keygen_init; |
| 517 | pmeth->keygen = keygen; | 541 | pmeth->keygen = keygen; |
| 518 | } | 542 | } |
| 543 | LCRYPTO_ALIAS(EVP_PKEY_meth_set_keygen); | ||
| 519 | 544 | ||
| 520 | void | 545 | void |
| 521 | EVP_PKEY_meth_set_sign(EVP_PKEY_METHOD *pmeth, | 546 | EVP_PKEY_meth_set_sign(EVP_PKEY_METHOD *pmeth, |
| @@ -526,6 +551,7 @@ EVP_PKEY_meth_set_sign(EVP_PKEY_METHOD *pmeth, | |||
| 526 | pmeth->sign_init = sign_init; | 551 | pmeth->sign_init = sign_init; |
| 527 | pmeth->sign = sign; | 552 | pmeth->sign = sign; |
| 528 | } | 553 | } |
| 554 | LCRYPTO_ALIAS(EVP_PKEY_meth_set_sign); | ||
| 529 | 555 | ||
| 530 | void | 556 | void |
| 531 | EVP_PKEY_meth_set_verify(EVP_PKEY_METHOD *pmeth, | 557 | EVP_PKEY_meth_set_verify(EVP_PKEY_METHOD *pmeth, |
| @@ -536,6 +562,7 @@ EVP_PKEY_meth_set_verify(EVP_PKEY_METHOD *pmeth, | |||
| 536 | pmeth->verify_init = verify_init; | 562 | pmeth->verify_init = verify_init; |
| 537 | pmeth->verify = verify; | 563 | pmeth->verify = verify; |
| 538 | } | 564 | } |
| 565 | LCRYPTO_ALIAS(EVP_PKEY_meth_set_verify); | ||
| 539 | 566 | ||
| 540 | void | 567 | void |
| 541 | EVP_PKEY_meth_set_verify_recover(EVP_PKEY_METHOD *pmeth, | 568 | EVP_PKEY_meth_set_verify_recover(EVP_PKEY_METHOD *pmeth, |
| @@ -547,6 +574,7 @@ EVP_PKEY_meth_set_verify_recover(EVP_PKEY_METHOD *pmeth, | |||
| 547 | pmeth->verify_recover_init = verify_recover_init; | 574 | pmeth->verify_recover_init = verify_recover_init; |
| 548 | pmeth->verify_recover = verify_recover; | 575 | pmeth->verify_recover = verify_recover; |
| 549 | } | 576 | } |
| 577 | LCRYPTO_ALIAS(EVP_PKEY_meth_set_verify_recover); | ||
| 550 | 578 | ||
| 551 | void | 579 | void |
| 552 | EVP_PKEY_meth_set_signctx(EVP_PKEY_METHOD *pmeth, | 580 | EVP_PKEY_meth_set_signctx(EVP_PKEY_METHOD *pmeth, |
| @@ -557,6 +585,7 @@ EVP_PKEY_meth_set_signctx(EVP_PKEY_METHOD *pmeth, | |||
| 557 | pmeth->signctx_init = signctx_init; | 585 | pmeth->signctx_init = signctx_init; |
| 558 | pmeth->signctx = signctx; | 586 | pmeth->signctx = signctx; |
| 559 | } | 587 | } |
| 588 | LCRYPTO_ALIAS(EVP_PKEY_meth_set_signctx); | ||
| 560 | 589 | ||
| 561 | void | 590 | void |
| 562 | EVP_PKEY_meth_set_verifyctx(EVP_PKEY_METHOD *pmeth, | 591 | EVP_PKEY_meth_set_verifyctx(EVP_PKEY_METHOD *pmeth, |
| @@ -567,6 +596,7 @@ EVP_PKEY_meth_set_verifyctx(EVP_PKEY_METHOD *pmeth, | |||
| 567 | pmeth->verifyctx_init = verifyctx_init; | 596 | pmeth->verifyctx_init = verifyctx_init; |
| 568 | pmeth->verifyctx = verifyctx; | 597 | pmeth->verifyctx = verifyctx; |
| 569 | } | 598 | } |
| 599 | LCRYPTO_ALIAS(EVP_PKEY_meth_set_verifyctx); | ||
| 570 | 600 | ||
| 571 | void | 601 | void |
| 572 | EVP_PKEY_meth_set_encrypt(EVP_PKEY_METHOD *pmeth, | 602 | EVP_PKEY_meth_set_encrypt(EVP_PKEY_METHOD *pmeth, |
| @@ -577,6 +607,7 @@ EVP_PKEY_meth_set_encrypt(EVP_PKEY_METHOD *pmeth, | |||
| 577 | pmeth->encrypt_init = encrypt_init; | 607 | pmeth->encrypt_init = encrypt_init; |
| 578 | pmeth->encrypt = encryptfn; | 608 | pmeth->encrypt = encryptfn; |
| 579 | } | 609 | } |
| 610 | LCRYPTO_ALIAS(EVP_PKEY_meth_set_encrypt); | ||
| 580 | 611 | ||
| 581 | void | 612 | void |
| 582 | EVP_PKEY_meth_set_decrypt(EVP_PKEY_METHOD *pmeth, | 613 | EVP_PKEY_meth_set_decrypt(EVP_PKEY_METHOD *pmeth, |
| @@ -587,6 +618,7 @@ EVP_PKEY_meth_set_decrypt(EVP_PKEY_METHOD *pmeth, | |||
| 587 | pmeth->decrypt_init = decrypt_init; | 618 | pmeth->decrypt_init = decrypt_init; |
| 588 | pmeth->decrypt = decrypt; | 619 | pmeth->decrypt = decrypt; |
| 589 | } | 620 | } |
| 621 | LCRYPTO_ALIAS(EVP_PKEY_meth_set_decrypt); | ||
| 590 | 622 | ||
| 591 | void | 623 | void |
| 592 | EVP_PKEY_meth_set_derive(EVP_PKEY_METHOD *pmeth, | 624 | EVP_PKEY_meth_set_derive(EVP_PKEY_METHOD *pmeth, |
| @@ -596,6 +628,7 @@ EVP_PKEY_meth_set_derive(EVP_PKEY_METHOD *pmeth, | |||
| 596 | pmeth->derive_init = derive_init; | 628 | pmeth->derive_init = derive_init; |
| 597 | pmeth->derive = derive; | 629 | pmeth->derive = derive; |
| 598 | } | 630 | } |
| 631 | LCRYPTO_ALIAS(EVP_PKEY_meth_set_derive); | ||
| 599 | 632 | ||
| 600 | void | 633 | void |
| 601 | EVP_PKEY_meth_set_ctrl(EVP_PKEY_METHOD *pmeth, | 634 | EVP_PKEY_meth_set_ctrl(EVP_PKEY_METHOD *pmeth, |
| @@ -605,12 +638,14 @@ EVP_PKEY_meth_set_ctrl(EVP_PKEY_METHOD *pmeth, | |||
| 605 | pmeth->ctrl = ctrl; | 638 | pmeth->ctrl = ctrl; |
| 606 | pmeth->ctrl_str = ctrl_str; | 639 | pmeth->ctrl_str = ctrl_str; |
| 607 | } | 640 | } |
| 641 | LCRYPTO_ALIAS(EVP_PKEY_meth_set_ctrl); | ||
| 608 | 642 | ||
| 609 | void | 643 | void |
| 610 | EVP_PKEY_meth_set_check(EVP_PKEY_METHOD *pmeth, int (*check)(EVP_PKEY *pkey)) | 644 | EVP_PKEY_meth_set_check(EVP_PKEY_METHOD *pmeth, int (*check)(EVP_PKEY *pkey)) |
| 611 | { | 645 | { |
| 612 | pmeth->check = check; | 646 | pmeth->check = check; |
| 613 | } | 647 | } |
| 648 | LCRYPTO_ALIAS(EVP_PKEY_meth_set_check); | ||
| 614 | 649 | ||
| 615 | void | 650 | void |
| 616 | EVP_PKEY_meth_set_public_check(EVP_PKEY_METHOD *pmeth, | 651 | EVP_PKEY_meth_set_public_check(EVP_PKEY_METHOD *pmeth, |
| @@ -618,6 +653,7 @@ EVP_PKEY_meth_set_public_check(EVP_PKEY_METHOD *pmeth, | |||
| 618 | { | 653 | { |
| 619 | pmeth->public_check = public_check; | 654 | pmeth->public_check = public_check; |
| 620 | } | 655 | } |
| 656 | LCRYPTO_ALIAS(EVP_PKEY_meth_set_public_check); | ||
| 621 | 657 | ||
| 622 | void | 658 | void |
| 623 | EVP_PKEY_meth_set_param_check(EVP_PKEY_METHOD *pmeth, | 659 | EVP_PKEY_meth_set_param_check(EVP_PKEY_METHOD *pmeth, |
| @@ -625,3 +661,4 @@ EVP_PKEY_meth_set_param_check(EVP_PKEY_METHOD *pmeth, | |||
| 625 | { | 661 | { |
| 626 | pmeth->param_check = param_check; | 662 | pmeth->param_check = param_check; |
| 627 | } | 663 | } |
| 664 | LCRYPTO_ALIAS(EVP_PKEY_meth_set_param_check); | ||
