Skip to content

Commit

Permalink
Add missing MD dependency for pkcs5_pbkdf2_hmac
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrzej Kurek authored and Andrzej Kurek committed Aug 31, 2022
1 parent 5bc7917 commit e682975
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions include/mbedtls/pkcs5.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ int mbedtls_pkcs5_pbkdf2_hmac_ext( mbedtls_md_type_t md_type,
unsigned int iteration_count,
uint32_t key_length, unsigned char *output );

#if defined(MBEDTLS_MD_C)
#if !defined(MBEDTLS_DEPRECATED_REMOVED)
/**
* \brief PKCS#5 PBKDF2 using HMAC
Expand All @@ -113,6 +114,7 @@ int MBEDTLS_DEPRECATED mbedtls_pkcs5_pbkdf2_hmac( mbedtls_md_context_t *ctx,
unsigned int iteration_count,
uint32_t key_length, unsigned char *output );
#endif /* !MBEDTLS_DEPRECATED_REMOVED */
#endif /* MBEDTLS_MD_C */
#if defined(MBEDTLS_SELF_TEST)

/**
Expand Down
4 changes: 3 additions & 1 deletion library/pkcs5.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ int mbedtls_pkcs5_pbes2( const mbedtls_asn1_buf *pbe_params, int mode,
}
#endif /* MBEDTLS_ASN1_PARSE_C */

#if defined(MBEDTLS_MD_C)
#if defined(MBEDTLS_DEPRECATED_REMOVED)
static
#endif
Expand Down Expand Up @@ -292,6 +293,7 @@ int mbedtls_pkcs5_pbkdf2_hmac( mbedtls_md_context_t *ctx,

return( ret );
}
#endif /* MBEDTLS_MD_C */

int mbedtls_pkcs5_pbkdf2_hmac_ext( mbedtls_md_type_t md_alg,
const unsigned char *password,
Expand Down Expand Up @@ -418,7 +420,7 @@ int mbedtls_pkcs5_pbkdf2_hmac_ext( mbedtls_md_type_t md_alg,
ret = MBEDTLS_ERR_ERROR_GENERIC_ERROR;

return ( ret );
#endif
#endif /* !MBEDTLS_MD_C */
}

#if defined(MBEDTLS_SELF_TEST)
Expand Down

0 comments on commit e682975

Please sign in to comment.