See the rustdoc output.
rust-openssl needs to link against the OpenSSL devleopment libraries on your system. It's very easy to get them on Linux.
For some reason, the OpenSSL distribution for Windows is structured differently, so it's a little more involved, but it is possible to build rust-openssl successfully on Windows.
sudo apt-get install libssl-dev
.cargo build
.$OPENSSL_PATH
cargo build
[OpenSSL folder]/bin
is your choice. The latter is probably preferable, and the default.[OpenSSL folder]/lib/MinGW/
, and copy libeay32.a
and ssleay32.a
(If 64-bit, then they will have 64
instead of 32
.) to your Rust install's libs folder. The default should be:
C:\Program Files (x86)\Rust\bin\rustlib\i686-pc-mingw32\lib
C:\Program Files (x86)\Rust\bin\rustlib\x86_64-pc-windows-gnu\lib
libeay32.a
and ssleay32.a
to libcrypto.a
and libssl.a
, respectively. cargo build
.Several tests expect a local test server to be running to bounce requests off of. It's easy to do this. Open a separate terminal window and cd
to the rust-openssl directory. Then run one of the following commands:
openssl s_server -accept 15418 -www -cert test/cert.pem -key test/key.pem > NUL
openssl s_server -accept 15418 -www -cert test/cert.pem -key test/key.pem >/dev/null
Then in the original terminal, run cargo test
. If everything is set up correctly, all tests should pass. You might get some warnings in the openssl s_server
window. Those aren't anything to worry about. You can stop the server using Control-C.