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>
This commit is contained in:
parent
69877b6119
commit
499b440135
@ -367,7 +367,6 @@ static void tls1_sha256_final_raw(void* ctx, unsigned char *md_out)
|
||||
#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 @@ static void tls1_sha512_final_raw(void* ctx, unsigned char *md_out)
|
||||
}
|
||||
#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 @@ char ssl3_cbc_record_digest_supported(const EVP_MD_CTX *ctx)
|
||||
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 @@ void ssl3_cbc_digest_record(
|
||||
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 @@ void ssl3_cbc_digest_record(
|
||||
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
|
||||
|
@ -890,10 +890,8 @@ static int tls1_check_cert_param(SSL *s, X509 *x, int set_ee_md)
|
||||
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 @@ const EVP_MD *tls12_get_hash(unsigned char hash_alg)
|
||||
|
||||
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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user