1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-12-12 15:41:16 +03:00

libgcrypt: Remove useless comparison

Signed-off-by: Norbert Pocs <npocs@redhat.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Norbert Pocs
2022-07-04 12:33:09 +00:00
committed by Andreas Schneider
parent 78d109596c
commit 11a7c7b45b

View File

@@ -275,9 +275,6 @@ int hmac_update(HMACCTX c, const void *data, size_t len) {
int hmac_final(HMACCTX c, unsigned char *hashmacbuf, size_t *len) {
unsigned int tmp = gcry_md_get_algo_dlen(gcry_md_get_algo(c));
if (tmp > SIZE_MAX) {
return 0;
}
*len = (size_t)tmp;
memcpy(hashmacbuf, gcry_md_read(c, 0), *len);
gcry_md_close(c);