summaryrefslogtreecommitdiff
path: root/ext/soap/php_http.c
diff options
context:
space:
mode:
authorMark A. Hershberger <mah@debian.(none)>2009-03-25 00:37:48 -0400
committerMark A. Hershberger <mah@debian.(none)>2009-03-25 00:37:48 -0400
commiteddbbea4325e602ddc87c545531609132d4f0e3b (patch)
treef0994206a7e0a6251be7cc6729ba480f0c8729c2 /ext/soap/php_http.c
parent2d4e5b09576bb4f0ba716cc82cdf29ea04d9184b (diff)
downloadphp-eddbbea4325e602ddc87c545531609132d4f0e3b.tar.gz
Imported Upstream version 5.2.3upstream/5.2.3
Diffstat (limited to 'ext/soap/php_http.c')
-rw-r--r--ext/soap/php_http.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c
index d41bf6997..137c49e6d 100644
--- a/ext/soap/php_http.c
+++ b/ext/soap/php_http.c
@@ -17,11 +17,12 @@
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_http.c,v 1.77.2.11.2.8 2007/02/24 02:17:26 helly Exp $ */
+/* $Id: php_http.c,v 1.77.2.11.2.10 2007/05/10 21:52:10 tony2001 Exp $ */
#include "php_soap.h"
#include "ext/standard/base64.h"
#include "ext/standard/md5.h"
+#include "ext/standard/php_rand.h"
static char *get_http_header_value(char *headers, char *type);
static int get_http_body(php_stream *socketd, int close, char *headers, char **response, int *out_size TSRMLS_DC);
@@ -469,10 +470,9 @@ try_again:
char HA1[33], HA2[33], response[33], cnonce[33], nc[9];
PHP_MD5_CTX md5ctx;
unsigned char hash[16];
- unsigned int ctx;
PHP_MD5Init(&md5ctx);
- snprintf(cnonce, sizeof(cnonce), "%d", php_rand_r(&ctx));
+ snprintf(cnonce, sizeof(cnonce), "%ld", php_rand(TSRMLS_C));
PHP_MD5Update(&md5ctx, (unsigned char*)cnonce, strlen(cnonce));
PHP_MD5Final(hash, &md5ctx);
make_digest(cnonce, hash);