Loading src/or/config.c +3 −3 Original line number Diff line number Diff line Loading @@ -713,7 +713,7 @@ or_options_free(or_options_t *options) return; routerset_free(options->_ExcludeExitNodesUnion); tor_free(options->BridgePassword_AuthDigest); tor_free(options->_BridgePassword_AuthDigest); config_free(&options_format, options); } Loading Loading @@ -1310,8 +1310,8 @@ options_act(or_options_t *old_options) "BridgePassword."); return -1; } options->BridgePassword_AuthDigest = tor_malloc(DIGEST256_LEN); crypto_digest256(options->BridgePassword_AuthDigest, options->_BridgePassword_AuthDigest = tor_malloc(DIGEST256_LEN); crypto_digest256(options->_BridgePassword_AuthDigest, http_authenticator, strlen(http_authenticator), DIGEST_SHA256); tor_free(http_authenticator); Loading src/or/directory.c +3 −2 Original line number Diff line number Diff line Loading @@ -3069,7 +3069,7 @@ directory_handle_command_get(dir_connection_t *conn, const char *headers, } if (options->BridgeAuthoritativeDir && options->BridgePassword_AuthDigest && options->_BridgePassword_AuthDigest && connection_dir_is_encrypted(conn) && !strcmp(url,"/tor/networkstatus-bridges")) { char *status; Loading @@ -3081,7 +3081,8 @@ directory_handle_command_get(dir_connection_t *conn, const char *headers, /* now make sure the password is there and right */ if (!header || tor_memneq(digest, options->BridgePassword_AuthDigest, DIGEST256_LEN)) { tor_memneq(digest, options->_BridgePassword_AuthDigest, DIGEST256_LEN)) { write_http_status_line(conn, 404, "Not found"); tor_free(header); goto done; Loading src/or/or.h +2 −2 Original line number Diff line number Diff line Loading @@ -2492,8 +2492,8 @@ typedef struct { * for bridge statuses -- but only if the requests use this password. */ char *BridgePassword; /** If BridgePassword is set, this is a SHA256 digest of the basic http * authenticator for it. */ char *BridgePassword_AuthDigest; * authenticator for it. Used so we can do a time-independent comparison. */ char *_BridgePassword_AuthDigest; int UseBridges; /**< Boolean: should we start all circuits with a bridge? */ config_line_t *Bridges; /**< List of bootstrap bridge addresses. */ Loading Loading
src/or/config.c +3 −3 Original line number Diff line number Diff line Loading @@ -713,7 +713,7 @@ or_options_free(or_options_t *options) return; routerset_free(options->_ExcludeExitNodesUnion); tor_free(options->BridgePassword_AuthDigest); tor_free(options->_BridgePassword_AuthDigest); config_free(&options_format, options); } Loading Loading @@ -1310,8 +1310,8 @@ options_act(or_options_t *old_options) "BridgePassword."); return -1; } options->BridgePassword_AuthDigest = tor_malloc(DIGEST256_LEN); crypto_digest256(options->BridgePassword_AuthDigest, options->_BridgePassword_AuthDigest = tor_malloc(DIGEST256_LEN); crypto_digest256(options->_BridgePassword_AuthDigest, http_authenticator, strlen(http_authenticator), DIGEST_SHA256); tor_free(http_authenticator); Loading
src/or/directory.c +3 −2 Original line number Diff line number Diff line Loading @@ -3069,7 +3069,7 @@ directory_handle_command_get(dir_connection_t *conn, const char *headers, } if (options->BridgeAuthoritativeDir && options->BridgePassword_AuthDigest && options->_BridgePassword_AuthDigest && connection_dir_is_encrypted(conn) && !strcmp(url,"/tor/networkstatus-bridges")) { char *status; Loading @@ -3081,7 +3081,8 @@ directory_handle_command_get(dir_connection_t *conn, const char *headers, /* now make sure the password is there and right */ if (!header || tor_memneq(digest, options->BridgePassword_AuthDigest, DIGEST256_LEN)) { tor_memneq(digest, options->_BridgePassword_AuthDigest, DIGEST256_LEN)) { write_http_status_line(conn, 404, "Not found"); tor_free(header); goto done; Loading
src/or/or.h +2 −2 Original line number Diff line number Diff line Loading @@ -2492,8 +2492,8 @@ typedef struct { * for bridge statuses -- but only if the requests use this password. */ char *BridgePassword; /** If BridgePassword is set, this is a SHA256 digest of the basic http * authenticator for it. */ char *BridgePassword_AuthDigest; * authenticator for it. Used so we can do a time-independent comparison. */ char *_BridgePassword_AuthDigest; int UseBridges; /**< Boolean: should we start all circuits with a bridge? */ config_line_t *Bridges; /**< List of bootstrap bridge addresses. */ Loading