mirror of https://github.com/wolfSSL/wolfssh.git
commit
a3dd039224
|
@ -5282,6 +5282,7 @@ static INLINE int CreateMac(WOLFSSH* ssh, const byte* in, word32 inSz,
|
|||
ret = wc_HmacFinal(&hmac, digest);
|
||||
if (ret == WS_SUCCESS)
|
||||
WMEMCPY(mac, digest, SHA1_96_SZ);
|
||||
wc_HmacFree(&hmac);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -5299,6 +5300,7 @@ static INLINE int CreateMac(WOLFSSH* ssh, const byte* in, word32 inSz,
|
|||
ret = wc_HmacUpdate(&hmac, in, inSz);
|
||||
if (ret == WS_SUCCESS)
|
||||
ret = wc_HmacFinal(&hmac, mac);
|
||||
wc_HmacFree(&hmac);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -5317,6 +5319,7 @@ static INLINE int CreateMac(WOLFSSH* ssh, const byte* in, word32 inSz,
|
|||
ret = wc_HmacUpdate(&hmac, in, inSz);
|
||||
if (ret == WS_SUCCESS)
|
||||
ret = wc_HmacFinal(&hmac, mac);
|
||||
wc_HmacFree(&hmac);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -5385,6 +5388,7 @@ static INLINE int VerifyMac(WOLFSSH* ssh, const byte* in, word32 inSz,
|
|||
default:
|
||||
ret = WS_INVALID_ALGO_ID;
|
||||
}
|
||||
wc_HmacFree(&hmac);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Reference in New Issue