Skip to content

Commit 82965dc

Browse files
committed
Config changes
1 parent c90eee3 commit 82965dc

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed

ext/standard/config.m4

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ int main(void) {
146146
return !encrypted || strcmp(encrypted,"_J9..rasmBYk8r9AiWNc");
147147
}])],
148148
[ac_cv_crypt_ext_des=yes],
149-
[ac_cv_crypt_ext_des=yes],
150-
[ac_cv_crypt_ext_des=yes])])
149+
[ac_cv_crypt_ext_des=no],
150+
[ac_cv_crypt_ext_des=no])])
151151
152152
AC_CACHE_CHECK([for MD5 crypt], [ac_cv_crypt_md5],
153153
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
@@ -209,6 +209,33 @@ int main(void) {
209209
[ac_cv_crypt_blowfish=no],
210210
[ac_cv_crypt_blowfish=no])])
211211
212+
AC_CACHE_CHECK([for Yescrypt crypt], [ac_cv_crypt_yescrypt],
213+
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
214+
#ifdef HAVE_UNISTD_H
215+
#include <unistd.h>
216+
#endif
217+
218+
#ifdef HAVE_CRYPT_H
219+
#include <crypt.h>
220+
#endif
221+
222+
#include <stdlib.h>
223+
#include <string.h>
224+
225+
int main(void) {
226+
char answer[128];
227+
char *encrypted;
228+
char salt[] = "$y$j9T$fFqB7ZKMpdoOep2IXlKMuBnGplYOF/$";
229+
230+
strcpy(answer, salt);
231+
strcpy(&answer[sizeof(salt) - 1], "YUbFz9cPA2OISKzl1FhXHQP556fm3v7K1PBuIcVwyL/");
232+
encrypted = crypt("rasmuslerdorf", salt);
233+
return !encrypted || strcmp(encrypted, answer);
234+
}]])],
235+
[ac_cv_crypt_yescrypt=yes],
236+
[ac_cv_crypt_yescrypt=no],
237+
[ac_cv_crypt_yescrypt=no])])
238+
212239
AC_CACHE_CHECK([for SHA512 crypt], [ac_cv_crypt_sha512],
213240
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
214241
#ifdef HAVE_UNISTD_H
@@ -263,7 +290,7 @@ int main(void) {
263290
[ac_cv_crypt_sha256=no],
264291
[ac_cv_crypt_sha256=no])])
265292
266-
if test "$ac_cv_crypt_blowfish" = "no" || test "$ac_cv_crypt_des" = "no" || test "$ac_cv_crypt_ext_des" = "no" || test "$ac_cv_crypt_md5" = "no" || test "$ac_cv_crypt_sha512" = "no" || test "$ac_cv_crypt_sha256" = "no"; then
293+
if test "$ac_cv_crypt_blowfish" = "no" || test "$ac_cv_crypt_yescrypt" = "no" || test "$ac_cv_crypt_des" = "no" || test "$ac_cv_crypt_ext_des" = "no" || test "$ac_cv_crypt_md5" = "no" || test "$ac_cv_crypt_sha512" = "no" || test "$ac_cv_crypt_sha256" = "no"; then
267294
AC_MSG_FAILURE([Cannot use external libcrypt as some algo are missing.])
268295
fi
269296

0 commit comments

Comments
 (0)