Skip to content

Commit

Permalink
Replace MBEDTLS_MD_CAN_SHA256 in md.h, ssl.h, and entropy.h
Browse files Browse the repository at this point in the history
Signed-off-by: Elena Uziunaite <[email protected]>
  • Loading branch information
eleuzi01 committed Jul 9, 2024
1 parent 390a43a commit eb7c0c1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/mbedtls/ssl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tf-psa-crypto/drivers/builtin/include/mbedtls/entropy.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) */
Expand Down
2 changes: 1 addition & 1 deletion tf-psa-crypto/drivers/builtin/include/mbedtls/md.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit eb7c0c1

Please sign in to comment.