| 1 | --- configure.vbs 2017-01-10 16:45:32.508086500 +0100
|
|---|
| 2 | +++ configure_patch.vbs 2017-01-11 10:39:18.877001800 +0100
|
|---|
| 3 | @@ -1899,21 +1898,37 @@
|
|---|
| 4 | ' Checks for openssl
|
|---|
| 5 | sub CheckForSsl(strOptSsl)
|
|---|
| 6 | dim strPathSsl, str
|
|---|
| 7 | + dim iOpenSSLPre11
|
|---|
| 8 | PrintHdr "openssl"
|
|---|
| 9 |
|
|---|
| 10 | '
|
|---|
| 11 | ' Try find some openssl dll/lib.
|
|---|
| 12 | '
|
|---|
| 13 | strPathSsl = ""
|
|---|
| 14 | + iOpenSSLPre11 = 0
|
|---|
| 15 | if (strPathSsl = "") And (strOptSsl <> "") then
|
|---|
| 16 | - if CheckForSslSub(strOptSsl) then strPathSsl = strOptSsl
|
|---|
| 17 | + if CheckForSslSub(strOptSsl) then
|
|---|
| 18 | + strPathSsl = strOptSsl
|
|---|
| 19 | + iOpenSSLPre11 = 1
|
|---|
| 20 | + elseif CheckForSsl11Sub(strOptSsl) then
|
|---|
| 21 | + strPathSsl = strOptSsl
|
|---|
| 22 | + end if
|
|---|
| 23 | end if
|
|---|
| 24 |
|
|---|
| 25 | if strPathSsl = "" Then
|
|---|
| 26 | str = Which("ssleay32.lib")
|
|---|
| 27 | if str <> "" Then
|
|---|
| 28 | str = PathParent(PathStripFilename(str))
|
|---|
| 29 | - if CheckForSslSub(str) then strPathSsl = str
|
|---|
| 30 | + if CheckForSslSub(str) then
|
|---|
| 31 | + strPathSsl = str
|
|---|
| 32 | + iOpenSSLPre11 = 1
|
|---|
| 33 | + end if
|
|---|
| 34 | + else
|
|---|
| 35 | + str = Which("libssl.lib")
|
|---|
| 36 | + if str <> "" then
|
|---|
| 37 | + str = PathParent(PathStripFilename(str))
|
|---|
| 38 | + if CheckForSsl11Sub(str) then strPathSsl = str
|
|---|
| 39 | + end if
|
|---|
| 40 | end if
|
|---|
| 41 | end if
|
|---|
| 42 |
|
|---|
| 43 | @@ -1936,8 +1951,14 @@
|
|---|
| 44 |
|
|---|
| 45 | strPathSsl = UnixSlashes(PathAbs(strPathSsl))
|
|---|
| 46 | CfgPrint "SDK_VBOX_OPENSSL_INCS := " & strPathSsl & "/include"
|
|---|
| 47 | - CfgPrint "SDK_VBOX_OPENSSL_LIBS := " & strPathSsl & "/lib/ssleay32.lib" & " " & strPathSsl & "/lib/libeay32.lib"
|
|---|
| 48 | - CfgPrint "SDK_VBOX_BLD_OPENSSL_LIBS := " & strPathSsl & "/lib/ssleay32.lib" & " " & strPathSsl & "/lib/libeay32.lib"
|
|---|
| 49 | + if iOpenSSLPre11 = 1 then
|
|---|
| 50 | + CfgPrint "SDK_VBOX_OPENSSL_LIBS := " & strPathSsl & "/lib/ssleay32.lib" & " " & strPathSsl & "/lib/libeay32.lib"
|
|---|
| 51 | + CfgPrint "SDK_VBOX_BLD_OPENSSL_LIBS := " & strPathSsl & "/lib/ssleay32.lib" & " " & strPathSsl & "/lib/libeay32.lib"
|
|---|
| 52 | + CfgPrint "VBOX_WITH_OPENSSL_PRE_1_1 := 1"
|
|---|
| 53 | + else
|
|---|
| 54 | + CfgPrint "SDK_VBOX_OPENSSL_LIBS := " & strPathSsl & "/lib/libssl.lib" & " " & strPathSsl & "/lib/libcrypto.lib"
|
|---|
| 55 | + CfgPrint "SDK_VBOX_BLD_OPENSSL_LIBS := " & strPathSsl & "/lib/libssl.lib" & " " & strPathSsl & "/lib/libcrypto.lib"
|
|---|
| 56 | + end if
|
|---|
| 57 |
|
|---|
| 58 | PrintResult "openssl", strPathSsl
|
|---|
| 59 | end sub
|
|---|
| 60 | @@ -1958,6 +1979,24 @@
|
|---|
| 61 | end if
|
|---|
| 62 | end function
|
|---|
| 63 |
|
|---|
| 64 | +''
|
|---|
| 65 | +' Checks if the specified path points to an usable openssl 1.1.0 or not.
|
|---|
| 66 | +function CheckForSsl11Sub(strPathSsl)
|
|---|
| 67 | +
|
|---|
| 68 | + CheckForSsl11Sub = False
|
|---|
| 69 | + LogPrint "trying: strPathSsl=" & strPathSsl
|
|---|
| 70 | + if LogFileExists(strPathSsl, "include/openssl/md5.h") _
|
|---|
| 71 | + And (LogFindFile(strPathSsl, "bin/libcrypto-1_1.dll") <> "" _
|
|---|
| 72 | + Or LogFindFile(strPathSsl, "bin/libcrypto-1_1-x64.dll") <> "") _
|
|---|
| 73 | + And LogFindFile(strPathSsl, "lib/libcrypto.lib") <> "" _
|
|---|
| 74 | + And (LogFindFile(strPathSsl, "bin/libssl-1_1.dll") <> "" _
|
|---|
| 75 | + Or LogFindFile(strPathSsl, "bin/libssl-1_1-x64.dll") <> "") _
|
|---|
| 76 | + And LogFindFile(strPathSsl, "lib/libssl.lib") <> "" _
|
|---|
| 77 | + then
|
|---|
| 78 | + CheckForSsl11Sub = True
|
|---|
| 79 | + end if
|
|---|
| 80 | +end function
|
|---|
| 81 | +
|
|---|
| 82 |
|
|---|
| 83 | ''
|
|---|
| 84 | ' Checks for libcurl
|
|---|