From 1d1d5ae7f8f91b62f0e86081ff1f7255c545383b Mon Sep 17 00:00:00 2001 From: George Kadianakis Date: Fri, 25 Nov 2011 01:08:31 +0100 Subject: [PATCH] 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 0f828db81f..8b0f0ef9da 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 dynamic_dh_modulus_fname 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 504c59b1a7..683c8ea38f 100644 --- a/src/common/crypto.h +++ b/src/common/crypto.h @@ -16,8 +16,6 @@ #include #include "torint.h" -#include - /** 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 e3feeedc27..ec49014d94 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 b9e9f2a713..f9d156cb09 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);