diff options
author | Rich Salz <rsalz@openssl.org> | 2017-06-14 18:05:25 +0200 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2017-06-14 18:05:25 +0200 |
commit | 594da712ffe416e61eeedc736d0332fa4664b24f (patch) | |
tree | e28c9aa0c1e0d93d116f74775f580d21a6aefce7 /crypto/des | |
parent | Fix possible crash in X931 code. (diff) | |
download | openssl-594da712ffe416e61eeedc736d0332fa4664b24f.tar.xz openssl-594da712ffe416e61eeedc736d0332fa4664b24f.zip |
Remove OLD_STR_TO_KEY compile option
This flag was added in 1992 and only documented in the CHANGES file.
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3681)
Diffstat (limited to 'crypto/des')
-rw-r--r-- | crypto/des/str2key.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/crypto/des/str2key.c b/crypto/des/str2key.c index 78998a1cd0..e18d726522 100644 --- a/crypto/des/str2key.c +++ b/crypto/des/str2key.c @@ -17,10 +17,6 @@ void DES_string_to_key(const char *str, DES_cblock *key) memset(key, 0, 8); length = strlen(str); -#ifdef OLD_STR_TO_KEY - for (i = 0; i < length; i++) - (*key)[i % 8] ^= (str[i] << 1); -#else /* MIT COMPATIBLE */ for (i = 0; i < length; i++) { register unsigned char j = str[i]; @@ -34,7 +30,6 @@ void DES_string_to_key(const char *str, DES_cblock *key) (*key)[7 - (i % 8)] ^= j; } } -#endif DES_set_odd_parity(key); DES_set_key_unchecked(key, &ks); DES_cbc_cksum((const unsigned char *)str, key, length, &ks, key); @@ -50,20 +45,6 @@ void DES_string_to_2keys(const char *str, DES_cblock *key1, DES_cblock *key2) memset(key1, 0, 8); memset(key2, 0, 8); length = strlen(str); -#ifdef OLD_STR_TO_KEY - if (length <= 8) { - for (i = 0; i < length; i++) { - (*key2)[i] = (*key1)[i] = (str[i] << 1); - } - } else { - for (i = 0; i < length; i++) { - if ((i / 8) & 1) - (*key2)[i % 8] ^= (str[i] << 1); - else - (*key1)[i % 8] ^= (str[i] << 1); - } - } -#else /* MIT COMPATIBLE */ for (i = 0; i < length; i++) { register unsigned char j = str[i]; @@ -84,7 +65,6 @@ void DES_string_to_2keys(const char *str, DES_cblock *key1, DES_cblock *key2) } if (length <= 8) memcpy(key2, key1, 8); -#endif DES_set_odd_parity(key1); DES_set_odd_parity(key2); DES_set_key_unchecked(key1, &ks); |