diff options
| author | Steven Fackler <[email protected]> | 2016-10-13 19:46:13 -0700 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2016-10-13 19:46:13 -0700 |
| commit | edfc50f37db8d230eb17480f124b9fd70166a940 (patch) | |
| tree | 1849ef2aaa0fece3a93b4bf797773ef5ee2ddfdc /openssl/src/crypto | |
| parent | Correct feature selection in tests (diff) | |
| download | rust-openssl-edfc50f37db8d230eb17480f124b9fd70166a940.tar.xz rust-openssl-edfc50f37db8d230eb17480f124b9fd70166a940.zip | |
Clean up features
Diffstat (limited to 'openssl/src/crypto')
| -rw-r--r-- | openssl/src/crypto/symm.rs | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/openssl/src/crypto/symm.rs b/openssl/src/crypto/symm.rs index c4021338..37754387 100644 --- a/openssl/src/crypto/symm.rs +++ b/openssl/src/crypto/symm.rs @@ -16,31 +16,20 @@ pub enum Mode { pub enum Type { AES_128_ECB, AES_128_CBC, - /// Requires the `aes_xts` feature - #[cfg(feature = "aes_xts")] AES_128_XTS, - #[cfg(feature = "aes_ctr")] AES_128_CTR, - // AES_128_GCM, AES_128_CFB1, AES_128_CFB128, AES_128_CFB8, - AES_256_ECB, AES_256_CBC, - /// Requires the `aes_xts` feature - #[cfg(feature = "aes_xts")] AES_256_XTS, - #[cfg(feature = "aes_ctr")] AES_256_CTR, - // AES_256_GCM, AES_256_CFB1, AES_256_CFB128, AES_256_CFB8, - DES_CBC, DES_ECB, - RC4_128, } @@ -50,29 +39,20 @@ impl Type { match *self { Type::AES_128_ECB => ffi::EVP_aes_128_ecb(), Type::AES_128_CBC => ffi::EVP_aes_128_cbc(), - #[cfg(feature = "aes_xts")] Type::AES_128_XTS => ffi::EVP_aes_128_xts(), - #[cfg(feature = "aes_ctr")] Type::AES_128_CTR => ffi::EVP_aes_128_ctr(), - // AES_128_GCM => (EVP_aes_128_gcm(), 16, 16), Type::AES_128_CFB1 => ffi::EVP_aes_128_cfb1(), Type::AES_128_CFB128 => ffi::EVP_aes_128_cfb128(), Type::AES_128_CFB8 => ffi::EVP_aes_128_cfb8(), - Type::AES_256_ECB => ffi::EVP_aes_256_ecb(), Type::AES_256_CBC => ffi::EVP_aes_256_cbc(), - #[cfg(feature = "aes_xts")] Type::AES_256_XTS => ffi::EVP_aes_256_xts(), - #[cfg(feature = "aes_ctr")] Type::AES_256_CTR => ffi::EVP_aes_256_ctr(), - // AES_256_GCM => (EVP_aes_256_gcm(), 32, 16), Type::AES_256_CFB1 => ffi::EVP_aes_256_cfb1(), Type::AES_256_CFB128 => ffi::EVP_aes_256_cfb128(), Type::AES_256_CFB8 => ffi::EVP_aes_256_cfb8(), - Type::DES_CBC => ffi::EVP_des_cbc(), Type::DES_ECB => ffi::EVP_des_ecb(), - Type::RC4_128 => ffi::EVP_rc4(), } } @@ -396,7 +376,6 @@ mod tests { } #[test] - #[cfg(feature = "aes_xts")] fn test_aes256_xts() { // Test case 174 from // http://csrc.nist.gov/groups/STM/cavp/documents/aes/XTSTestVectors.zip @@ -412,7 +391,6 @@ mod tests { } #[test] - #[cfg(feature = "aes_ctr")] fn test_aes128_ctr() { let pt = "6BC1BEE22E409F96E93D7E117393172AAE2D8A571E03AC9C9EB76FAC45AF8E5130C81C46A35CE411\ @@ -425,17 +403,6 @@ mod tests { cipher_test(super::Type::AES_128_CTR, pt, ct, key, iv); } - // #[test] - // fn test_aes128_gcm() { - // Test case 3 in GCM spec - // let pt = ~"d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b391aafd255"; - // let ct = ~"42831ec2217774244b7221b784d0d49ce3aa212f2c02a4e035c17e2329aca12e21d514b25466931c7d8f6a5aac84aa051ba30b396a0aac973d58e091473f59854d5c2af327cd64a62cf35abd2ba6fab4"; - // let key = ~"feffe9928665731c6d6a8f9467308308"; - // let iv = ~"cafebabefacedbaddecaf888"; - // - // cipher_test(super::AES_128_GCM, pt, ct, key, iv); - // } - #[test] fn test_aes128_cfb1() { // Lifted from http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf |