md5: return non-zero if built-in tests (-x) fail
MFC after: 1 week Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
205f3e1597
commit
af9de844c4
@ -498,10 +498,12 @@ MDTestSuite(const Algorithm_t *alg)
|
||||
for (i = 0; i < MDTESTCOUNT; i++) {
|
||||
(*alg->Data)(MDTestInput[i], strlen(MDTestInput[i]), buffer);
|
||||
printf("%s (\"%s\") = %s", alg->name, MDTestInput[i], buffer);
|
||||
if (strcmp(buffer, (*alg->TestOutput)[i]) == 0)
|
||||
if (strcmp(buffer, (*alg->TestOutput)[i]) == 0) {
|
||||
printf(" - verified correct\n");
|
||||
else
|
||||
} else {
|
||||
printf(" - INCORRECT RESULT!\n");
|
||||
failed++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user