]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Use SSL_clear_mode where available.
authorNick Mathewson <nickm@torproject.org>
Wed, 13 May 2015 15:24:47 +0000 (11:24 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 13 May 2015 15:24:47 +0000 (11:24 -0400)
src/common/tortls.c

index 4a1567015672f9940ae8ab1c9e23b1514a05ea24..609328663715c2d23cf3304a464552ae8dd872cc 100644 (file)
@@ -2223,6 +2223,14 @@ tor_tls_handshake(tor_tls_t *tls)
   return r;
 }
 
+/* SSL_clear_mode was introduced in 0.9.8m */
+#ifndef SSL_clear_mode
+static void SSL_clear_mode(SSL *s, unsigned long m)
+{
+  s->mode &= ~m;
+}
+#endif
+
 /** Perform the final part of the intial TLS handshake on <b>tls</b>.  This
  * should be called for the first handshake only: it determines whether the v1
  * or the v2 handshake was used, and adjusts things for the renegotiation