mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Autotools: Sync CS in ext/standard (#15560)
- Overquoted arguments reduced - Added missing quotes in algorithms checks - Synced indentations for algorithms checks
This commit is contained in:
@@ -104,8 +104,8 @@ AC_SEARCH_LIBS([crypt_r], [crypt],
|
|||||||
PHP_CRYPT_R_STYLE
|
PHP_CRYPT_R_STYLE
|
||||||
AC_CHECK_HEADERS([crypt.h])
|
AC_CHECK_HEADERS([crypt.h])
|
||||||
|
|
||||||
AC_CACHE_CHECK(for standard DES crypt, ac_cv_crypt_des,[
|
AC_CACHE_CHECK([for standard DES crypt], [ac_cv_crypt_des],
|
||||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
[AC_RUN_IFELSE([AC_LANG_SOURCE([
|
||||||
#ifdef HAVE_UNISTD_H
|
#ifdef HAVE_UNISTD_H
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -120,16 +120,13 @@ AC_CHECK_HEADERS([crypt.h])
|
|||||||
int main(void) {
|
int main(void) {
|
||||||
char *encrypted = crypt("rasmuslerdorf","rl");
|
char *encrypted = crypt("rasmuslerdorf","rl");
|
||||||
return !encrypted || strcmp(encrypted,"rl.3StKT.4T8M");
|
return !encrypted || strcmp(encrypted,"rl.3StKT.4T8M");
|
||||||
}]])],[
|
}])],
|
||||||
ac_cv_crypt_des=yes
|
[ac_cv_crypt_des=yes],
|
||||||
],[
|
[ac_cv_crypt_des=no],
|
||||||
ac_cv_crypt_des=no
|
[ac_cv_crypt_des=yes])])
|
||||||
],[
|
|
||||||
ac_cv_crypt_des=yes
|
|
||||||
])])
|
|
||||||
|
|
||||||
AC_CACHE_CHECK(for extended DES crypt, ac_cv_crypt_ext_des,[
|
AC_CACHE_CHECK([for extended DES crypt], [ac_cv_crypt_ext_des],
|
||||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
[AC_RUN_IFELSE([AC_LANG_SOURCE([
|
||||||
#ifdef HAVE_UNISTD_H
|
#ifdef HAVE_UNISTD_H
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -144,16 +141,13 @@ int main(void) {
|
|||||||
int main(void) {
|
int main(void) {
|
||||||
char *encrypted = crypt("rasmuslerdorf","_J9..rasm");
|
char *encrypted = crypt("rasmuslerdorf","_J9..rasm");
|
||||||
return !encrypted || strcmp(encrypted,"_J9..rasmBYk8r9AiWNc");
|
return !encrypted || strcmp(encrypted,"_J9..rasmBYk8r9AiWNc");
|
||||||
}]])],[
|
}])],
|
||||||
ac_cv_crypt_ext_des=yes
|
[ac_cv_crypt_ext_des=yes],
|
||||||
],[
|
[ac_cv_crypt_ext_des=no],
|
||||||
ac_cv_crypt_ext_des=no
|
[ac_cv_crypt_ext_des=no])])
|
||||||
],[
|
|
||||||
ac_cv_crypt_ext_des=no
|
|
||||||
])])
|
|
||||||
|
|
||||||
AC_CACHE_CHECK(for MD5 crypt, ac_cv_crypt_md5,[
|
AC_CACHE_CHECK([for MD5 crypt], [ac_cv_crypt_md5],
|
||||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||||
#ifdef HAVE_UNISTD_H
|
#ifdef HAVE_UNISTD_H
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -178,16 +172,13 @@ int main(void) {
|
|||||||
strcat(answer,"rISCgZzpwk3UhDidwXvin0");
|
strcat(answer,"rISCgZzpwk3UhDidwXvin0");
|
||||||
encrypted = crypt("rasmuslerdorf",salt);
|
encrypted = crypt("rasmuslerdorf",salt);
|
||||||
return !encrypted || strcmp(encrypted,answer);
|
return !encrypted || strcmp(encrypted,answer);
|
||||||
}]])],[
|
}]])],
|
||||||
ac_cv_crypt_md5=yes
|
[ac_cv_crypt_md5=yes],
|
||||||
],[
|
[ac_cv_crypt_md5=no],
|
||||||
ac_cv_crypt_md5=no
|
[ac_cv_crypt_md5=no])])
|
||||||
],[
|
|
||||||
ac_cv_crypt_md5=no
|
|
||||||
])])
|
|
||||||
|
|
||||||
AC_CACHE_CHECK(for Blowfish crypt, ac_cv_crypt_blowfish,[
|
AC_CACHE_CHECK([for Blowfish crypt], [ac_cv_crypt_blowfish],
|
||||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||||
#ifdef HAVE_UNISTD_H
|
#ifdef HAVE_UNISTD_H
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -203,22 +194,20 @@ int main(void) {
|
|||||||
char salt[30], answer[70];
|
char salt[30], answer[70];
|
||||||
char *encrypted;
|
char *encrypted;
|
||||||
|
|
||||||
salt[0]='$'; salt[1]='2'; salt[2]='a'; salt[3]='$'; salt[4]='0'; salt[5]='7'; salt[6]='$'; salt[7]='\0';
|
salt[0]='$'; salt[1]='2'; salt[2]='a'; salt[3]='$';
|
||||||
|
salt[4]='0'; salt[5]='7'; salt[6]='$'; salt[7]='\0';
|
||||||
strcat(salt,"rasmuslerd............");
|
strcat(salt,"rasmuslerd............");
|
||||||
strcpy(answer,salt);
|
strcpy(answer,salt);
|
||||||
strcpy(&answer[29],"nIdrcHdxcUxWomQX9j6kvERCFjTg7Ra");
|
strcpy(&answer[29],"nIdrcHdxcUxWomQX9j6kvERCFjTg7Ra");
|
||||||
encrypted = crypt("rasmuslerdorf",salt);
|
encrypted = crypt("rasmuslerdorf",salt);
|
||||||
return !encrypted || strcmp(encrypted,answer);
|
return !encrypted || strcmp(encrypted,answer);
|
||||||
}]])],[
|
}]])],
|
||||||
ac_cv_crypt_blowfish=yes
|
[ac_cv_crypt_blowfish=yes],
|
||||||
],[
|
[ac_cv_crypt_blowfish=no],
|
||||||
ac_cv_crypt_blowfish=no
|
[ac_cv_crypt_blowfish=no])])
|
||||||
],[
|
|
||||||
ac_cv_crypt_blowfish=no
|
|
||||||
])])
|
|
||||||
|
|
||||||
AC_CACHE_CHECK(for SHA512 crypt, ac_cv_crypt_sha512,[
|
AC_CACHE_CHECK([for SHA512 crypt], [ac_cv_crypt_sha512],
|
||||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||||
#ifdef HAVE_UNISTD_H
|
#ifdef HAVE_UNISTD_H
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -239,16 +228,13 @@ int main(void) {
|
|||||||
strcat(answer, "EeHCRjm0bljalWuALHSTs1NB9ipEiLEXLhYeXdOpx22gmlmVejnVXFhd84cEKbYxCo.XuUTrW.RLraeEnsvWs/");
|
strcat(answer, "EeHCRjm0bljalWuALHSTs1NB9ipEiLEXLhYeXdOpx22gmlmVejnVXFhd84cEKbYxCo.XuUTrW.RLraeEnsvWs/");
|
||||||
encrypted = crypt("rasmuslerdorf",salt);
|
encrypted = crypt("rasmuslerdorf",salt);
|
||||||
return !encrypted || strcmp(encrypted,answer);
|
return !encrypted || strcmp(encrypted,answer);
|
||||||
}]])],[
|
}]])],
|
||||||
ac_cv_crypt_sha512=yes
|
[ac_cv_crypt_sha512=yes],
|
||||||
],[
|
[ac_cv_crypt_sha512=no],
|
||||||
ac_cv_crypt_sha512=no
|
[ac_cv_crypt_sha512=no])])
|
||||||
],[
|
|
||||||
ac_cv_crypt_sha512=no
|
|
||||||
])])
|
|
||||||
|
|
||||||
AC_CACHE_CHECK(for SHA256 crypt, ac_cv_crypt_sha256,[
|
AC_CACHE_CHECK([for SHA256 crypt], [ac_cv_crypt_sha256],
|
||||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||||
#ifdef HAVE_UNISTD_H
|
#ifdef HAVE_UNISTD_H
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -269,13 +255,10 @@ int main(void) {
|
|||||||
strcat(answer, "cFAm2puLCujQ9t.0CxiFIIvFi4JyQx5UncCt/xRIX23");
|
strcat(answer, "cFAm2puLCujQ9t.0CxiFIIvFi4JyQx5UncCt/xRIX23");
|
||||||
encrypted = crypt("rasmuslerdorf",salt);
|
encrypted = crypt("rasmuslerdorf",salt);
|
||||||
return !encrypted || strcmp(encrypted,answer);
|
return !encrypted || strcmp(encrypted,answer);
|
||||||
}]])],[
|
}]])],
|
||||||
ac_cv_crypt_sha256=yes
|
[ac_cv_crypt_sha256=yes],
|
||||||
],[
|
[ac_cv_crypt_sha256=no],
|
||||||
ac_cv_crypt_sha256=no
|
[ac_cv_crypt_sha256=no])])
|
||||||
],[
|
|
||||||
ac_cv_crypt_sha256=no
|
|
||||||
])])
|
|
||||||
|
|
||||||
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
|
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
|
||||||
AC_MSG_FAILURE([Cannot use external libcrypt as some algo are missing.])
|
AC_MSG_FAILURE([Cannot use external libcrypt as some algo are missing.])
|
||||||
|
|||||||
Reference in New Issue
Block a user