I just tried to compile 2.3.2.1 and still getting the openssl errors. Configured with: ./configure --with-mysql --with-ssl=openssl Which finishes with: Install prefix . : /usr/local File offsets ... : 64bit I/O polling .... : kqueue I/O notifys .... : kqueue SSL ............ : yes (OpenSSL) GSSAPI ......... : no passdbs ........ : static passwd passwd-file pam checkpassword sql CFLAGS ......... : -std=gnu99 -g -O2 -fstack-protector -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -fno-builtin-strftime -Wstrict-aliasing=2 : -shadow -bsdauth -sia -ldap -vpopmail userdbs ........ : static prefetch passwd passwd-file checkpassword sql : -ldap -vpopmail SQL drivers .... : mysql : -pgsql -sqlite -cassandra Full text search : squat : -lucene -solr Any another suggestions? Thanks, James.
On 5 Mar 2018, at 2:54 pm, James Brown <jlbrown@bordo.com.au> wrote:
On 2 Mar 2018, at 6:11 pm, James Brown <jlbrown@bordo.com.au> wrote:
On 2 Mar 2018, at 5:59 pm, Aki Tuomi <aki.tuomi@dovecot.fi> wrote:
We have attempted to compile our code with OpenSSL 1.0, 1.0.2 and 1.1.0, but I'll try the specific releases too.
Can you try this patch?
diff --git a/src/lib-dcrypt/dcrypt-openssl.c b/src/lib-dcrypt/dcrypt-openssl.c index 26c9b91..187bb75 100644 --- a/src/lib-dcrypt/dcrypt-openssl.c +++ b/src/lib-dcrypt/dcrypt-openssl.c @@ -9,17 +9,17 @@ #include "array.h" #include "module-dir.h" #include "dovecot-openssl-common.h" -#include <openssl/evp.h> -#include <openssl/sha.h> -#include <openssl/err.h> -#include <openssl/rsa.h> -#include <openssl/ec.h> -#include <openssl/bio.h> -#include <openssl/pem.h> -#include <openssl/x509.h> -#include <openssl/engine.h> -#include <openssl/hmac.h> -#include <openssl/objects.h> +#include "openssl/evp.h" +#include "openssl/sha.h" +#include "openssl/err.h" +#include "openssl/rsa.h" +#include "openssl/ec.h" +#include "openssl/bio.h" +#include "openssl/pem.h" +#include "openssl/x509.h" +#include "openssl/engine.h" +#include "openssl/hmac.h" +#include "openssl/objects.h" #include "dcrypt.h" #include "dcrypt-private.h"
And if it does not work, add after the includes
#pragma message("OpenSSL version is " OPENSSL_VERSION_TEXT) #error See above
And provide output?
Aki
Hi Aki,
Change src/lib-dcrypt/dcrypt-openssl.c start to:
/* Copyright (c) 2016-2017 Dovecot authors, see the included COPYING file */
#include "lib.h" #include "buffer.h" #include "str.h" #include "hex-binary.h" #include "safe-memset.h" #include "randgen.h" #include "array.h" #include "module-dir.h" #include "dovecot-openssl-common.h" #include "openssl/evp.h" #include "openssl/sha.h" #include "openssl/err.h" #include "openssl/rsa.h" #include "openssl/ec.h" #include "openssl/bio.h" #include "openssl/pem.h" #include "openssl/x509.h" #include "openssl/engine.h" #include "openssl/hmac.h" #include "openssl/objects.h" #include "dcrypt.h" #include "dcrypt-private.h" #pragma message("OpenSSL version is " OPENSSL_VERSION_TEXT) #error See above /**
Ie changed the < and > to double quotes.
Ran make clean, then ./configure and but it still fails. :-(
dcrypt-openssl.c:25: warning: ignoring #pragma message dcrypt-openssl.c:26:2: error: #error See above dcrypt-openssl.c:118: error: field 'ctx' has incomplete type dcrypt-openssl.c: In function 'dcrypt_openssl_ctx_hmac_destroy': dcrypt-openssl.c:452: warning: implicit declaration of function 'HMAC_cleanup' dcrypt-openssl.c: In function 'dcrypt_openssl_generate_ec_key': dcrypt-openssl.c:556: error: dereferencing pointer to incomplete type dcrypt-openssl.c:557: error: dereferencing pointer to incomplete type dcrypt-openssl.c: In function 'dcrypt_openssl_ecdh_derive_secret_local': dcrypt-openssl.c:589: error: dereferencing pointer to incomplete type dcrypt-openssl.c: In function 'dcrypt_openssl_ecdh_derive_secret_peer': dcrypt-openssl.c:669: error: dereferencing pointer to incomplete type dcrypt-openssl.c:698: error: dereferencing pointer to incomplete type dcrypt-openssl.c:699: error: dereferencing pointer to incomplete type dcrypt-openssl.c: In function 'dcrypt_openssl_store_private_key_dovecot': dcrypt-openssl.c:1462: error: dereferencing pointer to incomplete type dcrypt-openssl.c:1483: error: dereferencing pointer to incomplete type dcrypt-openssl.c:1490: error: dereferencing pointer to incomplete type dcrypt-openssl.c: In function 'dcrypt_openssl_load_private_key': dcrypt-openssl.c:1616: error: dereferencing pointer to incomplete type dcrypt-openssl.c: In function 'dcrypt_openssl_store_public_key': dcrypt-openssl.c:1766: error: dereferencing pointer to incomplete type dcrypt-openssl.c: In function 'dcrypt_openssl_private_to_public_key': dcrypt-openssl.c:1802: error: dereferencing pointer to incomplete type dcrypt-openssl.c: In function 'dcrypt_openssl_name2oid': dcrypt-openssl.c:2063: error: dereferencing pointer to incomplete type dcrypt-openssl.c: In function 'dcrypt_openssl_public_key_id_old': dcrypt-openssl.c:2113: error: dereferencing pointer to incomplete type dcrypt-openssl.c: In function 'dcrypt_openssl_private_key_id_old': dcrypt-openssl.c:2136: error: dereferencing pointer to incomplete type dcrypt-openssl.c: In function 'dcrypt_openssl_public_key_id_evp': dcrypt-openssl.c:2154: error: dereferencing pointer to incomplete type make[3]: *** [libdcrypt_openssl_la-dcrypt-openssl.lo] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2
Thanks for your help.
James.