2019-03-25 14:03:49 -04:00
|
|
|
/* Copyright (c) 2001 Matej Pfajfar.
|
|
|
|
* Copyright (c) 2001-2004, Roger Dingledine.
|
|
|
|
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
|
2020-01-08 18:39:17 -05:00
|
|
|
* Copyright (c) 2007-2020, The Tor Project, Inc. */
|
2019-03-25 14:03:49 -04:00
|
|
|
/* See LICENSE for licensing information */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \file control_auth.h
|
|
|
|
* \brief Header file for control_auth.c.
|
|
|
|
**/
|
|
|
|
|
|
|
|
#ifndef TOR_CONTROL_AUTH_H
|
|
|
|
#define TOR_CONTROL_AUTH_H
|
|
|
|
|
2019-04-09 10:09:38 -04:00
|
|
|
struct control_cmd_args_t;
|
|
|
|
struct control_cmd_syntax_t;
|
|
|
|
|
2019-03-25 14:03:49 -04:00
|
|
|
int init_control_cookie_authentication(int enabled);
|
|
|
|
char *get_controller_cookie_file_name(void);
|
|
|
|
struct config_line_t;
|
|
|
|
smartlist_t *decode_hashed_passwords(struct config_line_t *passwords);
|
|
|
|
|
2019-04-09 10:09:38 -04:00
|
|
|
int handle_control_authchallenge(control_connection_t *conn,
|
|
|
|
const struct control_cmd_args_t *args);
|
2019-03-25 14:03:49 -04:00
|
|
|
int handle_control_authenticate(control_connection_t *conn,
|
2019-04-09 10:09:38 -04:00
|
|
|
const struct control_cmd_args_t *args);
|
2019-03-25 14:03:49 -04:00
|
|
|
void control_auth_free_all(void);
|
|
|
|
|
2019-04-09 10:09:38 -04:00
|
|
|
extern const struct control_cmd_syntax_t authchallenge_syntax;
|
|
|
|
extern const struct control_cmd_syntax_t authenticate_syntax;
|
|
|
|
|
2019-03-25 14:03:49 -04:00
|
|
|
#endif /* !defined(TOR_CONTROL_AUTH_H) */
|