diff options
author | beck <> | 2024-04-10 15:00:38 +0000 |
---|---|---|
committer | beck <> | 2024-04-10 15:00:38 +0000 |
commit | 8b041422435150e802f8d2bda683ae248b607c20 (patch) | |
tree | 0c45d2cbdada96b065c8962e4b4ab01b5a7f05bc /src | |
parent | 7a88601975769471c321595f58d58baf8601e37f (diff) | |
download | openbsd-8b041422435150e802f8d2bda683ae248b607c20.tar.gz openbsd-8b041422435150e802f8d2bda683ae248b607c20.tar.bz2 openbsd-8b041422435150e802f8d2bda683ae248b607c20.zip |
Hide deprecated functions in evp.h
use LCRYPTO_UNUSED and remove the LIBRESSL_INTERNAL guard around them.
ok tb@
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/Symbols.namespace | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/evp/evp.h | 12 | ||||
-rw-r--r-- | src/lib/libcrypto/evp/evp_cipher.c | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/evp/evp_digest.c | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/hidden/openssl/evp.h | 7 |
5 files changed, 19 insertions, 14 deletions
diff --git a/src/lib/libcrypto/Symbols.namespace b/src/lib/libcrypto/Symbols.namespace index efc38f9273..381b797ec2 100644 --- a/src/lib/libcrypto/Symbols.namespace +++ b/src/lib/libcrypto/Symbols.namespace | |||
@@ -3203,3 +3203,8 @@ _libre_BN_gcd | |||
3203 | _libre_BN_mod_inverse | 3203 | _libre_BN_mod_inverse |
3204 | _libre_HMAC_Init | 3204 | _libre_HMAC_Init |
3205 | _libre_HMAC_CTX_reset | 3205 | _libre_HMAC_CTX_reset |
3206 | _libre_EVP_MD_CTX_init | ||
3207 | _libre_EVP_EncryptFinal | ||
3208 | _libre_EVP_DecryptFinal | ||
3209 | _libre_EVP_CipherFinal | ||
3210 | _libre_EVP_CIPHER_CTX_init | ||
diff --git a/src/lib/libcrypto/evp/evp.h b/src/lib/libcrypto/evp/evp.h index f6123963e9..26695dc3d7 100644 --- a/src/lib/libcrypto/evp/evp.h +++ b/src/lib/libcrypto/evp/evp.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: evp.h,v 1.132 2024/03/02 10:21:12 tb Exp $ */ | 1 | /* $OpenBSD: evp.h,v 1.133 2024/04/10 15:00:38 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 | * |
@@ -442,9 +442,7 @@ int EVP_Cipher(EVP_CIPHER_CTX *c, unsigned char *out, const unsigned char *in, | |||
442 | 442 | ||
443 | EVP_MD_CTX *EVP_MD_CTX_new(void); | 443 | EVP_MD_CTX *EVP_MD_CTX_new(void); |
444 | void EVP_MD_CTX_free(EVP_MD_CTX *ctx); | 444 | void EVP_MD_CTX_free(EVP_MD_CTX *ctx); |
445 | #ifndef LIBRESSL_INTERNAL | ||
446 | int EVP_MD_CTX_init(EVP_MD_CTX *ctx); | 445 | int EVP_MD_CTX_init(EVP_MD_CTX *ctx); |
447 | #endif | ||
448 | int EVP_MD_CTX_reset(EVP_MD_CTX *ctx); | 446 | int EVP_MD_CTX_reset(EVP_MD_CTX *ctx); |
449 | EVP_MD_CTX *EVP_MD_CTX_create(void); | 447 | EVP_MD_CTX *EVP_MD_CTX_create(void); |
450 | void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx); | 448 | void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx); |
@@ -486,9 +484,7 @@ int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, | |||
486 | int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, | 484 | int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, |
487 | const unsigned char *in, int inl); | 485 | const unsigned char *in, int inl); |
488 | int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); | 486 | int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); |
489 | #ifndef LIBRESSL_INTERNAL | ||
490 | int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); | 487 | int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); |
491 | #endif | ||
492 | 488 | ||
493 | int EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, | 489 | int EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, |
494 | const unsigned char *key, const unsigned char *iv); | 490 | const unsigned char *key, const unsigned char *iv); |
@@ -497,9 +493,7 @@ int EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, | |||
497 | int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, | 493 | int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, |
498 | const unsigned char *in, int inl); | 494 | const unsigned char *in, int inl); |
499 | int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); | 495 | int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); |
500 | #ifndef LIBRESSL_INTERNAL | ||
501 | int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); | 496 | int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); |
502 | #endif | ||
503 | 497 | ||
504 | int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, | 498 | int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, |
505 | const unsigned char *key, const unsigned char *iv, int enc); | 499 | const unsigned char *key, const unsigned char *iv, int enc); |
@@ -508,9 +502,7 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, | |||
508 | int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, | 502 | int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, |
509 | const unsigned char *in, int inl); | 503 | const unsigned char *in, int inl); |
510 | int EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); | 504 | int EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); |
511 | #ifndef LIBRESSL_INTERNAL | ||
512 | int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); | 505 | int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); |
513 | #endif | ||
514 | 506 | ||
515 | int EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s, | 507 | int EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s, |
516 | EVP_PKEY *pkey); | 508 | EVP_PKEY *pkey); |
@@ -556,9 +548,7 @@ int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, | |||
556 | int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl); | 548 | int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl); |
557 | int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n); | 549 | int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n); |
558 | 550 | ||
559 | #ifndef LIBRESSL_INTERNAL | ||
560 | int EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *a); | 551 | int EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *a); |
561 | #endif | ||
562 | int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a); | 552 | int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a); |
563 | EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void); | 553 | EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void); |
564 | void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *a); | 554 | void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *a); |
diff --git a/src/lib/libcrypto/evp/evp_cipher.c b/src/lib/libcrypto/evp/evp_cipher.c index c4b5034c25..e9c266d1b9 100644 --- a/src/lib/libcrypto/evp/evp_cipher.c +++ b/src/lib/libcrypto/evp/evp_cipher.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: evp_cipher.c,v 1.22 2024/04/09 13:52:41 beck Exp $ */ | 1 | /* $OpenBSD: evp_cipher.c,v 1.23 2024/04/10 15:00:38 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 | * |
@@ -264,6 +264,7 @@ EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len) | |||
264 | 264 | ||
265 | return EVP_DecryptFinal_ex(ctx, out, out_len); | 265 | return EVP_DecryptFinal_ex(ctx, out, out_len); |
266 | } | 266 | } |
267 | LCRYPTO_ALIAS(EVP_CipherFinal); | ||
267 | 268 | ||
268 | int | 269 | int |
269 | EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len) | 270 | EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len) |
@@ -427,6 +428,7 @@ EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len) | |||
427 | { | 428 | { |
428 | return EVP_EncryptFinal_ex(ctx, out, out_len); | 429 | return EVP_EncryptFinal_ex(ctx, out, out_len); |
429 | } | 430 | } |
431 | LCRYPTO_ALIAS(EVP_EncryptFinal); | ||
430 | 432 | ||
431 | int | 433 | int |
432 | EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len) | 434 | EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len) |
@@ -554,6 +556,7 @@ EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len) | |||
554 | { | 556 | { |
555 | return EVP_DecryptFinal_ex(ctx, out, out_len); | 557 | return EVP_DecryptFinal_ex(ctx, out, out_len); |
556 | } | 558 | } |
559 | LCRYPTO_ALIAS(EVP_DecryptFinal); | ||
557 | 560 | ||
558 | int | 561 | int |
559 | EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len) | 562 | EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len) |
@@ -638,6 +641,7 @@ EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *ctx) | |||
638 | { | 641 | { |
639 | return EVP_CIPHER_CTX_cleanup(ctx); | 642 | return EVP_CIPHER_CTX_cleanup(ctx); |
640 | } | 643 | } |
644 | LCRYPTO_ALIAS(EVP_CIPHER_CTX_init); | ||
641 | 645 | ||
642 | int | 646 | int |
643 | EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *ctx) | 647 | EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *ctx) |
diff --git a/src/lib/libcrypto/evp/evp_digest.c b/src/lib/libcrypto/evp/evp_digest.c index 3eb6c258bf..0a97d25c7d 100644 --- a/src/lib/libcrypto/evp/evp_digest.c +++ b/src/lib/libcrypto/evp/evp_digest.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: evp_digest.c,v 1.13 2024/04/09 13:52:41 beck Exp $ */ | 1 | /* $OpenBSD: evp_digest.c,v 1.14 2024/04/10 15:00:38 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 | * |
@@ -267,6 +267,7 @@ EVP_MD_CTX_init(EVP_MD_CTX *ctx) | |||
267 | { | 267 | { |
268 | return EVP_MD_CTX_cleanup(ctx); | 268 | return EVP_MD_CTX_cleanup(ctx); |
269 | } | 269 | } |
270 | LCRYPTO_ALIAS(EVP_MD_CTX_init); | ||
270 | 271 | ||
271 | int | 272 | int |
272 | EVP_MD_CTX_reset(EVP_MD_CTX *ctx) | 273 | EVP_MD_CTX_reset(EVP_MD_CTX *ctx) |
diff --git a/src/lib/libcrypto/hidden/openssl/evp.h b/src/lib/libcrypto/hidden/openssl/evp.h index f5f0cc6dd6..7721a2f412 100644 --- a/src/lib/libcrypto/hidden/openssl/evp.h +++ b/src/lib/libcrypto/hidden/openssl/evp.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: evp.h,v 1.3 2024/04/09 13:52:42 beck Exp $ */ | 1 | /* $OpenBSD: evp.h,v 1.4 2024/04/10 15:00:38 beck Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2024 Bob Beck <beck@openbsd.org> | 3 | * Copyright (c) 2024 Bob Beck <beck@openbsd.org> |
4 | * | 4 | * |
@@ -374,5 +374,10 @@ LCRYPTO_USED(EVP_AEAD_CTX_cleanup); | |||
374 | LCRYPTO_USED(EVP_AEAD_CTX_seal); | 374 | LCRYPTO_USED(EVP_AEAD_CTX_seal); |
375 | LCRYPTO_USED(EVP_AEAD_CTX_open); | 375 | LCRYPTO_USED(EVP_AEAD_CTX_open); |
376 | LCRYPTO_USED(ERR_load_EVP_strings); | 376 | LCRYPTO_USED(ERR_load_EVP_strings); |
377 | LCRYPTO_UNUSED(EVP_MD_CTX_init); | ||
378 | LCRYPTO_UNUSED(EVP_EncryptFinal); | ||
379 | LCRYPTO_UNUSED(EVP_DecryptFinal); | ||
380 | LCRYPTO_UNUSED(EVP_CipherFinal); | ||
381 | LCRYPTO_UNUSED(EVP_CIPHER_CTX_init); | ||
377 | 382 | ||
378 | #endif /* _LIBCRYPTO_EVP_H */ | 383 | #endif /* _LIBCRYPTO_EVP_H */ |