mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2024-12-28 15:17:21 +00:00
Replace MBEDTLS_MD_CAN_SHA256 in md.h, ssl.h, and entropy.h
Signed-off-by: Elena Uziunaite <elena.uziunaite@arm.com>
This commit is contained in:
parent
0916cd702f
commit
4e6a3681e1
@ -1153,7 +1153,7 @@ typedef void mbedtls_ssl_async_cancel_t(mbedtls_ssl_context *ssl);
|
||||
#if defined(MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED) && \
|
||||
!defined(MBEDTLS_SSL_KEEP_PEER_CERTIFICATE)
|
||||
#define MBEDTLS_SSL_PEER_CERT_DIGEST_MAX_LEN 48
|
||||
#if defined(MBEDTLS_MD_CAN_SHA256)
|
||||
#if defined(PSA_WANT_ALG_SHA_256)
|
||||
#define MBEDTLS_SSL_PEER_CERT_DIGEST_DFL_TYPE MBEDTLS_MD_SHA256
|
||||
#define MBEDTLS_SSL_PEER_CERT_DIGEST_DFL_LEN 32
|
||||
#elif defined(PSA_WANT_ALG_SHA_384)
|
||||
|
@ -22,7 +22,7 @@
|
||||
#define MBEDTLS_ENTROPY_MD MBEDTLS_MD_SHA512
|
||||
#define MBEDTLS_ENTROPY_BLOCK_SIZE 64 /**< Block size of entropy accumulator (SHA-512) */
|
||||
#else
|
||||
#if defined(MBEDTLS_MD_CAN_SHA256)
|
||||
#if defined(PSA_WANT_ALG_SHA_256)
|
||||
#define MBEDTLS_ENTROPY_SHA256_ACCUMULATOR
|
||||
#define MBEDTLS_ENTROPY_MD MBEDTLS_MD_SHA256
|
||||
#define MBEDTLS_ENTROPY_BLOCK_SIZE 32 /**< Block size of entropy accumulator (SHA-256) */
|
||||
|
@ -71,7 +71,7 @@ typedef enum {
|
||||
#define MBEDTLS_MD_MAX_SIZE 64 /* longest known is SHA512 */
|
||||
#elif defined(PSA_WANT_ALG_SHA_384) || defined(MBEDTLS_MD_CAN_SHA3_384)
|
||||
#define MBEDTLS_MD_MAX_SIZE 48 /* longest known is SHA384 */
|
||||
#elif defined(MBEDTLS_MD_CAN_SHA256) || defined(PSA_WANT_ALG_SHA3_256)
|
||||
#elif defined(PSA_WANT_ALG_SHA_256) || defined(PSA_WANT_ALG_SHA3_256)
|
||||
#define MBEDTLS_MD_MAX_SIZE 32 /* longest known is SHA256 */
|
||||
#elif defined(PSA_WANT_ALG_SHA_224) || defined(MBEDTLS_MD_CAN_SHA3_224)
|
||||
#define MBEDTLS_MD_MAX_SIZE 28 /* longest known is SHA224 */
|
||||
|
Loading…
Reference in New Issue
Block a user