diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-08-21 10:12:54 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-08-21 10:12:54 -0400 |
commit | 2cf229ab60b43c79289292f918f671ae6fec5da4 (patch) | |
tree | 5b5215192b682df7b0039c5dc2c65b76264f5cf6 /src/common | |
parent | 916fba2243f36dcf53b078a95ce2389a63b94f72 (diff) | |
download | tor-2cf229ab60b43c79289292f918f671ae6fec5da4.tar.gz tor-2cf229ab60b43c79289292f918f671ae6fec5da4.zip |
Make the two branches of tor_tls_used_v1_handshake into one.
(Coverity thinks that "if (a) X; else X;" is probably a bug.)
[Coverity CID 1232086]
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/tortls.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/common/tortls.c b/src/common/tortls.c index 0f989684cf..5fe8d81c59 100644 --- a/src/common/tortls.c +++ b/src/common/tortls.c @@ -2611,16 +2611,20 @@ check_no_tls_errors_(const char *fname, int line) int tor_tls_used_v1_handshake(tor_tls_t *tls) { +#if defined(V2_HANDSHAKE_SERVER) && defined(V2_HANDSHAKE_CLIENT) + return ! tls->wasV2Handshake; +#else if (tls->isServer) { -#ifdef V2_HANDSHAKE_SERVER +# ifdef V2_HANDSHAKE_SERVER return ! tls->wasV2Handshake; -#endif +# endif } else { -#ifdef V2_HANDSHAKE_CLIENT +# ifdef V2_HANDSHAKE_CLIENT return ! tls->wasV2Handshake; -#endif +# endif } return 1; +#endif } /** Return true iff <b>name</b> is a DN of a kind that could only |