mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-24 18:58:08 -07:00
This also fixes the build with libressl-3.5.x from the gentoo overlay. Signed-off-by: orbea <orbea@riseup.net> Closes: https://github.com/gentoo/gentoo/pull/26240 Signed-off-by: Sam James <sam@gentoo.org>
32 lines
652 B
Diff
32 lines
652 B
Diff
--- a/lib/ftxlate.c
|
|
+++ b/lib/ftxlate.c
|
|
@@ -2040,11 +2048,13 @@
|
|
|
|
|
|
/* init crypto */
|
|
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
|
if (!(cp->cipher_ctx = (EVP_CIPHER_CTX*) malloc(sizeof(EVP_CIPHER_CTX)))) {
|
|
return -1;
|
|
}
|
|
|
|
EVP_CIPHER_CTX_init(cp->cipher_ctx);
|
|
+#endif
|
|
|
|
/* disable padding */
|
|
if (!(EVP_CIPHER_CTX_set_padding(cp->cipher_ctx, 0))) {
|
|
@@ -2083,10 +2093,14 @@
|
|
{
|
|
|
|
#ifdef HAVE_OPENSSL
|
|
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
|
EVP_CIPHER_CTX_cleanup(cp->cipher_ctx);
|
|
|
|
if (cp->cipher_ctx)
|
|
free (cp->cipher_ctx);
|
|
+#else
|
|
+ EVP_CIPHER_CTX_free(cp->cipher_ctx);
|
|
+#endif
|
|
#endif /* HAVE_OPENSSL */
|
|
|
|
return 0;
|