[packages/up-imapproxy] - release 7, openssl-1.1 buildfix
adamg
adamg at pld-linux.org
Thu Sep 27 11:48:52 CEST 2018
commit 792d60aa827cbc23bb54da74925bfc0ff0dd51cb
Author: Adam Gołębiowski <adamg at pld-linux.org>
Date: Thu Sep 27 11:48:45 2018 +0200
- release 7, openssl-1.1 buildfix
up-imapproxy-openssl-1.1.patch | 57 ++++++++++++++++++++++++++++++++++++++++++
up-imapproxy.spec | 5 +++-
2 files changed, 61 insertions(+), 1 deletion(-)
---
diff --git a/up-imapproxy.spec b/up-imapproxy.spec
index 9f96846..1f968a2 100644
--- a/up-imapproxy.spec
+++ b/up-imapproxy.spec
@@ -1,16 +1,18 @@
# TODO
+# - rename to squirrelmail-imap_proxy
# - daemon fails (delays) to startup if the configured target imap server is down
Summary: Imapproxy Daemon
Summary(pl.UTF-8): Serwer proxy dla protokołu IMAP
Name: up-imapproxy
Version: 1.2.7
-Release: 6
+Release: 7
License: GPL
Group: Networking/Daemons
Source0: http://www.imapproxy.org/downloads/%{name}-%{version}.tar.gz
# Source0-md5: 036b487a9a6d2b955f81eb80bd9faee0
Source1: %{name}.init
Patch0: %{name}-config.patch
+Patch1: %{name}-openssl-1.1.patch
URL: http://www.imapproxy.org/
BuildRequires: automake
BuildRequires: libwrap-devel
@@ -38,6 +40,7 @@ pośredniczący w połączeniach IMAP.
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
%build
cp -f /usr/share/automake/config.sub .
diff --git a/up-imapproxy-openssl-1.1.patch b/up-imapproxy-openssl-1.1.patch
new file mode 100644
index 0000000..09743bc
--- /dev/null
+++ b/up-imapproxy-openssl-1.1.patch
@@ -0,0 +1,57 @@
+--- up-imapproxy-1.2.7.orig/src/imapcommon.c 2010-02-20 18:16:58.000000000 +0100
++++ up-imapproxy-1.2.7/src/imapcommon.c 2018-09-27 11:43:57.312867137 +0200
+@@ -398,16 +398,18 @@
+ int rc;
+ unsigned int Expiration;
+
+- EVP_MD_CTX mdctx;
++ EVP_MD_CTX *mdctx;
+ int md_len;
+
+ Expiration = PC_Struct.cache_expiration_time;
+ memset( &Server, 0, sizeof Server );
+
+ /* need to md5 the passwd regardless, so do that now */
+- EVP_DigestInit(&mdctx, EVP_md5());
+- EVP_DigestUpdate(&mdctx, Password, strlen(Password));
+- EVP_DigestFinal(&mdctx, md5pw, &md_len);
++ mdctx = EVP_MD_CTX_create();
++ EVP_DigestInit(mdctx, EVP_md5());
++ EVP_DigestUpdate(mdctx, Password, strlen(Password));
++ EVP_DigestFinal(mdctx, md5pw, &md_len);
++ EVP_MD_CTX_free(mdctx);
+
+ /* see if we have a reusable connection available */
+ ICC_Active = NULL;
+--- up-imapproxy-1.2.7.orig/src/main.c 2010-02-20 18:16:58.000000000 +0100
++++ up-imapproxy-1.2.7/src/main.c 2018-09-27 11:41:32.938679196 +0200
+@@ -471,16 +471,8 @@
+ /* Set up OpenSSL thread protection */
+ ssl_thread_setup(fn);
+
+- /* Need to seed PRNG, too! */
+- if ( RAND_egd( ( RAND_file_name( f_randfile, sizeof( f_randfile ) ) == f_randfile ) ? f_randfile : "/.rnd" ) )
+- {
+- /* Not an EGD, so read and write it. */
+- if ( RAND_load_file( f_randfile, -1 ) )
+- RAND_write_file( f_randfile );
+- }
+-
+ SSL_load_error_strings();
+- tls_ctx = SSL_CTX_new( TLSv1_client_method() );
++ tls_ctx = SSL_CTX_new( TLS_client_method() );
+ if ( tls_ctx == NULL )
+ {
+ syslog(LOG_ERR, "%s: Failed to create new SSL_CTX. Exiting.", fn);
+@@ -1381,9 +1373,9 @@
+ verify_error = X509_V_ERR_CERT_CHAIN_TOO_LONG;
+ }
+ }
+- switch (ctx->error) {
++ switch (X509_STORE_CTX_get_error(ctx)) {
+ case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT:
+- X509_NAME_oneline(X509_get_issuer_name(ctx->current_cert), buf, sizeof(buf));
++ X509_NAME_oneline(X509_get_issuer_name(X509_STORE_CTX_get_current_cert(ctx)), buf, sizeof(buf));
+ syslog(LOG_NOTICE, "issuer= %s", buf);
+ break;
+ case X509_V_ERR_CERT_NOT_YET_VALID:
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/up-imapproxy.git/commitdiff/792d60aa827cbc23bb54da74925bfc0ff0dd51cb
More information about the pld-cvs-commit
mailing list