diff options
author | Rich Salz <rsalz@openssl.org> | 2015-01-24 10:57:19 -0500 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-01-24 10:58:38 -0500 |
commit | a2b18e657ea1a932d125154f4e13ab2258796d90 (patch) | |
tree | bdfcb8bbe1d673b3bce209ef289520e11a109464 /crypto/des | |
parent | 2747d73c1466c487daf64a1234b6fe2e8a62ac75 (diff) | |
download | openssl-a2b18e657ea1a932d125154f4e13ab2258796d90.tar.gz |
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/des')
-rw-r--r-- | crypto/des/cfb64ede.c | 10 | ||||
-rw-r--r-- | crypto/des/ofb64ede.c | 12 | ||||
-rw-r--r-- | crypto/des/rpc_enc.c | 20 |
3 files changed, 0 insertions, 42 deletions
diff --git a/crypto/des/cfb64ede.c b/crypto/des/cfb64ede.c index 5d709c12d3..ba4f00b3b5 100644 --- a/crypto/des/cfb64ede.c +++ b/crypto/des/cfb64ede.c @@ -127,16 +127,6 @@ void DES_ede3_cfb64_encrypt(const unsigned char *in, unsigned char *out, *num = n; } -#ifdef undef /* MACRO */ -void DES_ede2_cfb64_encrypt(unsigned char *in, unsigned char *out, - long length, DES_key_schedule ks1, - DES_key_schedule ks2, DES_cblock (*ivec), - int *num, int enc) -{ - DES_ede3_cfb64_encrypt(in, out, length, ks1, ks2, ks1, ivec, num, enc); -} -#endif - /* * This is compatible with the single key CFB-r for DES, even thought that's * not what EVP needs. diff --git a/crypto/des/ofb64ede.c b/crypto/des/ofb64ede.c index 45c67505a6..215b38dff5 100644 --- a/crypto/des/ofb64ede.c +++ b/crypto/des/ofb64ede.c @@ -102,8 +102,6 @@ void DES_ede3_ofb64_encrypt(register const unsigned char *in, n = (n + 1) & 0x07; } if (save) { -/*- v0=ti[0]; - v1=ti[1];*/ iv = &(*ivec)[0]; l2c(v0, iv); l2c(v1, iv); @@ -111,13 +109,3 @@ void DES_ede3_ofb64_encrypt(register const unsigned char *in, v0 = v1 = ti[0] = ti[1] = 0; *num = n; } - -#ifdef undef /* MACRO */ -void DES_ede2_ofb64_encrypt(register unsigned char *in, - register unsigned char *out, long length, - DES_key_schedule k1, DES_key_schedule k2, - DES_cblock (*ivec), int *num) -{ - DES_ede3_ofb64_encrypt(in, out, length, k1, k2, k1, ivec, num); -} -#endif diff --git a/crypto/des/rpc_enc.c b/crypto/des/rpc_enc.c index f5a84c5b05..a5cd7dd283 100644 --- a/crypto/des/rpc_enc.c +++ b/crypto/des/rpc_enc.c @@ -75,26 +75,6 @@ int _des_crypt(char *buf, int len, struct desparams *desp) else { DES_ncbc_encrypt(desp->UDES.UDES_buf, desp->UDES.UDES_buf, len, &ks, &desp->des_ivec, enc); -#ifdef undef - /* - * len will always be %8 if called from common_crypt in secure_rpc. - * Libdes's cbc encrypt does not copy back the iv, so we have to do - * it here. - */ - /* It does now :-) eay 20/09/95 */ - - a = (char *)&(desp->UDES.UDES_buf[len - 8]); - b = (char *)&(desp->des_ivec[0]); - - *(a++) = *(b++); - *(a++) = *(b++); - *(a++) = *(b++); - *(a++) = *(b++); - *(a++) = *(b++); - *(a++) = *(b++); - *(a++) = *(b++); - *(a++) = *(b++); -#endif } return (1); } |