Created attachment 149087 [details] patch to replace functions and types with DES_ versions OpenLDAP 2.4 fails to build with LibreSSL, error below make.conf WITH_OPENSSL_PORT= yes OPENSSL_SHLIBVER= 30 OPENSSL_PORT= security/libressl OpenLDAP is using des_* types and functions that were deprecated in 2002 by the OpenSSL product (and replaced with DES_*) and removed by LibreSSL April 2014 Created a patch for libraries/liblutil/passwd.c to upgrade to the recent DES_-versions Upstream responded that this is due to building with --enable-lmpasswd and commented that lmpasswd should no longer be used. Created a patch that disables lmpasswd when LibreSSL is used but suggest moving lmpasswd to an OPTION or removing it alltogether. --- passwd.o --- passwd.c:41:9: error: unknown type name 'des_cblock'; did you mean 'DES_cblock'? typedef des_cblock des_key; ^~~~~~~~~~ DES_cblock /usr/local/include/openssl/des.h:73:23: note: 'DES_cblock' declared here typedef unsigned char DES_cblock[8]; ^ passwd.c:42:9: error: unknown type name 'des_cblock'; did you mean 'DES_cblock'? typedef des_cblock des_data_block; ^~~~~~~~~~ DES_cblock /usr/local/include/openssl/des.h:73:23: note: 'DES_cblock' declared here typedef unsigned char DES_cblock[8]; ^ passwd.c:43:9: error: unknown type name 'des_key_schedule'; did you mean 'DES_key_schedule'? typedef des_key_schedule des_context; ^~~~~~~~~~~~~~~~ DES_key_schedule /usr/local/include/openssl/des.h:87:7: note: 'DES_key_schedule' declared here } DES_key_schedule; ^ passwd.c:670:5: warning: implicit declaration of function 'des_set_odd_parity' is invalid in C99 [-Wimplicit-function-declaration] des_set_odd_parity( key ); ^ passwd.c:867:2: warning: implicit declaration of function 'des_set_key_unchecked' is invalid in C99 [-Wimplicit-function-declaration] des_set_key_unchecked( &key, schedule ); ^ passwd.c:868:2: warning: implicit declaration of function 'des_ecb_encrypt' is invalid in C99 [-Wimplicit-function-declaration] des_ecb_encrypt( &StdText, &PasswordHash1, schedule , DES_ENCRYPT ); ^ 3 warnings and 3 errors generated. *** [passwd.o] Error code 1 make[4]: stopped in /usr/ports/net/openldap24-server/work/openldap-2.4.40/libraries/liblutil 1 error
Auto-assigned to maintainer delphij@FreeBSD.org
Created attachment 149088 [details] Patch disabling lmpasswd when LibreSSL is installed Suggest moving lmpasswd to an OPTION
A commit references this bug: Author: delphij Date: Wed Nov 12 17:59:35 UTC 2014 New revision: 372499 URL: https://svnweb.freebsd.org/changeset/ports/372499 Log: - Fix Perl dependency by converting the port from using bsd.port.{pre,post}.mk to options.mk. [1] - Fix build with LibreSSL. [2] [3] - Make LM Password optional and disable by default. [3] Reported by: Lorenzo Perone <lorenzo.perone@bytesatwork.com> [1], brd [1] Submitted by: spil.oss@gmail.com [2] PR: 194841 [3] Changes: head/net/openldap24-server/Makefile head/net/openldap24-server/files/patch-des
Committed, thanks!