e745142509
(__crypt_r, __crypt): Disable MD5 and DES if FIPS is enabled. * crypt/md5c-test.c (main): Tolerate disabled MD5. * sysdeps/unix/sysv/linux/fips-private.h: New file. * sysdeps/generic/fips-private.h: New file, dummy fallback.
19 lines
318 B
C
19 lines
318 B
C
#include <crypt.h>
|
|
#include <string.h>
|
|
|
|
int
|
|
main (int argc, char *argv[])
|
|
{
|
|
const char salt[] = "$1$saltstring";
|
|
char *cp;
|
|
int result = 0;
|
|
|
|
cp = crypt ("Hello world!", salt);
|
|
|
|
/* MD5 is disabled in FIPS mode. */
|
|
if (cp)
|
|
result |= strcmp ("$1$saltstri$YMyguxXMBpd2TEZ.vS/3q1", cp);
|
|
|
|
return result;
|
|
}
|