4

I want port an OpenSSL based project over to Windows that uses OpenSSL. I have Visual Studio 2010, and I downloaded OpenSSL from their download page.

I am trying to follow the directions from How to use OpenSSL with Visual Studio, but I am unable to find any library folders (lib) or dlls.

I am also getting the error Cannot open include file: 'openssl/openssl.conf.h': No such file or directory the file that is attempting to use that is the 'e_os2.h' file.

  1. Why are there no lib folders or dll files?
  2. Why is it trying to include a file that doesn't exist in the original package?
Community
  • 1
  • 1
Matthew
  • 3,886
  • 7
  • 47
  • 84
  • you have to build the library yourself either from MSVC or console – Raindrop7 Dec 21 '16 at 20:00
  • Is that with the Pearl script that is included in the download of OpenSSL? – Matthew Dec 21 '16 at 20:02
  • 1
    1. You downloaded the _source_ code, so you will have to compile it yourself. 2. I believe `openssl/openssl.conf.h` is generated as a result of the build process. – wkl Dec 21 '16 at 20:02
  • How do you go about compiling it on a windows machine? I just downloaded pearl for windows. – Matthew Dec 21 '16 at 20:02
  • 1
    Follow the instructions for Windows outlined in their [INSTALL document](https://github.com/openssl/openssl/blob/master/INSTALL). It'll probably come down to something like `perl Configure VC-WIN64A` then `nmake` then `nmake test` then `nmake install`. Then once you're all set with that, you'll have to configure your Visual Studio to include the `include` folder of your new OpenSSL installation so it can find `openssl/openssl.conf.h`. – wkl Dec 21 '16 at 20:05
  • I downloaded ActiveState Perl, installed it and when I type in perl to the command line, it doesn't recognize it as a command – Matthew Dec 21 '16 at 20:42
  • Then when I specify the direct path to perl and try it I get an error `stric.pm did not return a true value at Configure line 13` – Matthew Dec 21 '16 at 20:43
  • If you use `Mingw` with `MSYS` then you can build with: `./configure shared threads --prefix=/usr/local mingw` to set it to a shared-library (.dll). Then `make install` to build and install it to `/usr/local` which will be relative to your mingw installation folder. – Brandon Dec 21 '16 at 21:38
  • 1
    ***it doesn't recognize it as a command*** I think you missed the option to add perl to your path or you did not reboot after the install. – drescherjm Dec 21 '16 at 21:40

1 Answers1

4

Why are there no lib folders or dll files?

OpenSSL is distributed in source form. You have to build it yourself.

An alternative to building it yourself is to use Thomas Hruska's Win32 OpenSSL.


Why is it trying to include a file that doesn't exist in the original package?

OpenSSL's Configure script creates two header files that are tailored for your platform. The first is <openssl/opensslconf.h>, and the second is <openssl/bn.h>. If you have not run configure, then they will not be present.

jww
  • 97,681
  • 90
  • 411
  • 885