[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Finishing touches.



commit 1d1d5ae7f8f91b62f0e86081ff1f7255c545383b
Author: George Kadianakis <desnacked@xxxxxxxxx>
Date:   Fri Nov 25 01:08:31 2011 +0100

    Finishing touches.
    
    - Make check-spaces happy.
    - Remove a stray header from crypto.h
---
 src/common/crypto.c |   16 +++++++---------
 src/common/crypto.h |    2 --
 src/or/or.h         |    2 +-
 src/or/router.h     |    1 -
 4 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/src/common/crypto.c b/src/common/crypto.c
index 0f828db..8b0f0ef 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -1862,7 +1862,7 @@ crypto_store_dynamic_dh_modulus(const char *fname)
   fname_status = file_status(fname);
 
   if (fname_status == FN_FILE) {
-    /* If the fname is a file, then the dynamic DH modulus is already stored. */
+    /* If the fname is a file, then the dynamic DH modulus is already stored.*/
     retval = 0;
     goto done;
   } else if (fname_status != FN_NOENT) {
@@ -1939,7 +1939,6 @@ crypto_get_stored_dynamic_dh_modulus(const char *fname)
                "than '%d' bits.", DH_BYTES*8);
       goto err;
     }
-
   }
 
   { /* log the dynamic DH modulus: */
@@ -1965,7 +1964,6 @@ crypto_get_stored_dynamic_dh_modulus(const char *fname)
   return dynamic_dh_modulus;
 }
 
-
 /** Set the global TLS Diffie-Hellman modulus.
  * If <b>dynamic_dh_modulus_fname</b> is set, try to read a dynamic DH modulus
  * off it and use it as the DH modulus. If that's not possible,
@@ -2001,12 +1999,12 @@ crypto_set_tls_dh_prime(const char *dynamic_dh_modulus_fname)
      * modules/ssl/ssl_engine_dh.c; Apache also uses a generator of 2 with this
      * prime.
      */
-    r = BN_hex2bn(&tls_prime,
-                  "D67DE440CBBBDC1936D693D34AFD0AD50C84D239A45F520BB88174CB98"
-                  "BCE951849F912E639C72FB13B4B4D7177E16D55AC179BA420B2A29FE324A"
-                  "467A635E81FF5901377BEDDCFD33168A461AAD3B72DAE8860078045B07A7"
-                  "DBCA7874087D1510EA9FCC9DDD330507DD62DB88AEAA747DE0F4D6E2BD68"
-                  "B0E7393E0F24218EB3");
+    r =BN_hex2bn(&tls_prime,
+                 "D67DE440CBBBDC1936D693D34AFD0AD50C84D239A45F520BB88174CB98"
+                 "BCE951849F912E639C72FB13B4B4D7177E16D55AC179BA420B2A29FE324A"
+                 "467A635E81FF5901377BEDDCFD33168A461AAD3B72DAE8860078045B07A7"
+                 "DBCA7874087D1510EA9FCC9DDD330507DD62DB88AEAA747DE0F4D6E2BD68"
+                 "B0E7393E0F24218EB3");
     tor_assert(r);
   }
 
diff --git a/src/common/crypto.h b/src/common/crypto.h
index 504c59b..683c8ea 100644
--- a/src/common/crypto.h
+++ b/src/common/crypto.h
@@ -16,8 +16,6 @@
 #include <stdio.h>
 #include "torint.h"
 
-#include <openssl/bn.h>
-
 /** Length of the output of our message digest. */
 #define DIGEST_LEN 20
 /** Length of the output of our second (improved) message digests.  (For now
diff --git a/src/or/or.h b/src/or/or.h
index e3feeed..ec49014 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -2873,7 +2873,7 @@ typedef struct {
   char *Address; /**< OR only: configured address for this onion router. */
   char *PidFile; /**< Where to store PID of Tor process. */
 
-  int DynamicDHGroups; /**< Enable dynamic generation of primes for use in DH. */
+  int DynamicDHGroups; /**< Dynamic generation of prime moduli for use in DH.*/
 
   routerset_t *ExitNodes; /**< Structure containing nicknames, digests,
                            * country codes and IP address patterns of ORs to
diff --git a/src/or/router.h b/src/or/router.h
index b9e9f2a..f9d156c 100644
--- a/src/or/router.h
+++ b/src/or/router.h
@@ -28,7 +28,6 @@ void dup_onion_keys(crypto_pk_env_t **key, crypto_pk_env_t **last);
 void rotate_onion_key(void);
 crypto_pk_env_t *init_key_from_file(const char *fname, int generate,
                                     int severity);
-
 void v3_authority_check_key_expiry(void);
 
 int init_keys(void);



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits