[chrony-dev] nts_ke_server calling UTI_GetRandomBytesUrandom

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


Two places call UTI_GetRandomBytesUrandom rather than UTI_GetRandomBytes.

1. nts_ke_server.c generate_key (from patch a420ed57q):
+  UTI_GetRandomBytesUrandom(server_keys[index].key, key_length);
+  if (!SIV_SetKey(server_keys[index].siv, server_keys[index].key, key_length))
+    assert(0);
+
+  UTI_GetRandomBytes(&server_keys[index].id, sizeof (server_keys[index].id));

2. client.c process_cmd_keygen (from patch 7fcf69ce):
+  UTI_GetRandomBytesUrandom(key, length);

Is there any reason for them to call the Urandom version directly?

Everywhere else (including 4 lines later in the generate_key function) calls 
UTI_GetRandomBytes, which attempts to use getrandom system call, and falls
back to UTI_GetRandomBytesUrandom if that isn't available or working.


--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/