Commit Graph

144 Commits

Author SHA1 Message Date
Steven Fackler ccef9e339d Macroise from_pem 2016-11-13 17:56:48 +00:00
Steven Fackler df9666c334 Macroise to_pem 2016-11-13 17:42:45 +00:00
Steven Fackler 48c0009418 Macroise from_der 2016-11-13 17:06:50 +00:00
Steven Fackler b0415f466c Macroise to_der 2016-11-13 16:52:19 +00:00
Steven Fackler 26a3358a2b Add basic X509_STORE access
There's more to do here, but this enabled addition of trusted CAs from
X509 objects.

Closes #394
2016-11-12 00:24:12 +00:00
Steven Fackler a42c6e8713 Drop rustc-serialize dependency 2016-11-09 20:35:23 +00:00
Steven Fackler 1edb6f682e Support client CA advertisement 2016-11-06 12:17:14 -08:00
Steven Fackler 8037258913 Return a Stack in Pkcs12 2016-11-05 13:57:05 -07:00
Steven Fackler f15c817c2d Rustfmt 2016-11-05 10:54:17 -07:00
Steven Fackler 01ae978db0 Get rid of Ref
There's unfortunately a rustdoc bug that causes all methods implemented
for any Ref<T> to be inlined in the deref methods section :(
2016-11-04 17:16:59 -07:00
Steven Fackler 6fe7dd3024 Remove an enum 2016-11-03 22:45:54 -07:00
Steven Fackler 62a9f89fce Avoid lhash weirdness 2016-11-03 20:38:51 -07:00
Steven Fackler e67733cc4e Cleanup X509StoreContext::chain 2016-11-01 19:45:38 -07:00
Lionel Flandrin 8d0090faec Implement X509StoreContextRef::get_chain 2016-11-01 21:23:18 +01:00
Lionel Flandrin 36bf0bb387 Replace GeneralNames by the new Stack API 2016-11-01 21:23:18 +01:00
Steven Fackler dc4098bdd8 Clean up x509 name entries 2016-10-31 22:43:05 -07:00
Steven Fackler cd7fa9fca2 Update x509 2016-10-31 20:54:34 -07:00
Steven Fackler f640613863 Update PKey 2016-10-31 20:12:55 -07:00
Steven Fackler 849fca4a7b Convert Asn1Time 2016-10-31 20:02:24 -07:00
Steven Fackler f75f82e466 Rustfmt 2016-10-30 16:37:45 -07:00
Steven Fackler c89f2c0be0 Use PKeyRef in X509Generator 2016-10-29 16:37:56 -07:00
Steven Fackler c2b38d8bb3 Move docs 2016-10-29 15:02:36 -07:00
Steven Fackler 85169e5a61 Fix reexport 2016-10-29 15:02:07 -07:00
Steven Fackler 4c7a5a418e Implement client and server connectors 2016-10-29 14:02:26 -07:00
Steven Fackler 1a288da86c Make verification unconditionally exposed internally 2016-10-28 22:14:44 -07:00
Steven Fackler 4f59d57675 Move SslString to a shared location 2016-10-26 21:28:00 -07:00
Steven Fackler d39a2cedad Fix tests 2016-10-22 16:01:26 -07:00
Steven Fackler 787cad3c82 Use constants rather than constructors for Nid 2016-10-22 15:58:06 -07:00
Steven Fackler 3c50c74444 Camel case Rsa 2016-10-22 10:21:16 -07:00
Steven Fackler 2fd201d9c3 De-enumify Nid 2016-10-22 10:08:32 -07:00
Steven Fackler 98b7f2f935 Flatten crypto module 2016-10-22 09:16:38 -07:00
Steven Fackler 8ec53eb0e1 Fix X509StoreContext 2016-10-21 20:59:07 -07:00
Steven Fackler 6f1a3f2834 Update BigNumRef 2016-10-21 20:26:53 -07:00
Steven Fackler 02b4385c5d Convert X509VerifyParamRef 2016-10-21 19:58:06 -07:00
Steven Fackler b7017a7eec Update Asn1TimeRef 2016-10-21 17:13:30 -07:00
Steven Fackler 23fc6c828b Convert X509Ref 2016-10-21 17:01:13 -07:00
Steven Fackler b3eb8d516c Switch X509Name over to new borrow setup
The use of actual references enables us to be correct with respect to
mutability without needing two structs for the mutable and immutable
cases and more deref impls.
2016-10-20 22:51:10 -07:00
Steven Fackler 5ab037f056 Allow the X509 verify error to be read from an SslRef 2016-10-18 22:21:06 -07:00
Steven Fackler cfd5192a7d De-enumify X509ValidationError
Also make it an Error.

Closes #352.
2016-10-18 22:10:37 -07:00
Steven Fackler 080050e10d Drop lifetime on GeneralNames 2016-10-18 21:52:49 -07:00
Steven Fackler 194298a057 Implement new feature setup
The basic idea here is that there is a feature for each supported
OpenSSL version. Enabling multiple features represents support for
multiple OpenSSL versions, but it's then up to you to check which
version you link against (probably by depending on openssl-sys and
making a build script similar to what openssl does).
2016-10-17 21:57:54 -07:00
Steven Fackler a938a001a7 Fix missing import 2016-10-16 23:26:38 -07:00
Steven Fackler 7ec015325b Finish error overhaul 2016-10-16 21:07:17 -07:00
Steven Fackler c171be551a De-enumify message digests 2016-10-15 15:23:29 -07:00
Steven Fackler d976b8f595 Enable hostname verification on 1.0.2 2016-10-14 18:56:15 -07:00
Steven Fackler af51b263b1 Support hostname verification
Closes #206
2016-10-14 17:39:31 -07:00
Alex Crichton 43c951f743 Add support for OpenSSL 1.1.0
This commit is relatively major refactoring of the `openssl-sys` crate as well
as the `openssl` crate itself. The end goal here was to support OpenSSL 1.1.0,
and lots of other various tweaks happened along the way. The major new features
are:

* OpenSSL 1.1.0 is supported
* OpenSSL 0.9.8 is no longer supported (aka all OSX users by default)
* All FFI bindings are verified with the `ctest` crate (same way as the `libc`
  crate)
* CI matrixes are vastly expanded to include 32/64 of all platforms, more
  OpenSSL version coverage, as well as ARM coverage on Linux
* The `c_helpers` module is completely removed along with the `gcc` dependency.
* The `openssl-sys` build script was completely rewritten
  * Now uses `OPENSSL_DIR` to find the installation, not include/lib env vars.
  * Better error messages for mismatched versions.
  * Better error messages for failing to find OpenSSL on a platform (more can be
    done here)
  * Probing of OpenSSL build-time configuration to inform the API of the `*-sys`
    crate.
* Many Cargo features have been removed as they're now enabled by default.

As this is a breaking change to both the `openssl` and `openssl-sys` crates this
will necessitate a major version bump of both. There's still a few more API
questions remaining but let's hash that out on a PR!

Closes #452
2016-10-12 22:49:55 -07:00
Steven Fackler cd69343d67 Fix SslContext::add_extra_chain_cert
SSL_CTX_add_extra_chain_cert assumes ownership of the certificate, so
the method really needs to take an X509 by value. Work around this by
manually cloning the cert.

This method has been around for over a year but I'm guessing nobody
actually used it since it produces a nice double free into segfault!
2016-08-17 19:30:57 -07:00
David Weinstein 7a653282a9 Get rid of use Asn1TimeRef warning for some builds 2016-08-17 01:23:54 -04:00
David Weinstein 06f19cf285 Be explicit regarding Asn1TimeRef lifetimes 2016-08-17 01:23:54 -04:00