10 #define LEET "0.s0.l33t"
16 atf_tc_set_md_var(tc, "descr", "Tests the MD5 based password hash");
21 const char want[] = "$1$deadbeef$0Huu6KHrKLVWfqa4WljDE0";
24 pw = crypt(LEET, want);
25 ATF_CHECK_STREQ(pw, want);
29 ATF_TC_HEAD(invalid, tc)
32 atf_tc_set_md_var(tc, "descr", "Tests that invalid password fails");
35 ATF_TC_BODY(invalid, tc)
37 const char want[] = "$1$cafebabe$0Huu6KHrKLVWfqa4WljDE0";
40 pw = crypt(LEET, want);
41 ATF_CHECK(strcmp(pw, want) != 0);
45 * This function must not do anything except enumerate
46 * the test cases, per atf-c-api(3).
51 ATF_TP_ADD_TC(tp, md5);
52 ATF_TP_ADD_TC(tp, invalid);
53 return atf_no_error();