From 5682c044696bacb6600617433826141b0a08cd66 Mon Sep 17 00:00:00 2001 From: Charlie Ozinga Date: Tue, 19 Apr 2016 17:28:19 -0600 Subject: [PATCH] Remove des_cfb and des_ofb, since they appear on limit platforms --- openssl-sys/src/lib.rs | 2 -- openssl/src/crypto/symm.rs | 24 ------------------------ openssl/src/crypto/symm_internal.rs | 2 -- 3 files changed, 28 deletions(-) diff --git a/openssl-sys/src/lib.rs b/openssl-sys/src/lib.rs index 958d0ebe4..8b7bdd094 100644 --- a/openssl-sys/src/lib.rs +++ b/openssl-sys/src/lib.rs @@ -529,8 +529,6 @@ extern "C" { pub fn EVP_des_cbc() -> *const EVP_CIPHER; pub fn EVP_des_ecb() -> *const EVP_CIPHER; - pub fn EVP_des_cfb() -> *const EVP_CIPHER; - pub fn EVP_des_ofb() -> *const EVP_CIPHER; pub fn EVP_BytesToKey(typ: *const EVP_CIPHER, md: *const EVP_MD, salt: *const u8, data: *const u8, datalen: c_int, diff --git a/openssl/src/crypto/symm.rs b/openssl/src/crypto/symm.rs index dfba70536..935980f3c 100644 --- a/openssl/src/crypto/symm.rs +++ b/openssl/src/crypto/symm.rs @@ -39,8 +39,6 @@ pub enum Type { DES_CBC, DES_ECB, - DES_CFB, - DES_OFB, RC4_128, } @@ -389,26 +387,4 @@ mod tests { cipher_test(super::Type::DES_ECB, pt, ct, key, iv); } - - #[test] - fn test_des_cfb() { - - let pt = "54686973206973206120746573742e"; - let ct = "10577dc484ebfe7679121dff761797"; - let key = "7cb66337f3d3c0fe"; - let iv = "0001020304050607"; - - cipher_test(super::Type::DES_CFB, pt, ct, key, iv); - } - - #[test] - fn test_des_ofb() { - - let pt = "54686973206973206120746573742e"; - let ct = "10577dc484ebfe76be391c7b8a6b9d"; - let key = "7cb66337f3d3c0fe"; - let iv = "0001020304050607"; - - cipher_test(super::Type::DES_OFB, pt, ct, key, iv); - } } diff --git a/openssl/src/crypto/symm_internal.rs b/openssl/src/crypto/symm_internal.rs index 37b9025c8..ba01e1c19 100644 --- a/openssl/src/crypto/symm_internal.rs +++ b/openssl/src/crypto/symm_internal.rs @@ -28,8 +28,6 @@ pub fn evpc(t: symm::Type) -> (*const ffi::EVP_CIPHER, u32, u32) { symm::Type::DES_CBC => (ffi::EVP_des_cbc(), 8, 8), symm::Type::DES_ECB => (ffi::EVP_des_ecb(), 8, 8), - symm::Type::DES_CFB => (ffi::EVP_des_cfb(), 8, 8), - symm::Type::DES_OFB => (ffi::EVP_des_ofb(), 8, 8), symm::Type::RC4_128 => (ffi::EVP_rc4(), 16, 0), } -- GitLab