fork of boring2 with prefix patch
Go to file
Marius 1b580e2e8d Update README with OSX 10.11 instructions
These instructions are from one of the open issues on the project. They are working for me, I am not sure if there are some possible side effects from the brew link --force.
2015-12-24 10:12:13 -08:00
openssl Release v0.7.4 2015-12-18 22:41:46 -08:00
openssl-sys Release v0.7.4 2015-12-18 22:41:46 -08:00
openssl-sys-extras Release v0.7.4 2015-12-18 22:41:46 -08:00
.gitignore Move docs to this repo and auto build 2015-02-07 21:30:05 -08:00
.travis.yml Disable cross compilation for now 2015-12-17 21:13:44 -08:00
README.md Update README with OSX 10.11 instructions 2015-12-24 10:12:13 -08:00
THIRD_PARTY Add OpenSSL license to THIRD_PARTY 2015-02-13 23:22:52 -08:00
appveyor.yml Use 1.5.0 instead of nightlies 2015-12-12 18:13:33 -08:00
build_docs.sh Drop verbose flag 2015-12-18 22:20:57 -08:00

README.md

rust-openssl

Build Status

Documentation.

Building

rust-openssl depends on both the OpenSSL runtime libraries and headers.

Linux

On Linux, you can install OpenSSL via your package manager. The headers are sometimes provided in a separate package than the runtime libraries - look for something like openssl-devel or libssl-dev.

# On Ubuntu
sudo apt-get install libssl-dev
# On Arch Linux
sudo pacman -S openssl

OSX

OpenSSL 0.9.8 is preinstalled on OSX. Some features are only available when linking against OpenSSL 1.0.0 or greater; see below on how to point rust-openssl to a separate installation. OSX releases starting at 10.11, "El Capitan", no longer include OpenSSL headers which will prevent the openssl crate from compiling.

For OSX 10.11 you can use brew to install OpenSSL.

brew install openssl
brew link openssl --force

Windows

On Windows, consider building with mingw-w64. Build script will try to find mingw in PATH environment variable to provide Cargo with location where openssl libs from mingw-w64 package may be found. If you followed guide Building on Windows from rust repo, then you should have MSYS2 with mingw-w64-openssl installed as part of mingw-w64-x86_64-toolchain (or mingw-w64-i686-toolchain) package.

Alternatively, install OpenSSL from here. Cargo will not be able to find OpenSSL if it's installed to the default location. You can either copy the include/openssl directory, libssl32.dll, and libeay32.dll to locations that Cargo can find or pass the location to Cargo via environment variables:

env OPENSSL_LIB_DIR=C:/OpenSSL-Win64 OPENSSL_INCLUDE_DIR=C:/OpenSSL-Win64/include cargo build

Manual configuration

rust-openssl's build script will by default attempt to locate OpenSSL via pkg-config. This will not work in some situations, for example, on systems that don't have pkg-config, when cross compiling, or when using a copy of OpenSSL other than the normal system install.

The build script can be configured via environment variables:

  • OPENSSL_LIB_DIR - If specified, a directory that will be used to find OpenSSL runtime libraries.
  • OPENSSL_INCLUDE_DIR - If specified, a directory that will be used to find OpenSSL headers.
  • OPENSSL_STATIC - If specified, OpenSSL libraries will be statically rather than dynamically linked.

If either OPENSSL_LIB_DIR or OPENSSL_INCLUDE_DIR are specified, then the build script will skip the pkg-config step.