Commit 2cf229ab authored by Nick Mathewson's avatar Nick Mathewson 🤹
Browse files

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]
parent 916fba22
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -2611,6 +2611,9 @@ 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
    return ! tls->wasV2Handshake;
@@ -2621,6 +2624,7 @@ tor_tls_used_v1_handshake(tor_tls_t *tls)
# endif
  }
  return 1;
#endif
}

/** Return true iff <b>name</b> is a DN of a kind that could only