For fuzzing: Expose directory_handle_command.

(Nick extracted this patch from a larger patch by Teor.)
This commit is contained in:
teor 2016-12-13 19:12:34 -05:00 committed by Nick Mathewson
parent 9bf89f80ce
commit 02068c6391
2 changed files with 3 additions and 2 deletions

View File

@ -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;

View File

@ -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