Commit Graph

26 Commits

Author SHA1 Message Date
Sean McArthur
6b5726aaa8 Improve fmt::Debug of Client and ClientBuilder 2019-10-09 13:46:39 -07:00
Sean McArthur
53495e1526 Redesign Error type
- The `Error`'s kind is a now a set of variants depending on the context
  of when an error could occur.
- If another error was the cause, it is now always the `source`.

Along with the `is_*` methods, this should help in understanding *when*
a certain error occurred. For example, an error setting the TLS
certificates will return a builder error, with the TLS error as the
source. This should help differentiate from a TLS error that happens
when connecting to a server.

It also makes the internal code less dependent on all the exact
dependencies that can be enabled or disabled.
2019-09-17 14:23:22 -07:00
Sean McArthur
5fb04356fc Re-enable rustls feature (#625) 2019-09-09 12:45:45 -07:00
Sean McArthur
ba7b2a754e refactor all to async/await (#617)
Co-authored-by: Danny Browning <danny.browning@protectwise.com>
Co-authored-by: Daniel Eades <danieleades@hotmail.com>
2019-09-06 17:22:56 -07:00
danieleades
cf8944a0f0 cargo fmt (#604)
Run rustfmt and setup CI to check for it.
2019-08-29 09:52:39 -07:00
Daniel Eades
4bb4149b63 remove unnecessary double-colons 2019-08-16 12:59:55 -07:00
Daniel Eades
3ba4b6eadf port all optional features to 2018-edition 2019-08-16 12:59:55 -07:00
Daniel Eades
86d9cbc66e cargo fix --edition 2019-08-16 12:59:55 -07:00
Timothée Ravier
9a9bcac336 Enable derive Clone for Certificate & Cert (#569)
This makes it easier to parse Certificates in advance and pass them as
clones for each client request.

Signed-off-by: Timothée Ravier <timothee.ravier@ssi.gouv.fr>
2019-07-18 09:50:40 -07:00
Sean McArthur
9276e2cce7 Fix unused_mut warning in src/tls 2019-07-09 15:11:57 -07:00
Sean McArthur
a701e93edb fix redundant TLSError import warning 2019-06-05 13:21:41 -07:00
Manuel Alejandro
f96f9454fd Fixing Identity::from_pem which was failing when there was a PKCS1 RSA private key but not PKCS8 key (#458) 2019-02-16 12:30:18 -08:00
Sean McArthur
81b4d26682 Try to detect Certificate and Identity errors earlier 2019-01-11 15:43:00 -08:00
Sean McArthur
fa8736f851 remove unneeded features from tokio dependency 2019-01-07 15:37:18 -08:00
Sean McArthur
b9f4661332 rename TLSBackend to TlsBackend 2019-01-03 12:43:22 -08:00
quininer
37039760f8 Add rustls support (#390) 2018-12-17 11:57:43 -08:00
Yannick Heinrich
c4bf420021 Integrate helper functions inside corresponding structs 2018-10-05 11:19:52 -07:00
Yannick Heinrich
647f59756e Add missing pub(crate) statements. 2018-10-05 11:19:52 -07:00
Yannick Heinrich
11f8588989 upgrade to native-tls 0.2 + invalid certs (#325)
- Bumps `native-tls` dependency to 0.2 and adapt code accordingly
- Import code used from `tokio-tls` into `connect_async` and adapt dependencies accordinlgy
- Add an option for using `danger_accept_invalid_certs` inside the `Config` struct
2018-08-08 13:14:36 -07:00
Xin Yu
1b55d8b08a read certificate from PEM buffer. 2018-02-02 09:55:40 +08:00
Anthony Nowell
646c8b8efc Support PKCS12 identity on the ClientBuilder 2017-08-25 15:38:45 -07:00
Sean McArthur
665b4fe718 upgrade hyper to v0.11 2017-06-21 09:47:21 -07:00
Steven Fackler
fa4df2037a Use external hyper-native-tls crate 2017-01-21 12:50:54 +00:00
Sebastian Dröge
d624b0ef29 Implement std::fmt::Debug for all public types 2016-11-14 20:54:18 +02:00
Anthony Nowell
92825974b0 Update to reflect latest native-tls API 2016-11-08 02:57:08 -07:00
Sean McArthur
1259128d92 add native-tls and serde json support 2016-10-22 21:48:29 -07:00