diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-01-03 09:02:39 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-01-03 09:02:39 -0500 |
commit | ed62f0fa151f7a21a9634fbec1e95832ddbede94 (patch) | |
tree | c8a9edd8843651d121f6abaa9b803f9c6f1b57b5 /src/core | |
parent | 98755cbddf64860efce6ab357f119b8d7e769a1b (diff) | |
parent | 3e64553f769a4d2536c9f0ac0ad289cf9c41826d (diff) | |
download | tor-ed62f0fa151f7a21a9634fbec1e95832ddbede94.tar.gz tor-ed62f0fa151f7a21a9634fbec1e95832ddbede94.zip |
Merge branch 'maint-0.3.4' into maint-0.3.5
Diffstat (limited to 'src/core')
-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 65f4e28c92..e6f04259f5 100644 --- a/src/core/or/connection_or.c +++ b/src/core/or/connection_or.c @@ -2880,9 +2880,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 @@ -3010,10 +3016,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); |