Commit 5258ce6e authored by Steven Fackler's avatar Steven Fackler
Browse files

Move AES XTS support to a feature

parent fa42ed9e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ before_script:
script:
  - cargo build --features "$FEATURES"
  - cargo test --features "$FEATURES"
  - cargo doc --features "sslv2 tlsv1_1 tlsv1_2"
  - cargo doc --features "sslv2 tlsv1_1 tlsv1_2 aes_xtc"
after_success: |
  [ $TRAVIS_BRANCH = master ] &&
  [ $TRAVIS_PULL_REQUEST = false ] &&
+1 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ authors = ["Steven Fackler <sfackler@gmail.com"]
tlsv1_2 = ["openssl-sys/tlsv1_2"]
tlsv1_1 = ["openssl-sys/tlsv1_1"]
sslv2 = ["openssl-sys/sslv2"]
aes_xts = ["openssl-sys/aes_xts"]

[target.i686-apple-darwin.dependencies.openssl-sys]
  path = "openssl-sys"
+1 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ build = "src/build.rs"
tlsv1_2 = []
tlsv1_1 = []
sslv2 = []
aes_xts = []

[build-dependencies.pkg-config]
git = "https://github.com/alexcrichton/pkg-config-rs"

openssl-sys/src/lib.rs

100755 → 100644
+2 −0
Original line number Diff line number Diff line
@@ -316,11 +316,13 @@ extern "C" {

    pub fn EVP_aes_128_cbc() -> *const EVP_CIPHER;
    pub fn EVP_aes_128_ecb() -> *const EVP_CIPHER;
    #[cfg(feature = "aes_xts")]
    pub fn EVP_aes_128_xts() -> *const EVP_CIPHER;
    // fn EVP_aes_128_ctr() -> EVP_CIPHER;
    // fn EVP_aes_128_gcm() -> EVP_CIPHER;
    pub fn EVP_aes_256_cbc() -> *const EVP_CIPHER;
    pub fn EVP_aes_256_ecb() -> *const EVP_CIPHER;
    #[cfg(feature = "aes_xts")]
    pub fn EVP_aes_256_xts() -> *const EVP_CIPHER;
    // fn EVP_aes_256_ctr() -> EVP_CIPHER;
    // fn EVP_aes_256_gcm() -> EVP_CIPHER;
+1 −1
Original line number Diff line number Diff line
@@ -122,7 +122,7 @@ mod tests {

    pub fn hash_writer(t: super::HashType, data: &[u8]) -> Vec<u8> {
        let mut h = super::Hasher::new(t);
        h.write(data);
        h.write(data).unwrap();
        h.finalize()
    }

Loading