mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 16:35:06 -05:00
hash: allow non-security MD5 use in FIPS mode
gnutls running in the FIPS140-2 mode does not allow MD5 to be initialized, which breaks chronyd using MD5 to calculate reference ID of IPv6 addresses. Specify a new hash algorithm for non-security MD5 use and temporarily switch to the lax mode when initializing the hash function.
This commit is contained in:
@@ -71,6 +71,9 @@ HSH_GetHashId(HSH_Algorithm algorithm)
|
||||
{
|
||||
int i, h;
|
||||
|
||||
if (algorithm == HSH_MD5_NONCRYPTO)
|
||||
algorithm = HSH_MD5;
|
||||
|
||||
for (i = 0; hashes[i].algorithm != 0; i++) {
|
||||
if (hashes[i].algorithm == algorithm)
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user