mirror of
https://github.com/apache/httpd.git
synced 2025-08-10 02:56:11 +00:00
* modules/proxy/proxy_util.c (ap_proxy_share_balancer): Create the
nonce as a pseudo-UUID using the PRNG. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1864693 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@ -1247,10 +1247,11 @@ PROXY_DECLARE(apr_status_t) ap_proxy_share_balancer(proxy_balancer *balancer,
|
|||||||
if (*balancer->s->nonce == PROXY_UNSET_NONCE) {
|
if (*balancer->s->nonce == PROXY_UNSET_NONCE) {
|
||||||
char nonce[APR_UUID_FORMATTED_LENGTH + 1];
|
char nonce[APR_UUID_FORMATTED_LENGTH + 1];
|
||||||
apr_uuid_t uuid;
|
apr_uuid_t uuid;
|
||||||
/* Retrieve a UUID and store the nonce for the lifetime of
|
|
||||||
* the process.
|
/* Generate a pseudo-UUID from the PRNG to use as a nonce for
|
||||||
*/
|
* the lifetime of the process. uuid.data is a char array so
|
||||||
apr_uuid_get(&uuid);
|
* this is an adequate substitute for apr_uuid_get(). */
|
||||||
|
ap_random_insecure_bytes(uuid.data, sizeof uuid.data);
|
||||||
apr_uuid_format(nonce, &uuid);
|
apr_uuid_format(nonce, &uuid);
|
||||||
rv = PROXY_STRNCPY(balancer->s->nonce, nonce);
|
rv = PROXY_STRNCPY(balancer->s->nonce, nonce);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user