diff options
author | Scott MacVicar <scottmac@php.net> | 2011-07-19 22:29:55 +0000 |
---|---|---|
committer | Scott MacVicar <scottmac@php.net> | 2011-07-19 22:29:55 +0000 |
commit | 591e0e446fb070cf8ed7043cc9cc00e2b4a096cf (patch) | |
tree | f9b4a999ce51057660cac7cb36cf84ebaf34d03b /ext/openssl | |
parent | 3afe772423779041665e48d141cba183970b1ce2 (diff) | |
download | php-git-591e0e446fb070cf8ed7043cc9cc00e2b4a096cf.tar.gz |
Revert change to use a special Windows version of openssl_random_pseudo_bytes().
Lets discuss this on internals first. We're advertising something from the OpenSSL library
and then subverting it with another Windows OS call.
What are the implications of this? Should we make this available in ext/standard/ instead?
Diffstat (limited to 'ext/openssl')
-rw-r--r-- | ext/openssl/openssl.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index b41d04c3bb..f8266a381c 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -4930,19 +4930,10 @@ PHP_FUNCTION(openssl_random_pseudo_bytes) buffer = emalloc(buffer_length + 1); -#ifdef PHP_WIN32 - strong_result = 1; - /* random/urandom equivalent on Windows */ - if (php_win32_get_random_bytes(buffer, (size_t) buffer_length) == FAILURE){ - efree(buffer); - RETURN_FALSE; - } -#else if ((strong_result = RAND_pseudo_bytes(buffer, buffer_length)) < 0) { efree(buffer); RETURN_FALSE; } -#endif buffer[buffer_length] = 0; RETVAL_STRINGL((char *)buffer, buffer_length, 0); |