]> git.pld-linux.org Git - packages/dovecot.git/commitdiff
- add openssl 3.0.0 support, rel 2 auto/th/dovecot-2.3.16-2
authorJan Rękorajski <baggins@pld-linux.org>
Sat, 2 Oct 2021 20:28:55 +0000 (22:28 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Sat, 2 Oct 2021 20:28:55 +0000 (22:28 +0200)
dovecot.spec
openssl3.patch [new file with mode: 0644]

index 7db7110d34c9840578618cf222bec85249bf80f4..86e0ed6491edfd4fef521473ac31941d5474ce1a 100644 (file)
@@ -13,7 +13,7 @@ Summary:      IMAP and POP3 server written with security primarily in mind
 Summary(pl.UTF-8):     Serwer IMAP i POP3 pisany głównie z myślą o bezpieczeństwie
 Name:          dovecot
 Version:       2.3.16
-Release:       1
+Release:       2
 Epoch:         1
 License:       MIT (libraries), LGPL v2.1 (the rest)
 Group:         Networking/Daemons
@@ -27,6 +27,7 @@ Patch0:               %{name}-config.patch
 Patch1:                %{name}-rpath.patch
 Patch2:                %{name}-shebang.patch
 Patch3:                fts.patch
+Patch4:                openssl3.patch
 URL:           http://dovecot.org/
 BuildRequires: autoconf
 BuildRequires: automake
@@ -168,6 +169,7 @@ Pakiet programistyczny do tworzenia wtyczek dla Dovecota.
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 %{__sed} -i 's,/usr/lib/dovecot,%{_libdir}/dovecot,g' doc/example-config/*.conf doc/example-config/conf.d/*.conf
 
diff --git a/openssl3.patch b/openssl3.patch
new file mode 100644 (file)
index 0000000..fa6c44f
--- /dev/null
@@ -0,0 +1,34 @@
+diff -up dovecot-2.3.14/src/lib-dcrypt/dcrypt-openssl.c.opensslv3 dovecot-2.3.14/src/lib-dcrypt/dcrypt-openssl.c
+--- dovecot-2.3.14/src/lib-dcrypt/dcrypt-openssl.c.opensslv3   2021-06-03 18:56:52.573174433 +0200
++++ dovecot-2.3.14/src/lib-dcrypt/dcrypt-openssl.c     2021-06-03 18:56:52.585174274 +0200
+@@ -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)
This page took 0.147307 seconds and 4 git commands to generate.