mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
More Extended ORPort code improvements.
* Change name of init_ext_or_auth_cookie_authentication(). * Add a small comment.
This commit is contained in:
parent
d8f74cc439
commit
c46f1b810d
@ -1481,7 +1481,7 @@ options_act(const or_options_t *old_options)
|
||||
}
|
||||
|
||||
/* If we have an ExtORPort, initialize its auth cookie. */
|
||||
if (init_ext_or_auth_cookie_authentication(!!options->ExtORPort_lines) < 0) {
|
||||
if (init_ext_or_cookie_authentication(!!options->ExtORPort_lines) < 0) {
|
||||
log_warn(LD_CONFIG,"Error creating Extended ORPort cookie file.");
|
||||
return -1;
|
||||
}
|
||||
|
@ -1406,6 +1406,7 @@ connection_init_accepted_conn(connection_t *conn,
|
||||
|
||||
switch (conn->type) {
|
||||
case CONN_TYPE_EXT_OR:
|
||||
/* Initiate Extended ORPort authentication. */
|
||||
return connection_ext_or_start_auth(TO_OR_CONN(conn));
|
||||
case CONN_TYPE_OR:
|
||||
control_event_or_conn_status(TO_OR_CONN(conn), OR_CONN_EVENT_NEW, 0);
|
||||
|
@ -128,7 +128,7 @@ get_ext_or_auth_cookie_file(void)
|
||||
* authorized to use the control connection. Return -1 if we can't
|
||||
* write the file, or 0 on success. */
|
||||
int
|
||||
init_ext_or_auth_cookie_authentication(int is_enabled)
|
||||
init_ext_or_cookie_authentication(int is_enabled)
|
||||
{
|
||||
char *fname;
|
||||
char cookie_file_string[EXT_OR_PORT_AUTH_COOKIE_FILE_LEN];
|
||||
|
@ -9,6 +9,6 @@ void connection_or_clear_ext_or_id_map(void);
|
||||
int connection_ext_or_finished_flushing(or_connection_t *conn);
|
||||
int connection_ext_or_process_inbuf(or_connection_t *or_conn);
|
||||
|
||||
int init_ext_or_auth_cookie_authentication(int is_enabled);
|
||||
int init_ext_or_cookie_authentication(int is_enabled);
|
||||
char *get_ext_or_auth_cookie_file(void);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user