mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-09-21 21:44:58 +02:00
Make "ext" participate in may_include.
Also, resolve a circular dependency involving the use of lib/log by csiphash.c.
This commit is contained in:
parent
e429e31ad1
commit
d32795bb6e
10
src/ext/.may_include
Normal file
10
src/ext/.may_include
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
orconfig.h
|
||||||
|
|
||||||
|
lib/err/*.h
|
||||||
|
lib/cc/*.h
|
||||||
|
|
||||||
|
tinytest*.h
|
||||||
|
ext/siphash.h
|
||||||
|
ext/byteorder.h
|
||||||
|
ext/tor_readpassphrase.h
|
@ -30,12 +30,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "lib/cc/torint.h"
|
#include "lib/cc/torint.h"
|
||||||
#include "lib/log/util_bug.h"
|
#include "lib/err/torerr.h"
|
||||||
|
|
||||||
#include "siphash.h"
|
#include "ext/siphash.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "byteorder.h"
|
#include "ext/byteorder.h"
|
||||||
|
|
||||||
#define ROTATE(x, b) (uint64_t)( ((x) << (b)) | ( (x) >> (64 - (b))) )
|
#define ROTATE(x, b) (uint64_t)( ((x) << (b)) | ( (x) >> (64 - (b))) )
|
||||||
|
|
||||||
@ -112,13 +112,13 @@ static int the_siphash_key_is_set = 0;
|
|||||||
static struct sipkey the_siphash_key;
|
static struct sipkey the_siphash_key;
|
||||||
|
|
||||||
uint64_t siphash24g(const void *src, unsigned long src_sz) {
|
uint64_t siphash24g(const void *src, unsigned long src_sz) {
|
||||||
tor_assert(the_siphash_key_is_set);
|
raw_assert(the_siphash_key_is_set);
|
||||||
return siphash24(src, src_sz, &the_siphash_key);
|
return siphash24(src, src_sz, &the_siphash_key);
|
||||||
}
|
}
|
||||||
|
|
||||||
void siphash_set_global_key(const struct sipkey *key)
|
void siphash_set_global_key(const struct sipkey *key)
|
||||||
{
|
{
|
||||||
tor_assert(! the_siphash_key_is_set);
|
raw_assert(! the_siphash_key_is_set);
|
||||||
the_siphash_key.k0 = key->k0;
|
the_siphash_key.k0 = key->k0;
|
||||||
the_siphash_key.k1 = key->k1;
|
the_siphash_key.k1 = key->k1;
|
||||||
the_siphash_key_is_set = 1;
|
the_siphash_key_is_set = 1;
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include "tor_readpassphrase.h"
|
#include "ext/tor_readpassphrase.h"
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user