]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix a bug in usage of SSL_set1_groups_list()
authorNick Mathewson <nickm@torproject.org>
Sun, 11 Nov 2018 23:03:50 +0000 (18:03 -0500)
committerNick Mathewson <nickm@torproject.org>
Sun, 11 Nov 2018 23:03:50 +0000 (18:03 -0500)
Apparently, even though the manpage says it returns an int, it
can return a long instead and cause a warning.

Bug not in any released Tor.  Part of #28399

src/common/tortls.c

index 7c50f871122130bbfed3384ed5c2039f39616d45..1fbe3c663e80173de9471d21872739277a808c61 100644 (file)
@@ -1228,7 +1228,7 @@ tor_tls_context_new(crypto_pk_t *identity, unsigned int key_lifetime,
       list = "P-256:P-224";
     else
       list = "P-256:P-224";
-    int r = SSL_CTX_set1_groups_list(result->ctx, list);
+    int r = (int) SSL_CTX_set1_groups_list(result->ctx, list);
     if (r < 0)
       goto error;
   }