summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Wallner <mike@php.net>2013-09-13 12:54:42 +0200
committerMichael Wallner <mike@php.net>2013-09-13 12:56:38 +0200
commit2e692b22e92e26f6224e313864105ad1d9c4585d (patch)
tree0d5e984d5d17e30b49260d8ecf3994d54843daa1
parentef9e003b0c30e704073f125632e916e927363426 (diff)
downloadphp-git-2e692b22e92e26f6224e313864105ad1d9c4585d.tar.gz
fix broken sha2 configure tests
see http://patch-tracker.debian.org/patch/series/view/php5/5.5.3+dfsg-1/fix_broken_sha2_test.patch
-rw-r--r--ext/standard/config.m421
1 files changed, 11 insertions, 10 deletions
diff --git a/ext/standard/config.m4 b/ext/standard/config.m4
index 2af2209f2b..3d00d88dda 100644
--- a/ext/standard/config.m4
+++ b/ext/standard/config.m4
@@ -182,12 +182,12 @@ AC_TRY_RUN([
main() {
#if HAVE_CRYPT
- char salt[30], answer[80];
-
- salt[0]='$'; salt[1]='6'; salt[2]='$'; salt[3]='$'; salt[4]='b'; salt[5]='a'; salt[6]='r'; salt[7]='\0';
+ char salt[21], answer[21+86];
+
+ strcpy(salt,"\$6\$rasmuslerdorf\$");
strcpy(answer, salt);
- strcpy(&answer[29],"$6$$QMXjqd7rHQZPQ1yHsXkQqC1FBzDiVfTHXL.LaeDAeVV.IzMaV9VU4MQ8kPuZa2SOP1A0RPm772EaFYjpEJtdu.");
- exit (strcmp((char *)crypt("foo",salt),answer));
+ strcat(answer, "EeHCRjm0bljalWuALHSTs1NB9ipEiLEXLhYeXdOpx22gmlmVejnVXFhd84cEKbYxCo.XuUTrW.RLraeEnsvWs/");
+ exit (strcmp((char *)crypt("rasmuslerdorf",salt),answer));
#else
exit(0);
#endif
@@ -211,12 +211,13 @@ AC_TRY_RUN([
main() {
#if HAVE_CRYPT
- char salt[30], answer[80];
- salt[0]='$'; salt[1]='5'; salt[2]='$'; salt[3]='$'; salt[4]='s'; salt[5]='a'; salt[6]='l'; salt[7]='t'; salt[8]='s'; salt[9]='t'; salt[10]='r'; salt[11]='i'; salt[12]='n'; salt[13]='g'; salt[14]='\0';
- strcat(salt,"");
+ char salt[21], answer[21+43];
+
+ strcpy(salt,"\$5\$rasmuslerdorf\$");
strcpy(answer, salt);
- strcpy(&answer[29], "$5$saltstring$5B8vYYiY.CVt1RlTTf8KbXBH3hsxY/GNooZaBBGWEc5");
- exit (strcmp((char *)crypt("foo",salt),answer));
+ strcat(answer, "cFAm2puLCujQ9t.0CxiFIIvFi4JyQx5UncCt/xRIX23");
+ exit (strcmp((char *)crypt("rasmuslerdorf",salt),answer));
+
#else
exit(0);
#endif