digest: append the timer to the random for the nonce
This commit is contained in:
		| @@ -375,8 +375,11 @@ CURLcode Curl_output_digest(struct connectdata *conn, | |||||||
|     d->nc = 1; |     d->nc = 1; | ||||||
|  |  | ||||||
|   if(!d->cnonce) { |   if(!d->cnonce) { | ||||||
|     snprintf(cnoncebuf, sizeof(cnoncebuf), "%08x%08x", |     struct timeval now = Curl_tvnow(); | ||||||
|              Curl_rand(data), Curl_rand(data)); |     snprintf(cnoncebuf, sizeof(cnoncebuf), "%08x%08x%08x%08x", | ||||||
|  |              Curl_rand(data), Curl_rand(data), | ||||||
|  |              (unsigned int)now.tv_sec, | ||||||
|  |              (unsigned int)now.tv_usec); | ||||||
|  |  | ||||||
|     rc = Curl_base64_encode(data, cnoncebuf, strlen(cnoncebuf), |     rc = Curl_base64_encode(data, cnoncebuf, strlen(cnoncebuf), | ||||||
|                             &cnonce, &cnonce_sz); |                             &cnonce, &cnonce_sz); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Daniel Stenberg
					Daniel Stenberg