configure and have crypt or DES_crypt

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



Hello,

With current portable master source tree HAVE_CRYPT and HAVE_DES_CRYPT are not defined. It seems to me this is regression introduced with implementation of configure options --with-openssl.

Impacted code is in xcrypt.c:
...
# if defined(WITH_OPENSSL) && !defined(HAVE_CRYPT) && defined(HAVE_DES_CRYPT)
#  include <openssl/des.h>
#  define crypt DES_crypt
# endif
...

Only above preprocessor statement use defines HAVE_CRYPT and HAVE_DES_CRYPT.


Configure script look like (
if with OpenSSL then
  ....
else
  ...
  AC_CHECK_FUNCS([crypt DES_crypt])
fi

Proposed patch restore previous behavior.


Regards,
Roumen Petrov

--
Get SSH with X.509 certificate support
http://roumenpetrov.info/openssh/


>From 5ad84fc6d378505ead87e5c9a28fa471bdd01c66 Mon Sep 17 00:00:00 2001
From: Roumen Petrov <openssh@xxxxxxxxxxxxxxxxx>
Date: Sat, 21 Feb 2015 20:21:54 +0200
Subject: [PATCH 01/16] configure.ac: rewrite check for functions crypt and
 DES_crypt

---
 configure.ac | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 2ef9db6..a85fa6e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2573,6 +2573,8 @@ if test "x$openssl" = "xyes" ; then
 		AC_CHECK_LIB([crypt], [crypt], [LIBS="$LIBS -lcrypt"])
 	fi
 
+	AC_CHECK_FUNCS([crypt DES_crypt])
+
 	# Search for SHA256 support in libc and/or OpenSSL
 	AC_CHECK_FUNCS([SHA256_Update EVP_sha256], ,
 	    [unsupported_algorithms="$unsupported_algorithms \
@@ -2710,7 +2712,6 @@ if test "x$openssl" = "xyes" ; then
 	AC_SUBST([COMMENT_OUT_ECC])
 else
 	AC_CHECK_LIB([crypt], [crypt], [LIBS="$LIBS -lcrypt"])
-	AC_CHECK_FUNCS([crypt DES_crypt])
 fi
 
 AC_CHECK_FUNCS([ \
-- 
1.8.4

_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux