diff --git a/.github/workflows/win-test.yml b/.github/workflows/win-test.yml new file mode 100644 index 0000000..a1476ff --- /dev/null +++ b/.github/workflows/win-test.yml @@ -0,0 +1,67 @@ +name: Windows Build Test + +on: + push: + branches: [ 'master', 'main', 'release/**' ] + pull_request: + branches: [ '*' ] + +jobs: + build: + + runs-on: windows-latest + + # This should be a safe limit for the tests to run. + timeout-minutes: 6 + + env: + # Path to the solution file relative to the root of the project. + SOLUTION_FILE_PATH: wolfpkcs11\IDE\VisualStudio\wolfpkcs11.sln + + # Configuration type to build. + # You can convert this to a build matrix if you need coverage of multiple configuration types. + # https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix + BUILD_CONFIGURATION: Debug + BUILD_PLATFORM: x64 + + steps: + - name: Pull wolfPKCS11 + uses: actions/checkout@master + with: + repository: wolfssl/wolfpkcs11 + path: wolfpkcs11 + + - name: Pull wolfTPM + uses: actions/checkout@master + with: + repository: wolfssl/wolftpm + path: wolftpm + + - name: Pull wolfSSL + uses: actions/checkout@master + with: + repository: wolfssl/wolfssl + path: wolfssl + - name: Create FIPS stub files (autogen) + working-directory: wolfssl + run: | + echo $null >> wolfcrypt\src\fips.c + echo $null >> wolfcrypt\src\fips_test.c + echo $null >> wolfcrypt\src\wolfcrypt_first.c + echo $null >> wolfcrypt\src\wolfcrypt_last.c + + - name: Add MSBuild to PATH + uses: microsoft/setup-msbuild@v1 + + - name: Build + working-directory: ${{env.GITHUB_WORKSPACE}} + # Add additional options to the MSBuild command line here (like platform or verbosity level). + # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference + run: msbuild /m /p:PlatformToolset=v142 /p:Platform=${{env.BUILD_PLATFORM}} /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} + + # The GitHub CI runners do not have a TPM. + # Failure 0x8028400f: unknown error number + # TBS_E_TPM_NOT_FOUND (0x8028400F) A compatible Trusted Platform Module (TPM) Security Device cannot be found on this computer. + #- name: Run Wrap Test + # working-directory: ${{env.GITHUB_WORKSPACE}} + # run: wolfpkcs11\IDE\VisualStudio\Debug\x64\pkcs11test.exe diff --git a/.gitignore b/.gitignore index ad9cb31..bdbe0b5 100644 --- a/.gitignore +++ b/.gitignore @@ -43,3 +43,5 @@ tests/wp11_ecckey_* tests/wp11_symmkey_* tests/wp11_token_* tests/wp11_obj_* + +IDE/VisualStudio/.vs diff --git a/IDE/VisualStudio/README.md b/IDE/VisualStudio/README.md new file mode 100644 index 0000000..6406533 --- /dev/null +++ b/IDE/VisualStudio/README.md @@ -0,0 +1,9 @@ +# Visual Studio Solution for wolfPKCS11 + +This includes projects for building wolfSSL, wolfTPM, wolfPKCS11 and some examples. + +The solution and project are based on older VS 2015, but can be re-targeted / updated to newer when opened. + +All build settings are contained in IDE/VisualStudio/user_settings.h. This module supports using the FIPS ready bundle from the website. Just enable the `#if 0` FIPS section in user_settings.h. See wolfssl/IDE/WIN10/README.txt for details on setting the FIPS integrity check in fips_test.c at run-time. + +These projects assume `wolftpm`, `wolfssl` and `wolfpkcs11` directories reside next to each other. diff --git a/IDE/VisualStudio/include.am b/IDE/VisualStudio/include.am new file mode 100644 index 0000000..b5c5112 --- /dev/null +++ b/IDE/VisualStudio/include.am @@ -0,0 +1,13 @@ +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +EXTRA_DIST+= IDE/VisualStudio/README.md +EXTRA_DIST+= IDE/VisualStudio/wolfpkcs11.sln +EXTRA_DIST+= IDE/VisualStudio/wolftpm.vcxproj +EXTRA_DIST+= IDE/VisualStudio/wolfssl.vcxproj +EXTRA_DIST+= IDE/VisualStudio/wolfcrypt_test.vcxproj +EXTRA_DIST+= IDE/VisualStudio/pkcs11str.vcxproj +EXTRA_DIST+= IDE/VisualStudio/pkcs11test.vcxproj +EXTRA_DIST+= IDE/VisualStudio/wrap_test.vcxproj +EXTRA_DIST+= IDE/VisualStudio/user_settings.h diff --git a/IDE/VisualStudio/pkcs11str.vcxproj b/IDE/VisualStudio/pkcs11str.vcxproj new file mode 100644 index 0000000..982cf8c --- /dev/null +++ b/IDE/VisualStudio/pkcs11str.vcxproj @@ -0,0 +1,309 @@ + + + + + Debug + Win32 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + Win32Proj + {e7403474-f122-4aec-92e3-b41f4008f0fa} + pkcs11str + + + + Application + true + v110 + Unicode + + + Application + true + v110 + Unicode + + + Application + false + v110 + true + Unicode + + + Application + false + v110 + true + Unicode + + + Application + true + v110 + Unicode + + + Application + true + v110 + Unicode + + + Application + false + v110 + true + Unicode + + + Application + false + v110 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)$(Configuration)\$(Platform)\ + $(Configuration)\$(Platform)\$(ProjectName)_obj\ + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;WOLFPKCS11_USER_SETTINGS;%(PreprocessorDefinitions) + true + ./;../../;../../../wolfssl/;../../../wolfpkcs11/;%(AdditionalIncludeDirectories) + + + Console + true + ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;tbs.lib;wolftpm.lib;wolfssl.lib;%(AdditionalDependencies) + $(Configuration)\$(Platform);%(AdditionalLibraryDirectories) + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;WOLFPKCS11_USER_SETTINGS;%(PreprocessorDefinitions) + true + ./;../../;../../../wolfssl/;../../../wolfpkcs11/;%(AdditionalIncludeDirectories) + + + Console + true + ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;tbs.lib;wolftpm.lib;wolfssl.lib;%(AdditionalDependencies) + $(Configuration)\$(Platform);%(AdditionalLibraryDirectories) + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;WOLFPKCS11_USER_SETTINGS;%(PreprocessorDefinitions) + true + ./;../../;../../../wolfssl/;../../../wolfpkcs11/;%(AdditionalIncludeDirectories) + + + Console + true + true + true + ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;tbs.lib;wolftpm.lib;wolfssl.lib;%(AdditionalDependencies) + $(Configuration)\$(Platform);%(AdditionalLibraryDirectories) + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;WOLFPKCS11_USER_SETTINGS;%(PreprocessorDefinitions) + true + ./;../../;../../../wolfssl/;../../../wolfpkcs11/;%(AdditionalIncludeDirectories) + + + Console + true + true + true + ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;tbs.lib;wolftpm.lib;wolfssl.lib;%(AdditionalDependencies) + $(Configuration)\$(Platform);%(AdditionalLibraryDirectories) + + + + + Level3 + true + _DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;WOLFPKCS11_USER_SETTINGS;%(PreprocessorDefinitions) + true + ./;../../;../../../wolfssl/;../../../wolfpkcs11/;%(AdditionalIncludeDirectories) + + + Console + true + ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;tbs.lib;wolftpm.lib;wolfssl.lib;%(AdditionalDependencies) + $(Configuration)\$(Platform);%(AdditionalLibraryDirectories) + + + + + Level3 + true + _DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;WOLFPKCS11_USER_SETTINGS;%(PreprocessorDefinitions) + true + ./;../../;../../../wolfssl/;../../../wolfpkcs11/;%(AdditionalIncludeDirectories) + + + Console + true + ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;tbs.lib;wolftpm.lib;wolfssl.lib;%(AdditionalDependencies) + $(Configuration)\$(Platform);%(AdditionalLibraryDirectories) + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;WOLFPKCS11_USER_SETTINGS;%(PreprocessorDefinitions) + true + ./;../../;../../../wolfssl/;../../../wolfpkcs11/;%(AdditionalIncludeDirectories) + + + Console + true + true + true + ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;tbs.lib;wolftpm.lib;wolfssl.lib;%(AdditionalDependencies) + $(Configuration)\$(Platform);%(AdditionalLibraryDirectories) + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;WOLFPKCS11_USER_SETTINGS;%(PreprocessorDefinitions) + true + ./;../../;../../../wolfssl/;../../../wolfpkcs11/;%(AdditionalIncludeDirectories) + + + Console + true + true + true + ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;tbs.lib;wolftpm.lib;wolfssl.lib;%(AdditionalDependencies) + $(Configuration)\$(Platform);%(AdditionalLibraryDirectories) + + + + + + + + {73973223-5EE8-41CA-8E88-1D60E89A237B} + false + + + {2BA1F3EA-4146-4DF5-AF12-0BD33E0DD74B} + false + + + {F51D6864-FF02-4E92-AD78-EC8BECF7EAA7} + false + + + + + + \ No newline at end of file diff --git a/IDE/VisualStudio/pkcs11test.vcxproj b/IDE/VisualStudio/pkcs11test.vcxproj new file mode 100644 index 0000000..c54038c --- /dev/null +++ b/IDE/VisualStudio/pkcs11test.vcxproj @@ -0,0 +1,308 @@ + + + + + Debug + Win32 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + Win32Proj + {a495b4a4-d47f-4141-ac59-331743cd953a} + pkcs11test + + + + Application + true + v110 + Unicode + + + Application + true + v110 + Unicode + + + Application + false + v110 + true + Unicode + + + Application + false + v110 + true + Unicode + + + Application + false + v110 + Unicode + + + Application + true + v110 + Unicode + + + Application + false + v110 + true + Unicode + + + Application + false + v110 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)$(Configuration)\$(Platform)\ + $(Configuration)\$(Platform)\$(ProjectName)_obj\ + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;WOLFPKCS11_USER_SETTINGS;%(PreprocessorDefinitions) + ./;../../;../../../wolfssl/;../../../wolfpkcs11/;%(AdditionalIncludeDirectories) + true + + + Console + true + ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;tbs.lib;wolftpm.lib;wolfssl.lib;%(AdditionalDependencies) + $(Configuration)\$(Platform);%(AdditionalLibraryDirectories) + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;WOLFPKCS11_USER_SETTINGS;%(PreprocessorDefinitions) + ./;../../;../../../wolfssl/;../../../wolfpkcs11/;%(AdditionalIncludeDirectories) + true + + + Console + true + ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;tbs.lib;wolftpm.lib;wolfssl.lib;%(AdditionalDependencies) + $(Configuration)\$(Platform);%(AdditionalLibraryDirectories) + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;WOLFPKCS11_USER_SETTINGS;%(PreprocessorDefinitions) + ./;../../;../../../wolfssl/;../../../wolfpkcs11/;%(AdditionalIncludeDirectories) + true + + + Console + true + true + true + ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;tbs.lib;wolftpm.lib;wolfssl.lib;%(AdditionalDependencies) + $(Configuration)\$(Platform);%(AdditionalLibraryDirectories) + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;WOLFPKCS11_USER_SETTINGS;%(PreprocessorDefinitions) + ./;../../;../../../wolfssl/;../../../wolfpkcs11/;%(AdditionalIncludeDirectories) + true + + + Console + true + true + true + ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;tbs.lib;wolftpm.lib;wolfssl.lib;%(AdditionalDependencies) + $(Configuration)\$(Platform);%(AdditionalLibraryDirectories) + + + + + Level3 + true + _DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;WOLFPKCS11_USER_SETTINGS;%(PreprocessorDefinitions) + Default + ./;../../;../../../wolfssl/;../../../wolfpkcs11/;%(AdditionalIncludeDirectories) + MultiThreadedDebugDLL + Disabled + + + Console + true + ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;tbs.lib;wolftpm.lib;wolfssl.lib;%(AdditionalDependencies) + $(Configuration)\$(Platform);%(AdditionalLibraryDirectories) + + + + + Level3 + true + _DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;WOLFPKCS11_USER_SETTINGS;%(PreprocessorDefinitions) + true + ./;../../;../../../wolfssl/;../../../wolfpkcs11/;%(AdditionalIncludeDirectories) + + + Console + true + ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;tbs.lib;wolftpm.lib;wolfssl.lib;%(AdditionalDependencies) + $(Configuration)\$(Platform);%(AdditionalLibraryDirectories) + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;WOLFPKCS11_USER_SETTINGS;%(PreprocessorDefinitions) + ./;../../;../../../wolfssl/;../../../wolfpkcs11/;%(AdditionalIncludeDirectories) + true + + + Console + true + true + true + ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;tbs.lib;wolftpm.lib;wolfssl.lib;%(AdditionalDependencies) + $(Configuration)\$(Platform);%(AdditionalLibraryDirectories) + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;WOLFPKCS11_USER_SETTINGS;%(PreprocessorDefinitions) + ./;../../;../../../wolfssl/;../../../wolfpkcs11/;%(AdditionalIncludeDirectories) + true + + + Console + true + true + true + ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;tbs.lib;wolftpm.lib;wolfssl.lib;%(AdditionalDependencies) + $(Configuration)\$(Platform);%(AdditionalLibraryDirectories) + + + + + + + + {73973223-5EE8-41CA-8E88-1D60E89A237B} + + + {2BA1F3EA-4146-4DF5-AF12-0BD33E0DD74B} + + + {F51D6864-FF02-4E92-AD78-EC8BECF7EAA7} + + + + + + \ No newline at end of file diff --git a/IDE/VisualStudio/user_settings.h b/IDE/VisualStudio/user_settings.h new file mode 100644 index 0000000..101221f --- /dev/null +++ b/IDE/VisualStudio/user_settings.h @@ -0,0 +1,205 @@ +/* user_settings.h + * + * Copyright (C) 2006-2024 wolfSSL Inc. + * + * This file is part of wolfPKCS11. + * + * wolfPKCS11 is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * wolfPKCS11 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA + */ + +/* Template for wolfPKCS11, wolfTPM and wolfCrypt (FIPS optional) */ + +#ifndef _USER_SETTINGS_H_ +#define _USER_SETTINGS_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#if 0 /* enable for FIPS ready */ + /* FIPS v5-ready 140-3 */ + #define HAVE_FIPS + #define HAVE_FIPS_VERSION 5 + #define HAVE_FIPS_VERSION_MINOR 3 +#endif + +/* Platform */ +#define HAVE_THREAD_LS /* thread local storage */ +#ifdef _WIN32 + #define WOLFTPM_WINAPI + #define _WINSOCK_DEPRECATED_NO_WARNINGS + #define _CRT_SECURE_NO_WARNINGS +#endif + +/* Debugging */ +#if 1 + #define DEBUG_WOLFSSL + #define ERROR_QUEUE_PER_THREAD + + #define DEBUG_WOLFTPM + //#define WOLFTPM_DEBUG_TIMEOUT + //#define WOLFTPM_DEBUG_VERBOSE + //#define WOLFTPM_DEBUG_IO + + #define DEBUG_WOLFPKCS11 + #define WOLFPKCS11_DEBUG_STORE +#else + //#define NO_ERROR_STRINGS +#endif + + +/* TPM */ +#define WOLFSSL_AES_CFB /* required for parameter encryption */ +#define WOLFSSL_PUBLIC_MP /* expose mp_ math functions - required for tpm ECC secret encrypt */ + +/* PKCS11 */ +#define HAVE_PKCS11_STATIC +#define WOLF_CRYPTO_CB +#define WOLFSSL_KEY_GEN +#define WC_RSA_DIRECT +#define WOLFSSL_PUBLIC_MP +#define WOLFSSL_KEY_GEN + //#define HAVE_SCRYPT /* For PKCS11 Pin. Scrypt uses massive memory */ +//#define WOLFPKCS11_USER_ENV + +/* PKCS11 TPM */ +#define WOLFPKCS11_TPM +#ifndef WOLFTPM_WINAPI + /* Windows does not allow TPM NV use */ + #define WOLFPKCS11_TPM_STORE +#endif + +/* TLS */ +#if 0 + /* TLS Versions v1.2 and v1.3 */ + #define WOLFSSL_TLS13 + #define NO_OLD_TLS +#else + #define WOLFCRYPT_ONLY +#endif + +/* TLS Extensions */ +#define HAVE_TLS_EXTENSIONS +#define HAVE_SUPPORTED_CURVES +#define HAVE_EXTENDED_MASTER +#define HAVE_SERVER_RENEGOTIATION_INFO +#define HAVE_ENCRYPT_THEN_MAC +#define HAVE_SNI + +/* Math Option */ +#ifdef HAVE_FIPS + #define USE_FAST_MATH /* tfm.c */ + #define FP_MAX_BITS 16384 +#else + #define WOLFSSL_SP_MATH_ALL /* sp_int.c */ + #define SP_INT_BITS 8192 +#endif +#define WOLFSSL_USE_ALIGN +#define TFM_TIMING_RESISTANT +#define ECC_TIMING_RESISTANT +#define WC_RSA_BLINDING + +/* No ASM (optional) */ +#if 0 + #define TFM_NO_ASM + #define WOLFSSL_NO_ASM + #define NO_CHACHA_ASM +#endif + +/* Certificate */ +#define WOLFSSL_ASN_TEMPLATE +#define WOLFSSL_BASE64_ENCODE +#define WOLFSSL_CERT_GEN +#define WOLFSSL_CERT_REQ +#define WOLFSSL_CERT_EXT + +/* RNG */ +#define HAVE_HASHDRBG +#ifdef HAVE_FIPS + #define WC_RNG_SEED_CB +#endif + +/* Asymmetric */ +#define HAVE_ECC +#define ECC_SHAMIR +#define ECC_USER_CURVES +#define HAVE_ECC192 +#define HAVE_ECC224 +#define HAVE_ECC256 +#define HAVE_ECC384 +#define HAVE_ECC521 +#define WOLFSSL_ECDSA_SET_K +#define HAVE_ECC_CDH +#define WOLFSSL_VALIDATE_ECC_IMPORT +#define WOLFSSL_VALIDATE_ECC_KEYGEN + +#define WC_RSA_PSS +#define WOLFSSL_PSS_LONG_SALT +#define WC_RSA_NO_PADDING +#define WOLFSSL_KEY_GEN + +#if 1 + #define NO_DH /* PKCS11 w/TPM does not support DH */ +#else + #define HAVE_DH_DEFAULT_PARAMS + #define HAVE_FFDHE_Q + #define HAVE_FFDHE_2048 + #define HAVE_FFDHE_3072 + #define HAVE_FFDHE_4096 + #define HAVE_FFDHE_6144 + #define HAVE_FFDHE_8192 + #define WOLFSSL_VALIDATE_FFC_IMPORT +#endif + +#define WOLFSSL_SHA224 +#define WOLFSSL_SHA384 +#define WOLFSSL_SHA512 +#define WOLFSSL_NOSHA512_224 +#define WOLFSSL_NOSHA512_256 + +#define WOLFSSL_SHA3 +#define WOLFSSL_NO_SHAKE128 +#define WOLFSSL_NO_SHAKE256 + +#define HAVE_HKDF + +#define WOLFSSL_AES_DIRECT +#define HAVE_AES_ECB +#define WOLFSSL_AES_COUNTER +#define WOLFSSL_AES_OFB +#define HAVE_AESCCM +#define HAVE_AESGCM +#define GCM_TABLE_4BIT +#define HAVE_AES_KEYWRAP +#define WOLFSSL_AES_DIRECT +#define HAVE_PKCS7 +#define WOLFSSL_CMAC + +#define HAVE_X963_KDF + +/* Disabled features */ +#undef NO_RC4 +#define NO_RC4 +#define NO_PSK +#define NO_MD4 +#define NO_DES3 +#define NO_DSA + + +#ifdef __cplusplus +} +#endif + +#endif /* _USER_SETTINGS_H_ */ diff --git a/IDE/VisualStudio/wolfcrypt_test.vcxproj b/IDE/VisualStudio/wolfcrypt_test.vcxproj new file mode 100644 index 0000000..648ebf5 --- /dev/null +++ b/IDE/VisualStudio/wolfcrypt_test.vcxproj @@ -0,0 +1,284 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + {D04BDF66-664A-4D59-BEAC-8AB2D5809C21} + Win32Proj + + + + Application + v110 + + + Application + v110 + + + Application + v110 + + + Application + v110 + + + Application + v110 + + + Application + v110 + + + Application + v110 + + + Application + v110 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>11.0.61030.0 + + + $(SolutionDir)$(Configuration)\$(Platform)\ + $(Configuration)\$(Platform)\$(ProjectName)_obj\ + false + + + + Disabled + .\;..\..\;..\..\..\wolfssl;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + true + Console + MachineX86 + ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + false + $(Configuration)\$(Platform);%(AdditionalLibraryDirectories) + + + + + Disabled + .\;..\..\;..\..\..\wolfssl;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + + + true + Console + ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + true + $(Configuration)\$(Platform);%(AdditionalLibraryDirectories) + + + + + .\;..\..\;..\..\..\wolfssl;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) + MultiThreadedDLL + + Level3 + ProgramDatabase + true + + + true + Console + MachineX86 + ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + true + true + UseLinkTimeCodeGeneration + false + $(Configuration)\$(Platform);%(AdditionalLibraryDirectories) + + + + + .\;..\..\;..\..\..\wolfssl;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) + MultiThreadedDLL + + Level3 + ProgramDatabase + true + + + true + Console + ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + true + true + UseLinkTimeCodeGeneration + $(Configuration)\$(Platform);%(AdditionalLibraryDirectories) + + + + + Disabled + .\;..\..\;..\..\..\wolfssl;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;WOLFSSL_DLL;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + false + + + true + Console + MachineX86 + ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + true + $(Configuration)\$(Platform);%(AdditionalLibraryDirectories) + + + + + Disabled + .\;..\..\;..\..\..\wolfssl;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;CYASSL_DLL;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + Level3 + ProgramDatabase + false + + + true + Console + ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + false + $(Configuration)\$(Platform);%(AdditionalLibraryDirectories) + + + + + .\;..\..\;..\..\..\wolfssl;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;WOLFSSL_DLL;%(PreprocessorDefinitions) + MultiThreadedDLL + + Level3 + ProgramDatabase + + + true + Console + ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + true + true + MachineX86 + UseLinkTimeCodeGeneration + true + $(Configuration)\$(Platform);%(AdditionalLibraryDirectories) + + + + + .\;..\..\;..\..\..\wolfssl;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;WOLFSSL_DLL;%(PreprocessorDefinitions) + MultiThreadedDLL + + Level3 + ProgramDatabase + + + true + Console + ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + true + true + UseLinkTimeCodeGeneration + true + + + + + + + + {73973223-5EE8-41CA-8E88-1D60E89A237B} + false + + + + + + \ No newline at end of file diff --git a/IDE/VisualStudio/wolfpkcs11.sln b/IDE/VisualStudio/wolfpkcs11.sln new file mode 100644 index 0000000..b3fcbe5 --- /dev/null +++ b/IDE/VisualStudio/wolfpkcs11.sln @@ -0,0 +1,167 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.1.32228.430 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wolfssl", "wolfssl.vcxproj", "{73973223-5EE8-41CA-8E88-1D60E89A237B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wolfcrypt_test", "wolfcrypt_test.vcxproj", "{D04BDF66-664A-4D59-BEAC-8AB2D5809C21}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wolftpm", "wolftpm.vcxproj", "{2BA1F3EA-4146-4DF5-AF12-0BD33E0DD74B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wolfpkcs11", "wolfpkcs11.vcxproj", "{F51D6864-FF02-4E92-AD78-EC8BECF7EAA7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pkcs11str", "pkcs11str.vcxproj", "{C50B761F-4BC0-428A-8D6D-28A9EE702D71}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pkcs11test", "pkcs11test.vcxproj", "{6626F04A-20BC-428C-AFD7-C38D71890E28}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wrap_test", "wrap_test.vcxproj", "{A495B4A4-D47F-4141-AC59-331743CD953A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + DLL Debug|Win32 = DLL Debug|Win32 + DLL Debug|x64 = DLL Debug|x64 + DLL Release|Win32 = DLL Release|Win32 + DLL Release|x64 = DLL Release|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {73973223-5EE8-41CA-8E88-1D60E89A237B}.Debug|Win32.ActiveCfg = Debug|Win32 + {73973223-5EE8-41CA-8E88-1D60E89A237B}.Debug|Win32.Build.0 = Debug|Win32 + {73973223-5EE8-41CA-8E88-1D60E89A237B}.Debug|x64.ActiveCfg = Debug|x64 + {73973223-5EE8-41CA-8E88-1D60E89A237B}.Debug|x64.Build.0 = Debug|x64 + {73973223-5EE8-41CA-8E88-1D60E89A237B}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {73973223-5EE8-41CA-8E88-1D60E89A237B}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {73973223-5EE8-41CA-8E88-1D60E89A237B}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {73973223-5EE8-41CA-8E88-1D60E89A237B}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {73973223-5EE8-41CA-8E88-1D60E89A237B}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {73973223-5EE8-41CA-8E88-1D60E89A237B}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {73973223-5EE8-41CA-8E88-1D60E89A237B}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {73973223-5EE8-41CA-8E88-1D60E89A237B}.DLL Release|x64.Build.0 = DLL Release|x64 + {73973223-5EE8-41CA-8E88-1D60E89A237B}.Release|Win32.ActiveCfg = Release|Win32 + {73973223-5EE8-41CA-8E88-1D60E89A237B}.Release|Win32.Build.0 = Release|Win32 + {73973223-5EE8-41CA-8E88-1D60E89A237B}.Release|x64.ActiveCfg = Release|x64 + {73973223-5EE8-41CA-8E88-1D60E89A237B}.Release|x64.Build.0 = Release|x64 + {D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.Debug|Win32.ActiveCfg = Debug|Win32 + {D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.Debug|Win32.Build.0 = Debug|Win32 + {D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.Debug|x64.ActiveCfg = Debug|x64 + {D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.Debug|x64.Build.0 = Debug|x64 + {D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.DLL Release|x64.Build.0 = DLL Release|x64 + {D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.Release|Win32.ActiveCfg = Release|Win32 + {D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.Release|Win32.Build.0 = Release|Win32 + {D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.Release|x64.ActiveCfg = Release|x64 + {D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.Release|x64.Build.0 = Release|x64 + {2BA1F3EA-4146-4DF5-AF12-0BD33E0DD74B}.Debug|Win32.ActiveCfg = Debug|Win32 + {2BA1F3EA-4146-4DF5-AF12-0BD33E0DD74B}.Debug|Win32.Build.0 = Debug|Win32 + {2BA1F3EA-4146-4DF5-AF12-0BD33E0DD74B}.Debug|x64.ActiveCfg = Debug|x64 + {2BA1F3EA-4146-4DF5-AF12-0BD33E0DD74B}.Debug|x64.Build.0 = Debug|x64 + {2BA1F3EA-4146-4DF5-AF12-0BD33E0DD74B}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {2BA1F3EA-4146-4DF5-AF12-0BD33E0DD74B}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {2BA1F3EA-4146-4DF5-AF12-0BD33E0DD74B}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {2BA1F3EA-4146-4DF5-AF12-0BD33E0DD74B}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {2BA1F3EA-4146-4DF5-AF12-0BD33E0DD74B}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {2BA1F3EA-4146-4DF5-AF12-0BD33E0DD74B}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {2BA1F3EA-4146-4DF5-AF12-0BD33E0DD74B}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {2BA1F3EA-4146-4DF5-AF12-0BD33E0DD74B}.DLL Release|x64.Build.0 = DLL Release|x64 + {2BA1F3EA-4146-4DF5-AF12-0BD33E0DD74B}.Release|Win32.ActiveCfg = Release|Win32 + {2BA1F3EA-4146-4DF5-AF12-0BD33E0DD74B}.Release|Win32.Build.0 = Release|Win32 + {2BA1F3EA-4146-4DF5-AF12-0BD33E0DD74B}.Release|x64.ActiveCfg = Release|x64 + {2BA1F3EA-4146-4DF5-AF12-0BD33E0DD74B}.Release|x64.Build.0 = Release|x64 + {F51D6864-FF02-4E92-AD78-EC8BECF7EAA7}.Debug|Win32.ActiveCfg = Debug|Win32 + {F51D6864-FF02-4E92-AD78-EC8BECF7EAA7}.Debug|Win32.Build.0 = Debug|Win32 + {F51D6864-FF02-4E92-AD78-EC8BECF7EAA7}.Debug|x64.ActiveCfg = Debug|x64 + {F51D6864-FF02-4E92-AD78-EC8BECF7EAA7}.Debug|x64.Build.0 = Debug|x64 + {F51D6864-FF02-4E92-AD78-EC8BECF7EAA7}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {F51D6864-FF02-4E92-AD78-EC8BECF7EAA7}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {F51D6864-FF02-4E92-AD78-EC8BECF7EAA7}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {F51D6864-FF02-4E92-AD78-EC8BECF7EAA7}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {F51D6864-FF02-4E92-AD78-EC8BECF7EAA7}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {F51D6864-FF02-4E92-AD78-EC8BECF7EAA7}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {F51D6864-FF02-4E92-AD78-EC8BECF7EAA7}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {F51D6864-FF02-4E92-AD78-EC8BECF7EAA7}.DLL Release|x64.Build.0 = DLL Release|x64 + {F51D6864-FF02-4E92-AD78-EC8BECF7EAA7}.Release|Win32.ActiveCfg = Release|Win32 + {F51D6864-FF02-4E92-AD78-EC8BECF7EAA7}.Release|Win32.Build.0 = Release|Win32 + {F51D6864-FF02-4E92-AD78-EC8BECF7EAA7}.Release|x64.ActiveCfg = Release|x64 + {F51D6864-FF02-4E92-AD78-EC8BECF7EAA7}.Release|x64.Build.0 = Release|x64 + {E7403474-F122-4AEC-92E3-B41F4008F0FA}.Debug|Win32.ActiveCfg = Debug|Win32 + {E7403474-F122-4AEC-92E3-B41F4008F0FA}.Debug|Win32.Build.0 = Debug|Win32 + {E7403474-F122-4AEC-92E3-B41F4008F0FA}.Debug|x64.ActiveCfg = Debug|x64 + {E7403474-F122-4AEC-92E3-B41F4008F0FA}.Debug|x64.Build.0 = Debug|x64 + {E7403474-F122-4AEC-92E3-B41F4008F0FA}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {E7403474-F122-4AEC-92E3-B41F4008F0FA}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {E7403474-F122-4AEC-92E3-B41F4008F0FA}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {E7403474-F122-4AEC-92E3-B41F4008F0FA}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {E7403474-F122-4AEC-92E3-B41F4008F0FA}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {E7403474-F122-4AEC-92E3-B41F4008F0FA}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {E7403474-F122-4AEC-92E3-B41F4008F0FA}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {E7403474-F122-4AEC-92E3-B41F4008F0FA}.DLL Release|x64.Build.0 = DLL Release|x64 + {E7403474-F122-4AEC-92E3-B41F4008F0FA}.Release|Win32.ActiveCfg = Release|Win32 + {E7403474-F122-4AEC-92E3-B41F4008F0FA}.Release|Win32.Build.0 = Release|Win32 + {E7403474-F122-4AEC-92E3-B41F4008F0FA}.Release|x64.ActiveCfg = Release|x64 + {E7403474-F122-4AEC-92E3-B41F4008F0FA}.Release|x64.Build.0 = Release|x64 + {C50B761F-4BC0-428A-8D6D-28A9EE702D71}.Debug|Win32.ActiveCfg = Debug|Win32 + {C50B761F-4BC0-428A-8D6D-28A9EE702D71}.Debug|Win32.Build.0 = Debug|Win32 + {C50B761F-4BC0-428A-8D6D-28A9EE702D71}.Debug|x64.ActiveCfg = Debug|x64 + {C50B761F-4BC0-428A-8D6D-28A9EE702D71}.Debug|x64.Build.0 = Debug|x64 + {C50B761F-4BC0-428A-8D6D-28A9EE702D71}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {C50B761F-4BC0-428A-8D6D-28A9EE702D71}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {C50B761F-4BC0-428A-8D6D-28A9EE702D71}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {C50B761F-4BC0-428A-8D6D-28A9EE702D71}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {C50B761F-4BC0-428A-8D6D-28A9EE702D71}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {C50B761F-4BC0-428A-8D6D-28A9EE702D71}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {C50B761F-4BC0-428A-8D6D-28A9EE702D71}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {C50B761F-4BC0-428A-8D6D-28A9EE702D71}.DLL Release|x64.Build.0 = DLL Release|x64 + {C50B761F-4BC0-428A-8D6D-28A9EE702D71}.Release|Win32.ActiveCfg = Release|Win32 + {C50B761F-4BC0-428A-8D6D-28A9EE702D71}.Release|Win32.Build.0 = Release|Win32 + {C50B761F-4BC0-428A-8D6D-28A9EE702D71}.Release|x64.ActiveCfg = Release|x64 + {C50B761F-4BC0-428A-8D6D-28A9EE702D71}.Release|x64.Build.0 = Release|x64 + {6626F04A-20BC-428C-AFD7-C38D71890E28}.Debug|Win32.ActiveCfg = Debug|Win32 + {6626F04A-20BC-428C-AFD7-C38D71890E28}.Debug|Win32.Build.0 = Debug|Win32 + {6626F04A-20BC-428C-AFD7-C38D71890E28}.Debug|x64.ActiveCfg = Debug|x64 + {6626F04A-20BC-428C-AFD7-C38D71890E28}.Debug|x64.Build.0 = Debug|x64 + {6626F04A-20BC-428C-AFD7-C38D71890E28}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {6626F04A-20BC-428C-AFD7-C38D71890E28}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {6626F04A-20BC-428C-AFD7-C38D71890E28}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {6626F04A-20BC-428C-AFD7-C38D71890E28}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {6626F04A-20BC-428C-AFD7-C38D71890E28}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {6626F04A-20BC-428C-AFD7-C38D71890E28}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {6626F04A-20BC-428C-AFD7-C38D71890E28}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {6626F04A-20BC-428C-AFD7-C38D71890E28}.DLL Release|x64.Build.0 = DLL Release|x64 + {6626F04A-20BC-428C-AFD7-C38D71890E28}.Release|Win32.ActiveCfg = Release|Win32 + {6626F04A-20BC-428C-AFD7-C38D71890E28}.Release|Win32.Build.0 = Release|Win32 + {6626F04A-20BC-428C-AFD7-C38D71890E28}.Release|x64.ActiveCfg = Release|x64 + {6626F04A-20BC-428C-AFD7-C38D71890E28}.Release|x64.Build.0 = Release|x64 + {A495B4A4-D47F-4141-AC59-331743CD953A}.Debug|Win32.ActiveCfg = Debug|Win32 + {A495B4A4-D47F-4141-AC59-331743CD953A}.Debug|Win32.Build.0 = Debug|Win32 + {A495B4A4-D47F-4141-AC59-331743CD953A}.Debug|x64.ActiveCfg = Debug|x64 + {A495B4A4-D47F-4141-AC59-331743CD953A}.Debug|x64.Build.0 = Debug|x64 + {A495B4A4-D47F-4141-AC59-331743CD953A}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {A495B4A4-D47F-4141-AC59-331743CD953A}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {A495B4A4-D47F-4141-AC59-331743CD953A}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {A495B4A4-D47F-4141-AC59-331743CD953A}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {A495B4A4-D47F-4141-AC59-331743CD953A}.DLL Release|Win32.ActiveCfg = DLL Release|Win32 + {A495B4A4-D47F-4141-AC59-331743CD953A}.DLL Release|Win32.Build.0 = DLL Release|Win32 + {A495B4A4-D47F-4141-AC59-331743CD953A}.DLL Release|x64.ActiveCfg = DLL Release|x64 + {A495B4A4-D47F-4141-AC59-331743CD953A}.DLL Release|x64.Build.0 = DLL Release|x64 + {A495B4A4-D47F-4141-AC59-331743CD953A}.Release|Win32.ActiveCfg = Release|Win32 + {A495B4A4-D47F-4141-AC59-331743CD953A}.Release|Win32.Build.0 = Release|Win32 + {A495B4A4-D47F-4141-AC59-331743CD953A}.Release|x64.ActiveCfg = Release|x64 + {A495B4A4-D47F-4141-AC59-331743CD953A}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {435A5854-CB2B-45BE-B11A-A6508AE2781E} + EndGlobalSection +EndGlobal diff --git a/IDE/VisualStudio/wolfpkcs11.vcxproj b/IDE/VisualStudio/wolfpkcs11.vcxproj new file mode 100644 index 0000000..1a628bf --- /dev/null +++ b/IDE/VisualStudio/wolfpkcs11.vcxproj @@ -0,0 +1,328 @@ + + + + + Debug + Win32 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + {73973223-5EE8-41CA-8E88-1D60E89A237B} + + + {2BA1F3EA-4146-4DF5-AF12-0BD33E0DD74B} + + + + Win32Proj + {F51D6864-FF02-4E92-AD78-EC8BECF7EAA7} + wolftpm + + + + StaticLibrary + true + v110 + Unicode + + + DynamicLibrary + true + v110 + Unicode + + + StaticLibrary + false + v110 + true + Unicode + + + DynamicLibrary + false + v110 + true + Unicode + + + StaticLibrary + false + v110 + Unicode + + + DynamicLibrary + true + v110 + Unicode + + + StaticLibrary + false + v110 + true + Unicode + + + DynamicLibrary + false + v110 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)$(Configuration)\$(Platform)\ + $(Configuration)\$(Platform)\$(ProjectName)_obj\ + + + true + + + true + + + false + + + false + + + true + + + true + + + false + + + false + + + + Level3 + true + WIN32;_DEBUG;_LIB;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;WOLFPKCS11_USER_SETTINGS;%(PreprocessorDefinitions) + true + NotUsing + + + ./;../../;../../../wolfssl/;../../../wolftpm/;../../../wolfpkcs11/;%(AdditionalIncludeDirectories) + + + + + true + + + + + Level3 + true + WIN32;_DEBUG;_LIB;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;WOLFPKCS11_USER_SETTINGS;BUILDING_WOLFTPM;WOLFTPM_DLL;%(PreprocessorDefinitions) + true + NotUsing + + + ./;../../;../../../wolfssl/;../../../wolftpm/;../../../wolfpkcs11/;%(AdditionalIncludeDirectories) + + + + + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_LIB;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;WOLFPKCS11_USER_SETTINGS;%(PreprocessorDefinitions) + true + NotUsing + + + ./;../../;../../../wolfssl/;../../../wolftpm/;../../../wolfpkcs11/;%(AdditionalIncludeDirectories) + + + + + true + true + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_LIB;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;WOLFPKCS11_USER_SETTINGS;BUILDING_WOLFTPM;WOLFTPM_DLL;%(PreprocessorDefinitions) + true + NotUsing + + + ./;../../;../../../wolfssl/;../../../wolftpm/;../../../wolfpkcs11/;%(AdditionalIncludeDirectories) + + + + + true + true + true + + + + + Level3 + true + _DEBUG;_LIB;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;WOLFPKCS11_USER_SETTINGS;%(PreprocessorDefinitions) + true + NotUsing + + + ./;../../;../../../wolfssl/;../../../wolftpm/;../../../wolfpkcs11/;%(AdditionalIncludeDirectories) + MultiThreadedDebugDLL + + + + + true + + + + + Level3 + true + _DEBUG;_LIB;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;WOLFPKCS11_USER_SETTINGS;BUILDING_WOLFTPM;WOLFTPM_DLL;%(PreprocessorDefinitions) + true + NotUsing + + + ./;../../;../../../wolfssl/;../../../wolftpm/;../../../wolfpkcs11/;%(AdditionalIncludeDirectories) + + + + + true + + + + + Level3 + true + true + true + NDEBUG;_LIB;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;WOLFPKCS11_USER_SETTINGS;%(PreprocessorDefinitions) + NotUsing + + + ./;../../;../../../wolfssl/;../../../wolftpm/;../../../wolfpkcs11/;%(AdditionalIncludeDirectories) + + + + + true + true + true + + + + + Level3 + true + true + true + NDEBUG;_LIB;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;WOLFPKCS11_USER_SETTINGS;BUILDING_WOLFTPM;WOLFTPM_DLL;%(PreprocessorDefinitions) + NotUsing + + + ./;../../;../../../wolfssl/;../../../wolftpm/;../../../wolfpkcs11/;%(AdditionalIncludeDirectories) + + + + + true + true + DebugFull + + + + + + \ No newline at end of file diff --git a/IDE/VisualStudio/wolfssl.vcxproj b/IDE/VisualStudio/wolfssl.vcxproj new file mode 100644 index 0000000..7b61d01 --- /dev/null +++ b/IDE/VisualStudio/wolfssl.vcxproj @@ -0,0 +1,368 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + {73973223-5EE8-41CA-8E88-1D60E89A237B} + wolfssl + Win32Proj + + + + StaticLibrary + v110 + Unicode + true + + + DynamicLibrary + v110 + Unicode + true + + + StaticLibrary + v110 + Unicode + true + + + DynamicLibrary + v110 + Unicode + true + + + StaticLibrary + v110 + Unicode + + + DynamicLibrary + v110 + Unicode + + + StaticLibrary + v110 + Unicode + + + DynamicLibrary + v110 + Unicode + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)$(Configuration)\$(Platform)\ + $(Configuration)\$(Platform)\$(ProjectName)_obj\ + + + false + + + false + + + false + + + false + + + + Disabled + ./;../../;../../../wolfssl/;%(AdditionalIncludeDirectories) + WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + 4206;4214;4706;%(DisableSpecificWarnings) + + + + + Disabled + ./;../../;../../../wolfssl/;%(AdditionalIncludeDirectories) + BUILDING_WOLFSSL;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + 4206;4214;4706;%(DisableSpecificWarnings) + + + ws2_32.lib;%(AdditionalDependencies) + 0x5A000000 + false + false + true + + + + + Disabled + ./;../../;../../../wolfssl/;%(AdditionalIncludeDirectories) + WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + 4206;4214;4706;%(DisableSpecificWarnings) + + + + + Disabled + ./;../../;../../../wolfssl/;%(AdditionalIncludeDirectories) + BUILDING_WOLFSSL;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Level4 + ProgramDatabase + 4206;4214;4706;%(DisableSpecificWarnings) + + + ws2_32.lib;%(AdditionalDependencies) + false + false + + + + + MaxSpeed + true + ./;../../;../../../wolfssl/;%(AdditionalIncludeDirectories) + WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) + MultiThreadedDLL + true + Level3 + ProgramDatabase + false + + + + + MaxSpeed + true + ./;../../;../../../wolfssl/;%(AdditionalIncludeDirectories) + BUILDING_WOLFSSL;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) + MultiThreadedDLL + true + Level3 + ProgramDatabase + + + ws2_32.lib;%(AdditionalDependencies) + false + 0x5A000000 + true + + + + + MaxSpeed + true + ./;../../;../../../wolfssl/;%(AdditionalIncludeDirectories) + WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) + MultiThreadedDLL + true + Level3 + ProgramDatabase + false + + + + + MaxSpeed + true + ./;../../;../../../wolfssl/;%(AdditionalIncludeDirectories) + BUILDING_WOLFSSL;WOLFSSL_DLL;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions) + MultiThreadedDLL + true + Level3 + ProgramDatabase + + + ws2_32.lib;%(AdditionalDependencies) + false + + + + + + + + + + + + + + + + false + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + false + ml64.exe /DWOLFSSL_USER_SETTINGS /c /Zi /Fo"$(IntDir)%(Filename).obj" %(Identity) + ml64.exe /DWOLFSSL_USER_SETTINGS /c /Zi /Fo"$(IntDir)%(Filename).obj" %(Identity) + $(IntDir)%(Filename).obj + $(IntDir)%(Filename).obj + false + false + ml64.exe /DWOLFSSL_USER_SETTINGS /c /Zi /Fo"$(IntDir)%(Filename).obj" %(Identity) + ml64.exe /DWOLFSSL_USER_SETTINGS /c /Zi /Fo"$(IntDir)%(Filename).obj" %(Identity) + $(IntDir)%(Filename).obj + $(IntDir)%(Filename).obj + + + + + false + false + ml64.exe /DWOLFSSL_USER_SETTINGS /c /Zi /Fo"$(IntDir)%(Filename).obj" %(Identity) + ml64.exe /DWOLFSSL_USER_SETTINGS /c /Zi /Fo"$(IntDir)%(Filename).obj" %(Identity) + $(IntDir)%(Filename).obj + $(IntDir)%(Filename).obj + false + false + ml64.exe /DWOLFSSL_USER_SETTINGS /c /Zi /Fo"$(IntDir)%(Filename).obj" %(Identity) + ml64.exe /DWOLFSSL_USER_SETTINGS /c /Zi /Fo"$(IntDir)%(Filename).obj" %(Identity) + $(IntDir)%(Filename).obj + $(IntDir)%(Filename).obj + + + + + + + + + + + + false + false + false + false + ml64.exe /DWOLFSSL_USER_SETTINGS /c /Zi /Fo"$(IntDir)%(Filename).obj" %(Identity) + ml64.exe /DWOLFSSL_USER_SETTINGS /c /Zi /Fo"$(IntDir)%(Filename).obj" %(Identity) + ml64.exe /DWOLFSSL_USER_SETTINGS /c /Zi /Fo"$(IntDir)%(Filename).obj" %(Identity) + ml64.exe /DWOLFSSL_USER_SETTINGS /c /Zi /Fo"$(IntDir)%(Filename).obj" %(Identity) + $(IntDir)%(Filename).obj + $(IntDir)%(Filename).obj + $(IntDir)%(Filename).obj + $(IntDir)%(Filename).obj + + + + + + \ No newline at end of file diff --git a/IDE/VisualStudio/wolftpm.vcxproj b/IDE/VisualStudio/wolftpm.vcxproj new file mode 100644 index 0000000..663077a --- /dev/null +++ b/IDE/VisualStudio/wolftpm.vcxproj @@ -0,0 +1,337 @@ + + + + + Debug + Win32 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {73973223-5EE8-41CA-8E88-1D60E89A237B} + + + + Win32Proj + {2BA1F3EA-4146-4DF5-AF12-0BD33E0DD74B} + wolftpm + + + + StaticLibrary + true + v110 + Unicode + + + DynamicLibrary + true + v110 + Unicode + + + StaticLibrary + false + v110 + true + Unicode + + + DynamicLibrary + false + v110 + true + Unicode + + + StaticLibrary + false + v110 + Unicode + + + DynamicLibrary + true + v110 + Unicode + + + StaticLibrary + false + v110 + true + Unicode + + + DynamicLibrary + false + v110 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)$(Configuration)\$(Platform)\ + $(Configuration)\$(Platform)\$(ProjectName)_obj\ + + + true + + + true + + + false + + + false + + + true + + + true + + + false + + + false + + + + Level3 + true + WIN32;_DEBUG;_LIB;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;%(PreprocessorDefinitions) + true + NotUsing + + + ./;../../;../../../wolfssl;../../../wolftpm;%(AdditionalIncludeDirectories) + + + + + true + + + + + Level3 + true + WIN32;_DEBUG;_LIB;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;BUILDING_WOLFTPM;WOLFTPM_DLL;%(PreprocessorDefinitions) + true + NotUsing + + + ./;../../;../../../wolfssl;../../../wolftpm;%(AdditionalIncludeDirectories) + + + + + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_LIB;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;%(PreprocessorDefinitions) + true + NotUsing + + + ./;../../;../../../wolfssl;../../../wolftpm;%(AdditionalIncludeDirectories) + + + + + true + true + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_LIB;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;BUILDING_WOLFTPM;WOLFTPM_DLL;%(PreprocessorDefinitions) + true + NotUsing + + + ./;../../;../../../wolfssl;../../../wolftpm;%(AdditionalIncludeDirectories) + + + + + true + true + true + + + + + Level3 + true + _DEBUG;_LIB;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;%(PreprocessorDefinitions) + true + NotUsing + + + ./;../../;../../../wolfssl;../../../wolftpm;%(AdditionalIncludeDirectories) + MultiThreadedDebugDLL + + + + + true + + + + + Level3 + true + _DEBUG;_LIB;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;BUILDING_WOLFTPM;WOLFTPM_DLL;%(PreprocessorDefinitions) + true + NotUsing + + + ./;../../;../../../wolfssl;../../../wolftpm;%(AdditionalIncludeDirectories) + + + + + true + + + + + Level3 + true + true + true + NDEBUG;_LIB;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;%(PreprocessorDefinitions) + NotUsing + + + ./;../../;../../../wolfssl;../../../wolftpm;%(AdditionalIncludeDirectories) + + + + + true + true + true + + + + + Level3 + true + true + true + NDEBUG;_LIB;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;BUILDING_WOLFTPM;WOLFTPM_DLL;%(PreprocessorDefinitions) + NotUsing + + + ./;../../;../../../wolfssl;../../../wolftpm;%(AdditionalIncludeDirectories) + + + + + true + true + DebugFull + + + + + + \ No newline at end of file diff --git a/IDE/VisualStudio/wrap_test.vcxproj b/IDE/VisualStudio/wrap_test.vcxproj new file mode 100644 index 0000000..b74784b --- /dev/null +++ b/IDE/VisualStudio/wrap_test.vcxproj @@ -0,0 +1,306 @@ + + + + + Debug + Win32 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + Win32Proj + {A495B4A4-D47F-4141-AC59-331743CD953A} + wraptest + + + + Application + true + v110 + Unicode + + + Application + true + v110 + Unicode + + + Application + false + v110 + true + Unicode + + + Application + false + v110 + true + Unicode + + + Application + false + v110 + Unicode + + + Application + true + v110 + Unicode + + + Application + false + v110 + true + Unicode + + + Application + false + v110 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)$(Configuration)\$(Platform)\ + $(Configuration)\$(Platform)\$(ProjectName)_obj\ + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;%(PreprocessorDefinitions) + ./;../../;../../../wolfssl;../../../wolftpm/;%(AdditionalIncludeDirectories) + true + + + Console + true + ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;tbs.lib;wolftpm.lib;wolfssl.lib;%(AdditionalDependencies) + $(Configuration)\$(Platform);%(AdditionalLibraryDirectories) + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;%(PreprocessorDefinitions) + ./;../../;../../../wolfssl/;../../../wolftpm/;%(AdditionalIncludeDirectories) + true + + + Console + true + ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;tbs.lib;wolftpm.lib;wolfssl.lib;%(AdditionalDependencies) + $(Configuration)\$(Platform);%(AdditionalLibraryDirectories) + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;%(PreprocessorDefinitions) + ./;../../;../../../wolfssl/;../../../wolftpm/;%(AdditionalIncludeDirectories) + true + + + Console + true + true + true + ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;tbs.lib;wolftpm.lib;wolfssl.lib;%(AdditionalDependencies) + $(Configuration)\$(Platform);%(AdditionalLibraryDirectories) + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;%(PreprocessorDefinitions) + ./;../../;../../../wolfssl/;../../../wolftpm/;%(AdditionalIncludeDirectories) + true + + + Console + true + true + true + ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;tbs.lib;wolftpm.lib;wolfssl.lib;%(AdditionalDependencies) + $(Configuration)\$(Platform);%(AdditionalLibraryDirectories) + + + + + Level3 + true + _DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;%(PreprocessorDefinitions) + Default + ./;../../;../../../wolfssl/;../../../wolftpm/;%(AdditionalIncludeDirectories) + MultiThreadedDebugDLL + Disabled + + + Console + true + ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;tbs.lib;wolftpm.lib;wolfssl.lib;%(AdditionalDependencies) + $(Configuration)\$(Platform);%(AdditionalLibraryDirectories) + + + + + Level3 + true + _DEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;%(PreprocessorDefinitions) + true + ./;../../;../../../wolfssl/;../../../wolftpm/;%(AdditionalIncludeDirectories) + + + Console + true + ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;tbs.lib;wolftpm.lib;wolfssl.lib;%(AdditionalDependencies) + $(Configuration)\$(Platform);%(AdditionalLibraryDirectories) + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;%(PreprocessorDefinitions) + ./;../../;../../../wolfssl/;../../../wolftpm/;%(AdditionalIncludeDirectories) + true + + + Console + true + true + true + ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;tbs.lib;wolftpm.lib;wolfssl.lib;%(AdditionalDependencies) + $(Configuration)\$(Platform);%(AdditionalLibraryDirectories) + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;WOLFSSL_USER_SETTINGS;WOLFTPM_USER_SETTINGS;%(PreprocessorDefinitions) + ./;../../;../../../wolfssl/;../../../wolftpm/;%(AdditionalIncludeDirectories) + true + + + Console + true + true + true + ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;tbs.lib;wolftpm.lib;wolfssl.lib;%(AdditionalDependencies) + $(Configuration)\$(Platform);%(AdditionalLibraryDirectories) + + + + + + + + + {73973223-5EE8-41CA-8E88-1D60E89A237B} + + + {2BA1F3EA-4146-4DF5-AF12-0BD33E0DD74B} + + + + + + \ No newline at end of file diff --git a/IDE/include.am b/IDE/include.am new file mode 100644 index 0000000..ddcae26 --- /dev/null +++ b/IDE/include.am @@ -0,0 +1,5 @@ +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +include IDE/VisualStudio/include.am diff --git a/Makefile.am b/Makefile.am index b9d493a..e27307c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -34,6 +34,7 @@ ACLOCAL_AMFLAGS= -I m4 include src/include.am include wolfpkcs11/include.am include tests/include.am +include IDE/include.am EXTRA_DIST+= README.md EXTRA_DIST+= LICENSE diff --git a/src/crypto.c b/src/crypto.c index bd0265c..1d6d0fc 100644 --- a/src/crypto.c +++ b/src/crypto.c @@ -29,6 +29,7 @@ #else #include "user_settings.h" #endif +#include #include #include diff --git a/src/internal.c b/src/internal.c index 8db1433..5c7f3a4 100644 --- a/src/internal.c +++ b/src/internal.c @@ -30,6 +30,7 @@ #include "user_settings.h" #endif +#include #include #include #include @@ -708,7 +709,7 @@ int wolfPKCS11_Store_Open(int type, CK_ULONG id1, CK_ULONG id2, int read, WOLFTPM2_HANDLE parent; #else char name[120] = "\0"; - XFILE file; + XFILE file = XBADFILE; #endif #ifdef WOLFPKCS11_DEBUG_STORE @@ -840,7 +841,7 @@ int wolfPKCS11_Store_Open(int type, CK_ULONG id1, CK_ULONG id2, int read, *store = file; } #ifdef WOLFPKCS11_DEBUG_STORE - printf("Store Open %p: ret %d, name %s, ret %d\n", *store, ret, name); + printf("Store Open %p: ret %d, name %s\n", *store, ret, name); #endif #endif return ret; @@ -1224,7 +1225,7 @@ static int wp11_storage_write_ulong(void* storage, CK_ULONG val) /* Convert unsigned long number to big-endian byte array. */ for (i = 0; i < (int)sizeof(num); i++) { - num[i] = val >> ((sizeof(num) - 1 - i) * 8); + num[i] = (unsigned char)(val >> ((sizeof(num) - 1 - i) * 8)); } /* Write big-endian byte array. */ @@ -1273,7 +1274,7 @@ static int wp11_storage_write_time(void* storage, time_t timeVal) /* Convert time_t number to big-endian byte array. */ for (i = 0; i < (int)sizeof(num); i++) { - num[i] = timeVal >> ((sizeof(num) - 1 - i) * 8); + num[i] = (unsigned char)(timeVal >> ((sizeof(num) - 1 - i) * 8)); } /* Write big-endian byte array. */ @@ -2925,7 +2926,7 @@ static int wp11_Token_Load(WP11_Slot* slot, int tokenId, WP11_Token* token) int ret; int i; void* storage = NULL; - WP11_Object* object; + WP11_Object* object = NULL; WP11_Object** current; int objCnt = 0; word32 len; @@ -3397,12 +3398,16 @@ void WP11_Library_Final(void) */ int WP11_Library_IsInitialized(void) { - int ret; - - WP11_Lock_LockRO(&globalLock); + int ret, locked = 0; + if (libraryInitCount > 0) { + /* cannot used globalLock before init */ + WP11_Lock_LockRO(&globalLock); + locked = 1; + } ret = libraryInitCount > 0; - WP11_Lock_UnlockRO(&globalLock); - + if (locked) { + WP11_Lock_UnlockRO(&globalLock); + } return ret; } @@ -3488,7 +3493,7 @@ int WP11_Slot_OpenSession(WP11_Slot* slot, unsigned long flags, void* app, CK_NOTIFY notify, CK_SESSION_HANDLE* session) { int ret = 0; - WP11_Session* curr; + WP11_Session* curr = NULL; WP11_Lock_LockRW(&slot->lock); /* Cannot open a read-only session if SO is logged in. */ @@ -5557,7 +5562,7 @@ static int GetEcParams(ecc_key* key, byte* data, CK_ULONG* len) else { *len = dataLen; data[0] = ASN_OBJECT_ID; - data[1] = dataLen - 2; + data[1] = (byte)(dataLen - 2); XMEMCPY(data + 2, key->dp->oid, data[1]); } @@ -7093,7 +7098,7 @@ static int Pkcs11ECDSASig_Decode(const byte* in, word32 inSz, byte* sig, /* Check INT */ if (ret == 0 && in[i++] != ASN_INTEGER) ret = ASN_PARSE_E; - if (ret == 0 && (len = in[i++]) > sz + 1) + if (ret == 0 && (len = in[i++]) > (int)sz + 1) ret = ASN_PARSE_E; /* Check there is space for INT data */ if (ret == 0 && i + len > inSz) @@ -7115,7 +7120,7 @@ static int Pkcs11ECDSASig_Decode(const byte* in, word32 inSz, byte* sig, /* Check INT */ if (ret == 0 && in[i++] != ASN_INTEGER) ret = ASN_PARSE_E; - if (ret == 0 && (len = in[i++]) > sz + 1) + if (ret == 0 && (len = in[i++]) > (int)sz + 1) ret = ASN_PARSE_E; /* Check there is space for INT data */ if (ret == 0 && i + len > inSz) diff --git a/tests/pkcs11mtt.c b/tests/pkcs11mtt.c index 3714fc8..f1b62e2 100644 --- a/tests/pkcs11mtt.c +++ b/tests/pkcs11mtt.c @@ -19,22 +19,28 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA */ -#ifndef HAVE_PKCS11_STATIC -#include -#endif - #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#ifndef WOLFSSL_USER_SETTINGS + #include +#endif +#include + +#ifndef WOLFPKCS11_USER_SETTINGS + #include +#endif +#include + +#ifndef HAVE_PKCS11_STATIC +#include +#endif #include #if defined(_POSIX_THREADS) && !defined(SINGLE_THREADED) #include -#include #define TEST_MULTITHREADED #include "unit.h" @@ -239,7 +245,9 @@ static CK_RV test_object(void* args) }; CK_ULONG copyTmplCnt = sizeof(copyTmpl) / sizeof(*copyTmpl); CK_ULONG count; +#ifndef _WIN32 CK_ATTRIBUTE empty[] = { }; +#endif CK_ATTRIBUTE keyTypeNull[] = { { CKA_KEY_TYPE, NULL, sizeof(CK_KEY_TYPE) } }; @@ -288,11 +296,13 @@ static CK_RV test_object(void* args) ret = funcList->C_CreateObject(session, tmpl, tmplCnt, NULL); CHECK_CKR_FAIL(ret, CKR_ARGUMENTS_BAD, "Create Object no object"); } +#ifndef _WIN32 if (ret == CKR_OK) { ret = funcList->C_CreateObject(session, empty, 0, &obj); CHECK_CKR_FAIL(ret, CKR_TEMPLATE_INCOMPLETE, "Create Object no key type"); } +#endif if (ret == CKR_OK) { count = sizeof(keyTypeNull) / sizeof(*keyTypeNull); ret = funcList->C_CreateObject(session, keyTypeNull, count, &obj); diff --git a/tests/pkcs11str.c b/tests/pkcs11str.c index d392935..c1275e7 100644 --- a/tests/pkcs11str.c +++ b/tests/pkcs11str.c @@ -19,20 +19,25 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA */ -#ifndef HAVE_PKCS11_STATIC -#include -#endif - #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#ifndef WOLFSSL_USER_SETTINGS + #include +#endif +#include +#include -#include +#ifndef WOLFPKCS11_USER_SETTINGS + #include +#endif #include +#ifndef HAVE_PKCS11_STATIC +#include +#endif + #include "testdata.h" int verbose = 0; diff --git a/tests/pkcs11test.c b/tests/pkcs11test.c index 9a51420..fdd048c 100644 --- a/tests/pkcs11test.c +++ b/tests/pkcs11test.c @@ -19,20 +19,25 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA */ -#ifndef HAVE_PKCS11_STATIC -#include -#endif - #ifdef HAVE_CONFIG_H #include #endif -#include +#ifndef WOLFSSL_USER_SETTINGS + #include +#endif +#include #include -#include +#ifndef WOLFPKCS11_USER_SETTINGS + #include +#endif #include +#ifndef HAVE_PKCS11_STATIC +#include +#endif + #include "unit.h" #include "testdata.h" @@ -1084,7 +1089,9 @@ static CK_RV test_object(void* args) }; CK_ULONG copyTmplCnt = sizeof(copyTmpl) / sizeof(*copyTmpl); CK_ULONG count; +#ifndef _WIN32 CK_ATTRIBUTE empty[] = { }; +#endif CK_ATTRIBUTE keyTypeNull[] = { { CKA_KEY_TYPE, NULL, sizeof(CK_KEY_TYPE) } }; @@ -1131,11 +1138,13 @@ static CK_RV test_object(void* args) ret = funcList->C_CreateObject(session, tmpl, tmplCnt, NULL); CHECK_CKR_FAIL(ret, CKR_ARGUMENTS_BAD, "Create Object no object"); } +#ifndef _WIN32 if (ret == CKR_OK) { ret = funcList->C_CreateObject(session, empty, 0, &obj); CHECK_CKR_FAIL(ret, CKR_TEMPLATE_INCOMPLETE, "Create Object no key type"); } +#endif if (ret == CKR_OK) { count = sizeof(keyTypeNull) / sizeof(*keyTypeNull); ret = funcList->C_CreateObject(session, keyTypeNull, count, &obj); @@ -5573,7 +5582,7 @@ static CK_RV test_aes_cbc_update(CK_SESSION_HANDLE session, unsigned char* exp, CK_RV ret; byte plain[32], enc[32], dec[32], iv[16]; byte* pIn; - byte* pOut; + byte* pOut = NULL; CK_ULONG plainSz, encSz, decSz, ivSz, remSz, cumSz, partSz, inRemSz; CK_MECHANISM mech; @@ -6031,7 +6040,7 @@ static CK_RV test_aes_cbc_pad_update(CK_SESSION_HANDLE session, CK_RV ret; byte plain[32], enc[sizeof(plain)+16], dec[32], iv[16]; byte* pIn; - byte* pOut; + byte* pOut = NULL; CK_ULONG plainSz, encSz, decSz, ivSz, remSz, cumSz, partSz, inRemSz; CK_MECHANISM mech; @@ -6198,7 +6207,7 @@ static CK_RV test_aes_cbc_pad(CK_SESSION_HANDLE session, CK_OBJECT_HANDLE key, CK_RV ret; byte plain[32], enc[sizeof(plain)+16], dec[32], iv[16]; byte* pIn; - byte* pOut; + byte* pOut = NULL; CK_ULONG encSz, decSz, ivSz, remSz, cumSz, partSz, inRemSz; CK_MECHANISM mech; diff --git a/tests/testdata.h b/tests/testdata.h index a6b1467..ce503fd 100644 --- a/tests/testdata.h +++ b/tests/testdata.h @@ -448,14 +448,14 @@ static unsigned char aes_128_gcm_exp_tag[] = { #if defined(__MINGW32__) || defined(_MSC_VER) /* Windows/MinGw does not support setenv, but does have putenv and getenv */ -extern int putenv(const char *); +extern int _putenv(const char *); static inline int setenv(const char *name, const char *value, int overwrite) { char env[255]; size_t len = strlen(name) + 1 + strlen(value) + 1; if (len < sizeof(env)) { sprintf(env, "%s=%s", name, value); - return putenv(env); + return _putenv(env); } (void)overwrite; return EXIT_FAILURE; diff --git a/wolfpkcs11/internal.h b/wolfpkcs11/internal.h index 15600d3..7454545 100644 --- a/wolfpkcs11/internal.h +++ b/wolfpkcs11/internal.h @@ -32,9 +32,6 @@ #include #include -#ifndef WOLFPKCS11_USER_SETTINGS - #include -#endif #include #include diff --git a/wolfpkcs11/pkcs11.h b/wolfpkcs11/pkcs11.h index 4e1ba96..a4552fe 100644 --- a/wolfpkcs11/pkcs11.h +++ b/wolfpkcs11/pkcs11.h @@ -22,6 +22,10 @@ #ifndef _PKCS11_H_ #define _PKCS11_H_ +#ifdef WOLFPKCS11_USER_SETTINGS + #include "user_settings.h" +#endif + #include #ifdef __cplusplus