Add TLS support (#81)

When `-- features tls` is specified for tarpc, RPC communication can
also occur over a `TlsStream<TcpStream>` instead of a `TcpStream`.

* The functional tests have been refactored to use a common set of
functions for constructing the client and server structs so that all
the tests are shared across non-tls and tls test runs.

* Update pre-push to test TLS

* The `cfg_attr` logic caused many false warnings from clippy, so for now the crate docs for TLS are not tested.
This commit is contained in:
compressed
2017-01-31 13:21:13 -05:00
committed by Tim
parent c286c596bd
commit fafe569ebc
13 changed files with 636 additions and 78 deletions

View File

@@ -70,10 +70,12 @@ run_cargo() {
rustup run $2 cargo $1 &>/dev/null
else
rustup run nightly cargo $1 --features unstable &>/dev/null
rustup run nightly cargo $1 --features unstable,tls &>/dev/null
fi
else
printf "${PREFIX} $VERB... "
cargo $1 &>/dev/null
cargo $1 --features tls &>/dev/null
fi
if [ "$?" != "0" ]; then
printf "${FAILURE}\n"