--- configure.vbs 2017-01-10 16:45:32.508086500 +0100 +++ configure_patch.vbs 2017-01-11 10:39:18.877001800 +0100 @@ -1899,21 +1898,37 @@ ' Checks for openssl sub CheckForSsl(strOptSsl) dim strPathSsl, str + dim iOpenSSLPre11 PrintHdr "openssl" ' ' Try find some openssl dll/lib. ' strPathSsl = "" + iOpenSSLPre11 = 0 if (strPathSsl = "") And (strOptSsl <> "") then - if CheckForSslSub(strOptSsl) then strPathSsl = strOptSsl + if CheckForSslSub(strOptSsl) then + strPathSsl = strOptSsl + iOpenSSLPre11 = 1 + elseif CheckForSsl11Sub(strOptSsl) then + strPathSsl = strOptSsl + end if end if if strPathSsl = "" Then str = Which("ssleay32.lib") if str <> "" Then str = PathParent(PathStripFilename(str)) - if CheckForSslSub(str) then strPathSsl = str + if CheckForSslSub(str) then + strPathSsl = str + iOpenSSLPre11 = 1 + end if + else + str = Which("libssl.lib") + if str <> "" then + str = PathParent(PathStripFilename(str)) + if CheckForSsl11Sub(str) then strPathSsl = str + end if end if end if @@ -1936,8 +1951,14 @@ strPathSsl = UnixSlashes(PathAbs(strPathSsl)) CfgPrint "SDK_VBOX_OPENSSL_INCS := " & strPathSsl & "/include" - CfgPrint "SDK_VBOX_OPENSSL_LIBS := " & strPathSsl & "/lib/ssleay32.lib" & " " & strPathSsl & "/lib/libeay32.lib" - CfgPrint "SDK_VBOX_BLD_OPENSSL_LIBS := " & strPathSsl & "/lib/ssleay32.lib" & " " & strPathSsl & "/lib/libeay32.lib" + if iOpenSSLPre11 = 1 then + CfgPrint "SDK_VBOX_OPENSSL_LIBS := " & strPathSsl & "/lib/ssleay32.lib" & " " & strPathSsl & "/lib/libeay32.lib" + CfgPrint "SDK_VBOX_BLD_OPENSSL_LIBS := " & strPathSsl & "/lib/ssleay32.lib" & " " & strPathSsl & "/lib/libeay32.lib" + CfgPrint "VBOX_WITH_OPENSSL_PRE_1_1 := 1" + else + CfgPrint "SDK_VBOX_OPENSSL_LIBS := " & strPathSsl & "/lib/libssl.lib" & " " & strPathSsl & "/lib/libcrypto.lib" + CfgPrint "SDK_VBOX_BLD_OPENSSL_LIBS := " & strPathSsl & "/lib/libssl.lib" & " " & strPathSsl & "/lib/libcrypto.lib" + end if PrintResult "openssl", strPathSsl end sub @@ -1958,6 +1979,24 @@ end if end function +'' +' Checks if the specified path points to an usable openssl 1.1.0 or not. +function CheckForSsl11Sub(strPathSsl) + + CheckForSsl11Sub = False + LogPrint "trying: strPathSsl=" & strPathSsl + if LogFileExists(strPathSsl, "include/openssl/md5.h") _ + And (LogFindFile(strPathSsl, "bin/libcrypto-1_1.dll") <> "" _ + Or LogFindFile(strPathSsl, "bin/libcrypto-1_1-x64.dll") <> "") _ + And LogFindFile(strPathSsl, "lib/libcrypto.lib") <> "" _ + And (LogFindFile(strPathSsl, "bin/libssl-1_1.dll") <> "" _ + Or LogFindFile(strPathSsl, "bin/libssl-1_1-x64.dll") <> "") _ + And LogFindFile(strPathSsl, "lib/libssl.lib") <> "" _ + then + CheckForSsl11Sub = True + end if +end function + '' ' Checks for libcurl