diff options
author | Eray Aslan <eras@gentoo.org> | 2022-12-26 10:32:10 +0100 |
---|---|---|
committer | Eray Aslan <eras@gentoo.org> | 2022-12-26 10:32:10 +0100 |
commit | a4b8ad829b18e44c3ed18882804b56c9b38e58f1 (patch) | |
tree | be169151516ebc93257e9e5fe5c9df0cb7d9426d /net-mail/dovecot/files | |
parent | app-admin/coreboot-utils-4.18-r1: catch one more -Werror occurence (diff) | |
download | gentoo-a4b8ad829b18e44c3ed18882804b56c9b38e58f1.tar.gz gentoo-a4b8ad829b18e44c3ed18882804b56c9b38e58f1.tar.bz2 gentoo-a4b8ad829b18e44c3ed18882804b56c9b38e58f1.zip |
net-mail/dovecot: add openssl-3 support
Bug: https://bugs.gentoo.org/888083
Signed-off-by: Eray Aslan <eras@gentoo.org>
Diffstat (limited to 'net-mail/dovecot/files')
-rw-r--r-- | net-mail/dovecot/files/dovecot-openssl-3.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/net-mail/dovecot/files/dovecot-openssl-3.patch b/net-mail/dovecot/files/dovecot-openssl-3.patch new file mode 100644 index 000000000000..8f39a7ddfe21 --- /dev/null +++ b/net-mail/dovecot/files/dovecot-openssl-3.patch @@ -0,0 +1,45 @@ +From: =?utf-8?q?Christian_G=C3=B6ttsche?= <cgzones@googlemail.com> +Date: Wed, 11 May 2022 20:27:53 +0200 +Author: Michal Hlavinka +Origin: https://bugzilla.redhat.com/show_bug.cgi?id=1962035 +Subject: Support openssl 3.0 + +--- + src/lib-dcrypt/dcrypt-openssl.c | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +diff --git a/src/lib-dcrypt/dcrypt-openssl.c b/src/lib-dcrypt/dcrypt-openssl.c +index 1cbe352..5570d62 100644 +--- a/src/lib-dcrypt/dcrypt-openssl.c ++++ b/src/lib-dcrypt/dcrypt-openssl.c +@@ -73,10 +73,30 @@ + 2<tab>key algo oid<tab>1<tab>symmetric algo name<tab>salt<tab>hash algo<tab>rounds<tab>E(RSA = i2d_PrivateKey, EC=Private Point)<tab>key id + **/ + ++#if OPENSSL_VERSION_MAJOR == 3 ++static EC_KEY *EVP_PKEY_get0_EC_KEYv3(EVP_PKEY *key) ++{ ++ EC_KEY *eck = EVP_PKEY_get1_EC_KEY(key); ++ EVP_PKEY_set1_EC_KEY(key, eck); ++ EC_KEY_free(eck); ++ return eck; ++} ++ ++static EC_KEY *EVP_PKEY_get1_EC_KEYv3(EVP_PKEY *key) ++{ ++ EC_KEY *eck = EVP_PKEY_get1_EC_KEY(key); ++ EVP_PKEY_set1_EC_KEY(key, eck); ++ return eck; ++} ++ ++#define EVP_PKEY_get0_EC_KEY EVP_PKEY_get0_EC_KEYv3 ++#define EVP_PKEY_get1_EC_KEY EVP_PKEY_get1_EC_KEYv3 ++#else + #ifndef HAVE_EVP_PKEY_get0 + #define EVP_PKEY_get0_EC_KEY(x) x->pkey.ec + #define EVP_PKEY_get0_RSA(x) x->pkey.rsa + #endif ++#endif + + #ifndef HAVE_OBJ_LENGTH + #define OBJ_length(o) ((o)->length) |