mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
fix typos, whitespace, comments
This commit is contained in:
parent
338cfb3179
commit
d86896b29c
@ -2816,7 +2816,7 @@ static const char HTTP_CONNECT_IS_NOT_AN_HTTP_PROXY_MSG[] =
|
||||
"Content-Type: text/html; charset=iso-8859-1\r\n\r\n"
|
||||
"<html>\n"
|
||||
"<head>\n"
|
||||
"<title>This is an HTTP CONNECT tunnel, not an full HTTP Proxy</title>\n"
|
||||
"<title>This is an HTTP CONNECT tunnel, not a full HTTP Proxy</title>\n"
|
||||
"</head>\n"
|
||||
"<body>\n"
|
||||
"<h1>This is an HTTP CONNECT tunnel, not an HTTP proxy.</h1>\n"
|
||||
@ -2826,7 +2826,7 @@ static const char HTTP_CONNECT_IS_NOT_AN_HTTP_PROXY_MSG[] =
|
||||
"</p><p>\n"
|
||||
"This is not correct: This port is configured as a CONNECT tunnel, not\n"
|
||||
"an HTTP proxy. Please configure your client accordingly. You can also\n"
|
||||
"use HTTPS, then the client should automatically use HTTP CONNECT."
|
||||
"use HTTPS; then the client should automatically use HTTP CONNECT."
|
||||
"</p>\n"
|
||||
"<p>\n"
|
||||
"See <a href=\"https://www.torproject.org/documentation.html\">"
|
||||
|
@ -543,7 +543,7 @@ relay_command_to_string(uint8_t command)
|
||||
STATIC size_t
|
||||
get_pad_cell_offset(size_t data_len)
|
||||
{
|
||||
/* This is never suppose to happen but in case it does, stop right away
|
||||
/* This is never supposed to happen but in case it does, stop right away
|
||||
* because if tor is tricked somehow into not adding random bytes to the
|
||||
* payload with this function returning 0 for a bad data_len, the entire
|
||||
* authenticated SENDME design can be bypassed leading to bad denial of
|
||||
@ -577,7 +577,7 @@ pad_cell_payload(uint8_t *cell_payload, size_t data_len)
|
||||
}
|
||||
|
||||
/* Remember here that the cell_payload is the length of the header and
|
||||
* payload size so we offset it using the full lenght of the cell. */
|
||||
* payload size so we offset it using the full length of the cell. */
|
||||
pad_len = CELL_PAYLOAD_SIZE - pad_offset;
|
||||
crypto_fast_rng_getbytes(get_thread_fast_rng(),
|
||||
cell_payload + pad_offset, pad_len);
|
||||
@ -1621,7 +1621,7 @@ connection_edge_process_relay_cell(cell_t *cell, circuit_t *circ,
|
||||
}
|
||||
}
|
||||
|
||||
/* Tell circpad that we've recieved a recognized cell */
|
||||
/* Tell circpad that we've received a recognized cell */
|
||||
circpad_deliver_recognized_relay_cell_events(circ, rh.command, layer_hint);
|
||||
|
||||
/* either conn is NULL, in which case we've got a control cell, or else
|
||||
|
@ -157,7 +157,7 @@ cell_version_is_valid(uint8_t cell_version)
|
||||
*
|
||||
* This is the main critical function to make sure we can continue to
|
||||
* send/recv cells on a circuit. If the SENDME is invalid, the circuit should
|
||||
* be mark for close. */
|
||||
* be marked for close by the caller. */
|
||||
STATIC bool
|
||||
sendme_is_valid(const circuit_t *circ, const uint8_t *cell_payload,
|
||||
size_t cell_payload_len)
|
||||
@ -396,11 +396,11 @@ sendme_circuit_consider_sending(circuit_t *circ, crypt_path_t *layer_hint)
|
||||
* the length of the SENDME cell payload (excluding the header). The
|
||||
* cell_payload is the payload.
|
||||
*
|
||||
* Return 0 on success that is the SENDME is valid and the package window has
|
||||
* been updated properly.
|
||||
* Return 0 on success (the SENDME is valid and the package window has
|
||||
* been updated properly).
|
||||
*
|
||||
* On error, a negative value is returned which indicate that the circuit must
|
||||
* be closed using the value as the reason for it. */
|
||||
* On error, a negative value is returned, which indicates that the
|
||||
* circuit must be closed using the value as the reason for it. */
|
||||
int
|
||||
sendme_process_circuit_level(crypt_path_t *layer_hint,
|
||||
circuit_t *circ, const uint8_t *cell_payload,
|
||||
@ -462,11 +462,11 @@ sendme_process_circuit_level(crypt_path_t *layer_hint,
|
||||
* edge connection (stream) that the circuit circ is associated with. The
|
||||
* cell_body_len is the length of the payload (excluding the header).
|
||||
*
|
||||
* Return 0 on success that is the SENDME is valid and the package window has
|
||||
* been updated properly.
|
||||
* Return 0 on success (the SENDME is valid and the package window has
|
||||
* been updated properly).
|
||||
*
|
||||
* On error, a negative value is returned which indicate that the circuit must
|
||||
* be closed using the value as the reason for it. */
|
||||
* On error, a negative value is returned, which indicates that the
|
||||
* circuit must be closed using the value as the reason for it. */
|
||||
int
|
||||
sendme_process_stream_level(edge_connection_t *conn, circuit_t *circ,
|
||||
uint16_t cell_body_len)
|
||||
|
@ -937,7 +937,7 @@ state_query_del_all_(sr_state_object_t obj_type)
|
||||
} DIGESTMAP_FOREACH_END;
|
||||
break;
|
||||
}
|
||||
/* The following object are _NOT_ suppose to be removed. */
|
||||
/* The following objects are _NOT_ supposed to be removed. */
|
||||
case SR_STATE_OBJ_CURSRV:
|
||||
case SR_STATE_OBJ_PREVSRV:
|
||||
case SR_STATE_OBJ_PHASE:
|
||||
|
@ -697,7 +697,7 @@ setup_intro_circ_auth_key(origin_circuit_t *circ)
|
||||
}
|
||||
|
||||
/* Reaching this point means we didn't find any intro point for this circuit
|
||||
* which is not suppose to happen. */
|
||||
* which is not supposed to happen. */
|
||||
tor_assert_nonfatal_unreached();
|
||||
|
||||
end:
|
||||
|
@ -941,7 +941,7 @@ hs_parse_address(const char *address, ed25519_public_key_t *key_out,
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Validate a given onion address. The length, the base32 decoding and
|
||||
/* Validate a given onion address. The length, the base32 decoding, and
|
||||
* checksum are validated. Return 1 if valid else 0. */
|
||||
int
|
||||
hs_address_is_valid(const char *address)
|
||||
@ -956,7 +956,7 @@ hs_address_is_valid(const char *address)
|
||||
goto invalid;
|
||||
}
|
||||
|
||||
/* Get the checksum it's suppose to be and compare it with what we have
|
||||
/* Get the checksum it's supposed to be and compare it with what we have
|
||||
* encoded in the address. */
|
||||
build_hs_checksum(&service_pubkey, version, target_checksum);
|
||||
if (tor_memcmp(checksum, target_checksum, sizeof(checksum))) {
|
||||
@ -984,7 +984,7 @@ hs_address_is_valid(const char *address)
|
||||
* The returned address is base32 encoded and put in addr_out. The caller MUST
|
||||
* make sure the addr_out is at least HS_SERVICE_ADDR_LEN_BASE32 + 1 long.
|
||||
*
|
||||
* Format is as follow:
|
||||
* Format is as follows:
|
||||
* base32(PUBKEY || CHECKSUM || VERSION)
|
||||
* CHECKSUM = H(".onion checksum" || PUBKEY || VERSION)
|
||||
* */
|
||||
|
@ -11,7 +11,7 @@ TRUNNELINPUTS = \
|
||||
src/trunnel/link_handshake.trunnel \
|
||||
src/trunnel/pwbox.trunnel \
|
||||
src/trunnel/channelpadding_negotiation.trunnel \
|
||||
src/trunnel/sendme.trunnel \
|
||||
src/trunnel/sendme.trunnel \
|
||||
src/trunnel/socks5.trunnel \
|
||||
src/trunnel/circpad_negotiation.trunnel
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user