Modify config option for SHA384.
Although SHA512 is currently required to enable SHA384, this is expected to change in the future. This commit is an intermediate step towards fully separating SHA384 and SHA512. check_config is the only module which enforces that SHA512 is enabled together with SHA384. Signed-off-by: Mateusz Starzyk <mateusz.starzyk@mobica.com>
This commit is contained in:
parent
c102164a54
commit
3352a53475
38 changed files with 1030 additions and 978 deletions
|
@ -55,7 +55,7 @@ typedef struct mbedtls_sha512_context
|
|||
uint64_t total[2]; /*!< The number of Bytes processed. */
|
||||
uint64_t state[8]; /*!< The intermediate digest state. */
|
||||
unsigned char buffer[128]; /*!< The data block being processed. */
|
||||
#if !defined(MBEDTLS_SHA512_NO_SHA384)
|
||||
#if defined(MBEDTLS_SHA384_C)
|
||||
int is384; /*!< Determines which function to use:
|
||||
0: Use SHA-512, or 1: Use SHA-384. */
|
||||
#endif
|
||||
|
@ -101,8 +101,8 @@ void mbedtls_sha512_clone( mbedtls_sha512_context *dst,
|
|||
* \param is384 Determines which function to use. This must be
|
||||
* either \c 0 for SHA-512, or \c 1 for SHA-384.
|
||||
*
|
||||
* \note When \c MBEDTLS_SHA512_NO_SHA384 is defined, \p is384 must
|
||||
* be \c 0, or the function will return
|
||||
* \note When \c MBEDTLS_SHA384_C is not defined,
|
||||
* \p is384 must be \c 0, or the function will return
|
||||
* #MBEDTLS_ERR_SHA512_BAD_INPUT_DATA.
|
||||
*
|
||||
* \return \c 0 on success.
|
||||
|
@ -175,8 +175,8 @@ int mbedtls_internal_sha512_process( mbedtls_sha512_context *ctx,
|
|||
* \param is384 Determines which function to use. This must be either
|
||||
* \c 0 for SHA-512, or \c 1 for SHA-384.
|
||||
*
|
||||
* \note When \c MBEDTLS_SHA512_NO_SHA384 is defined, \p is384 must
|
||||
* be \c 0, or the function will return
|
||||
* \note When \c MBEDTLS_SHA384_C is defined, \p is384 must
|
||||
* be \c 1, or the function will return
|
||||
* #MBEDTLS_ERR_SHA512_BAD_INPUT_DATA.
|
||||
*
|
||||
* \return \c 0 on success.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue