mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
relay: Silence compiler warnings when relay mode is disabled
Part of 32123.
This commit is contained in:
parent
57e86a6d74
commit
e2280d6f84
@ -372,6 +372,8 @@ assert_identity_keys_ok(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_MODULE_RELAY
|
||||||
|
|
||||||
/** Returns the current server identity key; requires that the key has
|
/** Returns the current server identity key; requires that the key has
|
||||||
* been set, and that we are running as a Tor server.
|
* been set, and that we are running as a Tor server.
|
||||||
*/
|
*/
|
||||||
@ -384,6 +386,8 @@ get_server_identity_key,(void))
|
|||||||
return server_identitykey;
|
return server_identitykey;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/** Return true iff we are a server and the server identity key
|
/** Return true iff we are a server and the server identity key
|
||||||
* has been set. */
|
* has been set. */
|
||||||
int
|
int
|
||||||
|
@ -28,7 +28,13 @@ struct ed25519_keypair_t;
|
|||||||
MOCK_DECL(crypto_pk_t *,get_onion_key,(void));
|
MOCK_DECL(crypto_pk_t *,get_onion_key,(void));
|
||||||
time_t get_onion_key_set_at(void);
|
time_t get_onion_key_set_at(void);
|
||||||
void set_server_identity_key(crypto_pk_t *k);
|
void set_server_identity_key(crypto_pk_t *k);
|
||||||
|
/* Some compilers are clever enough to know that when relay mode is disabled,
|
||||||
|
* this function never returns. */
|
||||||
|
#ifdef HAVE_MODULE_RELAY
|
||||||
MOCK_DECL(crypto_pk_t *,get_server_identity_key,(void));
|
MOCK_DECL(crypto_pk_t *,get_server_identity_key,(void));
|
||||||
|
#else
|
||||||
|
#define get_server_identity_key() (tor_abort_(),NULL)
|
||||||
|
#endif
|
||||||
int server_identity_key_is_set(void);
|
int server_identity_key_is_set(void);
|
||||||
void set_client_identity_key(crypto_pk_t *k);
|
void set_client_identity_key(crypto_pk_t *k);
|
||||||
crypto_pk_t *get_tlsclient_identity_key(void);
|
crypto_pk_t *get_tlsclient_identity_key(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user