Appease "make check-spaces"

This commit is contained in:
Nick Mathewson
2015-12-20 15:00:20 -05:00
parent 2d9c38ea72
commit bb19799a49
3 changed files with 41 additions and 23 deletions
+7 -4
View File
@@ -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
+5 -4
View File
@@ -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;