Commit Graph

103 Commits

Author SHA1 Message Date
Tomasz Drwięga d9e3d6ea21 Improving missing OpenSSL message on Linux 2017-01-03 11:56:32 +01:00
Josh Triplett 9ff3ce4687 Use metadeps to specify pkg-config dependencies declaratively
This makes it easier for distribution packaging tools to generate
appropriate package dependencies.
2016-12-24 02:38:51 -08:00
Sébastien Marie b3526cbd2b Add LibreSSL 2.5.0 support 2016-12-21 09:27:12 +01:00
Aidan Hobson Sayers b090804227 Allow OPENSSL_{LIB,INCLUDE}_DIR to override OPENSSL_DIR 2016-12-12 17:51:35 +00:00
Alex Crichton c2bf8acad8 Provide a tailored error message on Linux
I just ran into a case where I installed OpenSSL in a docker container but I
forgot to install pkg-config. Right now openssl-sys relies on pkg-config, so
print out a nice error about this.
2016-11-05 22:55:25 -07:00
Steven Fackler fb9420fc91 Always dump openssl confs 2016-11-04 21:15:07 -07:00
Steven Fackler 91fd58b4c2 More buildscript tweaks 2016-11-04 21:10:49 -07:00
Steven Fackler 9198bcda3a Improve buildscript logic 2016-11-04 21:08:34 -07:00
Steven Fackler ba997c590e Prefer 1.1 when looking for Homebrew installs 2016-10-14 22:55:44 -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
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
Maximilian Hristache fcc6be2b01 Avoid empty include paths (i.e. cc -I "" ) as they are not supported by GCC. Fix #311 2015-11-28 16:26:58 +01:00
Steven Fackler c0a0b80020 Remove unecessary build dependency 2015-11-16 22:28:56 -08:00
Steven Fackler a8a10e64ad Split stuff requiring a shim out to a separate crate 2015-11-16 20:16:01 -08:00
Alex Crichton 8ed840cdf5 Add metadata for the include dir of openssl
If OpenSSL is installed at a nonstandard location dependencies on OpenSSL may
want to know where it was found to be installed at.
2015-10-13 15:58:45 -07:00
Alex Crichton bf16c19f31 Swap order of linking ssl/crypto
GNU linkers will sometimes aggressively try to strip objects and archives from a
linker command line in a left-to-right fashion. When a linker hits an object
file that doesn't satisfy any unresolved symbols, it will discard the object and
not re-visit it. This means that currently if symbols are depended upon in
libssl then some of the dependencies of libssl (in libcrypto) may have already
been stripped, causing a link error.

By swapping the order of what's linked it reflects the natural flow of
dependencies and the linker should figure everything out for us.
2015-09-01 11:24:32 -07:00
Jethro Beekman 6a725acf4d Remove #ifs for same-value shimmed SSL options. Depend on compiler optimization instead. 2015-07-01 21:49:27 -07:00
Jethro Beekman aeefa364b7 Decouple C SSL Option bit flags from Rust version
The OpenSSL "SSL_OP_*" flags are in constant flux between different OpenSSL
versions. To avoid having to change the Rust definitions, we implement our
own numbering system in Rust, and use an automatically-generated C shim to
convert the bitflags at runtime.
2015-07-01 21:49:11 -07:00
Steven Fackler 6e43f5c0d4 Modernize cargo directives 2015-06-28 19:41:52 -07:00
Steven Fackler d465f6c5bb Don't use pkg-config on windows 2015-06-28 19:28:28 -07:00
Steven Fackler d0b769c93c Move macro replicas into C shim 2015-06-27 15:11:11 -07:00
Simon Mazur 27b0e4d7af Don't ignore environment variables if building with mingw 2015-06-15 19:13:30 +03:00
Simon Mazur c532c1992e Added support for building on Windows with MinGW 2015-06-10 03:37:01 +03:00
a.navrotskiy 2a5bc20b78 Remove MSYSTEM environment variable check 2015-05-15 09:50:57 +03:00
a.navrotskiy 59c8a88839 Add ability to redefine library list via OPENSSL_LIBS environment variable.
It's usefull for compiling with MinGW-w64 installed via MSYS2 (https://wiki.qt.io/MSYS2).
2015-05-07 16:57:07 +03:00
Richard Diamond c55d410829 Fixes for Native Client. 2015-04-18 23:03:11 -05:00
Steven Fackler 19a24b80e9 Fix doctest errors 2015-04-02 11:15:59 -07:00
Alex Crichton 5a80cc8aae Update to rust master 2015-03-25 10:51:28 -07:00
Alex Crichton 2560ccb330 Remove usage of unstable features in openssl-sys 2015-03-16 11:05:29 -07:00
Alex Crichton 1c9b8a029b Cut down on unstable features in openssl-sys
* Move from `old_path` to `path` (leveraging the `fs` feature as well)
* Move from `StaticMutex` to `Mutex<()>` as they're dynamically initialized
2015-03-04 14:14:05 -08:00
Steven Fackler ebd9062933 Use new path API in buildscript 2015-02-22 11:14:20 -08:00
Steven Fackler 19488f711d Fix warning 2015-02-19 09:15:18 -08:00
Steven Fackler c424931c75 Don't use pkg-config if any overrides are passed 2015-02-13 23:02:08 -08:00
Steven Fackler c4f8427bfd Stop hardcoding things in openssl-sys build.rs
This more properly handles Windows builds as well as cross compiles.
2015-02-13 22:33:31 -08:00
Steven Fackler 15ff737b8c Ask openssl what version it is 2015-02-13 21:39:41 -08:00
Steven Fackler 9cb3b44e9a Oops, pass include dirs through for 1.0.0 versions too 2015-02-13 10:52:14 -08:00
Steven Fackler 94d7c1ff88 Fix shim builds
gcc-rs adds the proper link commands for us
2015-02-13 10:29:22 -08:00
Steven Fackler d4c5bafa19 Pass include directories to gcc 2015-02-12 18:41:51 -08:00
bombless 24b4df49d0 Make it safer 2015-02-13 06:22:48 +08:00
bombless 40f5227064 Fix Windows build 2015-02-13 05:50:21 +08:00
Steven Fackler d20bdfe551 Fix for upstream change 2015-02-12 13:21:53 -08:00
Steven Fackler 12d30628fe Merge pull request #160 from globin/fix/rustup
rustup to current master
2015-02-12 13:20:32 -08:00
Robin Gloster fabc1da31e rustup to current master 2015-02-12 18:25:45 +01:00
Steven Fackler 9d0b3d1574 Move BSD special case after pkg-config lookups
Also give a better error message if we couldn't find anything
2015-02-12 09:23:46 -08:00
Steven Fackler 4bdfe473c3 Merge pull request #159 from wg/master
Fix build on *BSD
2015-02-12 00:30:09 -05:00
Will dd261e4305 Add clarifying comment for BSD special case 2015-02-12 13:32:39 +09:00
Will 5fdde8bda3 Fix build on *BSD 2015-02-12 13:05:46 +09:00
Quentin Baradat e11bfa6f0c Fix a bad fix :) 2015-02-11 21:29:07 +01:00
Quentin Baradat 5adb3f397a Fix the target for windows 2015-02-11 20:41:13 +01:00
Steven Fackler 2682d4f2ba Always build shim 2015-02-09 00:04:44 -08:00
Steven Fackler 6ef819f971 Fix builds against 0.9.x OpenSSL
Namely builds on OSX
2015-02-08 23:31:46 -08:00
Steven Fackler d06f226b3f Fix deprecation warnings in openssl-sys 2015-02-05 21:04:18 -08:00
Steven Fackler 361e5f44fa Move openssl-sys build.rs 2015-02-03 10:04:37 -08:00