Saturday, 2 August 2014

Using OpenSSL in Windows and PowerShell

OpenSSL has no official binary distribution for Windows, however there is a semi-official version from Shining Light Productions (a compiled + installer version of the official OpenSSL which is free to download and use). It can be downloaded from this page. The very simple problem of using that binaries is that it can't find the config file (it tried to load it from /usr/local/ssl/openssl.cnf and fails with this message WARNING: can't open config file: /usr/local/ssl/openssl.cnf)
If you're using Windows' default shell (Command Prompt), then you can specify the config file manually by running this command: Alternatively if you're on PowerShell, run this command to add the correct path of the config file to the environment variable name OPENSSL_CONF:
No need to mention that you need to specify the correct path to the openssl.cfg file according to the installation path of OpenSSL.
An alternative solution is to edit the source code manually and change the default path of the config file and then compile it and so forth.