summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2024-04-10 15:00:39 +0000
committerBob Beck <beck@cvs.openbsd.org>2024-04-10 15:00:39 +0000
commit9e8f90bc86d535ccfde3e8cca4cbfa92ce2b68b5 (patch)
tree718d0e54f0b7619e08583bd162581120d5d4897a
parent1fd35999fe0191dd31e44a4b74f3d5d8447484bf (diff)
Hide deprecated functions in evp.h
use LCRYPTO_UNUSED and remove the LIBRESSL_INTERNAL guard around them. ok tb@
-rw-r--r--lib/libcrypto/Symbols.namespace5
-rw-r--r--lib/libcrypto/evp/evp.h12
-rw-r--r--lib/libcrypto/evp/evp_cipher.c6
-rw-r--r--lib/libcrypto/evp/evp_digest.c3
-rw-r--r--lib/libcrypto/hidden/openssl/evp.h7
5 files changed, 19 insertions, 14 deletions
diff --git a/lib/libcrypto/Symbols.namespace b/lib/libcrypto/Symbols.namespace
index efc38f92730..381b797ec22 100644
--- a/lib/libcrypto/Symbols.namespace
+++ b/lib/libcrypto/Symbols.namespace
@@ -3203,3 +3203,8 @@ _libre_BN_gcd
_libre_BN_mod_inverse
_libre_HMAC_Init
_libre_HMAC_CTX_reset
+_libre_EVP_MD_CTX_init
+_libre_EVP_EncryptFinal
+_libre_EVP_DecryptFinal
+_libre_EVP_CipherFinal
+_libre_EVP_CIPHER_CTX_init
diff --git a/lib/libcrypto/evp/evp.h b/lib/libcrypto/evp/evp.h
index f6123963e93..26695dc3d76 100644
--- a/lib/libcrypto/evp/evp.h
+++ b/lib/libcrypto/evp/evp.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: evp.h,v 1.132 2024/03/02 10:21:12 tb Exp $ */
+/* $OpenBSD: evp.h,v 1.133 2024/04/10 15:00:38 beck Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -442,9 +442,7 @@ int EVP_Cipher(EVP_CIPHER_CTX *c, unsigned char *out, const unsigned char *in,
EVP_MD_CTX *EVP_MD_CTX_new(void);
void EVP_MD_CTX_free(EVP_MD_CTX *ctx);
-#ifndef LIBRESSL_INTERNAL
int EVP_MD_CTX_init(EVP_MD_CTX *ctx);
-#endif
int EVP_MD_CTX_reset(EVP_MD_CTX *ctx);
EVP_MD_CTX *EVP_MD_CTX_create(void);
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,
int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
const unsigned char *in, int inl);
int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
-#ifndef LIBRESSL_INTERNAL
int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
-#endif
int EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
const unsigned char *key, const unsigned char *iv);
@@ -497,9 +493,7 @@ int EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
const unsigned char *in, int inl);
int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
-#ifndef LIBRESSL_INTERNAL
int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
-#endif
int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
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,
int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
const unsigned char *in, int inl);
int EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
-#ifndef LIBRESSL_INTERNAL
int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
-#endif
int EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s,
EVP_PKEY *pkey);
@@ -556,9 +548,7 @@ int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl);
int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n);
-#ifndef LIBRESSL_INTERNAL
int EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *a);
-#endif
int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a);
EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void);
void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *a);
diff --git a/lib/libcrypto/evp/evp_cipher.c b/lib/libcrypto/evp/evp_cipher.c
index c4b5034c259..e9c266d1b96 100644
--- a/lib/libcrypto/evp/evp_cipher.c
+++ b/lib/libcrypto/evp/evp_cipher.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: evp_cipher.c,v 1.22 2024/04/09 13:52:41 beck Exp $ */
+/* $OpenBSD: evp_cipher.c,v 1.23 2024/04/10 15:00:38 beck Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -264,6 +264,7 @@ EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len)
return EVP_DecryptFinal_ex(ctx, out, out_len);
}
+LCRYPTO_ALIAS(EVP_CipherFinal);
int
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)
{
return EVP_EncryptFinal_ex(ctx, out, out_len);
}
+LCRYPTO_ALIAS(EVP_EncryptFinal);
int
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)
{
return EVP_DecryptFinal_ex(ctx, out, out_len);
}
+LCRYPTO_ALIAS(EVP_DecryptFinal);
int
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)
{
return EVP_CIPHER_CTX_cleanup(ctx);
}
+LCRYPTO_ALIAS(EVP_CIPHER_CTX_init);
int
EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *ctx)
diff --git a/lib/libcrypto/evp/evp_digest.c b/lib/libcrypto/evp/evp_digest.c
index 3eb6c258bff..0a97d25c7d2 100644
--- a/lib/libcrypto/evp/evp_digest.c
+++ b/lib/libcrypto/evp/evp_digest.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: evp_digest.c,v 1.13 2024/04/09 13:52:41 beck Exp $ */
+/* $OpenBSD: evp_digest.c,v 1.14 2024/04/10 15:00:38 beck Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -267,6 +267,7 @@ EVP_MD_CTX_init(EVP_MD_CTX *ctx)
{
return EVP_MD_CTX_cleanup(ctx);
}
+LCRYPTO_ALIAS(EVP_MD_CTX_init);
int
EVP_MD_CTX_reset(EVP_MD_CTX *ctx)
diff --git a/lib/libcrypto/hidden/openssl/evp.h b/lib/libcrypto/hidden/openssl/evp.h
index f5f0cc6dd63..7721a2f412d 100644
--- a/lib/libcrypto/hidden/openssl/evp.h
+++ b/lib/libcrypto/hidden/openssl/evp.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: evp.h,v 1.3 2024/04/09 13:52:42 beck Exp $ */
+/* $OpenBSD: evp.h,v 1.4 2024/04/10 15:00:38 beck Exp $ */
/*
* Copyright (c) 2024 Bob Beck <beck@openbsd.org>
*
@@ -374,5 +374,10 @@ LCRYPTO_USED(EVP_AEAD_CTX_cleanup);
LCRYPTO_USED(EVP_AEAD_CTX_seal);
LCRYPTO_USED(EVP_AEAD_CTX_open);
LCRYPTO_USED(ERR_load_EVP_strings);
+LCRYPTO_UNUSED(EVP_MD_CTX_init);
+LCRYPTO_UNUSED(EVP_EncryptFinal);
+LCRYPTO_UNUSED(EVP_DecryptFinal);
+LCRYPTO_UNUSED(EVP_CipherFinal);
+LCRYPTO_UNUSED(EVP_CIPHER_CTX_init);
#endif /* _LIBCRYPTO_EVP_H */