Commit Graph

2147 Commits

Author SHA1 Message Date
Steven Fackler d7501d4285 Merge pull request #474 from sfackler/digest
Signature/Digest API
2016-10-15 13:36:32 -07:00
Steven Fackler 4ed81d6426 Fix EVP_DigestVerifyFinal version support 2016-10-15 13:12:37 -07:00
Steven Fackler 2ff82649b5 Add examples to crypto::sign 2016-10-15 12:50:03 -07:00
Steven Fackler ea8cbbe9dc Fix typo 2016-10-15 12:31:30 -07:00
Steven Fackler 4d567358a1 Distinguish between verification errors and "other" errors. 2016-10-15 12:31:06 -07:00
Steven Fackler bb23b33829 Fix signature of EVP_DigestVerifyFinal on 1.0.1 2016-10-15 12:24:20 -07:00
Steven Fackler 6ae472487f Support HMAC PKeys and remove hmac module 2016-10-15 11:06:11 -07:00
Steven Fackler cce1d44f28 Remove old RSA sign and verify methods 2016-10-15 10:43:19 -07:00
Steven Fackler f73313d688 Signature and verification support 2016-10-15 10:36:59 -07:00
Steven Fackler b564cb5db7 Add digest signature methods 2016-10-15 09:48:34 -07:00
Steven Fackler 64b8e5e553 Merge pull request #471 from sfackler/no-comp
Handle OPENSSL_NO_COMP
2016-10-14 23:09:11 -07:00
Steven Fackler e1d1006fad Check feature compatibility in build script 2016-10-14 23:03:44 -07:00
Steven Fackler ba997c590e Prefer 1.1 when looking for Homebrew installs 2016-10-14 22:55:44 -07:00
Steven Fackler 55b960fb92 Merge pull request #473 from sfackler/arm-build-only
Don't run test on ARM
2016-10-14 22:53:34 -07:00
Steven Fackler 984b9a0cc7 Don't run test on ARM
They're very segfaulty, but it's almost certainly due to the QEMU layer.
We really just want to make sure things compile.
2016-10-14 22:28:24 -07:00
Steven Fackler 1fe16382e0 Merge pull request #472 from sfackler/alpn-test
Fix test_alpn_server_select_none
2016-10-14 22:26:32 -07:00
Steven Fackler 7ac0599638 Fix test_alpn_server_select_none
In OpenSSL 1.1, a failure to negotiate a protocol is a fatal error, so
fork that test. This also popped up an issue where we assumed all errors
had library, function, and reason strings which is not necessarily the
case.

While we're in here, adjust the Display impl to match what OpenSSL
prints out.

Closes #465
2016-10-14 22:01:21 -07:00
Steven Fackler f520aa2860 Handle OPENSSL_NO_COMP
Closes #459
2016-10-14 20:50:45 -07:00
Steven Fackler 3ea2a9cb5f Merge pull request #470 from sfackler/confs
Support OpenSSL conditional compilation
2016-10-14 20:20:05 -07:00
Steven Fackler d7a433bdef Respect osslconf in systest
Also cfg off SSLv3_method, since it's disabled in the OpenSSL that ships
with Arch Linux. More such flags can be added on demand - it doesn't
seem worth auditing everything for them.
2016-10-14 19:16:08 -07:00
Steven Fackler ed076de2ca Merge pull request #469 from sfackler/hostname
Support hostname verification
2016-10-14 19:07:33 -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
Steven Fackler b2c09440f6 Merge pull request #468 from sfackler/no-link-name
Remove link_name usage
2016-10-14 16:28:00 -07:00
Steven Fackler ae282a78e2 Remove link_name usage 2016-10-14 16:15:50 -07:00
Steven Fackler 98e71596fb Merge pull request #464 from alexcrichton/systest
Add support for OpenSSL 1.1.0
2016-10-14 11:39:43 -07:00
Alex Crichton 0908fddc74 Ignore DTLS tests on Windows/ARM for now
cc #467
2016-10-14 11:15:22 -07:00
Steven Fackler f44cff29e6 Cleanup 2016-10-13 22:34:39 -07:00
Steven Fackler 3d535f661f Use stdlib logic for udp 2016-10-13 20:15:26 -07:00
Steven Fackler a09f46266d Fix windows for real 2016-10-13 20:09:43 -07:00
Steven Fackler 5b29fc9d69 Disable npn tests on < 1.0.2
s_client doesn't seem to support the required flag before then.
2016-10-13 20:03:02 -07:00
Steven Fackler 140ef1b988 Fix tests on windows 2016-10-13 20:01:31 -07:00
Steven Fackler 143556078b Reenable dtls tests 2016-10-13 19:48:30 -07:00
Steven Fackler edfc50f37d Clean up features 2016-10-13 19:46:13 -07:00
Steven Fackler 1883590c61 Correct feature selection in tests 2016-10-13 19:21:12 -07:00
Steven Fackler b610e01793 Flag off dtls and mask ssl_ops
Also un-feature gate npn as it ships with 1.0.1
2016-10-13 19:06:53 -07:00
Alex Crichton ce4d233d38 Tweak some comments in Cargo.toml 2016-10-12 22:53:03 -07:00
Alex Crichton 715b700aff Ignore a test on OpenSSL 1.1.0 2016-10-12 22:51:47 -07:00
Steven Fackler af3e06d3e8 Add remaining SSL_OP constants 2016-10-12 22:50:08 -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 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