Skip to content

Commit

Permalink
crypto: Support SHA384 hash when using glib
Browse files Browse the repository at this point in the history
QEMU requires minimum glib version 2.66.0 as per the root meson.build
file and per glib documentation[1] G_CHECKSUM_SHA384 is available since
2.51.

[1] https://docs.gtk.org/glib/enum.ChecksumType.html

Reviewed-by: Daniel P. Berrangé <[email protected]>
Signed-off-by: Dorjoy Chowdhury <[email protected]>
Signed-off-by: Daniel P. Berrangé <[email protected]>
  • Loading branch information
dorjoy03 authored and berrange committed Sep 9, 2024
1 parent 5d04de7 commit 9893da7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/hash-glib.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ static int qcrypto_hash_alg_map[QCRYPTO_HASH_ALG__MAX] = {
[QCRYPTO_HASH_ALG_SHA1] = G_CHECKSUM_SHA1,
[QCRYPTO_HASH_ALG_SHA224] = -1,
[QCRYPTO_HASH_ALG_SHA256] = G_CHECKSUM_SHA256,
[QCRYPTO_HASH_ALG_SHA384] = -1,
[QCRYPTO_HASH_ALG_SHA384] = G_CHECKSUM_SHA384,
[QCRYPTO_HASH_ALG_SHA512] = G_CHECKSUM_SHA512,
[QCRYPTO_HASH_ALG_RIPEMD160] = -1,
};
Expand Down

0 comments on commit 9893da7

Please sign in to comment.