PHP 4.0 Bug #9177 Updated: crypt problems with openssl
| From: | max at the-triumvirate dot net | Date: | Mon, 23 Apr 2001 23:43:22 +0000 |
| Subject: | PHP 4.0 Bug #9177 Updated: crypt problems with openssl | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-52242@lists.php.net to get a copy of this message | ||
ID: 9177
User Update by: max@the-triumvirate.net
Old-Status: Closed
Status: Open
Bug Type: *Encryption and hash functions
Description: crypt problems with openssl
It doesn't seem like it was fixed. From CVS checked about about 30 minutes ago, configure
says:
checking for MD5 crypt... no
And a simple script that is supposed to return an md5 crypted string, returns a DES crypted string.
--BEG SCRIPT--
<?= crypt('rasmuslerdorf', '$1$rasmusle$'); ?>
--END SCRIPT--
--BEG OUTPUT--
$1Hat1hn6A1pw
--END OUTPUT--
When php is compiled without openssl, the correct output is acquired which is:
$1$rasmusle$rISCgZzpwk3UhDidwXvin0
(I hope it is alright to re-open the bug)
Previous Comments:
---------------------------------------------------------------------------
[2001-04-23 03:34:55] sniper@php.net
Fixed in CVS.
--Jani
---------------------------------------------------------------------------
[2001-02-18 16:41:52] sniper@php.net
My bad. It was only discussed about, not fixed..
--Jani
---------------------------------------------------------------------------
[2001-02-15 11:35:43] sniper@php.net
IIRC this is fixed already in CVS so please try the latest CVS snapshot
from http://snaps.php.net/
--Jani
---------------------------------------------------------------------------
[2001-02-08 14:39:57] max@the-triumvirate.net
MD5 crypt fails if PHP is compiled with openssl (specifically with the -lcrypto)
If the .c file comes before the libraries, gcc won't recognize MD5 crypt:
----- blah.c -----
root# cat blah.c
#include <crypt.h>
main() {
char salt[15], answer[40];
salt[0]='$'; salt[1]='1'; salt[2]='$';
salt[3]='r'; salt[4]='a'; salt[5]='s';
salt[6]='m'; salt[7]='u'; salt[8]='s';
salt[9]='l'; salt[10]='e'; salt[11]='$';
salt[12]='