aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-12-20 15:00:20 -0500
committerNick Mathewson <nickm@torproject.org>2015-12-20 15:00:20 -0500
commitbb19799a49cf43feff46da1a445e8d80273ca0a3 (patch)
tree4b9f3f91dc6ab558ec79505b6cf028a3720503fc /src/common
parent2d9c38ea7295dc484c0e9a884b4b90f436f83627 (diff)
downloadtor-bb19799a49cf43feff46da1a445e8d80273ca0a3.tar.gz
tor-bb19799a49cf43feff46da1a445e8d80273ca0a3.zip
Appease "make check-spaces"
Diffstat (limited to 'src/common')
-rw-r--r--src/common/crypto.c11
-rw-r--r--src/common/tortls.c9
2 files changed, 12 insertions, 8 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c
index b39f9c16e3..a11ca79c04 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -1620,9 +1620,10 @@ crypto_digest256(char *digest, const char *m, size_t len,
tor_assert(digest);
tor_assert(algorithm == DIGEST_SHA256 || algorithm == DIGEST_SHA3_256);
if (algorithm == DIGEST_SHA256)
- return (SHA256((const unsigned char*)m,len,(unsigned char*)digest) == NULL);
+ return (SHA256((const uint8_t*)m,len,(uint8_t*)digest) == NULL);
else
- return (sha3_256((uint8_t *)digest, DIGEST256_LEN, (const uint8_t *)m, len) == -1);
+ return (sha3_256((uint8_t *)digest, DIGEST256_LEN,(const uint8_t *)m, len)
+ == -1);
}
/** Compute a 512-bit digest of <b>len</b> bytes in data stored in <b>m</b>,
@@ -1636,9 +1637,11 @@ crypto_digest512(char *digest, const char *m, size_t len,
tor_assert(digest);
tor_assert(algorithm == DIGEST_SHA512 || algorithm == DIGEST_SHA3_512);
if (algorithm == DIGEST_SHA512)
- return (SHA512((const unsigned char*)m,len,(unsigned char*)digest) == NULL);
+ return (SHA512((const unsigned char*)m,len,(unsigned char*)digest)
+ == NULL);
else
- return (sha3_512((uint8_t*)digest, DIGEST512_LEN, (const uint8_t*)m, len) == -1);
+ return (sha3_512((uint8_t*)digest, DIGEST512_LEN, (const uint8_t*)m, len)
+ == -1);
}
/** Set the digests_t in <b>ds_out</b> to contain every digest on the
diff --git a/src/common/tortls.c b/src/common/tortls.c
index 78f731bbcc..6e4cd3d480 100644
--- a/src/common/tortls.c
+++ b/src/common/tortls.c
@@ -1324,7 +1324,8 @@ find_cipher_by_id(const SSL *ssl, const SSL_METHOD *m, uint16_t cipher)
return c != NULL;
}
#else
-#if defined(HAVE_STRUCT_SSL_METHOD_ST_GET_CIPHER_BY_CHAR)
+
+# if defined(HAVE_STRUCT_SSL_METHOD_ST_GET_CIPHER_BY_CHAR)
if (m && m->get_cipher_by_char) {
unsigned char cipherid[3];
set_uint16(cipherid, htons(cipher));
@@ -1336,8 +1337,8 @@ find_cipher_by_id(const SSL *ssl, const SSL_METHOD *m, uint16_t cipher)
tor_assert((c->id & 0xffff) == cipher);
return c != NULL;
}
-#endif
-#if OPENSSL_VERSION_NUMBER < OPENSSL_V_SERIES(1,1,0)
+# endif
+# if OPENSSL_VERSION_NUMBER < OPENSSL_V_SERIES(1,1,0)
if (m && m->get_cipher && m->num_ciphers) {
/* It would seem that some of the "let's-clean-up-openssl" forks have
* removed the get_cipher_by_char function. Okay, so now you get a
@@ -1352,7 +1353,7 @@ find_cipher_by_id(const SSL *ssl, const SSL_METHOD *m, uint16_t cipher)
}
return 0;
}
-#endif
+# endif
(void) ssl;
(void) m;
(void) cipher;