diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-01-03 09:02:40 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-01-03 09:02:40 -0500 |
commit | 27853938a19bc6a861a7575ad059982bb5006e6e (patch) | |
tree | c608245ba7dd2c8b6d351a25ade515aa49505a83 /src/core/or/connection_or.c | |
parent | 3e7f13a4ef6ff96617f26f434efa529bbf17f9ef (diff) | |
parent | ed62f0fa151f7a21a9634fbec1e95832ddbede94 (diff) | |
download | tor-27853938a19bc6a861a7575ad059982bb5006e6e.tar.gz tor-27853938a19bc6a861a7575ad059982bb5006e6e.zip |
Merge branch 'maint-0.3.5'
Diffstat (limited to 'src/core/or/connection_or.c')
-rw-r--r-- | src/core/or/connection_or.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/core/or/connection_or.c b/src/core/or/connection_or.c index 5d0874869d..c8667fc399 100644 --- a/src/core/or/connection_or.c +++ b/src/core/or/connection_or.c @@ -2965,9 +2965,15 @@ connection_or_compute_authenticate_cell_body(or_connection_t *conn, char label[128]; tor_snprintf(label, sizeof(label), "EXPORTER FOR TOR TLS CLIENT BINDING %s", authtype_str); - tor_tls_export_key_material(conn->tls, auth->tlssecrets, - auth->cid, sizeof(auth->cid), - label); + int r = tor_tls_export_key_material(conn->tls, auth->tlssecrets, + auth->cid, sizeof(auth->cid), + label); + if (r < 0) { + if (r != -2) + log_warn(LD_BUG, "TLS key export failed for unknown reason."); + // If r == -2, this was openssl bug 7712. + goto err; + } } /* 8 octets were reserved for the current time, but we're trying to get out @@ -3095,10 +3101,8 @@ connection_or_send_authenticate_cell,(or_connection_t *conn, int authtype)) get_current_auth_keypair(), 0 /* not server */); if (! cell) { - /* LCOV_EXCL_START */ - log_warn(LD_BUG, "Unable to compute authenticate cell!"); + log_fn(LOG_PROTOCOL_WARN, LD_NET, "Unable to compute authenticate cell!"); return -1; - /* LCOV_EXCL_STOP */ } connection_or_write_var_cell_to_buf(cell, conn); var_cell_free(cell); |