Remove OPENSSL_NO_SHA512
Changes were made by running
find . -type f -name *.c | xargs unifdef -m -U OPENSSL_NO_SHA512
find . -type f -name *.h | xargs unifdef -m -U OPENSSL_NO_SHA512
Change-Id: I5c8a89384c865423aa7b549470068ef18161bce4
Reviewed-on: https://boringssl-review.googlesource.com/1379
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/ssl/s3_cbc.c b/ssl/s3_cbc.c
index f56f398..e80734e 100644
--- a/ssl/s3_cbc.c
+++ b/ssl/s3_cbc.c
@@ -367,7 +367,6 @@
#undef LARGEST_DIGEST_CTX
#define LARGEST_DIGEST_CTX SHA256_CTX
-#ifndef OPENSSL_NO_SHA512
static void tls1_sha512_final_raw(void* ctx, unsigned char *md_out)
{
SHA512_CTX *sha512 = ctx;
@@ -380,7 +379,6 @@
}
#undef LARGEST_DIGEST_CTX
#define LARGEST_DIGEST_CTX SHA512_CTX
-#endif
/* ssl3_cbc_record_digest_supported returns 1 iff |ctx| uses a hash function
* which ssl3_cbc_digest_record supports. */
@@ -392,10 +390,8 @@
case NID_sha1:
case NID_sha224:
case NID_sha256:
-#ifndef OPENSSL_NO_SHA512
case NID_sha384:
case NID_sha512:
-#endif
return 1;
default:
return 0;
@@ -486,7 +482,6 @@
md_transform = (void(*)(void *ctx, const unsigned char *block)) SHA256_Transform;
md_size = 32;
break;
-#ifndef OPENSSL_NO_SHA512
case NID_sha384:
SHA384_Init((SHA512_CTX*)md_state.c);
md_final_raw = tls1_sha512_final_raw;
@@ -503,7 +498,6 @@
md_block_size = 128;
md_length_size = 16;
break;
-#endif
default:
/* ssl3_cbc_record_digest_supported should have been
* called first to check that the hash function is
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c
index 1b7e3a7..7c52c7e 100644
--- a/ssl/t1_lib.c
+++ b/ssl/t1_lib.c
@@ -890,10 +890,8 @@
tlsext_sigalg_ecdsa(md)
static unsigned char tls12_sigalgs[] = {
-#ifndef OPENSSL_NO_SHA512
tlsext_sigalg(TLSEXT_hash_sha512)
tlsext_sigalg(TLSEXT_hash_sha384)
-#endif
tlsext_sigalg(TLSEXT_hash_sha256)
tlsext_sigalg(TLSEXT_hash_sha224)
#ifndef OPENSSL_NO_SHA
@@ -3025,13 +3023,11 @@
case TLSEXT_hash_sha256:
return EVP_sha256();
-#ifndef OPENSSL_NO_SHA512
case TLSEXT_hash_sha384:
return EVP_sha384();
case TLSEXT_hash_sha512:
return EVP_sha512();
-#endif
default:
return NULL;