瀏覽代碼

Prevent duplicate initialization of NSS DH module

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.
Nick Mathewson 5 年之前
父節點
當前提交
9e1a3be064
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/lib/crypt_ops/crypto_dh_nss.c

+ 2 - 0
src/lib/crypt_ops/crypto_dh_nss.c

@@ -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