summaryrefslogtreecommitdiffstats
path: root/crypto/rc5
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2015-01-24 10:57:19 -0500
committerRich Salz <rsalz@openssl.org>2015-01-24 10:58:38 -0500
commita2b18e657ea1a932d125154f4e13ab2258796d90 (patch)
treebdfcb8bbe1d673b3bce209ef289520e11a109464 /crypto/rc5
parent2747d73c1466c487daf64a1234b6fe2e8a62ac75 (diff)
ifdef cleanup, part 4a: '#ifdef undef'
This removes all code surrounded by '#ifdef undef' One case is left: memmove() replaced by open-coded for loop, in crypto/stack/stack.c That needs further review. Also removed a couple of instances of /* dead code */ if I saw them while doing the main removal. Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'crypto/rc5')
-rw-r--r--crypto/rc5/rc5test.c56
1 files changed, 0 insertions, 56 deletions
diff --git a/crypto/rc5/rc5test.c b/crypto/rc5/rc5test.c
index b29a436cec..5ed4d21105 100644
--- a/crypto/rc5/rc5test.c
+++ b/crypto/rc5/rc5test.c
@@ -322,60 +322,4 @@ int main(int argc, char *argv[])
return (err);
}
-# ifdef undef
-static int cfb64_test(unsigned char *cfb_cipher)
-{
- IDEA_KEY_SCHEDULE eks, dks;
- int err = 0, i, n;
-
- idea_set_encrypt_key(cfb_key, &eks);
- idea_set_decrypt_key(&eks, &dks);
- memcpy(cfb_tmp, cfb_iv, 8);
- n = 0;
- idea_cfb64_encrypt(plain, cfb_buf1, (long)12, &eks,
- cfb_tmp, &n, IDEA_ENCRYPT);
- idea_cfb64_encrypt(&(plain[12]), &(cfb_buf1[12]),
- (long)CFB_TEST_SIZE - 12, &eks,
- cfb_tmp, &n, IDEA_ENCRYPT);
- if (memcmp(cfb_cipher, cfb_buf1, CFB_TEST_SIZE) != 0) {
- err = 1;
- printf("idea_cfb64_encrypt encrypt error\n");
- for (i = 0; i < CFB_TEST_SIZE; i += 8)
- printf("%s\n", pt(&(cfb_buf1[i])));
- }
- memcpy(cfb_tmp, cfb_iv, 8);
- n = 0;
- idea_cfb64_encrypt(cfb_buf1, cfb_buf2, (long)17, &eks,
- cfb_tmp, &n, IDEA_DECRYPT);
- idea_cfb64_encrypt(&(cfb_buf1[17]), &(cfb_buf2[17]),
- (long)CFB_TEST_SIZE - 17, &dks,
- cfb_tmp, &n, IDEA_DECRYPT);
- if (memcmp(plain, cfb_buf2, CFB_TEST_SIZE) != 0) {
- err = 1;
- printf("idea_cfb_encrypt decrypt error\n");
- for (i = 0; i < 24; i += 8)
- printf("%s\n", pt(&(cfb_buf2[i])));
- }
- return (err);
-}
-
-static char *pt(unsigned char *p)
-{
- static char bufs[10][20];
- static int bnum = 0;
- char *ret;
- int i;
- static char *f = "0123456789ABCDEF";
-
- ret = &(bufs[bnum++][0]);
- bnum %= 10;
- for (i = 0; i < 8; i++) {
- ret[i * 2] = f[(p[i] >> 4) & 0xf];
- ret[i * 2 + 1] = f[p[i] & 0xf];
- }
- ret[16] = '\0';
- return (ret);
-}
-
-# endif
#endif