aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection_or.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-01-03 17:53:20 +0000
committerNick Mathewson <nickm@torproject.org>2005-01-03 17:53:20 +0000
commitfca7ba977765061731873ef36a32777f0df8ee89 (patch)
tree1daf736f4f1514112bb85c8aa5be6dfa7745d5a8 /src/or/connection_or.c
parent59504f483157420dc2562e8a750070965a2cdc42 (diff)
downloadtor-fca7ba977765061731873ef36a32777f0df8ee89.tar.gz
tor-fca7ba977765061731873ef36a32777f0df8ee89.zip
Resolve task 42: find where 19-char nicknames were getting truncated when read from certs, and fix it. Also audit use of MAX_NICKNAME_LEN; no other badness found, but some docs/code cleaned up a touch.
svn:r3244
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r--src/or/connection_or.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 3520bd2ffc..2fed1f89a7 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -354,7 +354,7 @@ connection_tls_finish_handshake(connection_t *conn) {
}
}
/* Okay; the other side is an OR or a post-0.0.8 OP (with a cert). */
- if (tor_tls_get_peer_cert_nickname(conn->tls, nickname, MAX_NICKNAME_LEN)) {
+ if (tor_tls_get_peer_cert_nickname(conn->tls, nickname, sizeof(nickname))) {
log_fn(LOG_WARN,"Other side (%s:%d) has a cert without a valid nickname. Closing.",
conn->address, conn->port);
return -1;