init repo.

This commit is contained in:
tqcq
2024-12-19 13:14:37 +08:00
commit 7d7845acb5
1412 changed files with 596214 additions and 0 deletions

160
third_party/curl/projects/README.md vendored Normal file
View File

@ -0,0 +1,160 @@
<!--
Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
SPDX-License-Identifier: curl
-->
Building via IDE Project Files
==============================
This document describes how to compile, build and install curl and libcurl
from sources using legacy versions of Visual Studio 2010 - 2013.
You will need to generate the project files before using them. Please run
"generate -help" for usage details.
To generate project files for recent versions of Visual Studio instead, use
cmake. Refer to INSTALL-CMAKE in the docs directory.
## Directory Structure
The following directory structure is used for the legacy project files:
somedirectory\
|_curl
|_projects
|_<platform>
|_<ide>
|_lib
|_src
This structure allows for side-by-side compilation of curl on the same machine
using different versions of a given compiler (for example VC10 and VC12) and
allows for your own application or product to be compiled against those
variants of libcurl for example.
Note: Typically this side-by-side compilation is generally only required when
a library is being compiled against dynamic runtime libraries.
## Dependencies
The projects files also support build configurations that require third party
dependencies such as OpenSSL, wolfSSL and libssh2. If you wish to support
these, you will also need to download and compile those libraries as well.
To support compilation of these libraries using different versions of
compilers, the following directory structure has been used for both the output
of curl and libcurl as well as these dependencies.
somedirectory\
|_curl
| |_ build
| |_<architecture>
| |_<ide>
| |_<configuration>
| |_lib
| |_src
|
|_openssl
| |_ build
| |_<architecture>
| |_VC <version>
| |_<configuration>
|
|_libssh2
|_ build
|_<architecture>
|_VC <version>
|_<configuration>
As OpenSSL and wolfSSL don't support side-by-side compilation when using
different versions of Visual Studio, build helper batch files have been
provided to assist with this. Please run `build-openssl -help` and/or
`build-wolfssl -help` for usage details.
## Building with Visual C++
To build with VC++, you will of course have to first install VC++ which is
part of Visual Studio.
Once you have VC++ installed you should launch the application and open one of
the solution or workspace files. The VC directory names are based on the
version of Visual C++ that you will be using. Each version of Visual Studio
has a default version of Visual C++. We offer these versions:
- VC10 (Visual Studio 2010 Version 10.0)
- VC11 (Visual Studio 2012 Version 11.0)
- VC12 (Visual Studio 2013 Version 12.0)
Separate solutions are provided for both libcurl and the curl command line
tool as well as a solution that includes both projects. libcurl.sln, curl.sln
and curl-all.sln, respectively. We recommend using curl-all.sln to build both
projects.
For example, if you are using Visual Studio 2010 then you should be able to
use `VC10\curl-all.sln` to build curl and libcurl.
## Running DLL based configurations
If you are a developer and plan to run the curl tool from Visual Studio with
any third-party libraries (such as OpenSSL, wolfSSL or LibSSH2) then you will
need to add the search path of these DLLs to the configuration's PATH
environment. To do that:
1. Open the 'curl-all.sln' or 'curl.sln' solutions
2. Right-click on the 'curl' project and select Properties
3. Navigate to 'Configuration Properties > Debugging > Environment'
4. Add `PATH='Path to DLL';C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem`
... where 'Path to DLL` is the configuration specific path. For example the
following configurations in Visual Studio 2010 might be:
DLL Debug - DLL OpenSSL (Win32):
PATH=..\..\..\..\..\openssl\build\Win32\VC10\DLL Debug;C:\Windows\system32;
C:\Windows;C:\Windows\System32\Wbem
DLL Debug - DLL OpenSSL (x64):
PATH=..\..\..\..\..\openssl\build\Win64\VC10\DLL Debug;C:\Windows\system32;
C:\Windows;C:\Windows\System32\Wbem
DLL Debug - DLL wolfSSL (Win32):
PATH=..\..\..\..\..\wolfssl\build\Win32\VC10\DLL Debug;C:\Windows\system32;
C:\Windows;C:\Windows\System32\Wbem
DLL Debug - DLL wolfSSL (x64):
PATH=..\..\..\..\..\wolfssl\build\Win64\VC10\DLL Debug;C:\Windows\system32;
C:\Windows;C:\Windows\System32\Wbem
If you are using a configuration that uses multiple third-party library DLLs
(such as DLL Debug - DLL OpenSSL - DLL LibSSH2) then 'Path to DLL' will need
to contain the path to both of these.
## Notes
The following keywords have been used in the directory hierarchy:
- `<platform>` - The platform (For example: Windows)
- `<ide>` - The IDE (For example: VC10)
- `<architecture>` - The platform architecture (For example: Win32, Win64)
- `<configuration>` - The target configuration (For example: DLL Debug, LIB
Release - LIB OpenSSL)
Should you wish to help out with some of the items on the TODO list, or find
bugs in the project files that need correcting, and would like to submit
updated files back then please note that, whilst the solution files can be
edited directly, the templates for the project files (which are stored in the
git repository) will need to be modified rather than the generated project
files that Visual Studio uses.
## Legacy Windows and SSL
Some of the project configurations allow the use of Schannel, the native SSL
library in Windows which forms part of Windows SSPI. However, Schannel in
Windows <= XP is unable to connect to servers that no longer support the
legacy handshakes and algorithms used by those versions. If you will be using
curl in one of those earlier versions of Windows you should choose another SSL
backend such as OpenSSL.

View File

@ -0,0 +1,739 @@
@echo off
rem ***************************************************************************
rem * _ _ ____ _
rem * Project ___| | | | _ \| |
rem * / __| | | | |_) | |
rem * | (__| |_| | _ <| |___
rem * \___|\___/|_| \_\_____|
rem *
rem * Copyright (C) Steve Holme, <steve_holme@hotmail.com>.
rem *
rem * This software is licensed as described in the file COPYING, which
rem * you should have received as part of this distribution. The terms
rem * are also available at https://curl.se/docs/copyright.html.
rem *
rem * You may opt to use, copy, modify, merge, publish, distribute and/or sell
rem * copies of the Software, and permit persons to whom the Software is
rem * furnished to do so, under the terms of the COPYING file.
rem *
rem * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
rem * KIND, either express or implied.
rem *
rem * SPDX-License-Identifier: curl
rem *
rem ***************************************************************************
:begin
rem Check we are running on a Windows NT derived OS
if not "%OS%" == "Windows_NT" goto nodos
rem Set our variables
setlocal ENABLEDELAYEDEXPANSION
set BUILD_CONFIG=
set BUILD_PLATFORM=
set SAVED_PATH=
set SOURCE_PATH=
set TMP_BUILD_PATH=
set TMP_INSTALL_PATH=
set VC_VER=
rem Ensure we have the required arguments
if /i "%~1" == "" goto syntax
rem Calculate the program files directory
if defined PROGRAMFILES (
set "PF=%PROGRAMFILES%"
set OS_PLATFORM=x86
)
if defined PROGRAMFILES(x86) (
rem Visual Studio was x86-only prior to 14.3
if /i "%~1" == "vc14.3" (
set "PF=%PROGRAMFILES%"
) else (
set "PF=%PROGRAMFILES(x86)%"
)
set OS_PLATFORM=x64
)
:parseArgs
if not "%~1" == "" (
if /i "%~1" == "vc10" (
set VC_VER=10.0
set VC_DESC=VC10
set "VC_PATH=Microsoft Visual Studio 10.0\VC"
) else if /i "%~1" == "vc11" (
set VC_VER=11.0
set VC_DESC=VC11
set "VC_PATH=Microsoft Visual Studio 11.0\VC"
) else if /i "%~1" == "vc12" (
set VC_VER=12.0
set VC_DESC=VC12
set "VC_PATH=Microsoft Visual Studio 12.0\VC"
) else if /i "%~1" == "vc14" (
set VC_VER=14.0
set VC_DESC=VC14
set "VC_PATH=Microsoft Visual Studio 14.0\VC"
) else if /i "%~1" == "vc14.1" (
set VC_VER=14.1
set VC_DESC=VC14.10
rem Determine the VC14.1 path based on the installed edition in descending
rem order (Enterprise, then Professional and finally Community)
if exist "%PF%\Microsoft Visual Studio\2017\Enterprise\VC" (
set "VC_PATH=Microsoft Visual Studio\2017\Enterprise\VC"
) else if exist "%PF%\Microsoft Visual Studio\2017\Professional\VC" (
set "VC_PATH=Microsoft Visual Studio\2017\Professional\VC"
) else (
set "VC_PATH=Microsoft Visual Studio\2017\Community\VC"
)
) else if /i "%~1" == "vc14.2" (
set VC_VER=14.2
set VC_DESC=VC14.20
rem Determine the VC14.2 path based on the installed edition in descending
rem order (Enterprise, then Professional and finally Community)
if exist "%PF%\Microsoft Visual Studio\2019\Enterprise\VC" (
set "VC_PATH=Microsoft Visual Studio\2019\Enterprise\VC"
) else if exist "%PF%\Microsoft Visual Studio\2019\Professional\VC" (
set "VC_PATH=Microsoft Visual Studio\2019\Professional\VC"
) else (
set "VC_PATH=Microsoft Visual Studio\2019\Community\VC"
)
) else if /i "%~1" == "vc14.3" (
set VC_VER=14.3
set VC_DESC=VC14.30
rem Determine the VC14.3 path based on the installed edition in descending
rem order (Enterprise, then Professional and finally Community)
if exist "%PF%\Microsoft Visual Studio\2022\Enterprise\VC" (
set "VC_PATH=Microsoft Visual Studio\2022\Enterprise\VC"
) else if exist "%PF%\Microsoft Visual Studio\2022\Professional\VC" (
set "VC_PATH=Microsoft Visual Studio\2022\Professional\VC"
) else (
set "VC_PATH=Microsoft Visual Studio\2022\Community\VC"
)
) else if /i "%~1%" == "x86" (
set BUILD_PLATFORM=x86
) else if /i "%~1%" == "x64" (
set BUILD_PLATFORM=x64
) else if /i "%~1%" == "debug" (
set BUILD_CONFIG=debug
) else if /i "%~1%" == "release" (
set BUILD_CONFIG=release
) else if /i "%~1" == "-?" (
goto syntax
) else if /i "%~1" == "-h" (
goto syntax
) else if /i "%~1" == "-help" (
goto syntax
) else if /i "%~1" == "-VSpath" (
if "%~2" == "" (
echo.
echo Error. Please provide VS Path.
goto error
) else (
set "ABS_VC_PATH=%~2\VC"
shift
)
) else if /i "%~1" == "-perlpath" (
if "%~2" == "" (
echo.
echo Error. Please provide Perl root Path.
goto error
) else (
set "PERL_PATH=%~2"
shift
)
) else (
if not defined START_DIR (
set "START_DIR=%~1%"
) else (
goto unknown
)
)
shift & goto parseArgs
)
:prerequisites
rem Compiler is a required parameter
if not defined VC_VER goto syntax
rem Default the start directory if one isn't specified
if not defined START_DIR set START_DIR=..\..\openssl
if not defined ABS_VC_PATH (
rem Check we have a program files directory
if not defined PF goto nopf
set "ABS_VC_PATH=%PF%\%VC_PATH%"
)
rem Check we have Visual Studio installed
if not exist "%ABS_VC_PATH%" goto novc
if not defined PERL_PATH (
rem Check we have Perl in our path
perl --version <NUL 1>NUL 2>&1
if errorlevel 1 (
rem It isn't so check we have it installed and set the path if it is
if exist "%SystemDrive%\Perl" (
set "PATH=%SystemDrive%\Perl\bin;%PATH%"
) else (
if exist "%SystemDrive%\Perl64" (
set "PATH=%SystemDrive%\Perl64\bin;%PATH%"
) else (
goto noperl
)
)
)
) else (
set "PATH=%PERL_PATH%\Perl\bin;%PATH%"
)
rem Check the start directory exists
if not exist "%START_DIR%" goto noopenssl
:setup
if "%BUILD_PLATFORM%" == "" (
if "%VC_VER%" == "6.0" (
set BUILD_PLATFORM=x86
) else if "%VC_VER%" == "7.0" (
set BUILD_PLATFORM=x86
) else if "%VC_VER%" == "7.1" (
set BUILD_PLATFORM=x86
) else (
set BUILD_PLATFORM=%OS_PLATFORM%
)
)
if "%BUILD_PLATFORM%" == "x86" (
set VCVARS_PLATFORM=x86
) else if "%BUILD_PLATFORM%" == "x64" (
if "%VC_VER%" == "10.0" set VCVARS_PLATFORM=%BUILD_PLATFORM%
if "%VC_VER%" == "11.0" set VCVARS_PLATFORM=amd64
if "%VC_VER%" == "12.0" set VCVARS_PLATFORM=amd64
if "%VC_VER%" == "14.0" set VCVARS_PLATFORM=amd64
if "%VC_VER%" == "14.1" set VCVARS_PLATFORM=amd64
if "%VC_VER%" == "14.2" set VCVARS_PLATFORM=amd64
if "%VC_VER%" == "14.3" set VCVARS_PLATFORM=amd64
)
if exist "%START_DIR%\ms\do_ms.bat" (
set LEGACY_BUILD=TRUE
) else (
set LEGACY_BUILD=FALSE
)
:start
echo.
set "SAVED_PATH=%CD%"
if "%VC_VER%" == "14.1" (
call "%ABS_VC_PATH%\Auxiliary\Build\vcvarsall" %VCVARS_PLATFORM%
) else if "%VC_VER%" == "14.2" (
call "%ABS_VC_PATH%\Auxiliary\Build\vcvarsall" %VCVARS_PLATFORM%
) else if "%VC_VER%" == "14.3" (
call "%ABS_VC_PATH%\Auxiliary\Build\vcvarsall" %VCVARS_PLATFORM%
) else (
call "%ABS_VC_PATH%\vcvarsall" %VCVARS_PLATFORM%
)
echo.
cd /d "%START_DIR%" || (echo Error: Failed cd start & exit /B 1)
rem Save the full path of the openssl source dir
set "SOURCE_PATH=%CD%"
rem Set temporary paths for building and installing OpenSSL. If a temporary
rem path is not the same as the source path then it is *removed* after the
rem installation is completed.
rem
rem For legacy OpenSSL the temporary build path must be the source path.
rem
rem For OpenSSL 1.1.x the temporary paths must be separate not a descendant
rem of the other, otherwise pdb files will be lost between builds.
rem https://github.com/openssl/openssl/issues/10005
rem
if "%LEGACY_BUILD%" == "TRUE" (
set "TMP_BUILD_PATH=%SOURCE_PATH%"
set "TMP_INSTALL_PATH=%SOURCE_PATH%"
) else (
set "TMP_BUILD_PATH=%SOURCE_PATH%\build\tmp_build"
set "TMP_INSTALL_PATH=%SOURCE_PATH%\build\tmp_install"
)
goto %BUILD_PLATFORM%
:x64
rem Calculate our output directory
set OUTDIR=build\Win64\%VC_DESC%
if not exist %OUTDIR% md %OUTDIR%
if not "%BUILD_CONFIG%" == "release" (
rem Configuring 64-bit Static Library Debug Build
call :configure x64 debug static %LEGACY_BUILD%
rem Perform the build
call :build x64 static %LEGACY_BUILD%
rem Perform the install
call :install debug static %LEGACY_BUILD%
rem Configuring 64-bit Shared Library Debug Build
call :configure x64 debug shared %LEGACY_BUILD%
rem Perform the build
call :build x64 shared %LEGACY_BUILD%
rem Perform the install
call :install debug shared %LEGACY_BUILD%
)
if not "%BUILD_CONFIG%" == "debug" (
rem Configuring 64-bit Static Library Release Build
call :configure x64 release static %LEGACY_BUILD%
rem Perform the build
call :build x64 static %LEGACY_BUILD%
rem Perform the install
call :install release static %LEGACY_BUILD%
rem Configuring 64-bit Shared Library Release Build
call :configure x64 release shared %LEGACY_BUILD%
rem Perform the build
call :build x64 shared %LEGACY_BUILD%
rem Perform the install
call :install release shared %LEGACY_BUILD%
)
goto success
:x86
rem Calculate our output directory
set OUTDIR=build\Win32\%VC_DESC%
if not exist %OUTDIR% md %OUTDIR%
if not "%BUILD_CONFIG%" == "release" (
rem Configuring 32-bit Static Library Debug Build
call :configure x86 debug static %LEGACY_BUILD%
rem Perform the build
call :build x86 static %LEGACY_BUILD%
rem Perform the install
call :install debug static %LEGACY_BUILD%
rem Configuring 32-bit Shared Library Debug Build
call :configure x86 debug shared %LEGACY_BUILD%
rem Perform the build
call :build x86 shared %LEGACY_BUILD%
rem Perform the install
call :install debug shared %LEGACY_BUILD%
)
if not "%BUILD_CONFIG%" == "debug" (
rem Configuring 32-bit Static Library Release Build
call :configure x86 release static %LEGACY_BUILD%
rem Perform the build
call :build x86 static %LEGACY_BUILD%
rem Perform the install
call :install release static %LEGACY_BUILD%
rem Configuring 32-bit Shared Library Release Build
call :configure x86 release shared %LEGACY_BUILD%
rem Perform the build
call :build x86 shared %LEGACY_BUILD%
rem Perform the install
call :install release shared %LEGACY_BUILD%
)
goto success
rem Function to configure the build.
rem
rem %1 - Platform (x86 or x64)
rem %2 - Configuration (release or debug)
rem %3 - Build Type (static or shared)
rem %4 - Build type (TRUE for legacy aka pre v1.1.0; otherwise FALSE)
rem
:configure
setlocal
if "%1" == "" exit /B 1
if "%2" == "" exit /B 1
if "%3" == "" exit /B 1
if "%4" == "" exit /B 1
if not exist "%TMP_BUILD_PATH%" mkdir "%TMP_BUILD_PATH%"
cd /d "%TMP_BUILD_PATH%" || (echo Error: Failed cd build & exit /B 1)
if "%4" == "TRUE" (
rem Calculate the configure options
if "%1" == "x86" (
if "%2" == "debug" (
set options=debug-VC-WIN32
) else if "%2" == "release" (
set options=VC-WIN32
) else (
exit /B 1
)
set options=!options! no-asm
) else if "%1" == "x64" (
if "%2" == "debug" (
set options=debug-VC-WIN64A
) else if "%2" == "release" (
set options=VC-WIN64A
) else (
exit /B 1
)
) else (
exit /B 1
)
) else if "%4" == "FALSE" (
rem Has configure already been ran?
if exist makefile (
rem Clean up the previous build
nmake clean
rem Remove the old makefile
del makefile 1>nul
)
rem Calculate the configure options
if "%1" == "x86" (
set options=VC-WIN32
) else if "%1" == "x64" (
set options=VC-WIN64A
) else (
exit /B 1
)
if "%2" == "debug" (
set options=!options! --debug
) else if "%2" == "release" (
set options=!options! --release
) else (
exit /B 1
)
if "%3" == "static" (
set options=!options! no-shared
) else if not "%3" == "shared" (
exit /B 1
)
set options=!options! no-asm
) else (
exit /B 1
)
rem Run the configure
perl "%SOURCE_PATH%\Configure" %options% "--prefix=%TMP_INSTALL_PATH%"
exit /B %ERRORLEVEL%
rem Main build function.
rem
rem %1 - Platform (x86 or x64)
rem %2 - Build Type (static or shared)
rem %3 - Build type (TRUE for legacy aka pre v1.1.0; otherwise FALSE)
rem
:build
setlocal
if "%1" == "" exit /B 1
if "%2" == "" exit /B 1
if "%3" == "" exit /B 1
cd /d "%TMP_BUILD_PATH%" || (echo Error: Failed cd build & exit /B 1)
if "%3" == "TRUE" (
if "%1" == "x86" (
call ms\do_ms.bat
) else if "%1" == "x64" (
call ms\do_win64a.bat
) else (
exit /B 1
)
if "%2" == "static" (
nmake -f ms\nt.mak
) else if "%2" == "shared" (
nmake -f ms\ntdll.mak
) else (
exit /B 1
)
) else if "%3" == "FALSE" (
nmake
) else (
exit /B 1
)
exit /B 0
rem Main installation function.
rem
rem %1 - Configuration (release or debug)
rem %2 - Build Type (static or shared)
rem %3 - Build type (TRUE for legacy aka pre v1.1.0; otherwise FALSE)
rem
:install
setlocal
if "%1" == "" exit /B 1
if "%2" == "" exit /B 1
if "%3" == "" exit /B 1
rem Copy the generated files to our directory structure
if "%3" == "TRUE" (
rem There's no actual installation for legacy OpenSSL, the files are copied
rem from the build dir (for legacy this is same as source dir) to the final
rem location.
cd /d "%SOURCE_PATH%" || (echo Error: Failed cd source & exit /B 1)
if "%1" == "debug" (
if "%2" == "static" (
rem Move the output directories
if exist "%OUTDIR%\LIB Debug" (
copy /y out32.dbg\* "%OUTDIR%\LIB Debug" 1>nul
rd out32.dbg /s /q
) else (
move out32.dbg "%OUTDIR%\LIB Debug" 1>nul
)
rem Move the PDB files
move tmp32.dbg\lib.pdb "%OUTDIR%\LIB Debug" 1>nul
rem Remove the intermediate directories
rd tmp32.dbg /s /q
) else if "%2" == "shared" (
if exist "%OUTDIR%\DLL Debug" (
copy /y out32dll.dbg\* "%OUTDIR%\DLL Debug" 1>nul
rd out32dll.dbg /s /q
) else (
move out32dll.dbg "%OUTDIR%\DLL Debug" 1>nul
)
rem Move the PDB files
move tmp32dll.dbg\lib.pdb "%OUTDIR%\DLL Debug" 1>nul
rem Remove the intermediate directories
rd tmp32dll.dbg /s /q
) else (
exit /B 1
)
) else if "%1" == "release" (
if "%2" == "static" (
rem Move the output directories
if exist "%OUTDIR%\LIB Release" (
copy /y out32\* "%OUTDIR%\LIB Release" 1>nul
rd out32 /s /q
) else (
move out32 "%OUTDIR%\LIB Release" 1>nul
)
rem Move the PDB files
move tmp32\lib.pdb "%OUTDIR%\LIB Release" 1>nul
rem Remove the intermediate directories
rd tmp32 /s /q
) else if "%2" == "shared" (
if exist "%OUTDIR%\DLL Release" (
copy /y out32dll\* "%OUTDIR%\DLL Release" 1>nul
rd out32dll /s /q
) else (
move out32dll "%OUTDIR%\DLL Release" 1>nul
)
rem Move the PDB files
move tmp32dll\lib.pdb "%OUTDIR%\DLL Release" 1>nul
rem Remove the intermediate directories
rd tmp32dll /s /q
) else (
exit /B 1
)
)
) else if "%3" == "FALSE" (
cd /d "%TMP_BUILD_PATH%" || (echo Error: Failed cd build & exit /B 1)
rem Perform the installation
nmake install_sw
cd /d "%SOURCE_PATH%" || (echo Error: Failed cd source & exit /B 1)
rem Move the output directories
if "%1" == "debug" (
if "%2" == "static" (
if not exist "%OUTDIR%\LIB Debug" (
mkdir "%OUTDIR%\LIB Debug" 1>nul
)
move "%TMP_INSTALL_PATH%\lib\*.lib" "%OUTDIR%\LIB Debug" 1>nul
move "%TMP_INSTALL_PATH%\lib\*.pdb" "%OUTDIR%\LIB Debug" 1>nul
move "%TMP_INSTALL_PATH%\bin\*.exe" "%OUTDIR%\LIB Debug" 1>nul
move "%TMP_INSTALL_PATH%\bin\*.pdb" "%OUTDIR%\LIB Debug" 1>nul
xcopy /E /I /Y "%TMP_INSTALL_PATH%\include" "%OUTDIR%\LIB Debug\include" 1>nul
) else if "%2" == "shared" (
if not exist "%OUTDIR%\DLL Debug" (
mkdir "%OUTDIR%\DLL Debug" 1>nul
)
move "%TMP_INSTALL_PATH%\lib\*.lib" "%OUTDIR%\DLL Debug" 1>nul
if exist "%TMP_INSTALL_PATH%\lib\engines-3" (
move "%TMP_INSTALL_PATH%\lib\engines-3\*.dll" "%OUTDIR%\DLL Debug" 1>nul
move "%TMP_INSTALL_PATH%\lib\engines-3\*.pdb" "%OUTDIR%\DLL Debug" 1>nul
) else if exist "%TMP_INSTALL_PATH%\lib\engines-1_1" (
move "%TMP_INSTALL_PATH%\lib\engines-1_1\*.dll" "%OUTDIR%\DLL Debug" 1>nul
move "%TMP_INSTALL_PATH%\lib\engines-1_1\*.pdb" "%OUTDIR%\DLL Debug" 1>nul
)
move "%TMP_INSTALL_PATH%\bin\*.dll" "%OUTDIR%\DLL Debug" 1>nul
move "%TMP_INSTALL_PATH%\bin\*.exe" "%OUTDIR%\DLL Debug" 1>nul
move "%TMP_INSTALL_PATH%\bin\*.pdb" "%OUTDIR%\DLL Debug" 1>nul
xcopy /E /I /Y "%TMP_INSTALL_PATH%\include" "%OUTDIR%\DLL Debug\include" 1>nul
) else (
exit /B 1
)
) else if "%1" == "release" (
if "%2" == "static" (
if not exist "%OUTDIR%\LIB Release" (
mkdir "%OUTDIR%\LIB Release" 1>nul
)
move "%TMP_INSTALL_PATH%\lib\*.lib" "%OUTDIR%\LIB Release" 1>nul
move "%TMP_INSTALL_PATH%\lib\*.pdb" "%OUTDIR%\LIB Release" 1>nul
move "%TMP_INSTALL_PATH%\bin\*.exe" "%OUTDIR%\LIB Release" 1>nul
move "%TMP_INSTALL_PATH%\bin\*.pdb" "%OUTDIR%\LIB Release" 1>nul
xcopy /E /I /Y "%TMP_INSTALL_PATH%\include" "%OUTDIR%\LIB Release\include" 1>nul
) else if "%2" == "shared" (
if not exist "%OUTDIR%\DLL Release" (
mkdir "%OUTDIR%\DLL Release" 1>nul
)
move "%TMP_INSTALL_PATH%\lib\*.lib" "%OUTDIR%\DLL Release" 1>nul
if exist "%TMP_INSTALL_PATH%\lib\engines-3" (
move "%TMP_INSTALL_PATH%\lib\engines-3\*.dll" "%OUTDIR%\DLL Release" 1>nul
move "%TMP_INSTALL_PATH%\lib\engines-3\*.pdb" "%OUTDIR%\DLL Release" 1>nul
) else if exist "%TMP_INSTALL_PATH%\lib\engines-1_1" (
move "%TMP_INSTALL_PATH%\lib\engines-1_1\*.dll" "%OUTDIR%\DLL Release" 1>nul
move "%TMP_INSTALL_PATH%\lib\engines-1_1\*.pdb" "%OUTDIR%\DLL Release" 1>nul
)
move "%TMP_INSTALL_PATH%\bin\*.dll" "%OUTDIR%\DLL Release" 1>nul
move "%TMP_INSTALL_PATH%\bin\*.exe" "%OUTDIR%\DLL Release" 1>nul
move "%TMP_INSTALL_PATH%\bin\*.pdb" "%OUTDIR%\DLL Release" 1>nul
xcopy /E /I /Y "%TMP_INSTALL_PATH%\include" "%OUTDIR%\DLL Release\include" 1>nul
) else (
exit /B 1
)
) else (
exit /B 1
)
rem Remove the output directories
if not "%SOURCE_PATH%" == "%TMP_BUILD_PATH%" (
rd "%TMP_BUILD_PATH%" /s /q
)
if not "%SOURCE_PATH%" == "%TMP_INSTALL_PATH%" (
rd "%TMP_INSTALL_PATH%" /s /q
)
) else (
exit /B 1
)
exit /B 0
:syntax
rem Display the help
echo.
echo Usage: build-openssl ^<compiler^> [platform] [configuration] [directory] [-VSpath] ["VSpath"] [-perlpath] ["perlpath"]
echo.
echo Compiler:
echo.
echo vc10 - Use Visual Studio 2010
echo vc11 - Use Visual Studio 2012
echo vc12 - Use Visual Studio 2013
echo vc14 - Use Visual Studio 2015
echo vc14.1 - Use Visual Studio 2017
echo vc14.2 - Use Visual Studio 2019
echo vc14.3 - Use Visual Studio 2022
echo.
echo Platform:
echo.
echo x86 - Perform a 32-bit build
echo x64 - Perform a 64-bit build
echo.
echo Configuration:
echo.
echo debug - Perform a debug build
echo release - Perform a release build
echo.
echo Other:
echo.
echo directory - Specifies the OpenSSL source directory
echo.
echo -VSpath - Specify the custom VS path if Visual Studio is not located at
echo "C:\<ProgramFiles>\Microsoft Visual Studio <version>"
echo For e.g. -VSpath "C:\apps\MVS14"
echo.
echo -perlpath - Specify the custom perl root path if perl is not located at
echo "C:\Perl" and it is a portable copy of perl and not
echo installed on the win system.
echo For e.g. -perlpath "D:\strawberry-perl-5.24.3.1-64bit-portable"
goto error
:unknown
echo.
echo Error: Unknown argument '%1'
goto error
:nodos
echo.
echo Error: Only a Windows NT based Operating System is supported
goto error
:nopf
echo.
echo Error: Cannot obtain the directory for Program Files
goto error
:novc
echo.
echo Error: %VC_DESC% is not installed
echo Error: Please check whether Visual compiler is installed at the path "%ABS_VC_PATH%"
echo Error: Please provide proper VS Path by using -VSpath
goto error
:noperl
echo.
echo Error: Perl is not installed
echo Error: Please check whether Perl is installed or it is at location "C:\Perl"
echo Error: If Perl is portable please provide perl root path by using -perlpath
goto error
:nox64
echo.
echo Error: %VC_DESC% does not support 64-bit builds
goto error
:noopenssl
echo.
echo Error: Cannot locate OpenSSL source directory
goto error
:error
if "%OS%" == "Windows_NT" endlocal
exit /B 1
:success
cd /d "%SAVED_PATH%"
endlocal
exit /B 0

View File

@ -0,0 +1,429 @@
@echo off
rem ***************************************************************************
rem * _ _ ____ _
rem * Project ___| | | | _ \| |
rem * / __| | | | |_) | |
rem * | (__| |_| | _ <| |___
rem * \___|\___/|_| \_\_____|
rem *
rem * Copyright (C) Steve Holme, <steve_holme@hotmail.com>.
rem * Copyright (C) Jay Satiro, <raysatiro@yahoo.com>.
rem *
rem * This software is licensed as described in the file COPYING, which
rem * you should have received as part of this distribution. The terms
rem * are also available at https://curl.se/docs/copyright.html.
rem *
rem * You may opt to use, copy, modify, merge, publish, distribute and/or sell
rem * copies of the Software, and permit persons to whom the Software is
rem * furnished to do so, under the terms of the COPYING file.
rem *
rem * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
rem * KIND, either express or implied.
rem *
rem * SPDX-License-Identifier: curl
rem *
rem ***************************************************************************
:begin
rem Check we are running on a Windows NT derived OS
if not "%OS%" == "Windows_NT" goto nodos
rem Set our variables
setlocal
set SUCCESSFUL_BUILDS=
set VC_VER=
set BUILD_PLATFORM=
set DEFAULT_START_DIR=..\..\wolfssl
rem Calculate the program files directory
if defined PROGRAMFILES (
set "PF=%PROGRAMFILES%"
set OS_PLATFORM=x86
)
if defined PROGRAMFILES(x86) (
rem Visual Studio was x86-only prior to 14.3
if /i "%~1" == "vc14.3" (
set "PF=%PROGRAMFILES%"
) else (
set "PF=%PROGRAMFILES(x86)%"
)
set OS_PLATFORM=x64
)
rem Ensure we have the required arguments
if /i "%~1" == "" goto syntax
:parseArgs
if "%~1" == "" goto prerequisites
if /i "%~1" == "vc10" (
set VC_VER=10.0
set VC_DESC=VC10
set VC_TOOLSET=v100
set "VC_PATH=Microsoft Visual Studio 10.0\VC"
) else if /i "%~1" == "vc11" (
set VC_VER=11.0
set VC_DESC=VC11
set VC_TOOLSET=v110
set "VC_PATH=Microsoft Visual Studio 11.0\VC"
) else if /i "%~1" == "vc12" (
set VC_VER=12.0
set VC_DESC=VC12
set VC_TOOLSET=v120
set "VC_PATH=Microsoft Visual Studio 12.0\VC"
) else if /i "%~1" == "vc14" (
set VC_VER=14.0
set VC_DESC=VC14
set VC_TOOLSET=v140
set "VC_PATH=Microsoft Visual Studio 14.0\VC"
) else if /i "%~1" == "vc14.1" (
set VC_VER=14.1
set VC_DESC=VC14.10
set VC_TOOLSET=v141
rem Determine the VC14.1 path based on the installed edition in descending
rem order (Enterprise, then Professional and finally Community)
if exist "%PF%\Microsoft Visual Studio\2017\Enterprise\VC" (
set "VC_PATH=Microsoft Visual Studio\2017\Enterprise\VC"
) else if exist "%PF%\Microsoft Visual Studio\2017\Professional\VC" (
set "VC_PATH=Microsoft Visual Studio\2017\Professional\VC"
) else (
set "VC_PATH=Microsoft Visual Studio\2017\Community\VC"
)
) else if /i "%~1" == "vc14.2" (
set VC_VER=14.2
set VC_DESC=VC14.20
set VC_TOOLSET=v142
rem Determine the VC14.2 path based on the installed edition in descending
rem order (Enterprise, then Professional and finally Community)
if exist "%PF%\Microsoft Visual Studio\2019\Enterprise\VC" (
set "VC_PATH=Microsoft Visual Studio\2019\Enterprise\VC"
) else if exist "%PF%\Microsoft Visual Studio\2019\Professional\VC" (
set "VC_PATH=Microsoft Visual Studio\2019\Professional\VC"
) else (
set "VC_PATH=Microsoft Visual Studio\2019\Community\VC"
)
) else if /i "%~1" == "vc14.3" (
set VC_VER=14.3
set VC_DESC=VC14.30
set VC_TOOLSET=v143
rem Determine the VC14.3 path based on the installed edition in descending
rem order (Enterprise, then Professional and finally Community)
if exist "%PF%\Microsoft Visual Studio\2022\Enterprise\VC" (
set "VC_PATH=Microsoft Visual Studio\2022\Enterprise\VC"
) else if exist "%PF%\Microsoft Visual Studio\2022\Professional\VC" (
set "VC_PATH=Microsoft Visual Studio\2022\Professional\VC"
) else (
set "VC_PATH=Microsoft Visual Studio\2022\Community\VC"
)
) else if /i "%~1" == "x86" (
set BUILD_PLATFORM=x86
) else if /i "%~1" == "x64" (
set BUILD_PLATFORM=x64
) else if /i "%~1" == "debug" (
set BUILD_CONFIG=debug
) else if /i "%~1" == "release" (
set BUILD_CONFIG=release
) else if /i "%~1" == "-?" (
goto syntax
) else if /i "%~1" == "-h" (
goto syntax
) else if /i "%~1" == "-help" (
goto syntax
) else (
if not defined START_DIR (
set START_DIR=%~1
) else (
goto unknown
)
)
shift & goto parseArgs
:prerequisites
rem Compiler is a required parameter
if not defined VC_VER goto syntax
rem Default the start directory if one isn't specified
if not defined START_DIR set "START_DIR=%DEFAULT_START_DIR%"
rem Check we have a program files directory
if not defined PF goto nopf
rem Check we have Visual Studio installed
if not exist "%PF%\%VC_PATH%" goto novc
rem Check the start directory exists
if not exist "%START_DIR%" goto nowolfssl
:configure
if "%BUILD_PLATFORM%" == "" set BUILD_PLATFORM=%OS_PLATFORM%
if "%BUILD_PLATFORM%" == "x86" (
set VCVARS_PLATFORM=x86
) else if "%BUILD_PLATFORM%" == "x64" (
if "%VC_VER%" == "10.0" set VCVARS_PLATFORM=%BUILD_PLATFORM%
if "%VC_VER%" == "11.0" set VCVARS_PLATFORM=amd64
if "%VC_VER%" == "12.0" set VCVARS_PLATFORM=amd64
if "%VC_VER%" == "14.0" set VCVARS_PLATFORM=amd64
if "%VC_VER%" == "14.1" set VCVARS_PLATFORM=amd64
if "%VC_VER%" == "14.2" set VCVARS_PLATFORM=amd64
if "%VC_VER%" == "14.3" set VCVARS_PLATFORM=amd64
)
:start
echo.
set SAVED_PATH=%CD%
if "%VC_VER%" == "14.1" (
call "%PF%\%VC_PATH%\Auxiliary\Build\vcvarsall" %VCVARS_PLATFORM%
) else if "%VC_VER%" == "14.2" (
call "%PF%\%VC_PATH%\Auxiliary\Build\vcvarsall" %VCVARS_PLATFORM%
) else if "%VC_VER%" == "14.3" (
call "%PF%\%VC_PATH%\Auxiliary\Build\vcvarsall" %VCVARS_PLATFORM%
) else (
call "%PF%\%VC_PATH%\vcvarsall" %VCVARS_PLATFORM%
)
echo.
cd /d %SAVED_PATH%
if defined START_DIR cd /d %START_DIR%
goto %BUILD_PLATFORM%
:x64
rem Calculate our output directory
set OUTDIR=build\Win64\%VC_DESC%
if not exist %OUTDIR% md %OUTDIR%
if "%BUILD_CONFIG%" == "release" goto x64release
:x64debug
rem Perform 64-bit Debug Build
call :build Debug x64
if errorlevel 1 goto error
call :build "DLL Debug" x64
if errorlevel 1 goto error
if "%BUILD_CONFIG%" == "debug" goto success
:x64release
rem Perform 64-bit Release Build
call :build Release x64
if errorlevel 1 goto error
call :build "DLL Release" x64
if errorlevel 1 goto error
goto success
:x86
rem Calculate our output directory
set OUTDIR=build\Win32\%VC_DESC%
if not exist %OUTDIR% md %OUTDIR%
if "%BUILD_CONFIG%" == "release" goto x86release
:x86debug
rem Perform 32-bit Debug Build
call :build Debug Win32
if errorlevel 1 goto error
call :build "DLL Debug" Win32
if errorlevel 1 goto error
if "%BUILD_CONFIG%" == "debug" goto success
:x86release
rem Perform 32-bit Release Build
call :build Release Win32
if errorlevel 1 goto error
call :build "DLL Release" Win32
if errorlevel 1 goto error
goto success
:build
rem This function builds wolfSSL.
rem Usage: CALL :build <configuration> <platform>
rem The current directory must be the wolfSSL directory.
rem VS Configuration: Debug, Release, DLL Debug or DLL Release.
rem VS Platform: Win32 or x64.
rem Returns: 1 on fail, 0 on success.
rem An informational message should be shown before any return.
setlocal
set MSBUILD_CONFIG=%~1
set MSBUILD_PLATFORM=%~2
if not exist wolfssl64.sln (
echo.
echo Error: build: wolfssl64.sln not found in "%CD%"
exit /b 1
)
rem OUTDIR isn't a full path, only relative. MSBUILD_OUTDIR must be full and
rem not have trailing backslashes, which are handled later.
if "%MSBUILD_CONFIG%" == "Debug" (
set "MSBUILD_OUTDIR=%CD%\%OUTDIR%\LIB Debug"
) else if "%MSBUILD_CONFIG%" == "Release" (
set "MSBUILD_OUTDIR=%CD%\%OUTDIR%\LIB Release"
) else if "%MSBUILD_CONFIG%" == "DLL Debug" (
set "MSBUILD_OUTDIR=%CD%\%OUTDIR%\DLL Debug"
) else if "%MSBUILD_CONFIG%" == "DLL Release" (
set "MSBUILD_OUTDIR=%CD%\%OUTDIR%\DLL Release"
) else (
echo.
echo Error: build: Configuration not recognized.
exit /b 1
)
if not "%MSBUILD_PLATFORM%" == "Win32" if not "%MSBUILD_PLATFORM%" == "x64" (
echo.
echo Error: build: Platform not recognized.
exit /b 1
)
copy /v /y "%~dp0\wolfssl_options.h" .\cyassl\options.h
if %ERRORLEVEL% neq 0 (
echo.
echo Error: build: Couldn't replace .\cyassl\options.h
exit /b 1
)
copy /v /y "%~dp0\wolfssl_options.h" .\wolfssl\options.h
if %ERRORLEVEL% neq 0 (
echo.
echo Error: build: Couldn't replace .\wolfssl\options.h
exit /b 1
)
rem Extra trailing \ in Dirs because otherwise it thinks a quote is escaped
msbuild wolfssl64.sln ^
-p:CustomAfterMicrosoftCommonTargets="%~dp0\wolfssl_override.props" ^
-p:Configuration="%MSBUILD_CONFIG%" ^
-p:Platform="%MSBUILD_PLATFORM%" ^
-p:PlatformToolset="%VC_TOOLSET%" ^
-p:OutDir="%MSBUILD_OUTDIR%\\" ^
-p:IntDir="%MSBUILD_OUTDIR%\obj\\"
if %ERRORLEVEL% neq 0 (
echo.
echo Error: Failed building wolfSSL %MSBUILD_CONFIG%^|%MSBUILD_PLATFORM%.
exit /b 1
)
rem For tests to run properly the wolfSSL directory must remain the current.
set "PATH=%MSBUILD_OUTDIR%;%PATH%"
"%MSBUILD_OUTDIR%\testsuite.exe"
if %ERRORLEVEL% neq 0 (
echo.
echo Error: Failed testing wolfSSL %MSBUILD_CONFIG%^|%MSBUILD_PLATFORM%.
exit /b 1
)
echo.
echo Success: Built and tested wolfSSL %MSBUILD_CONFIG%^|%MSBUILD_PLATFORM%.
echo.
echo.
rem This is necessary to export our local variables back to the caller.
endlocal & set SUCCESSFUL_BUILDS="%MSBUILD_CONFIG%|%MSBUILD_PLATFORM%" ^
%SUCCESSFUL_BUILDS%
exit /b 0
:syntax
rem Display the help
echo.
echo Usage: build-wolfssl ^<compiler^> [platform] [configuration] [directory]
echo.
echo.
echo Compiler:
echo.
echo vc10 - Use Visual Studio 2010
echo vc11 - Use Visual Studio 2012
echo vc12 - Use Visual Studio 2013
echo vc14 - Use Visual Studio 2015
echo vc14.1 - Use Visual Studio 2017
echo vc14.2 - Use Visual Studio 2019
echo vc14.3 - Use Visual Studio 2022
echo.
echo.
echo Platform:
echo.
echo x86 - Perform a 32-bit build
echo x64 - Perform a 64-bit build
echo.
echo If this parameter is unset the OS platform is used ^(%OS_PLATFORM%^).
echo.
echo.
echo Configuration:
echo.
echo debug - Perform a debug build
echo release - Perform a release build
echo.
echo If this parameter is unset both configurations are built.
echo.
echo.
echo Other:
echo.
echo directory - Specifies the wolfSSL source directory
echo.
echo If this parameter is unset the directory used is "%DEFAULT_START_DIR%".
echo.
goto error
:unknown
echo.
echo Error: Unknown argument '%1'
goto error
:nodos
echo.
echo Error: Only a Windows NT based Operating System is supported
goto error
:nopf
echo.
echo Error: Cannot obtain the directory for Program Files
goto error
:novc
echo.
echo Error: %VC_DESC% is not installed
goto error
:nox64
echo.
echo Error: %VC_DESC% does not support 64-bit builds
goto error
:nowolfssl
echo.
echo Error: Cannot locate wolfSSL source directory, expected "%START_DIR%"
goto error
:error
if "%OS%" == "Windows_NT" endlocal
exit /B 1
:success
if defined SUCCESSFUL_BUILDS (
echo.
echo.
echo Build complete.
echo.
echo The following configurations were built and tested successfully:
echo.
echo %SUCCESSFUL_BUILDS%
echo.
)
cd /d %SAVED_PATH%
endlocal
exit /B 0

225
third_party/curl/projects/checksrc.bat vendored Normal file
View File

@ -0,0 +1,225 @@
@echo off
rem ***************************************************************************
rem * _ _ ____ _
rem * Project ___| | | | _ \| |
rem * / __| | | | |_) | |
rem * | (__| |_| | _ <| |___
rem * \___|\___/|_| \_\_____|
rem *
rem * Copyright (C) Steve Holme, <steve_holme@hotmail.com>.
rem *
rem * This software is licensed as described in the file COPYING, which
rem * you should have received as part of this distribution. The terms
rem * are also available at https://curl.se/docs/copyright.html.
rem *
rem * You may opt to use, copy, modify, merge, publish, distribute and/or sell
rem * copies of the Software, and permit persons to whom the Software is
rem * furnished to do so, under the terms of the COPYING file.
rem *
rem * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
rem * KIND, either express or implied.
rem *
rem * SPDX-License-Identifier: curl
rem *
rem ***************************************************************************
:begin
rem Check we are running on a Windows NT derived OS
if not "%OS%" == "Windows_NT" goto nodos
rem Set our variables
setlocal
set CHECK_LIB=TRUE
set CHECK_SRC=TRUE
set CHECK_TESTS=TRUE
set CHECK_EXAMPLES=TRUE
set SRC_DIR=
set CUR_DIR=%cd%
set ARG0_DIR=%~dp0
:parseArgs
if "%~1" == "" goto prerequisites
if /i "%~1" == "-?" (
goto syntax
) else if /i "%~1" == "-h" (
goto syntax
) else if /i "%~1" == "-help" (
goto syntax
) else if /i "%~1" == "lib" (
set CHECK_LIB=TRUE
set CHECK_SRC=FALSE
set CHECK_TESTS=FALSE
set CHECK_EXAMPLES=FALSE
) else if /i "%~1" == "src" (
set CHECK_LIB=FALSE
set CHECK_SRC=TRUE
set CHECK_TESTS=FALSE
set CHECK_EXAMPLES=FALSE
) else if /i "%~1" == "tests" (
set CHECK_LIB=FALSE
set CHECK_SRC=FALSE
set CHECK_TESTS=TRUE
set CHECK_EXAMPLES=FALSE
) else if /i "%~1" == "examples" (
set CHECK_LIB=FALSE
set CHECK_SRC=FALSE
set CHECK_TESTS=FALSE
set CHECK_EXAMPLES=TRUE
) else (
if not defined SRC_DIR (
set SRC_DIR=%~1%
) else (
goto unknown
)
)
shift & goto parseArgs
:prerequisites
rem Check we have Perl in our path
perl --version <NUL 1>NUL 2>&1
if errorlevel 1 (
rem It isn't so check we have it installed and set the path if it is
if exist "%SystemDrive%\Perl" (
set "PATH=%SystemDrive%\Perl\bin;%PATH%"
) else (
if exist "%SystemDrive%\Perl64" (
set "PATH=%SystemDrive%\Perl64\bin;%PATH%"
) else (
goto noperl
)
)
)
:configure
if "%SRC_DIR%" == "" (
rem Are we being executed from the "projects" or main directory?
if "%CUR_DIR%\" == "%ARG0_DIR%" (
set SRC_DIR=..
) else if exist projects (
if exist docs (
if exist lib (
if exist src (
if exist tests (
set SRC_DIR=.
)
)
)
)
)
)
if not exist "%SRC_DIR%" goto nosrc
:start
if "%CHECK_SRC%" == "TRUE" (
rem Check the src directory
if exist %SRC_DIR%\src (
for /f "delims=" %%i in ('dir "%SRC_DIR%\src\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\src" -Wtool_hugehelp.c "%%i"
for /f "delims=" %%i in ('dir "%SRC_DIR%\src\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\src" "%%i"
)
)
if "%CHECK_LIB%" == "TRUE" (
rem Check the lib directory
if exist %SRC_DIR%\lib (
for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\lib" "%%i"
for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\lib" -Wcurl_config.h.cmake -Wcurl_config.h.in -Wcurl_config.h "%%i"
)
rem Check the lib\vauth directory
if exist %SRC_DIR%\lib\vauth (
for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\vauth\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\lib\vauth" "%%i"
for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\vauth\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\lib\vauth" "%%i"
)
rem Check the lib\vquic directory
if exist %SRC_DIR%\lib\vquic (
for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\vquic\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\lib\vquic" "%%i"
for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\vquic\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\lib\vquic" "%%i"
)
rem Check the lib\vssh directory
if exist %SRC_DIR%\lib\vssh (
for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\vssh\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\lib\vssh" "%%i"
for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\vssh\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\lib\vssh" "%%i"
)
rem Check the lib\vtls directory
if exist %SRC_DIR%\lib\vtls (
for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\vtls\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\lib\vtls" "%%i"
for /f "delims=" %%i in ('dir "%SRC_DIR%\lib\vtls\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\lib\vtls" "%%i"
)
)
if "%CHECK_TESTS%" == "TRUE" (
rem Check the tests\libtest directory
if exist %SRC_DIR%\tests\libtest (
for /f "delims=" %%i in ('dir "%SRC_DIR%\tests\libtest\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\tests\libtest" "%%i"
for /f "delims=" %%i in ('dir "%SRC_DIR%\tests\libtest\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\tests\libtest" "%%i"
)
rem Check the tests\unit directory
if exist %SRC_DIR%\tests\unit (
for /f "delims=" %%i in ('dir "%SRC_DIR%\tests\unit\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\tests\unit" "%%i"
for /f "delims=" %%i in ('dir "%SRC_DIR%\tests\unit\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\tests\unit" "%%i"
)
rem Check the tests\server directory
if exist %SRC_DIR%\tests\server (
for /f "delims=" %%i in ('dir "%SRC_DIR%\tests\server\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\tests\server" "%%i"
for /f "delims=" %%i in ('dir "%SRC_DIR%\tests\server\*.h.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\tests\server" "%%i"
)
)
if "%CHECK_EXAMPLES%" == "TRUE" (
rem Check the docs\examples directory
if exist %SRC_DIR%\docs\examples (
for /f "delims=" %%i in ('dir "%SRC_DIR%\docs\examples\*.c.*" /b 2^>NUL') do @perl "%SRC_DIR%\scripts\checksrc.pl" "-D%SRC_DIR%\docs\examples" -ASNPRINTF "%%i"
)
)
goto success
:syntax
rem Display the help
echo.
echo Usage: checksrc [what] [directory]
echo.
echo What to scan:
echo.
echo lib - Scan the libcurl source
echo src - Scan the command-line tool source
echo tests - Scan the library tests and unit tests
echo examples - Scan the examples
echo.
echo directory - Specifies the curl source directory
goto success
:unknown
echo.
echo Error: Unknown argument '%1'
goto error
:nodos
echo.
echo Error: Only a Windows NT based Operating System is supported
goto error
:noperl
echo.
echo Error: Perl is not installed
goto error
:nosrc
echo.
echo Error: "%SRC_DIR%" does not exist
goto error
:error
if "%OS%" == "Windows_NT" endlocal
exit /B 1
:success
endlocal
exit /B 0

357
third_party/curl/projects/generate.bat vendored Normal file
View File

@ -0,0 +1,357 @@
@echo off
rem ***************************************************************************
rem * _ _ ____ _
rem * Project ___| | | | _ \| |
rem * / __| | | | |_) | |
rem * | (__| |_| | _ <| |___
rem * \___|\___/|_| \_\_____|
rem *
rem * Copyright (C) Steve Holme, <steve_holme@hotmail.com>.
rem *
rem * This software is licensed as described in the file COPYING, which
rem * you should have received as part of this distribution. The terms
rem * are also available at https://curl.se/docs/copyright.html.
rem *
rem * You may opt to use, copy, modify, merge, publish, distribute and/or sell
rem * copies of the Software, and permit persons to whom the Software is
rem * furnished to do so, under the terms of the COPYING file.
rem *
rem * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
rem * KIND, either express or implied.
rem *
rem * SPDX-License-Identifier: curl
rem *
rem ***************************************************************************
:begin
rem Check we are running on a Windows NT derived OS
if not "%OS%" == "Windows_NT" goto nodos
rem Set our variables
setlocal ENABLEEXTENSIONS
set VERSION=ALL
set MODE=GENERATE
rem Check we are not running on a network drive
if "%~d0."=="\\." goto nonetdrv
rem Switch to this batch file's directory
cd /d "%~0\.." 1>NUL 2>&1
rem Check we are running from a curl git repository
if not exist ..\GIT-INFO.md goto norepo
:parseArgs
if "%~1" == "" goto start
if /i "%~1" == "pre" (
set VERSION=PRE
) else if /i "%~1" == "vc10" (
set VERSION=VC10
) else if /i "%~1" == "vc11" (
set VERSION=VC11
) else if /i "%~1" == "vc12" (
set VERSION=VC12
) else if /i "%~1" == "-clean" (
set MODE=CLEAN
) else if /i "%~1" == "-?" (
goto syntax
) else if /i "%~1" == "/?" (
goto syntax
) else if /i "%~1" == "-h" (
goto syntax
) else if /i "%~1" == "-help" (
goto syntax
) else if /i "%~1" == "--help" (
goto syntax
) else (
goto unknown
)
shift & goto parseArgs
:start
if exist ..\buildconf.bat (
if "%MODE%" == "GENERATE" (
call ..\buildconf
) else if "%VERSION%" == "PRE" (
call ..\buildconf -clean
) else if "%VERSION%" == "ALL" (
call ..\buildconf -clean
)
)
if "%VERSION%" == "PRE" goto success
if "%VERSION%" == "VC10" goto vc10
if "%VERSION%" == "VC11" goto vc11
if "%VERSION%" == "VC12" goto vc12
:vc10
echo.
if "%MODE%" == "GENERATE" (
echo Generating VC10 project files
call :generate vcxproj Windows\VC10\src\curl.tmpl Windows\VC10\src\curl.vcxproj
call :generate vcxproj Windows\VC10\lib\libcurl.tmpl Windows\VC10\lib\libcurl.vcxproj
) else (
echo Removing VC10 project files
call :clean Windows\VC10\src\curl.vcxproj
call :clean Windows\VC10\lib\libcurl.vcxproj
)
if not "%VERSION%" == "ALL" goto success
:vc11
echo.
if "%MODE%" == "GENERATE" (
echo Generating VC11 project files
call :generate vcxproj Windows\VC11\src\curl.tmpl Windows\VC11\src\curl.vcxproj
call :generate vcxproj Windows\VC11\lib\libcurl.tmpl Windows\VC11\lib\libcurl.vcxproj
) else (
echo Removing VC11 project files
call :clean Windows\VC11\src\curl.vcxproj
call :clean Windows\VC11\lib\libcurl.vcxproj
)
if not "%VERSION%" == "ALL" goto success
:vc12
echo.
if "%MODE%" == "GENERATE" (
echo Generating VC12 project files
call :generate vcxproj Windows\VC12\src\curl.tmpl Windows\VC12\src\curl.vcxproj
call :generate vcxproj Windows\VC12\lib\libcurl.tmpl Windows\VC12\lib\libcurl.vcxproj
) else (
echo Removing VC12 project files
call :clean Windows\VC12\src\curl.vcxproj
call :clean Windows\VC12\lib\libcurl.vcxproj
)
goto success
rem Main generate function.
rem
rem %1 - Project Type (vcxproj for VC10, VC11, VC12, VC14, VC14.10, VC14.20 and VC14.30)
rem %2 - Input template file
rem %3 - Output project file
rem
:generate
if not exist %2 (
echo.
echo Error: Cannot open %2
exit /B
)
if exist %3 (
del %3
)
echo * %CD%\%3
for /f "usebackq delims=" %%i in (`"findstr /n ^^ %2"`) do (
set "var=%%i"
setlocal enabledelayedexpansion
set "var=!var:*:=!"
if "!var!" == "CURL_SRC_C_FILES" (
for /f "delims=" %%c in ('dir /b ..\src\*.c') do call :element %1 src "%%c" %3
) else if "!var!" == "CURL_SRC_H_FILES" (
for /f "delims=" %%h in ('dir /b ..\src\*.h') do call :element %1 src "%%h" %3
) else if "!var!" == "CURL_SRC_RC_FILES" (
for /f "delims=" %%r in ('dir /b ..\src\*.rc') do call :element %1 src "%%r" %3
) else if "!var!" == "CURL_SRC_X_C_FILES" (
call :element %1 lib "strtoofft.c" %3
call :element %1 lib "timediff.c" %3
call :element %1 lib "nonblock.c" %3
call :element %1 lib "warnless.c" %3
call :element %1 lib "curl_multibyte.c" %3
call :element %1 lib "version_win32.c" %3
call :element %1 lib "dynbuf.c" %3
call :element %1 lib "base64.c" %3
) else if "!var!" == "CURL_SRC_X_H_FILES" (
call :element %1 lib "config-win32.h" %3
call :element %1 lib "curl_setup.h" %3
call :element %1 lib "strtoofft.h" %3
call :element %1 lib "timediff.h" %3
call :element %1 lib "nonblock.h" %3
call :element %1 lib "warnless.h" %3
call :element %1 lib "curl_ctype.h" %3
call :element %1 lib "curl_multibyte.h" %3
call :element %1 lib "version_win32.h" %3
call :element %1 lib "dynbuf.h" %3
call :element %1 lib "curl_base64.h" %3
) else if "!var!" == "CURL_LIB_C_FILES" (
for /f "delims=" %%c in ('dir /b ..\lib\*.c') do call :element %1 lib "%%c" %3
) else if "!var!" == "CURL_LIB_H_FILES" (
for /f "delims=" %%h in ('dir /b ..\include\curl\*.h') do call :element %1 include\curl "%%h" %3
for /f "delims=" %%h in ('dir /b ..\lib\*.h') do call :element %1 lib "%%h" %3
) else if "!var!" == "CURL_LIB_RC_FILES" (
for /f "delims=" %%r in ('dir /b ..\lib\*.rc') do call :element %1 lib "%%r" %3
) else if "!var!" == "CURL_LIB_VAUTH_C_FILES" (
for /f "delims=" %%c in ('dir /b ..\lib\vauth\*.c') do call :element %1 lib\vauth "%%c" %3
) else if "!var!" == "CURL_LIB_VAUTH_H_FILES" (
for /f "delims=" %%h in ('dir /b ..\lib\vauth\*.h') do call :element %1 lib\vauth "%%h" %3
) else if "!var!" == "CURL_LIB_VQUIC_C_FILES" (
for /f "delims=" %%c in ('dir /b ..\lib\vquic\*.c') do call :element %1 lib\vquic "%%c" %3
) else if "!var!" == "CURL_LIB_VQUIC_H_FILES" (
for /f "delims=" %%h in ('dir /b ..\lib\vquic\*.h') do call :element %1 lib\vquic "%%h" %3
) else if "!var!" == "CURL_LIB_VSSH_C_FILES" (
for /f "delims=" %%c in ('dir /b ..\lib\vssh\*.c') do call :element %1 lib\vssh "%%c" %3
) else if "!var!" == "CURL_LIB_VSSH_H_FILES" (
for /f "delims=" %%h in ('dir /b ..\lib\vssh\*.h') do call :element %1 lib\vssh "%%h" %3
) else if "!var!" == "CURL_LIB_VTLS_C_FILES" (
for /f "delims=" %%c in ('dir /b ..\lib\vtls\*.c') do call :element %1 lib\vtls "%%c" %3
) else if "!var!" == "CURL_LIB_VTLS_H_FILES" (
for /f "delims=" %%h in ('dir /b ..\lib\vtls\*.h') do call :element %1 lib\vtls "%%h" %3
) else (
echo.!var!>> %3
)
endlocal
)
exit /B
rem Generates a single file xml element.
rem
rem %1 - Project Type (vcxproj for VC10, VC11, VC12, VC14, VC14.10, VC14.20 and VC14.30)
rem %2 - Directory (src, lib, lib\vauth, lib\vquic, lib\vssh, lib\vtls)
rem %3 - Source filename
rem %4 - Output project file
rem
:element
set "SPACES= "
if "%2" == "lib\vauth" (
set "TABS= "
) else if "%2" == "lib\vquic" (
set "TABS= "
) else if "%2" == "lib\vssh" (
set "TABS= "
) else if "%2" == "lib\vtls" (
set "TABS= "
) else (
set "TABS= "
)
call :extension %3 ext
if "%1" == "dsp" (
echo # Begin Source File>> %4
echo.>> %4
echo SOURCE=..\..\..\..\%2\%~3>> %4
echo # End Source File>> %4
) else if "%1" == "vcproj1" (
echo %TABS%^<File>> %4
echo %TABS% RelativePath="..\..\..\..\%2\%~3"^>>> %4
echo %TABS%^</File^>>> %4
) else if "%1" == "vcproj2" (
echo %TABS%^<File>> %4
echo %TABS% RelativePath="..\..\..\..\%2\%~3">> %4
echo %TABS%^>>> %4
echo %TABS%^</File^>>> %4
) else if "%1" == "vcxproj" (
if "%ext%" == "c" (
echo %SPACES%^<ClCompile Include=^"..\..\..\..\%2\%~3^" /^>>> %4
) else if "%ext%" == "h" (
echo %SPACES%^<ClInclude Include=^"..\..\..\..\%2\%~3^" /^>>> %4
) else if "%ext%" == "rc" (
echo %SPACES%^<ResourceCompile Include=^"..\..\..\..\%2\%~3^" /^>>> %4
)
)
exit /B
rem Returns the extension for a given filename.
rem
rem %1 - The filename
rem %2 - The return value
rem
:extension
set fname=%~1
set ename=
:loop1
if "%fname%"=="" (
set %2=
exit /B
)
if not "%fname:~-1%"=="." (
set ename=%fname:~-1%%ename%
set fname=%fname:~0,-1%
goto loop1
)
set %2=%ename%
exit /B
rem Removes the given project file.
rem
rem %1 - The filename
rem
:clean
echo * %CD%\%1
if exist %1 (
del %1
)
exit /B
:syntax
rem Display the help
echo.
echo Usage: generate [what] [-clean]
echo.
echo What to generate:
echo.
echo pre - Prerequisites only
echo vc10 - Use Visual Studio 2010
echo vc11 - Use Visual Studio 2012
echo vc12 - Use Visual Studio 2013
echo.
echo Only legacy Visual Studio project files can be generated.
echo.
echo To generate recent versions of Visual Studio project files use cmake.
echo Refer to INSTALL-CMAKE in the docs directory.
echo.
echo -clean - Removes the project files
goto error
:unknown
echo.
echo Error: Unknown argument '%1'
goto error
:nodos
echo.
echo Error: Only a Windows NT based Operating System is supported
goto error
:nonetdrv
echo.
echo Error: This batch file cannot run from a network drive
goto error
:norepo
echo.
echo Error: This batch file should only be used from a curl git repository
goto error
:seterr
rem Set the caller's errorlevel.
rem %1[opt]: Errorlevel as integer.
rem If %1 is empty the errorlevel will be set to 0.
rem If %1 is not empty and not an integer the errorlevel will be set to 1.
setlocal
set EXITCODE=%~1
if not defined EXITCODE set EXITCODE=0
echo %EXITCODE%|findstr /r "[^0-9\-]" 1>NUL 2>&1
if %ERRORLEVEL% EQU 0 set EXITCODE=1
exit /b %EXITCODE%
:error
if "%OS%" == "Windows_NT" endlocal
exit /B 1
:success
endlocal
exit /B 0

View File

@ -0,0 +1,308 @@
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at https://curl.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
* SPDX-License-Identifier: curl
*
***************************************************************************/
/*
By default wolfSSL has a very conservative configuration that can result in
connections to servers failing due to certificate or algorithm problems.
To remedy this issue for libcurl I've generated this options file that
build-wolfssl will copy to the wolfSSL include directories and will result in
maximum compatibility.
These are the configure options that were used to build wolfSSL v5.1.1 in
mingw and generate the options in this file:
C_EXTRA_FLAGS="\
-Wno-attributes \
-Wno-unused-but-set-variable \
-DFP_MAX_BITS=16384 \
-DHAVE_SECRET_CALLBACK \
-DTFM_TIMING_RESISTANT \
-DUSE_WOLF_STRTOK \
-DWOLFSSL_DES_ECB \
-DWOLFSSL_STATIC_DH \
-DWOLFSSL_STATIC_RSA \
" \
./configure --prefix=/usr/local \
--disable-jobserver \
--enable-aesgcm \
--enable-alpn \
--enable-altcertchains \
--enable-certgen \
--enable-des3 \
--enable-dh \
--enable-dsa \
--enable-ecc \
--enable-eccshamir \
--enable-fastmath \
--enable-opensslextra \
--enable-ripemd \
--enable-sessioncerts \
--enable-sha512 \
--enable-sni \
--enable-tlsv10 \
--enable-supportedcurves \
--enable-tls13 \
--enable-testcert \
> config.out 2>&1
Two generated options HAVE_THREAD_LS and _POSIX_THREADS were removed since they
are inapplicable for our Visual Studio build. Currently thread local storage is
only used by the Fixed Point cache ECC which we're not enabling. However even
if we later may decide to enable the cache it will fallback on mutexes when
thread local storage is not available. wolfSSL is using __declspec(thread) to
create the thread local storage and that could be a problem for LoadLibrary.
Regarding the options that were added via C_EXTRA_FLAGS:
FP_MAX_BITS=16384
https://www.yassl.com/forums/topic423-cacertorgs-ca-cert-verify-failed-but-withdisablefastmath-it-works.html
"Since root.crt uses a 4096-bit RSA key, you'll need to increase the fastmath
buffer size. You can do this using the define:
FP_MAX_BITS and setting it to 8192."
HAVE_SECRET_CALLBACK
Build wolfSSL with wolfSSL_set_tls13_secret_cb which allows saving TLS 1.3
secrets to SSLKEYLOGFILE.
TFM_TIMING_RESISTANT
https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-2-building-wolfssl.html
From section 2.4.5 Increasing Performance, USE_FAST_MATH:
"Because the stack memory usage can be larger when using fastmath, we recommend
defining TFM_TIMING_RESISTANT as well when using this option."
USE_WOLF_STRTOK
Build wolfSSL to always use its internal strtok instead of C runtime strtok.
WOLFSSL_DES_ECB
Build wolfSSL with wolfSSL_DES_ecb_encrypt which is needed by libcurl for NTLM.
WOLFSSL_STATIC_DH: Allow TLS_ECDH_ ciphers
WOLFSSL_STATIC_RSA: Allow TLS_RSA_ ciphers
https://github.com/wolfSSL/wolfssl/blob/v3.6.6/README.md#note-1
Static key cipher suites are deprecated and disabled by default since v3.6.6.
*/
/* wolfssl options.h
* generated from configure options
*
* Copyright (C) 2006-2022 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
*
*/
#ifndef WOLFSSL_OPTIONS_H
#define WOLFSSL_OPTIONS_H
#ifdef __cplusplus
extern "C" {
#endif
#undef FP_MAX_BITS
#define FP_MAX_BITS 16384
#undef HAVE_SECRET_CALLBACK
#define HAVE_SECRET_CALLBACK
#undef TFM_TIMING_RESISTANT
#define TFM_TIMING_RESISTANT
#undef USE_WOLF_STRTOK
#define USE_WOLF_STRTOK
#undef WOLFSSL_DES_ECB
#define WOLFSSL_DES_ECB
#undef WOLFSSL_STATIC_DH
#define WOLFSSL_STATIC_DH
#undef WOLFSSL_STATIC_RSA
#define WOLFSSL_STATIC_RSA
#undef TFM_TIMING_RESISTANT
#define TFM_TIMING_RESISTANT
#undef ECC_TIMING_RESISTANT
#define ECC_TIMING_RESISTANT
#undef WC_RSA_BLINDING
#define WC_RSA_BLINDING
#undef WOLFSSL_USE_ALIGN
#define WOLFSSL_USE_ALIGN
#undef WOLFSSL_RIPEMD
#define WOLFSSL_RIPEMD
#undef WOLFSSL_SHA512
#define WOLFSSL_SHA512
#undef WOLFSSL_SHA384
#define WOLFSSL_SHA384
#undef SESSION_CERTS
#define SESSION_CERTS
#undef HAVE_HKDF
#define HAVE_HKDF
#undef HAVE_ECC
#define HAVE_ECC
#undef TFM_ECC256
#define TFM_ECC256
#undef ECC_SHAMIR
#define ECC_SHAMIR
#undef WOLFSSL_ALLOW_TLSV10
#define WOLFSSL_ALLOW_TLSV10
#undef WC_RSA_PSS
#define WC_RSA_PSS
#undef NO_HC128
#define NO_HC128
#undef NO_RABBIT
#define NO_RABBIT
#undef HAVE_POLY1305
#define HAVE_POLY1305
#undef HAVE_ONE_TIME_AUTH
#define HAVE_ONE_TIME_AUTH
#undef HAVE_CHACHA
#define HAVE_CHACHA
#undef HAVE_HASHDRBG
#define HAVE_HASHDRBG
#undef HAVE_TLS_EXTENSIONS
#define HAVE_TLS_EXTENSIONS
#undef HAVE_SNI
#define HAVE_SNI
#undef HAVE_TLS_EXTENSIONS
#define HAVE_TLS_EXTENSIONS
#undef HAVE_ALPN
#define HAVE_ALPN
#undef HAVE_TLS_EXTENSIONS
#define HAVE_TLS_EXTENSIONS
#undef HAVE_SUPPORTED_CURVES
#define HAVE_SUPPORTED_CURVES
#undef HAVE_FFDHE_2048
#define HAVE_FFDHE_2048
#undef HAVE_SUPPORTED_CURVES
#define HAVE_SUPPORTED_CURVES
#undef WOLFSSL_TLS13
#define WOLFSSL_TLS13
#undef HAVE_TLS_EXTENSIONS
#define HAVE_TLS_EXTENSIONS
#undef HAVE_EXTENDED_MASTER
#define HAVE_EXTENDED_MASTER
#undef WOLFSSL_ALT_CERT_CHAINS
#define WOLFSSL_ALT_CERT_CHAINS
#undef WOLFSSL_TEST_CERT
#define WOLFSSL_TEST_CERT
#undef NO_RC4
#define NO_RC4
#undef HAVE_ENCRYPT_THEN_MAC
#define HAVE_ENCRYPT_THEN_MAC
#undef NO_PSK
#define NO_PSK
#undef NO_MD4
#define NO_MD4
#undef WOLFSSL_ENCRYPTED_KEYS
#define WOLFSSL_ENCRYPTED_KEYS
#undef USE_FAST_MATH
#define USE_FAST_MATH
#undef WC_NO_ASYNC_THREADING
#define WC_NO_ASYNC_THREADING
#undef HAVE_DH_DEFAULT_PARAMS
#define HAVE_DH_DEFAULT_PARAMS
#undef WOLFSSL_CERT_GEN
#define WOLFSSL_CERT_GEN
#undef OPENSSL_EXTRA
#define OPENSSL_EXTRA
#undef WOLFSSL_ALWAYS_VERIFY_CB
#define WOLFSSL_ALWAYS_VERIFY_CB
#undef WOLFSSL_VERIFY_CB_ALL_CERTS
#define WOLFSSL_VERIFY_CB_ALL_CERTS
#undef WOLFSSL_EXTRA_ALERTS
#define WOLFSSL_EXTRA_ALERTS
#undef HAVE_EXT_CACHE
#define HAVE_EXT_CACHE
#undef WOLFSSL_FORCE_CACHE_ON_TICKET
#define WOLFSSL_FORCE_CACHE_ON_TICKET
#undef WOLFSSL_AKID_NAME
#define WOLFSSL_AKID_NAME
#undef HAVE_CTS
#define HAVE_CTS
#undef GCM_TABLE_4BIT
#define GCM_TABLE_4BIT
#undef HAVE_AESGCM
#define HAVE_AESGCM
#undef HAVE_WC_INTROSPECTION
#define HAVE_WC_INTROSPECTION
#ifdef __cplusplus
} /* end of extern "C" */
#endif
#endif /* WOLFSSL_OPTIONS_H */

View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
We use this file to override some properties of the wolfSSL project files.
In build-wolfssl when we call msbuild to build wolfSSL we pass in this props
file by using the CustomAfterMicrosoftCommonTargets property.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions);</PreprocessorDefinitions>
<!--
Our options file wolfssl_options.h is copied by build-wolfssl to
$(SolutionDir)\wolfssl\options.h. It includes all the options we need
to build wolfSSL for compatibility. See wolfssl_options.h for more info.
-->
<ForcedIncludeFiles>$(SolutionDir)\wolfssl\options.h;%(ForcedIncludeFiles);</ForcedIncludeFiles>
<!--
Do not use the Unicode character set since their mingw config doesn't.
Do not use their IDE\WIN\user_settings.h since we have wolfssl_options.h.
-->
<UndefinePreprocessorDefinitions>_UNICODE;UNICODE;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(UndefinePreprocessorDefinitions);</UndefinePreprocessorDefinitions>
</ClCompile>
<ResourceCompile>
<UndefinePreprocessorDefinitions>_UNICODE;UNICODE;%(UndefinePreprocessorDefinitions);</UndefinePreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
<!--
The project GUID for wolfssl.vcxproj is 73973223-5EE8-41CA-8E88-1D60E89A237B.
Since we have are using certain options like fast math (TFM) in our options
file we must compile the corresponding units in wolfssl.vcxproj. If the user
disables such an option the unit can still be compiled it just won't be used.
-->
<ItemGroup Condition="'$(ProjectGuid)'=='{73973223-5EE8-41CA-8E88-1D60E89A237B}'">
<ClCompile Include="wolfcrypt\src\chacha.c" />
<ClCompile Include="wolfcrypt\src\chacha20_poly1305.c" />
<ClCompile Include="wolfcrypt\src\poly1305.c" />
<ClCompile Include="wolfcrypt\src\tfm.c" />
</ItemGroup>
</Project>