diff options
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | .travis.yml | 17 | ||||
| -rwxr-xr-x | .travis/build_docs.sh | 11 | ||||
| -rwxr-xr-x | .travis/update_docs.sh | 16 | ||||
| -rw-r--r-- | README.md | 46 | ||||
| -rw-r--r-- | openssl-sys/Cargo.toml | 1 | ||||
| -rw-r--r-- | openssl-sys/src/lib.rs | 1 | ||||
| -rw-r--r-- | openssl/Cargo.toml (renamed from Cargo.toml) | 4 | ||||
| -rw-r--r-- | openssl/src/asn1/mod.rs (renamed from src/asn1/mod.rs) | 0 | ||||
| -rw-r--r-- | openssl/src/bio/mod.rs (renamed from src/bio/mod.rs) | 0 | ||||
| -rw-r--r-- | openssl/src/bn/mod.rs (renamed from src/bn/mod.rs) | 0 | ||||
| -rw-r--r-- | openssl/src/crypto/hash.rs (renamed from src/crypto/hash.rs) | 0 | ||||
| -rw-r--r-- | openssl/src/crypto/hmac.rs (renamed from src/crypto/hmac.rs) | 0 | ||||
| -rw-r--r-- | openssl/src/crypto/memcmp.rs (renamed from src/crypto/memcmp.rs) | 0 | ||||
| -rw-r--r-- | openssl/src/crypto/mod.rs (renamed from src/crypto/mod.rs) | 0 | ||||
| -rw-r--r-- | openssl/src/crypto/pkcs5.rs (renamed from src/crypto/pkcs5.rs) | 0 | ||||
| -rw-r--r-- | openssl/src/crypto/pkey.rs (renamed from src/crypto/pkey.rs) | 0 | ||||
| -rw-r--r-- | openssl/src/crypto/rand.rs (renamed from src/crypto/rand.rs) | 0 | ||||
| -rw-r--r-- | openssl/src/crypto/symm.rs (renamed from src/crypto/symm.rs) | 0 | ||||
| -rw-r--r-- | openssl/src/lib.rs (renamed from src/lib.rs) | 2 | ||||
| -rw-r--r-- | openssl/src/macros.rs (renamed from src/macros.rs) | 0 | ||||
| -rw-r--r-- | openssl/src/ssl/error.rs (renamed from src/ssl/error.rs) | 0 | ||||
| -rw-r--r-- | openssl/src/ssl/mod.rs (renamed from src/ssl/mod.rs) | 0 | ||||
| -rw-r--r-- | openssl/src/ssl/tests.rs (renamed from src/ssl/tests.rs) | 0 | ||||
| -rw-r--r-- | openssl/src/x509/mod.rs (renamed from src/x509/mod.rs) | 0 | ||||
| -rw-r--r-- | openssl/src/x509/tests.rs (renamed from src/x509/tests.rs) | 0 | ||||
| -rw-r--r-- | openssl/test/cert.pem (renamed from test/cert.pem) | 0 | ||||
| -rw-r--r-- | openssl/test/key.pem (renamed from test/key.pem) | 0 |
28 files changed, 73 insertions, 26 deletions
@@ -1,3 +1,2 @@ -/doc/ target/ Cargo.lock diff --git a/.travis.yml b/.travis.yml index fe30a5f2..0250ab7c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,13 @@ language: rust env: - matrix: - - FEATURES="" - - FEATURES="tlsv1_1 tlsv1_2 aes_xts" -os: - - osx - - linux + global: + - secure: J4i75AV4KMrU/UQrLIzzIh35Xix40Ki0uWjm8j05oxlXVl5aPU2zB30AemDne2QXYzkN4kRG/iRnNORE/8D0lF7YipQNSNxgfiBVoOEfj/NSogvI2BftYX9vlLZJUvt+s/nbE3xa/Pyge1IPv7itDYGO7SMe8RTSqitgqyfE2Eg= + - FEATURES="tlsv1_1 tlsv1_2 aes_xts" before_script: - - openssl s_server -accept 15418 -www -cert test/cert.pem -key test/key.pem >/dev/null 2>&1 & +- openssl s_server -accept 15418 -www -cert openssl/test/cert.pem -key openssl/test/key.pem >/dev/null 2>&1 & script: - - cargo test --features "$FEATURES" +- (cd openssl && cargo test) +- (cd openssl && cargo test --features $FEATURES) +- ./.travis/build_docs.sh +after_success: +- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && ./.travis/update_docs.sh diff --git a/.travis/build_docs.sh b/.travis/build_docs.sh new file mode 100755 index 00000000..67f1845c --- /dev/null +++ b/.travis/build_docs.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +set -e + +mkdir doc + +for crate in $(echo openssl-sys openssl); do + mkdir -p $crate/target + ln -s -t $crate/target ../../doc + (cd $crate && cargo doc --no-deps --features "$FEATURES") +done diff --git a/.travis/update_docs.sh b/.travis/update_docs.sh new file mode 100755 index 00000000..355f75f8 --- /dev/null +++ b/.travis/update_docs.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +set -o errexit -o nounset + +git clone --branch gh-pages "https://[email protected]/${TRAVIS_REPO_SLUG}.git" deploy_docs +cd deploy_docs + +git config user.name "Steven Fackler" +git config user.email "[email protected]" + +rm -rf doc +mv ../doc . + +git add -A . +git commit -m "rebuild pages at ${TRAVIS_COMMIT}" +git push @@ -1,13 +1,15 @@ rust-openssl [](https://travis-ci.org/sfackler/rust-openssl) ============ -See the [rustdoc output](https://sfackler.github.io/doc/openssl). +See the [rustdoc output](https://sfackler.github.io/rust-openssl/doc/openssl). Building -------- -rust-openssl needs to link against the OpenSSL devleopment libraries on your system. It's very easy to get them on Linux. -For some reason, the OpenSSL distribution for Windows is structured differently, so it's a little more involved, but it *is* possible to build rust-openssl successfully on Windows. +rust-openssl needs to link against the OpenSSL devleopment libraries on your +system. It's very easy to get them on Linux. For some reason, the OpenSSL +distribution for Windows is structured differently, so it's a little more +involved, but it *is* possible to build rust-openssl successfully on Windows. ###Linux @@ -15,18 +17,27 @@ For some reason, the OpenSSL distribution for Windows is structured differently, 2. Run `cargo build`. ###Android -1. Follow the steps [here](wiki.openssl.org/index.php/Android) to build OpenSSL for 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. -2. Run the installer, making note of where it's installing OpenSSL. The option to copy the libraries to the Windows system directory or `[OpenSSL folder]/bin` is your choice. The latter is probably preferable, and the default. -3. Navigate to `[OpenSSL folder]/lib/MinGW/`, and copy `libeay32.a` and `ssleay32.a` (If 64-bit, then they will have `64` instead of `32`.) to your Rust install's libs folder. The default should be: +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. +2. Run the installer, making note of where it's installing OpenSSL. The option + to copy the libraries to the Windows system directory or `[OpenSSL +folder]/bin` is your choice. The latter is probably preferable, and the +default. +3. Navigate to `[OpenSSL folder]/lib/MinGW/`, and copy `libeay32.a` and +`ssleay32.a` (If 64-bit, then they will have `64` instead of `32`.) to your +Rust install's libs folder. The default should be: * 32-bit: `C:\Program Files (x86)\Rust\bin\rustlib\i686-pc-mingw32\lib` * 64-bit: `C:\Program Files (x86)\Rust\bin\rustlib\x86_64-pc-windows-gnu\lib` -4. Rename `libeay32.a` and `ssleay32.a` to `libcrypto.a` and `libssl.a`, respectively. +4. Rename `libeay32.a` and `ssleay32.a` to `libcrypto.a` and `libssl.a`, +respectively. 5. Run `cargo build`. ###OS X @@ -41,11 +52,18 @@ brew link openssl --force Note that you need to execute `cargo clean` in your project directory to rebuild `rust-openssl` with the new version of `openssl`. ###Testing -Several tests expect a local test server to be running to bounce requests off of. It's easy to do this. Open a separate terminal window and `cd` to the rust-openssl directory. Then run one of the following commands: - -* Windows: `openssl s_server -accept 15418 -www -cert test/cert.pem -key test/key.pem > NUL` -* Linux: `openssl s_server -accept 15418 -www -cert test/cert.pem -key test/key.pem >/dev/null` - -Then in the original terminal, run `cargo test`. If everything is set up correctly, all tests should pass. You might get some warnings in the `openssl s_server` window. Those aren't anything to worry about. You can stop the server using Control-C. +Several tests expect a local test server to be running to bounce requests off +of. It's easy to do this. Open a separate terminal window and `cd` to the +rust-openssl directory. Then run one of the following commands: + +* Windows: `openssl s_server -accept 15418 -www -cert test/cert.pem -key + test/key.pem > NUL` +* Linux: `openssl s_server -accept 15418 -www -cert test/cert.pem -key + test/key.pem >/dev/null` + +Then in the original terminal, run `cargo test`. If everything is set up +correctly, all tests should pass. You might get some warnings in the `openssl +s_server` window. Those aren't anything to worry about. You can stop the server +using Control-C. [1]: http://slproweb.com/products/Win32OpenSSL.html diff --git a/openssl-sys/Cargo.toml b/openssl-sys/Cargo.toml index 5e7d587e..8f7e2bce 100644 --- a/openssl-sys/Cargo.toml +++ b/openssl-sys/Cargo.toml @@ -6,6 +6,7 @@ authors = ["Alex Crichton <[email protected]>", license = "MIT" description = "FFI bindings to OpenSSL" repository = "https://github.com/sfackler/rust-openssl" +documentation = "https://sfackler.github.io/rust-openssl/doc/openssl-sys" links = "openssl" build = "build.rs" diff --git a/openssl-sys/src/lib.rs b/openssl-sys/src/lib.rs index fd16792b..70526fd5 100644 --- a/openssl-sys/src/lib.rs +++ b/openssl-sys/src/lib.rs @@ -1,6 +1,7 @@ #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] #![allow(dead_code)] #![feature(core, io, libc, path, std_misc, env)] +#![doc(html_root_url="https://sfackler.github.io/rust-openssl/doc/openssl-sys")] extern crate libc; diff --git a/Cargo.toml b/openssl/Cargo.toml index 75f8ba59..f0b7a39b 100644 --- a/Cargo.toml +++ b/openssl/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Steven Fackler <[email protected]>"] license = "Apache-2.0" description = "OpenSSL bindings" repository = "https://github.com/sfackler/rust-openssl" -documentation = "https://sfackler.github.io/doc/openssl" +documentation = "https://sfackler.github.io/rust-openssl/doc/openssl" readme = "README.md" keywords = ["crypto", "tls", "ssl"] @@ -16,7 +16,7 @@ sslv2 = ["openssl-sys/sslv2"] aes_xts = ["openssl-sys/aes_xts"] [dependencies.openssl-sys] -path = "openssl-sys" +path = "../openssl-sys" version = "0.3.1" [dev-dependencies] diff --git a/src/asn1/mod.rs b/openssl/src/asn1/mod.rs index c250096f..c250096f 100644 --- a/src/asn1/mod.rs +++ b/openssl/src/asn1/mod.rs diff --git a/src/bio/mod.rs b/openssl/src/bio/mod.rs index 2f12f906..2f12f906 100644 --- a/src/bio/mod.rs +++ b/openssl/src/bio/mod.rs diff --git a/src/bn/mod.rs b/openssl/src/bn/mod.rs index 3a5f231e..3a5f231e 100644 --- a/src/bn/mod.rs +++ b/openssl/src/bn/mod.rs diff --git a/src/crypto/hash.rs b/openssl/src/crypto/hash.rs index f81532c9..f81532c9 100644 --- a/src/crypto/hash.rs +++ b/openssl/src/crypto/hash.rs diff --git a/src/crypto/hmac.rs b/openssl/src/crypto/hmac.rs index 65808e58..65808e58 100644 --- a/src/crypto/hmac.rs +++ b/openssl/src/crypto/hmac.rs diff --git a/src/crypto/memcmp.rs b/openssl/src/crypto/memcmp.rs index 299effa9..299effa9 100644 --- a/src/crypto/memcmp.rs +++ b/openssl/src/crypto/memcmp.rs diff --git a/src/crypto/mod.rs b/openssl/src/crypto/mod.rs index e695de33..e695de33 100644 --- a/src/crypto/mod.rs +++ b/openssl/src/crypto/mod.rs diff --git a/src/crypto/pkcs5.rs b/openssl/src/crypto/pkcs5.rs index b101c3ed..b101c3ed 100644 --- a/src/crypto/pkcs5.rs +++ b/openssl/src/crypto/pkcs5.rs diff --git a/src/crypto/pkey.rs b/openssl/src/crypto/pkey.rs index c20fae4f..c20fae4f 100644 --- a/src/crypto/pkey.rs +++ b/openssl/src/crypto/pkey.rs diff --git a/src/crypto/rand.rs b/openssl/src/crypto/rand.rs index dc338a3d..dc338a3d 100644 --- a/src/crypto/rand.rs +++ b/openssl/src/crypto/rand.rs diff --git a/src/crypto/symm.rs b/openssl/src/crypto/symm.rs index 922137c0..922137c0 100644 --- a/src/crypto/symm.rs +++ b/openssl/src/crypto/symm.rs diff --git a/src/lib.rs b/openssl/src/lib.rs index 58f3d2f0..11234c2f 100644 --- a/src/lib.rs +++ b/openssl/src/lib.rs @@ -2,7 +2,7 @@ #![crate_name="openssl"] #![crate_type="rlib"] #![crate_type="dylib"] -#![doc(html_root_url="https://sfackler.github.io/doc/openssl")] +#![doc(html_root_url="https://sfackler.github.io/rust-openssl/doc/openssl")] extern crate libc; #[cfg(test)] diff --git a/src/macros.rs b/openssl/src/macros.rs index 3e4bb429..3e4bb429 100644 --- a/src/macros.rs +++ b/openssl/src/macros.rs diff --git a/src/ssl/error.rs b/openssl/src/ssl/error.rs index 027554c5..027554c5 100644 --- a/src/ssl/error.rs +++ b/openssl/src/ssl/error.rs diff --git a/src/ssl/mod.rs b/openssl/src/ssl/mod.rs index 35649e24..35649e24 100644 --- a/src/ssl/mod.rs +++ b/openssl/src/ssl/mod.rs diff --git a/src/ssl/tests.rs b/openssl/src/ssl/tests.rs index 73f479bf..73f479bf 100644 --- a/src/ssl/tests.rs +++ b/openssl/src/ssl/tests.rs diff --git a/src/x509/mod.rs b/openssl/src/x509/mod.rs index 6c09f8b2..6c09f8b2 100644 --- a/src/x509/mod.rs +++ b/openssl/src/x509/mod.rs diff --git a/src/x509/tests.rs b/openssl/src/x509/tests.rs index 4f24e70c..4f24e70c 100644 --- a/src/x509/tests.rs +++ b/openssl/src/x509/tests.rs diff --git a/test/cert.pem b/openssl/test/cert.pem index 1523c736..1523c736 100644 --- a/test/cert.pem +++ b/openssl/test/cert.pem diff --git a/test/key.pem b/openssl/test/key.pem index a3f80dd9..a3f80dd9 100644 --- a/test/key.pem +++ b/openssl/test/key.pem |