diff --git a/ssl/s3_cbc.c b/ssl/s3_cbc.c index e39d488e..f56f3985 100644 --- a/ssl/s3_cbc.c +++ b/ssl/s3_cbc.c @@ -354,7 +354,6 @@ static void tls1_sha1_final_raw(void* ctx, unsigned char *md_out) } #define LARGEST_DIGEST_CTX SHA_CTX -#ifndef OPENSSL_NO_SHA256 static void tls1_sha256_final_raw(void* ctx, unsigned char *md_out) { SHA256_CTX *sha256 = ctx; @@ -367,7 +366,6 @@ static void tls1_sha256_final_raw(void* ctx, unsigned char *md_out) } #undef LARGEST_DIGEST_CTX #define LARGEST_DIGEST_CTX SHA256_CTX -#endif #ifndef OPENSSL_NO_SHA512 static void tls1_sha512_final_raw(void* ctx, unsigned char *md_out) @@ -392,10 +390,8 @@ char ssl3_cbc_record_digest_supported(const EVP_MD_CTX *ctx) { case NID_md5: case NID_sha1: -#ifndef OPENSSL_NO_SHA256 case NID_sha224: case NID_sha256: -#endif #ifndef OPENSSL_NO_SHA512 case NID_sha384: case NID_sha512: @@ -478,7 +474,6 @@ void ssl3_cbc_digest_record( md_transform = (void(*)(void *ctx, const unsigned char *block)) SHA1_Transform; md_size = 20; break; -#ifndef OPENSSL_NO_SHA256 case NID_sha224: SHA224_Init((SHA256_CTX*)md_state.c); md_final_raw = tls1_sha256_final_raw; @@ -491,7 +486,6 @@ void ssl3_cbc_digest_record( md_transform = (void(*)(void *ctx, const unsigned char *block)) SHA256_Transform; md_size = 32; break; -#endif #ifndef OPENSSL_NO_SHA512 case NID_sha384: SHA384_Init((SHA512_CTX*)md_state.c); diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c index c2b7cad6..026a0ac9 100644 --- a/ssl/s3_clnt.c +++ b/ssl/s3_clnt.c @@ -1877,11 +1877,7 @@ int ssl3_get_new_session_ticket(SSL *s) */ EVP_Digest(CBS_data(&ticket), CBS_len(&ticket), s->session->session_id, &s->session->session_id_length, -#ifndef OPENSSL_NO_SHA256 EVP_sha256(), NULL); -#else - EVP_sha1(), NULL); -#endif ret=1; return(ret); f_err: diff --git a/ssl/ssl_locl.h b/ssl/ssl_locl.h index e2d0850e..ef3e759f 100644 --- a/ssl/ssl_locl.h +++ b/ssl/ssl_locl.h @@ -1151,11 +1151,7 @@ int ssl_parse_serverhello_tlsext(SSL *s, CBS *cbs); int ssl_prepare_clienthello_tlsext(SSL *s); int ssl_prepare_serverhello_tlsext(SSL *s); -#ifdef OPENSSL_NO_SHA256 -#define tlsext_tick_md EVP_sha1 -#else #define tlsext_tick_md EVP_sha256 -#endif int tls1_process_ticket(SSL *s, const struct ssl_early_callback_ctx *ctx, SSL_SESSION **ret); diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index 192a0839..1b7e3a7d 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -894,10 +894,8 @@ static unsigned char tls12_sigalgs[] = { tlsext_sigalg(TLSEXT_hash_sha512) tlsext_sigalg(TLSEXT_hash_sha384) #endif -#ifndef OPENSSL_NO_SHA256 tlsext_sigalg(TLSEXT_hash_sha256) tlsext_sigalg(TLSEXT_hash_sha224) -#endif #ifndef OPENSSL_NO_SHA tlsext_sigalg(TLSEXT_hash_sha1) #endif @@ -3022,13 +3020,11 @@ const EVP_MD *tls12_get_hash(unsigned char hash_alg) case TLSEXT_hash_sha1: return EVP_sha1(); #endif -#ifndef OPENSSL_NO_SHA256 case TLSEXT_hash_sha224: return EVP_sha224(); case TLSEXT_hash_sha256: return EVP_sha256(); -#endif #ifndef OPENSSL_NO_SHA512 case TLSEXT_hash_sha384: return EVP_sha384();