Skip to content

Commit

Permalink
Simplify function call
Browse files Browse the repository at this point in the history
  • Loading branch information
Andras Fekete committed Oct 29, 2024
1 parent 708463a commit 6e470fc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/wolfprovider/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,11 @@ enum wc_HashType wp_nid_to_wc_hash_type(int nid);
int wp_name_to_wc_mgf(OSSL_LIB_CTX* libCtx, const char* name,
const char* propQ);
int wp_mgf1_from_hash(int nid);
#if LIBWOLFSSL_VERSION_HEX >= 0x05007004
int wp_hash_copy(wc_HashAlg* src, wc_HashAlg* dst);
#else
int wp_hash_copy(wc_HashAlg* src, wc_HashAlg* dst, enum wc_HashType hashType);
#endif

int wp_cipher_from_params(const OSSL_PARAM params[], int* cipher,
const char** cipherName);
Expand Down
4 changes: 4 additions & 0 deletions src/wp_internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,11 @@ int wp_mgf1_from_hash(int nid)
* @return 1 on success.
* @return 0 on failure.
*/
#if LIBWOLFSSL_VERSION_HEX >= 0x05007004
int wp_hash_copy(wc_HashAlg* src, wc_HashAlg* dst)
#else
int wp_hash_copy(wc_HashAlg* src, wc_HashAlg* dst, enum wc_HashType hashType)
#endif
{
int ok = 1;
int rc = 0;
Expand Down

0 comments on commit 6e470fc

Please sign in to comment.