Skip to content

Commit

Permalink
mbedtls: compile warning fix
Browse files Browse the repository at this point in the history
- apps/crypto/openssl_mbedtls_wrapper/mbedtls/err.c
- apps/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c

Signed-off-by: makejian <[email protected]>
  • Loading branch information
makejian authored and xiaoxiang781216 committed Oct 27, 2024
1 parent 597c701 commit 84292d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion crypto/openssl_mbedtls_wrapper/mbedtls/err.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* Public Functions
****************************************************************************/

unsigned long ERR_peek_last_error()
unsigned long ERR_peek_last_error(void)
{
return errno;
}
Expand Down
10 changes: 5 additions & 5 deletions crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,35 +132,35 @@ size_t EVP_MD_size(const EVP_MD *md)
return mbedtls_md_get_size((const mbedtls_md_info_t *)md);
}

const EVP_MD *EVP_sha1()
const EVP_MD *EVP_sha1(void)
{
const mbedtls_md_info_t *md_info =
mbedtls_md_info_from_type(MBEDTLS_MD_SHA1);
return (const EVP_MD *)md_info;
}

const EVP_MD *EVP_sha224()
const EVP_MD *EVP_sha224(void)
{
const mbedtls_md_info_t *md_info =
mbedtls_md_info_from_type(MBEDTLS_MD_SHA224);
return (const EVP_MD *)md_info;
}

const EVP_MD *EVP_sha256()
const EVP_MD *EVP_sha256(void)
{
const mbedtls_md_info_t *md_info =
mbedtls_md_info_from_type(MBEDTLS_MD_SHA256);
return (const EVP_MD *)md_info;
}

const EVP_MD *EVP_sha384()
const EVP_MD *EVP_sha384(void)
{
const mbedtls_md_info_t *md_info =
mbedtls_md_info_from_type(MBEDTLS_MD_SHA384);
return (const EVP_MD *)md_info;
}

const EVP_MD *EVP_sha512()
const EVP_MD *EVP_sha512(void)
{
const mbedtls_md_info_t *md_info =
mbedtls_md_info_from_type(MBEDTLS_MD_SHA512);
Expand Down

0 comments on commit 84292d5

Please sign in to comment.