mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 13:43:47 +01:00
For fuzzing: Expose directory_handle_command.
(Nick extracted this patch from a larger patch by Teor.)
This commit is contained in:
parent
9bf89f80ce
commit
02068c6391
@ -14,6 +14,7 @@
|
||||
#include "connection.h"
|
||||
#include "connection_edge.h"
|
||||
#include "control.h"
|
||||
#define DIRECTORY_PRIVATE
|
||||
#include "directory.h"
|
||||
#include "dirserv.h"
|
||||
#include "dirvote.h"
|
||||
@ -99,7 +100,6 @@ static void directory_send_command(dir_connection_t *conn,
|
||||
int purpose, int direct, const char *resource,
|
||||
const char *payload, size_t payload_len,
|
||||
time_t if_modified_since);
|
||||
static int directory_handle_command(dir_connection_t *conn);
|
||||
static int body_is_plausible(const char *body, size_t body_len, int purpose);
|
||||
static char *http_get_header(const char *headers, const char *which);
|
||||
static void http_set_address_origin(const char *headers, connection_t *conn);
|
||||
@ -3846,7 +3846,7 @@ directory_handle_command_post(dir_connection_t *conn, const char *headers,
|
||||
* from the inbuf, try to process it; otherwise, leave it on the
|
||||
* buffer. Return a 0 on success, or -1 on error.
|
||||
*/
|
||||
static int
|
||||
STATIC int
|
||||
directory_handle_command(dir_connection_t *conn)
|
||||
{
|
||||
char *headers=NULL, *body=NULL;
|
||||
|
@ -148,6 +148,7 @@ int purpose_needs_anonymity(uint8_t dir_purpose, uint8_t router_purpose,
|
||||
struct get_handler_args_t;
|
||||
STATIC int handle_get_hs_descriptor_v3(dir_connection_t *conn,
|
||||
const struct get_handler_args_t *args);
|
||||
STATIC int directory_handle_command(dir_connection_t *conn);
|
||||
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user