Commit Graph
12 Commits
Author SHA1 Message Date
James NugentandLucio Franco 33df3badb2 Temporarily allow duplicate crossbeam-queue crates (#153)
`crossbeam-queue` is currently brought in both by Rayon (up to date v0.2.0) and
Hyper's dependency chain (0.1.x). Since Hyper is in the process of updating
things, I proposed we temporarily allow this to pass CI and revisit it when
there is a new release of Hyper or the relevant dependencies thereof.
2019-11-25 16:18:52 -05:00
James NugentandLucio Franco 85060500f3 fix(transport): Remove support for OpenSSL (#141)
BREAKING CHANGE: Remove support for OpenSSL within the transport.
2019-11-15 13:30:42 +01:00
James NugentandGitHub 4490812ab4 Clarify what the Interop (Rustls) task is doing during CI (#131) 2019-11-10 18:08:59 +01:00
James NugentandLucio Franco 79996f7c93 Allow selection of TLS library in Interop tests (#129) 2019-11-10 17:28:03 +01:00
James NugentandLucio Franco b2c1d2e2b7 Add Windows build for interop crate (#126)
* Update rust interop test binaries to v1.25.1

* Add Windows build for interop crate
2019-11-10 12:15:39 +01:00
James NugentandLucio Franco ed53be5779 Use rustls for interop tests (#125)
* Use rustls for interop tests

This commit changes the interop tests to use rustls instead of openssl.
Apparently in the past there was some issue with this, but it seems to
work OK to me.

* Use certificates with larger key sizes for interop

This commit switches out the certificates used for testing interop to be
based on 4096-bit RSA keys, allowing rustls to be used for the interop
testing instead of OpenSSL.

The keys are generated using Terraform, although the state file is not
committed. A README.md is added to the data directory that explains how
to use Terraform to rotate the test certificates if this is ever
desirable.

This is desirable in order that none of the crates which `cargo build
--all` will build have the `openssl` feature, which should allow Tonic
to build on Windows with no issues.
2019-11-09 17:00:23 +00:00
James NugentandLucio Franco ac0e333b39 feat(transport): Add system root anchors for TLS (#114)
As per #101, it is sometimes desirable to use standard web PKI roots for
gRPC clients. This commit adds a method to ClientTlsConfig to add the
trust roots from the system certificate store:

- OpenSSL uses `openssl-probe` to search the system for roots.
- Rustls uses `rustls-native-certs` to load the system roots.

Enabling the `openssl-roots` or `rustls-roots` feature for `tonic` in
`Cargo.toml` will add system roots by default when configuring a gRPC
client.
2019-11-09 16:30:44 +00:00
James NugentandLucio Franco 4d4dbdf074 Use Stable Rust in CI (#124) 2019-11-09 10:03:49 +00:00
James NugentandLucio Franco 335a373a40 feat(transport): Add support client mTLS (#77)
This commit adds a simple API for specifying the TLS certificate a GRPC
client will present (via the same `Identity` wrapper as a server cert is
configured). It also adds an API to specify which CA certificate client
TLS certificates will be validated against for servers.
2019-10-22 17:00:08 -04:00
James NugentandLucio Franco 2a4bdb24f6 fix(transport): Rename server tls config method (#73)
BREAKING CHANGE: `rustls_client_config` for the server has been renamed to `rustls_server_config`.
2019-10-18 17:28:25 -04:00
James NugentandLucio Franco 8db3961491 feat(transport): Expose more granular control of TLS configuration (#48)
This commit reworks TLS configuration of both servers and endpoints in
order to provide a more flexible API. We now add options to configure
the selected TLS library using the appropriate 'native' configuration
structures, as well as retaining the existing simplier interface which
is compatible with both.

The new API can also be easily extended to support simple interfaces for
configuring mTLS and a range of other options without creating sprawl
in the builders for `Server` and `Endpoint`.
2019-10-08 11:49:05 -04:00
James NugentandLucio Franco 2c5c3a282a fix(transport): Attempt to load RSA private keys in rustls (#39)
Currently, using an RSA key - or indeed any text which is not a
PEM-encoded PKCS8-format key with RusTLS panics with an index-out-of-
range exception.

This commit introduces two new types of `TlsError` which indicate
problems with loading a certificate or private key:

- `CertificateParseError`, indicating that the certificate cannot be
  parsed

- `PrivateKeyParseError`, indicating that the private key cannot be
  parsed.

Additionally, in the case that reading the private key as PKCS8 fails,
we now try loading it as an RSA key before failing.
2019-10-04 11:31:17 -04:00