Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Clone in Desktop Download ZIP

Loading…

LibreSSL compatibility on Windows #36

Open
wants to merge 1 commit into from

2 participants

@martinjos

This patch makes the openssl gem compatible with the official release of LibreSSL from the OpenBSD team (https://github.com/libressl-portable/portable) on Windows.

Note: it's actually quite hard to use a particular installed version of the openssl gem. If you just run a script without bundler, it always seems to pick up the built-in version. Meanwhile, if you use bundler, bundler itself seems to load the built-in openssl before starting your program (and in fact, even if the built-in version isn't available, it still somehow seems to load libeay32.dll from OpenSSL). The only way I have found to get the gem and the LibreSSL libraries on their own is to remove or rename the files of the built-in version, and not use bundler.

However, having done this, I have succeeded in using the LibreSSL 2.3.1 Windows x86 binaries (under MinGW) with this gem to download a file using HTTPS (and I've verified that it is only loading the LibreSSL libraries).

See also: issue #37

@martinjos martinjos changed the title from Make it compile with libressl-portable to LibreSSL compatibility
@martinjos martinjos changed the title from LibreSSL compatibility to LibreSSL compatibility on Windows
@hsbt
Owner

@martinjos Thank you for your patch.

We fixed this issue at https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/52693 on ruby/ruby upstream. Can you test with https://github.com/ruby/ruby/tree/trunk/ext/openssl ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 15, 2015
  1. @martinjos
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 1 deletion.
  1. +2 −0  ext/openssl/extconf.rb
  2. +1 −1  ext/openssl/ossl.h
View
2  ext/openssl/extconf.rb
@@ -50,6 +50,8 @@
end
end
+have_header("openssl/e_os2.h")
+
unless have_header("openssl/conf_api.h")
raise "OpenSSL 0.9.6 or later required."
end
View
2  ext/openssl/ossl.h
@@ -44,7 +44,7 @@ extern "C" {
# define assert(condition)
#endif
-#if defined(_WIN32)
+#if defined(_WIN32) && HAVE_OPENSSL_E_OS2_H
# include <openssl/e_os2.h>
# define OSSL_NO_CONF_API 1
# if !defined(OPENSSL_SYS_WIN32)
Something went wrong with that request. Please try again.