GithubHelp home page GithubHelp logo

rust-openssl's Introduction

rust-openssl Build Status

See the rustdoc output.

Building

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.

###Linux

  1. Run sudo apt-get install libssl-dev.
  2. Run cargo build.

###Windows

  1. Grab the latest Win32 OpenSSL installer here. At the time of this writing, it's v1.0.1i. If you're using 64-bit Rust (coming to Windows soon), then you should get the Win64 installer instead.
  2. Run the installer, making note of where it's installing OpenSSL. The option to copy the libraries to the Windows system directory or [OpenSSL folder]/bin is your choice. The latter is probably preferable, and the default.
  3. Navigate to [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:
  • 32-bit: C:\Program Files (x86)\Rust\bin\rustlib\i686-pc-mingw32\lib
  • 64-bit: TODO
  1. Rename libeay32.a and ssleay32.a to libcrypto.a and libssl.a, respectively.
  2. Run cargo build.

###Testing 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:

  • Windows: openssl s_server -accept 15418 -www -cert test/cert.pem -key test/key.pem > NUL
  • Linux: 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.

rust-openssl's People

Contributors

sfackler avatar lilyball avatar vhbit avatar erickt avatar ebfe avatar randombit avatar jroesch avatar andrew-d avatar cjcole avatar alexcrichton avatar abonander avatar noxivs avatar zzmp avatar xorpse avatar mvdnes avatar chris-morgan avatar brson avatar codyps avatar dkhenry avatar davbo avatar kroisse avatar florob avatar paigeruten avatar reem avatar zr40 avatar miloshadzic avatar diamondlovesyou avatar kinghajj avatar boggle avatar iseki-masaya avatar

Watchers

Steve Klabnik avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.