This commit makes it that the authorized clients in the descriptor are in
random order instead of ordered by how they were read on disk.
Fixes #27545
Signed-off-by: David Goulet <dgoulet@torproject.org>
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
#include "lib/crypt_ops/crypto_ope.h"
+#include "lib/crypt_ops/crypto_rand.h"
#include "feature/dircache/directory.h"
#include "core/mainloop/main.h"
#include "feature/nodelist/networkstatus.h"
smartlist_add(superencrypted->clients, desc_client);
}
+ /* Shuffle the list to prevent the client know the position in the
+ * config. */
+ smartlist_shuffle(superencrypted->clients);
+
return 0;
}