Skip to content

Commit

Permalink
Merge pull request softhsm#530 from halderen/build_platform_update
Browse files Browse the repository at this point in the history
Appveyor build platform update
  • Loading branch information
halderen authored Mar 3, 2020
2 parents 9100ce6 + 322de03 commit 853b724
Show file tree
Hide file tree
Showing 27 changed files with 489 additions and 2,335 deletions.
22 changes: 10 additions & 12 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,20 @@ init:
$env:CONFIGURE_OPTIONS = "$env:CONFIGURE_OPTIONS with-crypto-backend=$env:CRYPTO_BACKEND with-$env:CRYPTO_BACKEND=$env:CRYPTO_PACKAGE_PATH\ with-cppunit=$env:CPPUNIT_PATH\"
environment:
matrix:
- CRYPTO_BACKEND: openssl
PACKAGE_VERSION_NAME: OpenSSL-1.0.2j
CRYPTO_PACKAGE_NAME: openssl-1.0.2j
ADDITIONAL_CONFIGURE_OPTIONS: disable-eddsa
- CRYPTO_BACKEND: botan
PACKAGE_VERSION_NAME: Botan-1.10.13
CRYPTO_PACKAGE_NAME: botan-1.10.13
ADDITIONAL_CONFIGURE_OPTIONS: disable-eddsa
ADDITIONAL_CONFIGURE_OPTIONS: disable-eddsa disable-gost with-crypto-backend=botan
- CRYPTO_BACKEND: openssl
PACKAGE_VERSION_NAME: OpenSSL-1.1.0b
CRYPTO_PACKAGE_NAME: openssl-1.1.0b
ADDITIONAL_CONFIGURE_OPTIONS: disable-eddsa disable-gost
ADDITIONAL_CONFIGURE_OPTIONS: disable-eddsa disable-gost with-crypto-backend=openssl
install:
- cmd: powershell -File testing/appveyor/appveyor_download_requirements.ps1
- cmd: vcpkg install sqlite3:x86-windows
- cmd: vcpkg install openssl-windows:x64-windows
- cmd: vcpkg install botan:x86-windows
- cmd: vcpkg install cppunit:x86-windows
- cmd: vcpkg install getopt-win32:x86-windows
build_script:
- cmd: testing/appveyor/appveyor_build.bat
- cmd: vcpkg integrate install
- cmd: cmake -DCMAKE_TOOLCHAIN_FILE=C:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DWITH_CRYPTO_BACKEND=%CRYPTO_BACKEND% -DBUILD_TESTS=OFF -DDISABLE_NON_PAGED_MEMORY=ON -DENABLE_GOST=OFF .
- cmd: msbuild softhsm2.sln /p:Configuration="Release" /p:Platform="Win32" /p:PlatformToolset=v140 /target:Build & exit 0
test: off
artifacts:
- path: build/SoftHSMv2-$(Platform)
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ test-results.xml
build
Botan-*
ROOT
*.cmake
CMakeFiles

# Specifics
softhsm2.module
Expand Down
101 changes: 101 additions & 0 deletions config.h.in.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,104 @@

/* Compile with raw RSA PKCS PSS */
#cmakedefine WITH_RAW_PSS @WITH_RAW_PSS@

/*
* Remainder is specific for Windows build to
* set some default that aren't configured from
* cmake yet, and provide compatibility functions.
*/
#ifdef _WIN32

/* The default log level */
#undef DEFAULT_LOG_LEVEL
#define DEFAULT_LOG_LEVEL "INFO"

/* Default storage backend for token objects */
#undef DEFAULT_OBJECTSTORE_BACKEND
#define DEFAULT_OBJECTSTORE_BACKEND "file"

/* The default PKCS#11 library */
#undef DEFAULT_PKCS11_LIB
#define DEFAULT_PKCS11_LIB "softhsm2.dll"

/* The default location of softhsm2.conf */
#undef DEFAULT_SOFTHSM2_CONF
#define DEFAULT_SOFTHSM2_CONF "softhsm2.conf"

/* The default location of the token directory */
#undef DEFAULT_TOKENDIR
#define DEFAULT_TOKENDIR "tokens"

/* Whether LoadLibrary is available */
#undef HAVE_LOADLIBRARY
#define HAVE_LOADLIBRARY 1


/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
#define HAVE_STDLIB_H 1

/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H

/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
#define HAVE_STRING_H 1

/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
#define HAVE_SYS_STAT_H 1

/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
#define HAVE_SYS_TYPES_H 1

/* Maximum PIN length */
#undef MAX_PIN_LEN
#define MAX_PIN_LEN 255

/* Minimum PIN length */
#undef MIN_PIN_LEN
#define MIN_PIN_LEN 4

/* Define to 1 if you have getpassphrase(). */
#define HAVE_GETPASSPHRASE

/* Addition things */

char *getpassphrase(const char *prompt);
int setenv(const char *name, const char *value, int overwrite);

/* At least Vista */

#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0600
#endif

#if _MSC_VER < 1900
#define snprintf _snprintf
#endif
#define strcasecmp _stricmp
#define strncasecmp _strnicmp

/* Prevent inclusion of winsock.h in windows.h */

#define WIN32_LEAN_AND_MEAN 1

#include <windows.h>

/* avoid collision from min and max macros */

#undef min
#undef max

/* Temporary for debug */

#undef DEBUG_LOG_STDERR
// #define DEBUG_LOG_STDERR 1

/* To avoid unsafe warnings (off) */

// #pragma warning(disable: 4996)

#endif
Loading

0 comments on commit 853b724

Please sign in to comment.