Paul Gofman : rsaenh: Output FIXME when HMAC hash algorithm is not found.

Alexandre Julliard julliard at winehq.org
Mon May 16 15:37:59 CDT 2022


Module: wine
Branch: master
Commit: 56d9ed83c14cd7d92076fc518d1a601fa3119b6b
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=56d9ed83c14cd7d92076fc518d1a601fa3119b6b

Author: Paul Gofman <pgofman at codeweavers.com>
Date:   Fri May 13 15:02:05 2022 -0500

rsaenh: Output FIXME when HMAC hash algorithm is not found.

Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/rsaenh/rsaenh.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/dlls/rsaenh/rsaenh.c b/dlls/rsaenh/rsaenh.c
index 2dcc85cad7b..beac3c7e850 100644
--- a/dlls/rsaenh/rsaenh.c
+++ b/dlls/rsaenh/rsaenh.c
@@ -690,7 +690,13 @@ static inline BOOL init_hash(CRYPTHASH *pCryptHash) {
                 const PROV_ENUMALGS_EX *pAlgInfo;
                 
                 pAlgInfo = get_algid_info(pCryptHash->hProv, pCryptHash->pHMACInfo->HashAlgid);
-                if (!pAlgInfo) return FALSE;
+                if (!pAlgInfo)
+                {
+                    /* A number of hash algorithms (e. g., _SHA256) are supported for HMAC even for providers
+                     * which don't list the algorithm, so print a fixme here. */
+                    FIXME("Hash algroithm %#x not found.\n", pCryptHash->pHMACInfo->HashAlgid);
+                    return FALSE;
+                }
                 pCryptHash->dwHashSize = pAlgInfo->dwDefaultLen >> 3;
                 init_hash_impl(pCryptHash->pHMACInfo->HashAlgid, &pCryptHash->hash_handle);
                 update_hash_impl(pCryptHash->hash_handle,




More information about the wine-cvs mailing list