diff options
author | Nick Mathewson <nickm@torproject.org> | 2010-10-21 16:23:01 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-10-21 16:23:01 -0400 |
commit | 17fdde3d9251e92f01be839efe7fc7cac4854484 (patch) | |
tree | f22d97b3a46d499dc40c9b958afa1e634909ea55 /src/or/connection_or.c | |
parent | f3eb2a10ae432eb0907418ff69b5e9535b3c7970 (diff) | |
parent | 441241c13692051ff1b4ae86eaf472a8782cd5d6 (diff) | |
download | tor-17fdde3d9251e92f01be839efe7fc7cac4854484.tar.gz tor-17fdde3d9251e92f01be839efe7fc7cac4854484.zip |
Merge remote branch 'origin/maint-0.2.2'
Conflicts:
src/common/tortls.c
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r-- | src/or/connection_or.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c index 9f979f086e..467f7be904 100644 --- a/src/or/connection_or.c +++ b/src/or/connection_or.c @@ -1142,6 +1142,9 @@ connection_or_check_valid_tls_handshake(or_connection_t *conn, started_here ? conn->_base.address : safe_str_client(conn->_base.address); const char *conn_type = started_here ? "outgoing" : "incoming"; + crypto_pk_env_t *our_identity = + started_here ? get_tlsclient_identity_key() : + get_server_identity_key(); int has_cert = 0, has_identity=0; check_no_tls_errors(); @@ -1179,7 +1182,7 @@ connection_or_check_valid_tls_handshake(or_connection_t *conn, if (identity_rcvd) { has_identity = 1; crypto_pk_get_digest(identity_rcvd, digest_rcvd_out); - if (crypto_pk_cmp_keys(get_identity_key(), identity_rcvd)<0) { + if (crypto_pk_cmp_keys(our_identity, identity_rcvd)<0) { conn->circ_id_type = CIRC_ID_TYPE_LOWER; } else { conn->circ_id_type = CIRC_ID_TYPE_HIGHER; |