Commit Graph

1258 Commits

Author SHA1 Message Date
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 c1e41349fb Rename NoPadding to None 2016-10-07 08:10:01 -07:00
Steven Fackler b6719de92e Rename EncryptionPadding to Padding 2016-10-07 08:09:02 -07:00
Steven Fackler b8e586538f Merge pull request #461 from aoprisan/RSAEncDec
Added public/private encrypt/decrypt functions to RSA
2016-10-07 08:06:17 -07:00
Andrei Oprisan 50648b7dac Removed max_size; removed all encrypt/decrypt methods except private/public encrypt/decrypt which take the padding 2016-10-07 10:01:16 +03:00
Andrei Oprisan f16cd5586f added try_ssl_size, which handles -1 as error and returns the value otherwise; added RSA private_decrypt and public encrypt
lift_ssl_size

Added public/private encrypt/decrypt to RSA from the original commit + tests; added try_ssl_returns_size macro to check for -1 in case of SSL functions which return size
2016-10-05 14:39:11 +03:00
Steven Fackler 623a34aa02 Merge pull request #458 from manuels/patch-1
Add RAND_status and RSA paddings
2016-10-03 01:46:58 +02:00
manuels 44ed665f02 Add RAND_status()
RAND_status() returns 1 if the PRNG has been seeded with enough data, 0 otherwise.
2016-10-01 13:42:13 +02:00
manuels 4cc55b65e0 Add RSA_*_PADDING constants 2016-10-01 13:39:33 +02:00
Steven Fackler c5da7131f5 Make sure private component exists when signing
Closes #457
2016-09-29 00:09:31 +02:00
Steven Fackler df194b0e61 Merge branch 'release' 2016-09-09 09:23:05 -07:00
Steven Fackler 37c475384a Merge branch 'release-v0.8.3' into release 2016-09-09 09:19:43 -07:00
Steven Fackler 8d95383f32 Release v0.8.3 2016-09-09 09:19:24 -07:00
Steven Fackler 63b3f4c2ac Merge pull request #450 from sfackler/sfackler-patch-1
Fix password callback on ARM
2016-09-09 11:13:14 -05:00
Steven Fackler 9a449dbd6e Fix password callback on ARM
Closes #449
2016-09-08 09:35:56 -07:00
Steven Fackler bb23d5119f Merge pull request #446 from xitep/master
Implement Clone for openssl::error::ErrorStack
2016-09-01 11:29:15 -07:00
Novotnik, Petr 5e08ad0085 Implement Clone for openssl::error::ErrorStack 2016-09-01 20:10:02 +02:00
Steven Fackler 4d4292a3b0 Merge pull request #444 from adelarsq/patch-1
Add cargo clean in the list
2016-08-30 20:53:22 +02:00
Adelar da Silva Queiróz f04d5e026b Add description about how to solve openssl issue 2016-08-29 23:08:28 -03:00
Adelar da Silva Queiróz 76c09f89f2 Add cargo clean in the list 2016-08-29 22:59:11 -03:00
Steven Fackler 2d510e21a3 Re-enable 64 bit MSVC
Closes #443
2016-08-20 12:55:43 -04:00
Steven Fackler dc8b786a18 Merge branch 'release' 2016-08-18 13:05:42 -07:00
Steven Fackler 87a3bc2615 Merge branch 'release-sys-v0.7.17-v0.8.2' into release 2016-08-18 12:59:44 -07:00
Steven Fackler 4718a88e04 Release openssl-sys v0.7.17, openssl v0.8.2 2016-08-18 12:59:22 -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
Steven Fackler 80ed1ef8ab Ignore flickering test on windows 2016-08-16 22:41:36 -07:00
Steven Fackler 82bda28206 Merge pull request #436 from dweinstein/asn1_expiration
Add support for getting X509 notBefore, notAfter
2016-08-16 22:34:46 -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
David Weinstein 90c42fc026 Fix docs 2016-08-17 01:23:54 -04:00
David Weinstein 234ce581f9 Add x509_validity feature to travis tests
- also update docs for new x509 `not_before`, `not_after`
2016-08-17 01:23:54 -04:00
David Weinstein 8fa4059b82 Add test for `"x509_validity"` feature 2016-08-17 01:23:54 -04:00
David Weinstein 96b1ef829c Add `"x509_expiry"` feature flag
- fix return of `ASN1_TIME_print`
- assert on null `date`
2016-08-17 01:23:54 -04:00
David Weinstein 32a4e2ba50 Introduce `Asn1TimeRef` 2016-08-17 01:23:54 -04:00
David Weinstein f9cd4bff1f Progress on asn1 expiry
- Use MemBio and implement `Display` for Asn1Time

- Tweak doc for asn1 `not_before`, `not_after`
2016-08-17 01:23:54 -04:00
Steven Fackler 4dd6fae48f Merge pull request #440 from dweinstein/openssl-mirror
Improve build script
2016-08-16 22:18:30 -07:00
David Weinstein e64d3fcfcc Fix finicky sha1 stdin format 2016-08-17 00:58:05 -04:00
David Weinstein e60c257019 Improve build script
- try and fallback to a mirror when openssl.org is down
- check the sha1 of the downloaded tarball
2016-08-17 00:48:56 -04:00
Steven Fackler 74c954b06b Merge branch 'release' 2016-08-15 18:53:25 -07:00
Steven Fackler 0f428d1904 Merge branch 'release-sys-v0.7.16-v0.8.1' into release 2016-08-15 18:46:15 -07:00
Steven Fackler 629f638f08 Release openssl-sys v0.7.16, openssl v0.8.1 2016-08-15 18:44:57 -07:00
Steven Fackler 88dcb1c81d Add a little comment to sketchy transmute 2016-08-15 18:41:18 -07:00
Steven Fackler 912f7499cd Initialize algorithms in init
Required to deserialize PKCS12 on 0.9.8, looks like
2016-08-14 12:51:33 -07:00
Steven Fackler e6c4135c53 Docs for pkcs12 2016-08-14 11:24:18 -07:00
Steven Fackler e5299fd7c9 Fix memory leak in general name stack 2016-08-14 11:16:53 -07:00
Steven Fackler 6b12a0cdde PKCS #12 support 2016-08-14 11:11:26 -07:00
Steven Fackler ad4a8cc140 More test fixes 2016-08-14 11:05:53 -07:00
Steven Fackler 3876332734 Fix tests 2016-08-14 10:29:55 -07:00
Steven Fackler 773a6f0735 Start on PKCS #12 support 2016-08-14 10:11:38 -07:00
Steven Fackler 5042d3d170 Mangle c helper functions
We want to make sure that multiple openssl versions can coexist in the
same dependency tree.

Closes #438
2016-08-13 12:05:29 -07:00