lib: Remove test/dead code

Apparently test/dead code gets flagged during a security audit as needing to be removed.  I suppose it is assumed that everyone has switched over to using unit tests.
This commit is contained in:
Rom Walton 2016-02-16 22:00:24 -05:00
parent ba0412ce96
commit 41331be431
1 changed files with 1 additions and 39 deletions

View File

@ -45,45 +45,6 @@
#include "fcgi_stdio.h" #include "fcgi_stdio.h"
#endif #endif
#ifdef TEST
/*
* Compile with -DTEST to create a self-contained executable test program.
* The test program should print out the same values as given in section
* A.5 of RFC 1321, reproduced below.
*/
#include <string.h>
main()
{
static const char *const test[7] = {
"", /*d41d8cd98f00b204e9800998ecf8427e*/
"a", /*0cc175b9c0f1b6a831c399e269772661*/
"abc", /*900150983cd24fb0d6963f7d28e17f72*/
"message digest", /*f96b697d7cb7938d525a2f31aaf161d0*/
"abcdefghijklmnopqrstuvwxyz", /*c3fcd3d76192e4007dfb496cca67e13b*/
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
/*d174ab98d277d9f5a5611c2c9f419d9f*/
"12345678901234567890123456789012345678901234567890123456789012345678901234567890" /*57edf4a22be3c955ac49da2e2107b67a*/
};
int i;
for (i = 0; i < 7; ++i) {
md5_state_t state;
md5_byte_t digest[16];
int di;
md5_init(&state);
md5_append(&state, (const md5_byte_t *)test[i], strlen(test[i]));
md5_finish(&state, digest);
printf("MD5 (\"%s\") = ", test[i]);
for (di = 0; di < 16; ++di)
printf("%02x", digest[di]);
printf("\n");
}
return 0;
}
#endif /* TEST */
/* /*
* For reference, here is the program that computed the T values. * For reference, here is the program that computed the T values.
*/ */
@ -99,6 +60,7 @@ main()
return 0; return 0;
} }
#endif #endif
/* /*
* End of T computation program. * End of T computation program.
*/ */