Openssl Windows Download Binary

0 views
Skip to first unread message

Riitta Palazzo

unread,
Aug 4, 2024, 6:11:10 PM8/4/24
to clearliropa
Ihave a question about how and what is the version of OpenSSl that I must install in Windows to later create certificates.Install a one version (openssl-1.0.2d-fips-2.0.10) found in SourceForge but it does not generate the files correctly.There is also the official website , but I do not know how to install it and how, so that when it comes to generating the keys and .pem file, it works.Generate some environment variables that point to the folder where I unzipped the downloaded, I do not know if it is the correct way.

I also wanted to create OPEN SSL for Windows 10. An easy way to do it without running into a risk of installing unknown software from 3rd party websites and risking entries of viruses, is by using the openssl.exe that comes inside your Git for Windows installation. In my case, I found the open SSL in the following location of Git for Windows Installation.


If you also want instructions on how to use OPENSSL to generate and use Certificates, here is a write-up on my blog. The step by step instructions first explains how to use Microsoft Windows Default Tool and also OPEN SSL and explains the difference between them.


The point is that many who've implemented WSL may not realize they can call upon ANY linux command (within their underlying WSL linux vm) right from the DOS or powershell command-line this way. (It's easy to fall into thinking the point of WSL is to use it to "shell into the vm", which is indeed an option, but the power to just run linux commands from Windows is a real value-add of WSL.)


And to be clear, in doing the command as above, whatever file names or folders you may point to (or create) will be relative to the Windows folder from which you run the command. So doing for example, openssl req to create a self-signed cert, where you may name -keyout selfsigned.key -out selfsigned.crt, those two files will be created in the Windows folder where you ran the command.


That said, there are ways this could fall down for some openssl command examples one may find, such as if they tried to use various bash-specific arguments, in which case "shelling into wsl" to run the command may well be the better choice. You could still direct things to be found or placed on the host, but I don't mean this answer to become overly-focused on such WSL aspects. I just wanted to propose it as another alternative to installing openssl.


I recently needed to document how to get a version of it installed, so I've copied my steps here, as the other answers were using different sources from what I recommend, which is Cygwin. I like Cygwin because it is well maintained and provides a wealth of other utilities for Windows. Cygwin also allows you to easily update the versions as needed when vulnerabilities are fixed. Please update your version of OpenSSL often!


I installed openssl 3.0.0 from then I go to windows start ->openssl->Win64 OpenSSL Command Prompt, it opens a window like regular dos window, all I need is to go to the installation folder of openssl.


I have been able to successfully build openssl 1.1.1.9 in windows 10 following the instructions in the release. I am using Microsoft visual studio 2019 + strawberry perl + nasm. I ran the following config command using the x64 native tools command prompt for vs 2019:


I was once able to do this following the above steps for an older version of python. That version shipped with openssl 1.1.3 (could be 4) and I built the dlls for 1.1.6 (could be 7) and replaced them and python had no issues. Is it possible that the default configuration scripts have changed over these versions such that the default windows x64 configuration no longer builds openssl in a way that works with python and I therefore need to use custom settings?


However, you may need to patch one file in OpenSSL, which will be the bit that looks for its current executable to load the function table (either in uplink.c or applink.c, I forget right now). In CPython, this table is in _ssl.pyd, so we have a little patch that looks there as well. cpython/openssl.vcxproj at 1e5d33e9b9b8631b36f061103a30208b206fd03a python/cpython GitHub


As long as you do not use any fancy config options, you can just swap out libcrypto and libssl with a newer version. OpenSSL patch releases are ABI backwards compatible. Some options affect ABI, e.g. OpenSSL builds without TLS 1.0.


It would be great if you could automatically update the underlying openssl version using a pip command or something similar. That would decouple the act of updating openssl from updating the python version itself. openssl security updates can then be delivered as soon as they are available without needing to wait until a new python release, and users can update openssl without being forced to update their python version.


what we did till now for python is , got the source code of 3.9.2 and built it on Vs 2017 and generated all pyd, dlls etc. Next step we thought we need to link it to openssl 1.0.2 by replacing the include dir and libs in vcproj of _ssl.vcproj and rebuild again


I know that it's possible to read certificates directly from certificate files like openssl x509 -in cert.crt -text and that it's also possible to verify files (what is not what i want because i do not have a certificate to do so), but how to check if a file has a digital signature and get additional info if so.


After doing a lot of research, it seems that openssl simply is not able to "get" a certificate / Authenticode the easy way just by offering the binary. In the end, I found a python module thats capable of extracting authenticode certificates -> pefile. So I decided to use that since I need a automatable soloution anyway. Also Windows Signtool should be capable of doing so which seems also to be aviable for Mono (when working on non windows platforms).


I compile many different versions of OpenSSL with MSVC. I have written a batch script to ease this process. To use it you basically need the source code, Cygwin and Microsoft Visual Studio. I use these builds to subsequently compile other libraries, e.g. Qt4 and Qt5. The main difference from the official release is that I patch the sources to allow compiling libraries with filenames that reflect the compile configuration, which makes it easier to use later. It is best to use the latest version always.


If you really like OpenSSL, if it has helped you or your company in any way, or you are feeling like giving back anyway, then please donate directly to the OpenSSL Project: The developers and countless contributors deserve it!


I used a previous version of your precompiled libraries for VC2010 compiler. Now, I try to upgrade with OpenSSL v1.0.2k, precompiled for MSVC2015 compiler. But you do not generate all libraries I was using. In previous versions, you compiled static Open SSL library with both MT and MD runtimes, as well as dynamic Open SSL library with both MT and MD runtime.


The previous version I used was a 1.0.1j compiled for MSVC2010. For my projects, I need only static build of OpenSSL, but I need this library compiled in 2 versions (with MT and MD flags). For debug purpose, I would also need the debug versions of each library.


In your site web, the static build of open-ssl uses only the static runtime. If you choose the dynamic runtime, then you get a dynamic OpenSSL library. What I am trying to do is to patch your scripts to compile all your configurations in static library (MT, MTd, MD and MDd).


Beyond that, I also manipulate the suffixes in my builds. Namely, I append the MD[d] and MT[d] suffixes, so that it can be clearer when someone uses a library. This may not be very important when using DLLs, but with static builds chaos ensues if you mix them. So I made my own patches to produce these suffixes to the libraries.


You can download my build scripts if you still like to change the names of the library files in a different way and look at the patch, and modify it accordingly.

You can also skip the application of the patch and then you will get exactly the filenaming conventions of OpenSSL upstream in different builds.


Thank you for your libraries. I am trying to use them but I ran into a problem. Evidently the project I am working on uses the Windows Certificate Store so it needs to use the CAPI engine. I am getting 6 linker errors regarding this. I was thinking I would need to rebuild openSSL with the enable-capeing option, but then I found this link ( -to-use-CAPI-engine-in-OpenSSL-1-0-0a-td11611.html) which seems to say that I can use your binaries and just link against c:\openssl\bin\capi.dll (if I can find that dll).


thanks for the information. Can you tell me whether these build will work for windows 10? when i use these libraries and build, in windows 10 its not able to load my dll. do we need to build for windows 10 seperately?


Thank you very very much ! It is curious why the authors of openSSL would not provide a way to compile it in windows. There are dozens of pages on the internet on how to do it but none of them worked for me, each gave various error messages. Using your binaries worked like a charm ! Thanks again !


3) What would be the benefit? The current script can be used to compile with all compilers (from MSVC2008-2015), unattended, and it can be scripted to batch build openssl. I may have misunderstood though; feel free to explain.


Robert, the script loads the perl environment variables. I use strawberry perl, but any would do really. I uploaded my perlenv.bat for you here. This file is for strawberry perl portable, you should drop it at the top-level of where you extracted portable perl (same level as the portableshell.bat file).


The other option is to edit my script and remove the check for the existence of perlenv.bat. If you do that make sure that your environment has a working perl in the PATH.

I will fix this in the build script in the next release. thank you and let me know if your builds succeed.


The main reason I use Cygwin, is that I streamline builds in my continuous integration build system to produce binaries the way I like them and use to develop software. I think for OpenSSL you just need perl and some extra tools and you can do without Cygwin. Look at the INSTALL.W32 and INSTALL.W64 files in the OpenSSL sources for instructions.

3a8082e126
Reply all
Reply to author
Forward
0 new messages