aboutsummaryrefslogtreecommitdiff
path: root/src/or/directory.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2009-08-20 16:50:51 -0400
committerRoger Dingledine <arma@torproject.org>2009-08-20 16:50:51 -0400
commit7f518873eb58b4d12d6db8ccbf98fb626529f859 (patch)
treed59ddac879322bc5cbe13069612e311e6627223b /src/or/directory.c
parent5da3b45fdce8354e320df91b26a170b21291c32e (diff)
downloadtor-7f518873eb58b4d12d6db8ccbf98fb626529f859.tar
tor-7f518873eb58b4d12d6db8ccbf98fb626529f859.tar.gz
Notice v3 cert parsing failures
If any the v3 certs we download are unparseable, we should actually notice the failure so we don't retry indefinitely. Bugfix on 0.2.0.x; reported by "rotator".
Diffstat (limited to 'src/or/directory.c')
-rw-r--r--src/or/directory.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index 976c08c19..93046489f 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -1649,6 +1649,8 @@ connection_dir_client_reached_eof(dir_connection_t *conn)
"'%s:%d'",(int) body_len, conn->_base.address, conn->_base.port);
if (trusted_dirs_load_certs_from_string(body, 0, 1)<0) {
log_warn(LD_DIR, "Unable to parse fetched certificates");
+ /* if we fetched more than one and only some failed, the successful
+ * ones got flushed to disk so it's safe to call this on them */
connection_dir_download_cert_failed(conn, status_code);
} else {
directory_info_has_arrived(now, 0);