Commit fb1c8152 authored by Chris Cole's avatar Chris Cole
Browse files

Merge remote-tracking branch 'upstream/master'

parents 33f3c966 ae9e2b1e
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
language: rust
env:
  global:
    - secure: qLvBJoJOJcPPZ+e31175O6sMUGBHgHe/kBuI0FCPeifYmpFyeRAkEvGddEkf8t3rojV+wE14CNYzzGsT/W/+JY7xW0C1FQKW3r+8SZ1Cave/8ahee0aCQVXGf0XY8c52uG6MrLGiUlNZbOsyFSdFUc/Io+kYZas4DxrinRSOIEA=
  matrix:
    - FEATURES=""
    - FEATURES="tlsv1_1 tlsv1_2 aes_xts"
@@ -11,11 +9,4 @@ os:
before_script:
  - openssl s_server -accept 15418 -www -cert test/cert.pem -key test/key.pem >/dev/null 2>&1 &
script:
  - cargo build --features "$FEATURES"
  - cargo test --features "$FEATURES"
  - cargo doc --features "sslv2 tlsv1_1 tlsv1_2 aes_xts"
after_success: |
  [ $TRAVIS_BRANCH = master ] &&
  [ $TRAVIS_PULL_REQUEST = false ] &&
  cd target/doc &&
  (curl http://www.rust-ci.org/artifacts/put?t=$RUSTCI_TOKEN | sh)
+2 −2
Original line number Diff line number Diff line
[package]
name = "openssl"
version = "0.2.1"
version = "0.2.3"
authors = ["Steven Fackler <sfackler@gmail.com>"]
license = "Apache-2.0"
description = "OpenSSL bindings"
@@ -17,4 +17,4 @@ aes_xts = ["openssl-sys/aes_xts"]

[dependencies.openssl-sys]
path = "openssl-sys"
version = "0.2.1"
version = "0.2.3"
+5 −0
Original line number Diff line number Diff line
@@ -14,6 +14,11 @@ For some reason, the OpenSSL distribution for Windows is structured differently,
1. Run `sudo apt-get install libssl-dev`.
2. Run `cargo build`.

###Android
1. Follow the steps [here](wiki.openssl.org/index.php/Android) to build OpenSSL for android
2. Provide the path to the libssl and libcrypto binaries via `$OPENSSL_PATH`
3. Build the package with `cargo build`

###Windows

1. Grab the latest Win32 OpenSSL installer [here][1]. At the time of this writing, it's v1.0.1i. If you're using 64-bit Rust (coming to Windows soon), then you should get the Win64 installer instead.
+11 −2
Original line number Diff line number Diff line
[package]
name = "openssl-sys"
version = "0.2.1"
version = "0.2.3"
authors = ["Alex Crichton <alex@alexcrichton.com>",
           "Steven Fackler <sfackler@gmail.com>"]
license = "MIT"
@@ -17,4 +17,13 @@ sslv2 = []
aes_xts = []

[build-dependencies]
pkg-config = "0.1"
pkg-config = "0.1.1"

[target.le32-unknown-nacl.dependencies]
libressl-pnacl-sys = "2.1.0"
[target.x86_64-unknown-nacl.dependencies]
libressl-pnacl-sys = "2.1.0"
[target.i686-unknown-nacl.dependencies]
libressl-pnacl-sys = "2.1.0"
[target.arm-unknown-nacl.dependencies]
libressl-pnacl-sys = "2.1.0"
+13 −0
Original line number Diff line number Diff line
@@ -3,6 +3,11 @@ extern crate "pkg-config" as pkg_config;
use std::os;

fn main() {
    // Without hackory, pkg-config will only look for host libraries.
    // So, abandon ship if we're cross compiling.
    if !pkg_config::target_supported() { return; }


    if pkg_config::find_library("openssl").is_err() {
        let mut flags = " -l crypto -l ssl".to_string();

@@ -17,6 +22,14 @@ fn main() {
        if win_pos.is_some() {
           flags.push_str(" -l gdi32 -l wsock32");
        }

        if target.find_str("android").is_some() {
            let path = os::getenv("OPENSSL_PATH").expect("Android does not provide openssl libraries, please \
                                                          build them yourselves (instructions in the README) \
                                                          and provide their location through $OPENSSL_PATH.");
            flags.push_str(format!(" -L {}", path).as_slice());
        }

        println!("cargo:rustc-flags={}", flags);
    }
}
Loading