]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Prevent duplicate initialization of NSS DH module
authorNick Mathewson <nickm@torproject.org>
Thu, 27 Sep 2018 17:26:47 +0000 (13:26 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 27 Sep 2018 17:26:47 +0000 (13:26 -0400)
Allowing this didn't do any actual harm, since there aren't any
shared structures or leakable objects here.  Still, it's bad style
and might cause trouble in the future.

Closes ticket 27856.

src/lib/crypt_ops/crypto_dh_nss.c

index 9a14b809b49ad6087254379aad8a5619c62efa1e..e2d9040f5e8d4968d7e4e293d3ac67d1fc6f8a22 100644 (file)
@@ -53,6 +53,8 @@ crypto_dh_init_nss(void)
   circuit_dh_param.prime.len = DH1024_KEY_LEN;
   circuit_dh_param.base.data = dh_generator_data;
   circuit_dh_param.base.len = 1;
+
+  dh_initialized = 1;
 }
 
 void