about summary refs log tree commit diff
path: root/REORG.TODO/crypt/md5c-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'REORG.TODO/crypt/md5c-test.c')
-rw-r--r--REORG.TODO/crypt/md5c-test.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/REORG.TODO/crypt/md5c-test.c b/REORG.TODO/crypt/md5c-test.c
new file mode 100644
index 0000000000..c80e40202d
--- /dev/null
+++ b/REORG.TODO/crypt/md5c-test.c
@@ -0,0 +1,18 @@
+#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;
+}