On Ubuntu and other Debian based systems FIPS 140-3 mode in libgcrypt breaks the apt package manager which uses GCRY_MD_MD5 internally. To work around this, Ubuntu is considering moving to explicit indicators for message digest and mac algorithms to mark MD5 non-approved instead of blocking it directly.
The patches below implement the new indicators and unblock md5 in fips mode.
A public Debian bug report for the problem can be found at: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1014517