From da00ff6db5e68773996ec79d711c45fb3444c580 Mon Sep 17 00:00:00 2001 From: NingSun Date: Wed, 14 Mar 2018 16:35:31 -0700 Subject: Remove win32 support in SoftHSMv2 Due to license issue, we have to remove win32 support in SoftHSMv2. Issue-ID: AAF-151 Change-Id: I31dda45ed84065819e26be8205747dd096a37432 Signed-off-by: NingSun --- SoftHSMv2/.appveyor.yml | 63 -- SoftHSMv2/.gitignore | 9 - SoftHSMv2/Makefile.am | 42 +- SoftHSMv2/NEWS | 4 +- SoftHSMv2/WIN32-NOTES.md | 311 ------ SoftHSMv2/configure.ac | 6 +- SoftHSMv2/src/bin/Makefile.am | 3 +- SoftHSMv2/src/bin/win32/getopt.cpp | 520 --------- SoftHSMv2/src/bin/win32/getopt.h | 101 -- SoftHSMv2/src/bin/win32/getpassphase.cpp | 35 - SoftHSMv2/src/lib/Makefile.am | 5 +- SoftHSMv2/src/lib/SoftHSM.cpp | 59 + SoftHSMv2/src/lib/SoftHSM.h | 1 + SoftHSMv2/src/lib/crypto/BotanGOSTPrivateKey.cpp | 93 +- SoftHSMv2/src/lib/crypto/OSSLGOSTPrivateKey.cpp | 30 +- SoftHSMv2/src/lib/crypto/test/GOSTTests.cpp | 34 + SoftHSMv2/src/lib/crypto/test/GOSTTests.h | 2 + SoftHSMv2/src/lib/test/Makefile.am | 2 - SoftHSMv2/src/lib/test/SymmetricAlgorithmTests.cpp | 233 +++- SoftHSMv2/src/lib/test/SymmetricAlgorithmTests.h | 7 +- SoftHSMv2/src/lib/win32/dllmain.cc | 18 - SoftHSMv2/src/lib/win32/setenv.cpp | 20 - SoftHSMv2/src/lib/win32/setenv.h | 12 - SoftHSMv2/src/lib/win32/syslog.cpp | 69 -- SoftHSMv2/src/lib/win32/syslog.h | 46 - SoftHSMv2/testing/appveyor/APPVEYOR-NOTES.MD | 27 - SoftHSMv2/testing/appveyor/appveyor_build.bat | 51 - .../appveyor/appveyor_download_requirements.ps1 | 80 -- SoftHSMv2/win32/.gitignore | 35 - SoftHSMv2/win32/Configure.py | 1167 -------------------- SoftHSMv2/win32/config.h.in | 185 ---- .../win32/convarch/convarch.vcxproj.filters.in | 928 ---------------- SoftHSMv2/win32/convarch/convarch.vcxproj.in | 374 ------- SoftHSMv2/win32/convarch/convarch.vcxproj.user | 3 - .../win32/cryptotest/cryptotest.vcxproj.filters | 123 --- SoftHSMv2/win32/cryptotest/cryptotest.vcxproj.in | 127 --- SoftHSMv2/win32/cryptotest/cryptotest.vcxproj.user | 3 - .../win32/datamgrtest/datamgrtest.vcxproj.filters | 54 - SoftHSMv2/win32/datamgrtest/datamgrtest.vcxproj.in | 104 -- .../win32/datamgrtest/datamgrtest.vcxproj.user | 3 - SoftHSMv2/win32/dump/dump.vcxproj.filters | 33 - SoftHSMv2/win32/dump/dump.vcxproj.in | 95 -- SoftHSMv2/win32/dump/dump.vcxproj.user | 3 - .../handlemgrtest/handlemgrtest.vcxproj.filters | 42 - .../win32/handlemgrtest/handlemgrtest.vcxproj.in | 100 -- .../win32/handlemgrtest/handlemgrtest.vcxproj.user | 3 - SoftHSMv2/win32/keyconv/keyconv.vcxproj.filters.in | 88 -- SoftHSMv2/win32/keyconv/keyconv.vcxproj.in | 116 -- SoftHSMv2/win32/keyconv/keyconv.vcxproj.user | 3 - .../objstoretest/objstoretest.vcxproj.filters | 84 -- .../win32/objstoretest/objstoretest.vcxproj.in | 114 -- .../win32/objstoretest/objstoretest.vcxproj.user | 3 - SoftHSMv2/win32/p11test/p11test.vcxproj.filters | 181 --- SoftHSMv2/win32/p11test/p11test.vcxproj.in | 159 --- SoftHSMv2/win32/p11test/p11test.vcxproj.user | 3 - .../sessionmgrtest/sessionmgrtest.vcxproj.filters | 42 - .../win32/sessionmgrtest/sessionmgrtest.vcxproj.in | 100 -- .../sessionmgrtest/sessionmgrtest.vcxproj.user | 3 - .../win32/slotmgrtest/slotmgrtest.vcxproj.filters | 42 - SoftHSMv2/win32/slotmgrtest/slotmgrtest.vcxproj.in | 100 -- .../win32/slotmgrtest/slotmgrtest.vcxproj.user | 3 - SoftHSMv2/win32/softhsm2.sln.in | 117 -- SoftHSMv2/win32/softhsm2/softhsm2.vcxproj.filters | 63 -- SoftHSMv2/win32/softhsm2/softhsm2.vcxproj.in | 107 -- SoftHSMv2/win32/softhsm2/softhsm2.vcxproj.user | 3 - SoftHSMv2/win32/util/util.vcxproj.filters.in | 108 -- SoftHSMv2/win32/util/util.vcxproj.in | 130 --- SoftHSMv2/win32/util/util.vcxproj.user | 3 - TPM2-Plugin/.gitignore | 8 + build.sh | 30 + 70 files changed, 455 insertions(+), 6420 deletions(-) delete mode 100644 SoftHSMv2/.appveyor.yml delete mode 100644 SoftHSMv2/WIN32-NOTES.md delete mode 100644 SoftHSMv2/src/bin/win32/getopt.cpp delete mode 100644 SoftHSMv2/src/bin/win32/getopt.h delete mode 100644 SoftHSMv2/src/bin/win32/getpassphase.cpp delete mode 100644 SoftHSMv2/src/lib/win32/dllmain.cc delete mode 100644 SoftHSMv2/src/lib/win32/setenv.cpp delete mode 100644 SoftHSMv2/src/lib/win32/setenv.h delete mode 100644 SoftHSMv2/src/lib/win32/syslog.cpp delete mode 100644 SoftHSMv2/src/lib/win32/syslog.h delete mode 100644 SoftHSMv2/testing/appveyor/APPVEYOR-NOTES.MD delete mode 100644 SoftHSMv2/testing/appveyor/appveyor_build.bat delete mode 100644 SoftHSMv2/testing/appveyor/appveyor_download_requirements.ps1 delete mode 100644 SoftHSMv2/win32/.gitignore delete mode 100644 SoftHSMv2/win32/Configure.py delete mode 100644 SoftHSMv2/win32/config.h.in delete mode 100644 SoftHSMv2/win32/convarch/convarch.vcxproj.filters.in delete mode 100644 SoftHSMv2/win32/convarch/convarch.vcxproj.in delete mode 100644 SoftHSMv2/win32/convarch/convarch.vcxproj.user delete mode 100644 SoftHSMv2/win32/cryptotest/cryptotest.vcxproj.filters delete mode 100644 SoftHSMv2/win32/cryptotest/cryptotest.vcxproj.in delete mode 100644 SoftHSMv2/win32/cryptotest/cryptotest.vcxproj.user delete mode 100644 SoftHSMv2/win32/datamgrtest/datamgrtest.vcxproj.filters delete mode 100644 SoftHSMv2/win32/datamgrtest/datamgrtest.vcxproj.in delete mode 100644 SoftHSMv2/win32/datamgrtest/datamgrtest.vcxproj.user delete mode 100644 SoftHSMv2/win32/dump/dump.vcxproj.filters delete mode 100644 SoftHSMv2/win32/dump/dump.vcxproj.in delete mode 100644 SoftHSMv2/win32/dump/dump.vcxproj.user delete mode 100644 SoftHSMv2/win32/handlemgrtest/handlemgrtest.vcxproj.filters delete mode 100644 SoftHSMv2/win32/handlemgrtest/handlemgrtest.vcxproj.in delete mode 100644 SoftHSMv2/win32/handlemgrtest/handlemgrtest.vcxproj.user delete mode 100644 SoftHSMv2/win32/keyconv/keyconv.vcxproj.filters.in delete mode 100644 SoftHSMv2/win32/keyconv/keyconv.vcxproj.in delete mode 100644 SoftHSMv2/win32/keyconv/keyconv.vcxproj.user delete mode 100644 SoftHSMv2/win32/objstoretest/objstoretest.vcxproj.filters delete mode 100644 SoftHSMv2/win32/objstoretest/objstoretest.vcxproj.in delete mode 100644 SoftHSMv2/win32/objstoretest/objstoretest.vcxproj.user delete mode 100644 SoftHSMv2/win32/p11test/p11test.vcxproj.filters delete mode 100644 SoftHSMv2/win32/p11test/p11test.vcxproj.in delete mode 100644 SoftHSMv2/win32/p11test/p11test.vcxproj.user delete mode 100644 SoftHSMv2/win32/sessionmgrtest/sessionmgrtest.vcxproj.filters delete mode 100644 SoftHSMv2/win32/sessionmgrtest/sessionmgrtest.vcxproj.in delete mode 100644 SoftHSMv2/win32/sessionmgrtest/sessionmgrtest.vcxproj.user delete mode 100644 SoftHSMv2/win32/slotmgrtest/slotmgrtest.vcxproj.filters delete mode 100644 SoftHSMv2/win32/slotmgrtest/slotmgrtest.vcxproj.in delete mode 100644 SoftHSMv2/win32/slotmgrtest/slotmgrtest.vcxproj.user delete mode 100644 SoftHSMv2/win32/softhsm2.sln.in delete mode 100644 SoftHSMv2/win32/softhsm2/softhsm2.vcxproj.filters delete mode 100644 SoftHSMv2/win32/softhsm2/softhsm2.vcxproj.in delete mode 100644 SoftHSMv2/win32/softhsm2/softhsm2.vcxproj.user delete mode 100644 SoftHSMv2/win32/util/util.vcxproj.filters.in delete mode 100644 SoftHSMv2/win32/util/util.vcxproj.in delete mode 100644 SoftHSMv2/win32/util/util.vcxproj.user create mode 100644 TPM2-Plugin/.gitignore create mode 100644 build.sh diff --git a/SoftHSMv2/.appveyor.yml b/SoftHSMv2/.appveyor.yml deleted file mode 100644 index 121d805..0000000 --- a/SoftHSMv2/.appveyor.yml +++ /dev/null @@ -1,63 +0,0 @@ -version: 2.2.{build} -configuration: Release -platform: -- x86 -- x64 -init: -- ps: >- - If ($env:Platform -Match "x86") { - $env:VCVARS_PLATFORM="x86" - $env:MSBUILD_PLATFORM="Win32" - $env:ENV_PLATFORM="x86" - $env:CONFIGURE_OPTIONS="disable-debug $env:ADDITIONAL_CONFIGURE_OPTIONS" - } Else { - $env:VCVARS_PLATFORM="amd64" - $env:MSBUILD_PLATFORM="x64" - $env:ENV_PLATFORM="x64" - $env:CONFIGURE_OPTIONS="enable-64bit disable-debug $env:ADDITIONAL_CONFIGURE_OPTIONS" - } - - - $CURRENT_DIR_PATH = (Get-Item -Path ".\" -Verbose).FullName - - $env:BUILD_DIR = Join-Path $CURRENT_DIR_PATH build - - $env:CRYPTO_PACKAGE= "$env:CRYPTO_PACKAGE_NAME-$env:ENV_PLATFORM.zip" - - $env:CRYPTO_PACKAGE_PATH = Join-Path $env:BUILD_DIR "$env:CRYPTO_PACKAGE_NAME-$env:ENV_PLATFORM" - - $env:CPPUNIT_VERSION_NAME = "CppUnit-1.13.2" - - $env:CPPUNIT_PACKAGE_NAME = "cppunit-1.13.2" - - $env:CPPUNIT_PACKAGE = "$env:CPPUNIT_PACKAGE_NAME-$env:ENV_PLATFORM.zip" - - $env:PYTHON_PATH = Join-Path $env:BUILD_DIR python - - $env:CPPUNIT_PATH = Join-Path $env:BUILD_DIR "$env:CPPUNIT_PACKAGE_NAME-$env:ENV_PLATFORM" - - $env:PYTHON_EXE = Join-Path $env:PYTHON_PATH python.exe - - $env:RELEASE_DIR=Join-Path $env:BUILD_DIR "SoftHSMv2-$env:ENV_PLATFORM" - - $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 - - CRYPTO_BACKEND: botan - PACKAGE_VERSION_NAME: Botan-1.10.13 - CRYPTO_PACKAGE_NAME: botan-1.10.13 - - CRYPTO_BACKEND: openssl - PACKAGE_VERSION_NAME: OpenSSL-1.1.0b - CRYPTO_PACKAGE_NAME: openssl-1.1.0b - ADDITIONAL_CONFIGURE_OPTIONS: disable-gost -install: -- cmd: powershell -File testing/appveyor/appveyor_download_requirements.ps1 -build_script: -- cmd: testing/appveyor/appveyor_build.bat -test: off -artifacts: -- path: build/SoftHSMv2-$(Platform) - name: SoftHSMv2-$(PACKAGE_VERSION_NAME)-$(Platform) diff --git a/SoftHSMv2/.gitignore b/SoftHSMv2/.gitignore index 88488d9..6fa8deb 100644 --- a/SoftHSMv2/.gitignore +++ b/SoftHSMv2/.gitignore @@ -9,8 +9,6 @@ compile py-compile confdefs.h config.* -!win32+botan/config.h -!win32+openssl/config.h configure conftest conftest.c @@ -37,12 +35,6 @@ test-driver *.la *.a -# Shared objects (inc. Windows DLLs) -*.dll -*.so -*.so.* -*.dylib - # Test outputs *.log *.trs @@ -73,7 +65,6 @@ src/lib/handle_mgr/test/handlemgrtest src/lib/object_store/test/objstoretest src/lib/session_mgr/test/sessionmgrtest src/lib/slot_mgr/test/slotmgrtest -src/lib/test/p11test src/lib/test/softhsm2-alt.conf src/lib/test/softhsm2.conf src/lib/test/tokens/64d6c3fe-1575-1736-1d26-5ccb28440ea7/ diff --git a/SoftHSMv2/Makefile.am b/SoftHSMv2/Makefile.am index a6573a3..cfc0c62 100644 --- a/SoftHSMv2/Makefile.am +++ b/SoftHSMv2/Makefile.am @@ -22,44 +22,4 @@ EXTRA_DIST = $(srcdir)/aes_wrap_key_with_pad/botan-diff \ $(srcdir)/LICENSE \ $(srcdir)/m4/*.m4 \ $(srcdir)/OSX-NOTES.md \ - $(srcdir)/README.md \ - $(srcdir)/win32/config.h.in \ - $(srcdir)/win32/Configure.py \ - $(srcdir)/win32/convarch/convarch.vcxproj.in \ - $(srcdir)/win32/convarch/convarch.vcxproj.filters.in \ - $(srcdir)/win32/convarch/convarch.vcxproj.user \ - $(srcdir)/win32/cryptotest/cryptotest.vcxproj.in \ - $(srcdir)/win32/cryptotest/cryptotest.vcxproj.filters \ - $(srcdir)/win32/cryptotest/cryptotest.vcxproj.user \ - $(srcdir)/win32/datamgrtest/datamgrtest.vcxproj.in \ - $(srcdir)/win32/datamgrtest/datamgrtest.vcxproj.filters \ - $(srcdir)/win32/datamgrtest/datamgrtest.vcxproj.user \ - $(srcdir)/win32/dump/dump.vcxproj.in \ - $(srcdir)/win32/dump/dump.vcxproj.filters \ - $(srcdir)/win32/dump/dump.vcxproj.user \ - $(srcdir)/win32/handlemgrtest/handlemgrtest.vcxproj.in \ - $(srcdir)/win32/handlemgrtest/handlemgrtest.vcxproj.filters \ - $(srcdir)/win32/handlemgrtest/handlemgrtest.vcxproj.user \ - $(srcdir)/win32/keyconv/keyconv.vcxproj.in \ - $(srcdir)/win32/keyconv/keyconv.vcxproj.filters.in \ - $(srcdir)/win32/keyconv/keyconv.vcxproj.user \ - $(srcdir)/win32/objstoretest/objstoretest.vcxproj.in \ - $(srcdir)/win32/objstoretest/objstoretest.vcxproj.filters \ - $(srcdir)/win32/objstoretest/objstoretest.vcxproj.user \ - $(srcdir)/win32/p11test/p11test.vcxproj.in \ - $(srcdir)/win32/p11test/p11test.vcxproj.filters \ - $(srcdir)/win32/p11test/p11test.vcxproj.user \ - $(srcdir)/win32/sessionmgrtest/sessionmgrtest.vcxproj.in \ - $(srcdir)/win32/sessionmgrtest/sessionmgrtest.vcxproj.filters \ - $(srcdir)/win32/sessionmgrtest/sessionmgrtest.vcxproj.user \ - $(srcdir)/win32/slotmgrtest/slotmgrtest.vcxproj.in \ - $(srcdir)/win32/slotmgrtest/slotmgrtest.vcxproj.filters \ - $(srcdir)/win32/slotmgrtest/slotmgrtest.vcxproj.user \ - $(srcdir)/win32/softhsm2/softhsm2.vcxproj.in \ - $(srcdir)/win32/softhsm2/softhsm2.vcxproj.filters \ - $(srcdir)/win32/softhsm2/softhsm2.vcxproj.user \ - $(srcdir)/win32/softhsm2.sln.in \ - $(srcdir)/win32/util/util.vcxproj.in \ - $(srcdir)/win32/util/util.vcxproj.filters.in \ - $(srcdir)/win32/util/util.vcxproj.user \ - $(srcdir)/WIN32-NOTES.md + $(srcdir)/README.md diff --git a/SoftHSMv2/NEWS b/SoftHSMv2/NEWS index 5d209ec..feae4e4 100644 --- a/SoftHSMv2/NEWS +++ b/SoftHSMv2/NEWS @@ -1,7 +1,8 @@ NEWS for SoftHSM -- History of user visible changes -SoftHSM develop +SoftHSM 2.4.0 - 2017-02-27 +* Issue #135: Support PKCS#8 for GOST. * Issue #140: Support for CKA_ALLOWED_MECHANISMS. (Patch from Brad Hess) * Issue #141: Support CKA_ALWAYS_AUTHENTICATE for private key objects. @@ -18,7 +19,6 @@ SoftHSM develop * Issue #348: Document that OSX needs pkg-config to detect cppunit. * Issue #349: softhsm2-util will check the configuration and report any issues before loading the PKCS#11 library. -* Issue #351: Upgrade Botan in Jenkins build. Bugfixes: * Issue #345: Private objects are presented to security officer in search diff --git a/SoftHSMv2/WIN32-NOTES.md b/SoftHSMv2/WIN32-NOTES.md deleted file mode 100644 index a3ce7ab..0000000 --- a/SoftHSMv2/WIN32-NOTES.md +++ /dev/null @@ -1,311 +0,0 @@ -# Building SoftHSM2 for Windows - -This document describes process of building both 32-bit and 64-bit versions of SoftHSM2 on 64-bit Windows 8.1 machine. -Either OpenSSL or Botan can be used as the crypto backend. - -## Required software - -- [Visual Studio](https://www.visualstudio.com/products/visual-studio-community-vs) (2015 Community) -- [GNU Privacy Guard for Windows](http://www.gpg4win.org/) (2.2.5) -- [7-zip](http://www.7-zip.org/) (9.20) -- [Strawberry Perl](http://strawberryperl.com/) (5.22.0.1) -- [The Netwide Assembler](http://www.nasm.us/) (2.11.08) -- [Python](https://www.python.org/downloads/windows/) (3.4.2) - -## Prepare working directories - - mkdir C:\build\bin\ - mkdir C:\build\src\ - -## Build OpenSSL 1.0.2d static library - -Download [OpenSSL 1.0.2d](http://openssl.org/source/openssl-1.0.2d.tar.gz) with [its signature](http://openssl.org/source/openssl-1.0.2d.tar.gz.asc) into `C:\build\src\` directory and verify signature of the downloaded archive: - - cd C:\build\src\ - gpg --keyserver pgp.mit.edu --recv-keys 0E604491 - gpg --verify openssl-1.0.2d.tar.gz.asc openssl-1.0.2d.tar.gz - -### 32-bit - -Extract archive `openssl-1.0.2d.tar.gz` into `C:\build\src\openssl-1.0.2d-x86` directory: - - cd C:\build\src\ - "C:\Program Files\7-Zip\7z" x openssl-1.0.2d.tar.gz - "C:\Program Files\7-Zip\7z" x openssl-1.0.2d.tar - rename openssl-1.0.2d openssl-1.0.2d-x86 - del openssl-1.0.2d.tar* - -In a **new command line window** build OpenSSL and install it into `C:\build\bin\openssl-1.0.2d-x86` directory: - - cd C:\build\src\openssl-1.0.2d-x86 - set PATH=%PATH%;C:\nasm - "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" - perl Configure VC-WIN32 --prefix=C:\build\bin\openssl-1.0.2d-x86 enable-static-engine - ms\do_nasm - nmake /f ms\nt.mak - nmake /f ms\nt.mak test - nmake /f ms\nt.mak install - -## 64-bit - -Extract archive `openssl-1.0.2d.tar.gz` into `C:\build\src\openssl-1.0.2d-x64` directory: - - cd C:\build\src\ - "C:\Program Files\7-Zip\7z" x openssl-1.0.2d.tar.gz - "C:\Program Files\7-Zip\7z" x openssl-1.0.2d.tar - rename openssl-1.0.2d openssl-1.0.2d-x64 - del openssl-1.0.2d.tar* - -In a **new command line window** build OpenSSL and install it into `C:\build\bin\openssl-1.0.2d-x64` directory: - - cd C:\build\src\openssl-1.0.2d-x64 - set PATH=%PATH%;C:\nasm - "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 - perl Configure VC-WIN64A --prefix=C:\build\bin\openssl-1.0.2d-x64 enable-static-engine - ms\do_win64a - nmake /f ms\nt.mak - nmake /f ms\nt.mak test - nmake /f ms\nt.mak install - -## Build OpenSSL 1.1.0a static library - -Download [OpenSSL 1.1.0a](https://www.openssl.org/source/openssl-1.1.0a.tar.gz) with [its signature](https://www.openssl.org/source/openssl-1.1.0a.tar.gz.asc) into `C:\build\src\` directory and verify signature of the downloaded archive: - - cd C:\build\src\ - gpg --keyserver pgp.mit.edu --recv-keys 0E604491 - gpg --verify openssl-1.1.0a.tar.gz.asc openssl-1.1.0a.tar.gz - -### 32-bit - -Extract archive `openssl-1.1.0a.tar.gz` into `C:\build\src\openssl-1.1.0a-x86` directory: - - cd C:\build\src\ - "C:\Program Files\7-Zip\7z" x openssl-1.1.0a.tar.gz - "C:\Program Files\7-Zip\7z" x openssl-1.1.0a.tar - rename openssl-1.1.0a openssl-1.1.0a-x86 - del openssl-1.1.0a.tar* - -In a **new command line window** build OpenSSL and install it into `C:\build\bin\openssl-1.1.0a-x86` directory: - - cd C:\build\src\openssl-1.1.0a-x86 - set PATH=%PATH%;C:\nasm - "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" - perl Configure VC-WIN32 --prefix=C:\build\bin\openssl-1.1.0a-x86 --openssldir=C:\build\bin\openssl-1.1.0a-x86\ssl no-shared - nmake - nmake test - nmake install - -## 64-bit - -Extract archive `openssl-1.1.0a.tar.gz` into `C:\build\src\openssl-1.1.0a-x64` directory: - - cd C:\build\src\ - "C:\Program Files\7-Zip\7z" x openssl-1.1.0a.tar.gz - "C:\Program Files\7-Zip\7z" x openssl-1.1.0a.tar - rename openssl-1.1.0a openssl-1.1.0a-x64 - del openssl-1.1.0a.tar* - -In a **new command line window** build OpenSSL and install it into `C:\build\bin\openssl-1.1.0a-x64` directory: - - cd C:\build\src\openssl-1.1.0a-x64 - set PATH=%PATH%;C:\nasm - "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 - perl Configure VC-WIN64A --prefix=C:\build\bin\openssl-1.1.0a-x64 --openssldir=C:\build\bin\openssl-1.1.0a-x64\ssl no-shared - nmake - nmake test - nmake install - -## Build Botan 1.10.10 - -Download [Botan 1.10.10](http://botan.randombit.net/releases/Botan-1.10.10.tgz) with [its signature](http://botan.randombit.net/releases/Botan-1.10.10.tgz.asc) into `C:\build\src\` directory and verify signature of the downloaded archive: - - cd C:\build\src\ - gpg --keyserver pgp.mit.edu --recv-keys EFBADFBC - gpg --verify Botan-1.10.10.tgz.asc Botan-1.10.10.tgz - -### 32-bit - -Extract archive `Botan-1.10.10.tgz` into `C:\build\src\botan-1.10.10-x86` directory: - - cd C:\build\src\ - rename Botan-1.10.10.tgz Botan-1.10.10.tar.gz - "C:\Program Files\7-Zip\7z" x Botan-1.10.10.tar.gz - "C:\Program Files\7-Zip\7z" x Botan-1.10.10.tgz - rename Botan-1.10.10 botan-1.10.10-x86 - del Botan-1.10.10.t* - -In a **new command line window as admin** build Botan and install it into `C:\build\bin\botan-1.10.10-x86` directory. Need to run the configure script as admin so it can link objects: - - cd C:\build\src\botan-1.10.10-x86 - "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" - python configure.py --cc=msvc --cpu=x86 --prefix=C:\build\bin\botan-1.10.10-x86 - nmake - nmake check - check.exe --validate - nmake install - -## 64-bit - -Extract archive `Botan-1.10.10.tgz` into `C:\build\src\botan-1.10.10-x64` directory: - - cd C:\build\src\ - rename Botan-1.10.10.tgz Botan-1.10.10.tar.gz - "C:\Program Files\7-Zip\7z" x Botan-1.10.10.tar.gz - "C:\Program Files\7-Zip\7z" x Botan-1.10.10.tgz - rename Botan-1.10.10 botan-1.10.10-x64 - del Botan-1.10.10.t* - -In a **new command line window as admin** build Botan and install it into `C:\build\bin\botan-1.10.10-x64` directory. Need to run the configure script as admin so it can link objects: - - cd C:\build\src\botan-1.10.10-x64 - "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 - python configure.py --cc=msvc --cpu=x64 --prefix=C:\build\bin\botan-1.10.10-x64 - nmake - nmake check - check.exe --validate - nmake install - -## Build CppUnit 1.13.2 unicode library - -Download [CppUnit 1.13.2](http://dev-www.libreoffice.org/src/cppunit-1.13.2.tar.gz) into `C:\build\src\` directory. - -### 32-bit - -Extract archive `cppunit-1.13.2.tar.gz` into `C:\build\src\cppunit-1.13.2-x86` directory: - - cd C:\build\src\ - "C:\Program Files\7-Zip\7z" x cppunit-1.13.2.tar.gz - "C:\Program Files\7-Zip\7z" x cppunit-1.13.2.tar - rename cppunit-1.13.2 cppunit-1.13.2-x86 - del cppunit-1.13.2.tar* - -Open solution `C:\build\src\cppunit-1.13.2-x86\src\CppUnitLibraries2010.sln` in Visual Studio and rebuild the source with `Release Unicode\Win32` solution configuration. - -(If you want to compile SoftHSM with static CRT, then you must also compile CppUnit with static CRT. Change "Runtime Library" to "Multi-threaded (/MT)" in the project "cppunit". This will create some build errors for project "TestRunner", but that can be ignored since it is not used by SoftHSM.) - -Copy the results into `C:\build\bin\cppunit-1.13.2-x86` directory: - - mkdir C:\build\bin\cppunit-1.13.2-x86\lib - xcopy C:\build\src\cppunit-1.13.2-x86\lib C:\build\bin\cppunit-1.13.2-x86\lib /E - mkdir C:\build\bin\cppunit-1.13.2-x86\include - xcopy C:\build\src\cppunit-1.13.2-x86\include C:\build\bin\cppunit-1.13.2-x86\include /E - -### 64-bit - -Extract archive `cppunit-1.13.2.tar.gz` into `C:\build\src\cppunit-1.13.2-x64` directory: - - cd C:\build\src\ - "C:\Program Files\7-Zip\7z" x cppunit-1.13.2.tar.gz - "C:\Program Files\7-Zip\7z" x cppunit-1.13.2.tar - rename cppunit-1.13.2 cppunit-1.13.2-x64 - del cppunit-1.13.2.tar* - -Open solution `C:\build\src\cppunit-1.13.2-x64\src\CppUnitLibraries2010.sln` in Visual Studio and rebuild the source with `Release Unicode\x64` solution configuration. - -(If you want to compile SoftHSM with static CRT, then you must also compile CppUnit with static CRT. Change "Runtime Library" to "Multi-threaded (/MT)" in the project "cppunit". This will create some build errors for project "TestRunner", but that can be ignored since it is not used by SoftHSM.) - -Copy the results into `C:\build\bin\cppunit-1.13.2-x64` directory: - - mkdir C:\build\bin\cppunit-1.13.2-x64\lib - xcopy C:\build\src\cppunit-1.13.2-x64\lib C:\build\bin\cppunit-1.13.2-x64\lib /E - mkdir C:\build\bin\cppunit-1.13.2-x64\include - xcopy C:\build\src\cppunit-1.13.2-x64\include C:\build\bin\cppunit-1.13.2-x64\include /E - -## Build SoftHSM - -Download the latest version of [SoftHSMv2](https://dist.opendnssec.org/source/) with its signature into `C:\build\src\` directory and verify signature of the downloaded archive: - - cd C:\build\src\ - gpg --keyserver pgp.mit.edu --recv-keys 4EE17CD2 - gpg --verify softhsm-2.x.y.tar.gz.sig softhsm-2.x.y.tar.gz - "C:\Program Files\7-Zip\7z" x softhsm-2.x.y.tar.gz - "C:\Program Files\7-Zip\7z" x softhsm-2.x.y.tar - rename softhsm-2.x.y SoftHSMv2 - del softhsm-2.x.y.tar* - -Or clone the source code from GitHub: - - cd C:\build\src\ - git clone https://github.com/opendnssec/SoftHSMv2.git - -### 32-bit - -Configure build process in a **new command line window**: - - cd C:\build\src\SoftHSMv2\win32\ - "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" - -OpenSSL (OpenSSL GOST engine does not support OpenSSL 1.1.0) or Botan crypto backend: - - python Configure.py disable-debug disable-gost with-crypto-backend=openssl with-openssl=C:\build\bin\openssl-1.1.0a-x86\ with-cppunit=C:\build\bin\cppunit-1.13.2-x86\ - python Configure.py disable-debug with-crypto-backend=botan with-botan=C:\build\bin\botan-1.10.10-x86\ with-cppunit=C:\build\bin\cppunit-1.13.2-x86\ - -(Add option enable-static-runtime if you want to compile with static CRT (/MT)) - -Open solution `C:\build\src\SoftHSMv2\win32\softhsm2.sln` in Visual Studio and rebuild the source with `Release\Win32` solution configuration. - -Verify the build by running the test programs: - - C:\build\src\SoftHSMv2\win32\Release\cryptotest.exe - C:\build\src\SoftHSMv2\win32\Release\datamgrtest.exe - C:\build\src\SoftHSMv2\win32\Release\handlemgrtest.exe - C:\build\src\SoftHSMv2\win32\Release\objstoretest.exe - C:\build\src\SoftHSMv2\win32\Release\p11test.exe - C:\build\src\SoftHSMv2\win32\Release\sessionmgrtest.exe - C:\build\src\SoftHSMv2\win32\Release\slotmgrtest.exe - -Copy the results into `C:\build\bin\SoftHSMv2-x86` directory: - - mkdir C:\build\bin\SoftHSMv2-x86 - mkdir C:\build\bin\SoftHSMv2-x86\tokens - copy C:\build\src\SoftHSMv2\win32\Release\softhsm2.dll C:\build\bin\SoftHSMv2-x86\ - copy C:\build\src\SoftHSMv2\win32\Release\softhsm2-dump-file.exe C:\build\bin\SoftHSMv2-x86\ - copy C:\build\src\SoftHSMv2\win32\Release\softhsm2-keyconv.exe C:\build\bin\SoftHSMv2-x86\ - copy C:\build\src\SoftHSMv2\win32\Release\softhsm2-util.exe C:\build\bin\SoftHSMv2-x86\ - copy C:\build\src\SoftHSMv2\src\lib\common\softhsm2.conf.in C:\build\bin\SoftHSMv2-x86\softhsm2.conf - -Replace `@softhsmtokendir@` with `C:\build\bin\SoftHSMv2-x86\tokens` in the file `C:\build\bin\SoftHSMv2-x86\softhsm2.conf` - -Set the environment variable SOFTHSM2_CONF to `C:\build\bin\SoftHSMv2-x86\softhsm2.conf` - -### 64-bit - -Configure build process in a **new command line window**: - - cd C:\build\src\SoftHSMv2\win32\ - "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 - -OpenSSL (OpenSSL GOST engine does not support OpenSSL 1.1.0) or Botan crypto backend: - - python Configure.py enable-64bit disable-debug disable-gost with-crypto-backend=openssl with-openssl=C:\build\bin\openssl-1.1.0a-x64\ with-cppunit=C:\build\bin\cppunit-1.13.2-x64\ - python Configure.py enable-64bit disable-debug with-crypto-backend=botan with-botan=C:\build\bin\botan-1.10.10-x64\ with-cppunit=C:\build\bin\cppunit-1.13.2-x64\ - -(Add option enable-static-runtime if you want to compile with static CRT (/MT)) - -Open solution `C:\build\src\SoftHSMv2\win32\softhsm2.sln` in Visual Studio and rebuild the source with `Release\x64` solution configuration. - -Verify the build by running the test programs: - - C:\build\src\SoftHSMv2\win32\x64\Release\cryptotest.exe - C:\build\src\SoftHSMv2\win32\x64\Release\datamgrtest.exe - C:\build\src\SoftHSMv2\win32\x64\Release\handlemgrtest.exe - C:\build\src\SoftHSMv2\win32\x64\Release\objstoretest.exe - C:\build\src\SoftHSMv2\win32\x64\Release\p11test.exe - C:\build\src\SoftHSMv2\win32\x64\Release\sessionmgrtest.exe - C:\build\src\SoftHSMv2\win32\x64\Release\slotmgrtest.exe - -Copy the results into `C:\build\bin\SoftHSMv2-x64` directory: - - mkdir C:\build\bin\SoftHSMv2-x64 - mkdir C:\build\bin\SoftHSMv2-x64\tokens - copy C:\build\src\SoftHSMv2\win32\x64\Release\softhsm2.dll C:\build\bin\SoftHSMv2-x64\ - copy C:\build\src\SoftHSMv2\win32\x64\Release\softhsm2-dump-file.exe C:\build\bin\SoftHSMv2-x64\ - copy C:\build\src\SoftHSMv2\win32\x64\Release\softhsm2-keyconv.exe C:\build\bin\SoftHSMv2-x64\ - copy C:\build\src\SoftHSMv2\win32\x64\Release\softhsm2-util.exe C:\build\bin\SoftHSMv2-x64\ - copy C:\build\src\SoftHSMv2\src\lib\common\softhsm2.conf.in C:\build\bin\SoftHSMv2-x64\softhsm2.conf - -Replace `@softhsmtokendir@` with `C:\build\bin\SoftHSMv2-x64\tokens` in the file `C:\build\bin\SoftHSMv2-x64\softhsm2.conf` - -Set the environment variable SOFTHSM2_CONF to `C:\build\bin\SoftHSMv2-x64\softhsm2.conf` - -## Continue reading in the README diff --git a/SoftHSMv2/configure.ac b/SoftHSMv2/configure.ac index 7a9e665..216dd46 100644 --- a/SoftHSMv2/configure.ac +++ b/SoftHSMv2/configure.ac @@ -2,12 +2,12 @@ # # # Version # # # -################ +################## # Program version define([SOFTHSM_VERSION_MAJOR], [2]) -define([SOFTHSM_VERSION_MINOR], [3]) +define([SOFTHSM_VERSION_MINOR], [4]) define([SOFTHSM_VERSION_FIX], [0]) define([PACKAGE_SUFFIX], []) @@ -20,7 +20,7 @@ define([PACKAGE_SUFFIX], []) define([SOFTHSM_VERSION_CURRENT], [2]) define([SOFTHSM_VERSION_AGE], [1]) -define([SOFTHSM_VERSION_REVISION], [3]) +define([SOFTHSM_VERSION_REVISION], [4]) ################## # # diff --git a/SoftHSMv2/src/bin/Makefile.am b/SoftHSMv2/src/bin/Makefile.am index 354c272..06a03d9 100644 --- a/SoftHSMv2/src/bin/Makefile.am +++ b/SoftHSMv2/src/bin/Makefile.am @@ -6,5 +6,4 @@ if BUILD_MIGRATE SUBDIRS += migrate endif -EXTRA_DIST = $(srcdir)/win32/*.cpp \ - $(srcdir)/win32/*.h +#EXTRA_DIST = diff --git a/SoftHSMv2/src/bin/win32/getopt.cpp b/SoftHSMv2/src/bin/win32/getopt.cpp deleted file mode 100644 index dfeabe2..0000000 --- a/SoftHSMv2/src/bin/win32/getopt.cpp +++ /dev/null @@ -1,520 +0,0 @@ -/*- - * Copyright (c) 2000 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Dieter Baron and Thomas Klausner. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include -#include -#include -#include - -#ifdef _WIN32 - -/* Windows needs warnx(). We change the definition though: - * 1. (another) global is defined, opterrmsg, which holds the error message - * 2. errors are always printed out on stderr w/o the program name - * Note that opterrmsg always gets set no matter what opterr is set to. The - * error message will not be printed if opterr is 0 as usual. - */ - -#include -#include - -extern char opterrmsg[128]; -char opterrmsg[128]; /* last error message is stored here */ - -static void warnx(int print_error, const char *fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - if (fmt != NULL) - _vsnprintf(opterrmsg, 128, fmt, ap); - else - opterrmsg[0]='\0'; - va_end(ap); - if (print_error) { - fprintf(stderr, opterrmsg); - fprintf(stderr, "\n"); - } -} - -#endif /*_WIN32*/ - -/* not part of the original file */ -#ifndef _DIAGASSERT -#define _DIAGASSERT(X) -#endif - -#if HAVE_CONFIG_H && !HAVE_GETOPT_LONG && !HAVE_DECL_OPTIND -#define REPLACE_GETOPT -#endif - -int opterr = 1; /* if error message should be printed */ -int optind = 1; /* index into parent argv vector */ -int optopt = '?'; /* character checked for validity */ -int optreset; /* reset getopt */ -char *optarg; /* argument associated with option */ - -#if !HAVE_GETOPT_LONG -#define IGNORE_FIRST (*options == '-' || *options == '+') -#define PRINT_ERROR ((opterr) && ((*options != ':') \ - || (IGNORE_FIRST && options[1] != ':'))) -#define IS_POSIXLY_CORRECT (getenv("POSIXLY_CORRECT") != NULL) -#define PERMUTE (!IS_POSIXLY_CORRECT && !IGNORE_FIRST) -/* XXX: GNU ignores PC if *options == '-' */ -#define IN_ORDER (!IS_POSIXLY_CORRECT && *options == '-') - -/* return values */ -#define BADCH (int)'?' -#define BADARG ((IGNORE_FIRST && options[1] == ':') \ - || (*options == ':') ? (int)':' : (int)'?') -#define INORDER (int)1 - -#define EMSG "" - -static int getopt_internal(int, char * const *, const char *); -static int gcd(int, int); -static void permute_args(int, int, int, char * const *); - -static char *place = EMSG; /* option letter processing */ - -/* XXX: set optreset to 1 rather than these two */ -static int nonopt_start = -1; /* first non option argument (for permute) */ -static int nonopt_end = -1; /* first option after non options (for permute) */ - -/* Error messages */ -static const char recargchar[] = "option requires an argument -- %c"; -static const char recargstring[] = "option requires an argument -- %s"; -static const char ambig[] = "ambiguous option -- %.*s"; -static const char noarg[] = "option doesn't take an argument -- %.*s"; -static const char illoptchar[] = "unknown option -- %c"; -static const char illoptstring[] = "unknown option -- %s"; - - -/* - * Compute the greatest common divisor of a and b. - */ -static int -gcd(int a, int b) -{ - int c; - - c = a % b; - while (c != 0) { - a = b; - b = c; - c = a % b; - } - - return b; -} - -/* - * Exchange the block from nonopt_start to nonopt_end with the block - * from nonopt_end to opt_end (keeping the same order of arguments - * in each block). - */ -static void -permute_args(int panonopt_start, int panonopt_end, - int opt_end, char * const *nargv) -{ - int cstart, cyclelen, i, j, ncycle, nnonopts, nopts, pos; - char *swap; - - _DIAGASSERT(nargv != NULL); - - /* - * compute lengths of blocks and number and size of cycles - */ - nnonopts = panonopt_end - panonopt_start; - nopts = opt_end - panonopt_end; - ncycle = gcd(nnonopts, nopts); - cyclelen = (opt_end - panonopt_start) / ncycle; - - for (i = 0; i < ncycle; i++) { - cstart = panonopt_end+i; - pos = cstart; - for (j = 0; j < cyclelen; j++) { - if (pos >= panonopt_end) - pos -= nnonopts; - else - pos += nopts; - swap = nargv[pos]; - /* LINTED const cast */ - ((char **) nargv)[pos] = nargv[cstart]; - /* LINTED const cast */ - ((char **)nargv)[cstart] = swap; - } - } -} - -/* - * getopt_internal -- - * Parse argc/argv argument vector. Called by user level routines. - * Returns -2 if -- is found (can be long option or end of options marker). - */ -static int -getopt_internal(int nargc, char * const *nargv, const char *options) -{ - char *oli; /* option letter list index */ - int optchar; - - _DIAGASSERT(nargv != NULL); - _DIAGASSERT(options != NULL); - - optarg = NULL; - - /* - * XXX Some programs (like rsyncd) expect to be able to - * XXX re-initialize optind to 0 and have getopt_long(3) - * XXX properly function again. Work around this braindamage. - */ - if (optind == 0) - optind = 1; - - if (optreset) - nonopt_start = nonopt_end = -1; -start: - if (optreset || !*place) { /* update scanning pointer */ - optreset = 0; - if (optind >= nargc) { /* end of argument vector */ - place = EMSG; - if (nonopt_end != -1) { - /* do permutation, if we have to */ - permute_args(nonopt_start, nonopt_end, - optind, nargv); - optind -= nonopt_end - nonopt_start; - } - else if (nonopt_start != -1) { - /* - * If we skipped non-options, set optind - * to the first of them. - */ - optind = nonopt_start; - } - nonopt_start = nonopt_end = -1; - return -1; - } - if ((*(place = nargv[optind]) != '-') - || (place[1] == '\0')) { /* found non-option */ - place = EMSG; - if (IN_ORDER) { - /* - * GNU extension: - * return non-option as argument to option 1 - */ - optarg = nargv[optind++]; - return INORDER; - } - if (!PERMUTE) { - /* - * if no permutation wanted, stop parsing - * at first non-option - */ - return -1; - } - /* do permutation */ - if (nonopt_start == -1) - nonopt_start = optind; - else if (nonopt_end != -1) { - permute_args(nonopt_start, nonopt_end, - optind, nargv); - nonopt_start = optind - - (nonopt_end - nonopt_start); - nonopt_end = -1; - } - optind++; - /* process next argument */ - goto start; - } - if (nonopt_start != -1 && nonopt_end == -1) - nonopt_end = optind; - if (place[1] && *++place == '-') { /* found "--" */ - place++; - return -2; - } - } - if ((optchar = (int)*place++) == (int)':' || - (oli = (char *) strchr(options + (IGNORE_FIRST ? 1 : 0), - optchar)) == NULL) { - /* option letter unknown or ':' */ - if (!*place) - ++optind; -#ifndef _WIN32 - if (PRINT_ERROR) - warnx(illoptchar, optchar); -#else - warnx(PRINT_ERROR, illoptchar, optchar); -#endif - optopt = optchar; - return BADCH; - } - if (optchar == 'W' && oli[1] == ';') { /* -W long-option */ - /* XXX: what if no long options provided (called by getopt)? */ - if (*place) - return -2; - - if (++optind >= nargc) { /* no arg */ - place = EMSG; -#ifndef _WIN32 - if (PRINT_ERROR) - warnx(recargchar, optchar); -#else - warnx(PRINT_ERROR, recargchar, optchar); -#endif - optopt = optchar; - return BADARG; - } else /* white space */ - place = nargv[optind]; - /* - * Handle -W arg the same as --arg (which causes getopt to - * stop parsing). - */ - return -2; - } - if (*++oli != ':') { /* doesn't take argument */ - if (!*place) - ++optind; - } else { /* takes (optional) argument */ - optarg = NULL; - if (*place) /* no white space */ - optarg = place; - /* XXX: disable test for :: if PC? (GNU doesn't) */ - else if (oli[1] != ':') { /* arg not optional */ - if (++optind >= nargc) { /* no arg */ - place = EMSG; -#ifndef _WIN32 - if (PRINT_ERROR) - warnx(recargchar, optchar); -#else - warnx(PRINT_ERROR, recargchar, optchar); -#endif - optopt = optchar; - return BADARG; - } else - optarg = nargv[optind]; - } - place = EMSG; - ++optind; - } - /* dump back option letter */ - return optchar; -} - -/* - * getopt -- - * Parse argc/argv argument vector. - * - * [eventually this will replace the real getopt] - */ -int -getopt(int nargc, char * const *nargv, const char *options) -{ - int retval; - - _DIAGASSERT(nargv != NULL); - _DIAGASSERT(options != NULL); - - if ((retval = getopt_internal(nargc, nargv, options)) == -2) { - ++optind; - /* - * We found an option (--), so if we skipped non-options, - * we have to permute. - */ - if (nonopt_end != -1) { - permute_args(nonopt_start, nonopt_end, optind, - nargv); - optind -= nonopt_end - nonopt_start; - } - nonopt_start = nonopt_end = -1; - retval = -1; - } - return retval; -} - -/* - * getopt_long -- - * Parse argc/argv argument vector. - */ -int -getopt_long(int nargc, - char * const *nargv, - const char *options, - const struct option *long_options, - int *idx) -{ - int retval; - - _DIAGASSERT(nargv != NULL); - _DIAGASSERT(options != NULL); - _DIAGASSERT(long_options != NULL); - /* idx may be NULL */ - - if ((retval = getopt_internal(nargc, nargv, options)) == -2) { - char *current_argv, *has_equal; - size_t current_argv_len; - int i, match; - - current_argv = place; - match = -1; - - optind++; - place = EMSG; - - if (*current_argv == '\0') { /* found "--" */ - /* - * We found an option (--), so if we skipped - * non-options, we have to permute. - */ - if (nonopt_end != -1) { - permute_args(nonopt_start, nonopt_end, - optind, nargv); - optind -= nonopt_end - nonopt_start; - } - nonopt_start = nonopt_end = -1; - return -1; - } - if ((has_equal = strchr(current_argv, '=')) != NULL) { - /* argument found (--option=arg) */ - current_argv_len = has_equal - current_argv; - has_equal++; - } else - current_argv_len = strlen(current_argv); - - for (i = 0; long_options[i].name; i++) { - /* find matching long option */ - if (strncmp(current_argv, long_options[i].name, - current_argv_len)) - continue; - - if (strlen(long_options[i].name) == - (unsigned)current_argv_len) { - /* exact match */ - match = i; - break; - } - if (match == -1) /* partial match */ - match = i; - else { - /* ambiguous abbreviation */ -#ifndef _WIN32 - if (PRINT_ERROR) - warnx(ambig, (int)current_argv_len, - current_argv); -#else - warnx(PRINT_ERROR, ambig, (int)current_argv_len, - current_argv); -#endif - optopt = 0; - return BADCH; - } - } - if (match != -1) { /* option found */ - if (long_options[match].has_arg == no_argument - && has_equal) { -#ifndef _WIN32 - if (PRINT_ERROR) - warnx(noarg, (int)current_argv_len, - current_argv); -#else - warnx(PRINT_ERROR, noarg, (int)current_argv_len, - current_argv); -#endif - /* - * XXX: GNU sets optopt to val regardless of - * flag - */ - if (long_options[match].flag == NULL) - optopt = long_options[match].val; - else - optopt = 0; - return BADARG; - } - if (long_options[match].has_arg == required_argument || - long_options[match].has_arg == optional_argument) { - if (has_equal) - optarg = has_equal; - else if (long_options[match].has_arg == - required_argument) { - /* - * optional argument doesn't use - * next nargv - */ - optarg = nargv[optind++]; - } - } - if ((long_options[match].has_arg == required_argument) - && (optarg == NULL)) { - /* - * Missing argument; leading ':' - * indicates no error should be generated - */ -#ifndef _WIN32 - if (PRINT_ERROR) - warnx(recargstring, current_argv); -#else - warnx(PRINT_ERROR, recargstring, current_argv); -#endif - /* - * XXX: GNU sets optopt to val regardless - * of flag - */ - if (long_options[match].flag == NULL) - optopt = long_options[match].val; - else - optopt = 0; - --optind; - return BADARG; - } - } else { /* unknown option */ -#ifndef _WIN32 - if (PRINT_ERROR) - warnx(illoptstring, current_argv); -#else - warnx(PRINT_ERROR, illoptstring, current_argv); -#endif - optopt = 0; - return BADCH; - } - if (long_options[match].flag) { - *long_options[match].flag = long_options[match].val; - retval = 0; - } else - retval = long_options[match].val; - if (idx) - *idx = match; - } - return retval; -} -#endif /* !GETOPT_LONG */ diff --git a/SoftHSMv2/src/bin/win32/getopt.h b/SoftHSMv2/src/bin/win32/getopt.h deleted file mode 100644 index f6b65a5..0000000 --- a/SoftHSMv2/src/bin/win32/getopt.h +++ /dev/null @@ -1,101 +0,0 @@ -/*- - * Copyright (c) 2000 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Dieter Baron and Thomas Klausner. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _GETOPT_H_ -#define _GETOPT_H_ - -#ifdef _WIN32 -/* from */ -# ifdef __cplusplus -# define __BEGIN_DECLS extern "C" { -# define __END_DECLS } -# else -# define __BEGIN_DECLS -# define __END_DECLS -# endif -# define __P(args) args -#endif - -/*#ifndef _WIN32 -#include -#include -#endif*/ - -/* - * Gnu like getopt_long() and BSD4.4 getsubopt()/optreset extensions - */ -#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE) -#define no_argument 0 -#define required_argument 1 -#define optional_argument 2 - -struct option { - /* name of long option */ - const char *name; - /* - * one of no_argument, required_argument, and optional_argument: - * whether option takes an argument - */ - int has_arg; - /* if not NULL, set *flag to val when option found */ - int *flag; - /* if flag not NULL, value to set *flag to; else return value */ - int val; -}; - -__BEGIN_DECLS -int getopt_long __P((int, char * const *, const char *, - const struct option *, int *)); -__END_DECLS -#endif - -#ifdef _WIN32 -/* These are global getopt variables */ -__BEGIN_DECLS - -extern int opterr, /* if error message should be printed */ - optind, /* index into parent argv vector */ - optopt, /* character checked for validity */ - optreset; /* reset getopt */ -extern char* optarg; /* argument associated with option */ - -/* Original getopt */ -int getopt __P((int, char * const *, const char *)); - -__END_DECLS -#endif - -#endif /* !_GETOPT_H_ */ diff --git a/SoftHSMv2/src/bin/win32/getpassphase.cpp b/SoftHSMv2/src/bin/win32/getpassphase.cpp deleted file mode 100644 index 9d8aaca..0000000 --- a/SoftHSMv2/src/bin/win32/getpassphase.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/* WIN32 getpassphrase */ - -#include -#include - -char * -getpassphrase(const char *prompt) { - static char buf[128]; - HANDLE h; - DWORD cc, mode; - int cnt; - - h = GetStdHandle(STD_INPUT_HANDLE); - fputs(prompt, stderr); - fflush(stderr); - fflush(stdout); - FlushConsoleInputBuffer(h); - GetConsoleMode(h, &mode); - SetConsoleMode(h, ENABLE_PROCESSED_INPUT); - - for (cnt = 0; cnt < sizeof(buf) - 1; cnt++) - { - ReadFile(h, buf + cnt, 1, &cc, NULL); - if (buf[cnt] == '\r') - break; - fputc('*', stdout); - fflush(stderr); - fflush(stdout); - } - - SetConsoleMode(h, mode); - buf[cnt] = '\0'; - fputs("\n", stderr); - return (buf); -} diff --git a/SoftHSMv2/src/lib/Makefile.am b/SoftHSMv2/src/lib/Makefile.am index f3f5bb4..c579d62 100644 --- a/SoftHSMv2/src/lib/Makefile.am +++ b/SoftHSMv2/src/lib/Makefile.am @@ -46,7 +46,4 @@ SUBDIRS = common \ test EXTRA_DIST = $(srcdir)/*.h \ - $(srcdir)/pkcs11/*.h \ - $(srcdir)/win32/*.cc \ - $(srcdir)/win32/*.cpp \ - $(srcdir)/win32/*.h + $(srcdir)/pkcs11/*.h diff --git a/SoftHSMv2/src/lib/SoftHSM.cpp b/SoftHSMv2/src/lib/SoftHSM.cpp index b06efc2..7a23a8a 100644 --- a/SoftHSMv2/src/lib/SoftHSM.cpp +++ b/SoftHSMv2/src/lib/SoftHSM.cpp @@ -6130,6 +6130,11 @@ CK_RV SoftHSM::C_WrapKey // can be ecdh too but it doesn't matter alg = AsymAlgo::ECDSA; break; +#endif +#ifdef WITH_GOST + case CKK_GOSTR3410: + alg = AsymAlgo::GOST; + break; #endif default: return CKR_KEY_NOT_WRAPPABLE; @@ -6159,6 +6164,11 @@ CK_RV SoftHSM::C_WrapKey case CKK_EC: rv = getECPrivateKey((ECPrivateKey*)privateKey, token, key); break; +#endif +#ifdef WITH_GOST + case CKK_GOSTR3410: + rv = getGOSTPrivateKey((GOSTPrivateKey*)privateKey, token, key); + break; #endif } if (rv != CKR_OK) @@ -6568,10 +6578,18 @@ CK_RV SoftHSM::C_UnwrapKey { bOK = bOK && setDHPrivateKey(osobject, keydata, token, isPrivate != CK_FALSE); } +#ifdef WITH_ECC else if (keyType == CKK_EC) { bOK = bOK && setECPrivateKey(osobject, keydata, token, isPrivate != CK_FALSE); } +#endif +#ifdef WITH_GOST + else if (keyType == CKK_GOSTR3410) + { + bOK = bOK && setGOSTPrivateKey(osobject, keydata, token, isPrivate != CK_FALSE); + } +#endif else bOK = false; @@ -11083,6 +11101,7 @@ bool SoftHSM::setDHPrivateKey(OSObject* key, const ByteString &ber, Token* token return bOK; } + bool SoftHSM::setECPrivateKey(OSObject* key, const ByteString &ber, Token* token, bool isPrivate) const { AsymmetricAlgorithm* ecc = CryptoFactory::i()->getAsymmetricAlgorithm(AsymAlgo::ECDSA); @@ -11123,6 +11142,46 @@ bool SoftHSM::setECPrivateKey(OSObject* key, const ByteString &ber, Token* token return bOK; } +bool SoftHSM::setGOSTPrivateKey(OSObject* key, const ByteString &ber, Token* token, bool isPrivate) const +{ + AsymmetricAlgorithm* gost = CryptoFactory::i()->getAsymmetricAlgorithm(AsymAlgo::GOST); + if (gost == NULL) + return false; + PrivateKey* priv = gost->newPrivateKey(); + if (priv == NULL) + { + CryptoFactory::i()->recycleAsymmetricAlgorithm(gost); + return false; + } + if (!priv->PKCS8Decode(ber)) + { + gost->recyclePrivateKey(priv); + CryptoFactory::i()->recycleAsymmetricAlgorithm(gost); + return false; + } + // GOST Private Key Attributes + ByteString value; + ByteString param_a; + if (isPrivate) + { + token->encrypt(((GOSTPrivateKey*)priv)->getD(), value); + token->encrypt(((GOSTPrivateKey*)priv)->getEC(), param_a); + } + else + { + value = ((GOSTPrivateKey*)priv)->getD(); + param_a = ((GOSTPrivateKey*)priv)->getEC(); + } + bool bOK = true; + bOK = bOK && key->setAttribute(CKA_VALUE, value); + bOK = bOK && key->setAttribute(CKA_GOSTR3410_PARAMS, param_a); + + gost->recyclePrivateKey(priv); + CryptoFactory::i()->recycleAsymmetricAlgorithm(gost); + + return bOK; +} + CK_RV SoftHSM::MechParamCheckRSAPKCSOAEP(CK_MECHANISM_PTR pMechanism) { // This is a programming error diff --git a/SoftHSMv2/src/lib/SoftHSM.h b/SoftHSMv2/src/lib/SoftHSM.h index 19909e4..70d497a 100644 --- a/SoftHSMv2/src/lib/SoftHSM.h +++ b/SoftHSMv2/src/lib/SoftHSM.h @@ -391,6 +391,7 @@ private: bool setDSAPrivateKey(OSObject* key, const ByteString &ber, Token* token, bool isPrivate) const; bool setDHPrivateKey(OSObject* key, const ByteString &ber, Token* token, bool isPrivate) const; bool setECPrivateKey(OSObject* key, const ByteString &ber, Token* token, bool isPrivate) const; + bool setGOSTPrivateKey(OSObject* key, const ByteString &ber, Token* token, bool isPrivate) const; CK_RV WrapKeyAsym diff --git a/SoftHSMv2/src/lib/crypto/BotanGOSTPrivateKey.cpp b/SoftHSMv2/src/lib/crypto/BotanGOSTPrivateKey.cpp index 890f135..e5bb3b4 100644 --- a/SoftHSMv2/src/lib/crypto/BotanGOSTPrivateKey.cpp +++ b/SoftHSMv2/src/lib/crypto/BotanGOSTPrivateKey.cpp @@ -38,6 +38,12 @@ #include "BotanRNG.h" #include "BotanUtil.h" #include +#include +#include +#include +#include +#include +#include // Constructors BotanGOSTPrivateKey::BotanGOSTPrivateKey() @@ -151,14 +157,93 @@ bool BotanGOSTPrivateKey::deserialise(ByteString& serialised) ByteString BotanGOSTPrivateKey::PKCS8Encode() { ByteString der; - // TODO - return der; + createBotanKey(); + if (eckey == NULL) return der; + // Force EC_DOMPAR_ENC_OID + const size_t PKCS8_VERSION = 0; +#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(2,0,0) + const std::vector parameters = eckey->domain().DER_encode(Botan::EC_DOMPAR_ENC_OID); + const Botan::AlgorithmIdentifier alg_id(eckey->get_oid(), parameters); + const Botan::secure_vector ber = + Botan::DER_Encoder() + .start_cons(Botan::SEQUENCE) + .encode(PKCS8_VERSION) + .encode(alg_id) + .encode(eckey->private_key_bits(), Botan::OCTET_STRING) + .end_cons() + .get_contents(); +#elif BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,11,0) + const std::vector parameters = eckey->domain().DER_encode(Botan::EC_DOMPAR_ENC_OID); + const Botan::AlgorithmIdentifier alg_id(eckey->get_oid(), parameters); + const Botan::secure_vector ber = + Botan::DER_Encoder() + .start_cons(Botan::SEQUENCE) + .encode(PKCS8_VERSION) + .encode(alg_id) + .encode(eckey->pkcs8_private_key(), Botan::OCTET_STRING) + .end_cons() + .get_contents(); +#else + const Botan::MemoryVector parameters = eckey->domain().DER_encode(Botan::EC_DOMPAR_ENC_OID); + const Botan::AlgorithmIdentifier alg_id(eckey->get_oid(), parameters); + const Botan::SecureVector ber = + Botan::DER_Encoder() + .start_cons(Botan::SEQUENCE) + .encode(PKCS8_VERSION) + .encode(alg_id) + .encode(eckey->pkcs8_private_key(), Botan::OCTET_STRING) + .end_cons() + .get_contents(); +#endif + der.resize(ber.size()); + memcpy(&der[0], &ber[0], ber.size()); + return der; } // Decode from PKCS#8 BER -bool BotanGOSTPrivateKey::PKCS8Decode(const ByteString& /*ber*/) +bool BotanGOSTPrivateKey::PKCS8Decode(const ByteString& ber) { - return false; + Botan::DataSource_Memory source(ber.const_byte_str(), ber.size()); + if (source.end_of_data()) return false; +#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,11,0) + Botan::secure_vector keydata; +#else + Botan::SecureVector keydata; +#endif + Botan::AlgorithmIdentifier alg_id; + Botan::GOST_3410_PrivateKey* key = NULL; + try + { + Botan::BER_Decoder(source) + .start_cons(Botan::SEQUENCE) + .decode_and_check(0, "Unknown PKCS #8 version number") + .decode(alg_id) + .decode(keydata, Botan::OCTET_STRING) + .discard_remaining() + .end_cons(); + if (keydata.empty()) + throw Botan::Decoding_Error("PKCS #8 private key decoding failed"); + if (Botan::OIDS::lookup(alg_id.oid).compare("GOST-34.10")) + { + ERROR_MSG("Decoded private key not GOST-34.10"); + + return false; + } + key = new Botan::GOST_3410_PrivateKey(alg_id, keydata); + if (key == NULL) return false; + + setFromBotan(key); + + delete key; + } + catch (std::exception& e) + { + ERROR_MSG("Decode failed on %s", e.what()); + + return false; + } + + return true; } // Retrieve the Botan representation of the key diff --git a/SoftHSMv2/src/lib/crypto/OSSLGOSTPrivateKey.cpp b/SoftHSMv2/src/lib/crypto/OSSLGOSTPrivateKey.cpp index 6371e8f..a68b720 100644 --- a/SoftHSMv2/src/lib/crypto/OSSLGOSTPrivateKey.cpp +++ b/SoftHSMv2/src/lib/crypto/OSSLGOSTPrivateKey.cpp @@ -36,6 +36,7 @@ #include "OSSLGOSTPrivateKey.h" #include "OSSLUtil.h" #include +#include #include // DER of a private key @@ -172,13 +173,36 @@ bool OSSLGOSTPrivateKey::deserialise(ByteString& serialised) ByteString OSSLGOSTPrivateKey::PKCS8Encode() { ByteString der; - // TODO + if (pkey == NULL) return der; + PKCS8_PRIV_KEY_INFO* p8inf = EVP_PKEY2PKCS8(pkey); + if (p8inf == NULL) return der; + int len = i2d_PKCS8_PRIV_KEY_INFO(p8inf, NULL); + if (len < 0) + { + PKCS8_PRIV_KEY_INFO_free(p8inf); + return der; + } + der.resize(len); + unsigned char* priv = &der[0]; + int len2 = i2d_PKCS8_PRIV_KEY_INFO(p8inf, &priv); + PKCS8_PRIV_KEY_INFO_free(p8inf); + if (len2 != len) der.wipe(); return der; } // Decode from PKCS#8 BER -bool OSSLGOSTPrivateKey::PKCS8Decode(const ByteString& /*ber*/) +bool OSSLGOSTPrivateKey::PKCS8Decode(const ByteString& ber) { - return false; + int len = ber.size(); + if (len <= 0) return false; + const unsigned char* priv = ber.const_byte_str(); + PKCS8_PRIV_KEY_INFO* p8 = d2i_PKCS8_PRIV_KEY_INFO(NULL, &priv, len); + if (p8 == NULL) return false; + EVP_PKEY* key = EVP_PKCS82PKEY(p8); + PKCS8_PRIV_KEY_INFO_free(p8); + if (key == NULL) return false; + setFromOSSL(key); + EVP_PKEY_free(key); + return true; } #endif diff --git a/SoftHSMv2/src/lib/crypto/test/GOSTTests.cpp b/SoftHSMv2/src/lib/crypto/test/GOSTTests.cpp index 91f6876..50d42e0 100644 --- a/SoftHSMv2/src/lib/crypto/test/GOSTTests.cpp +++ b/SoftHSMv2/src/lib/crypto/test/GOSTTests.cpp @@ -264,6 +264,40 @@ void GOSTTests::testSerialisation() gost->recycleKeyPair(dKP); } +void GOSTTests::testPKCS8() +{ + AsymmetricKeyPair* kp; + ECParameters *p; + ByteString curve = "06072a850302022301"; + + // Get parameters + p = new ECParameters; + CPPUNIT_ASSERT(p != NULL); + p->setEC(curve); + + // Generate key-pair + CPPUNIT_ASSERT(gost->generateKeyPair(&kp, p)); + CPPUNIT_ASSERT(kp != NULL); + + GOSTPrivateKey* priv = (GOSTPrivateKey*) kp->getPrivateKey(); + CPPUNIT_ASSERT(priv != NULL); + + // Encode and decode the private key + ByteString pkcs8 = priv->PKCS8Encode(); + CPPUNIT_ASSERT(pkcs8.size() != 0); + + GOSTPrivateKey* dPriv = (GOSTPrivateKey*) gost->newPrivateKey(); + CPPUNIT_ASSERT(dPriv != NULL); + + CPPUNIT_ASSERT(dPriv->PKCS8Decode(pkcs8)); + + CPPUNIT_ASSERT(priv->getD() == dPriv->getD()); + CPPUNIT_ASSERT(priv->getEC() == dPriv->getEC()); + + gost->recycleKeyPair(kp); + gost->recyclePrivateKey(dPriv); +} + void GOSTTests::testSigningVerifying() { AsymmetricKeyPair* kp; diff --git a/SoftHSMv2/src/lib/crypto/test/GOSTTests.h b/SoftHSMv2/src/lib/crypto/test/GOSTTests.h index f243392..ac6bf01 100644 --- a/SoftHSMv2/src/lib/crypto/test/GOSTTests.h +++ b/SoftHSMv2/src/lib/crypto/test/GOSTTests.h @@ -47,6 +47,7 @@ class GOSTTests : public CppUnit::TestFixture CPPUNIT_TEST(testHashKnownVector); CPPUNIT_TEST(testKeyGeneration); CPPUNIT_TEST(testSerialisation); + CPPUNIT_TEST(testPKCS8); CPPUNIT_TEST(testSigningVerifying); CPPUNIT_TEST(testSignVerifyKnownVector); CPPUNIT_TEST_SUITE_END(); @@ -57,6 +58,7 @@ public: void testHashKnownVector(); void testKeyGeneration(); void testSerialisation(); + void testPKCS8(); void testSigningVerifying(); void testSignVerifyKnownVector(); diff --git a/SoftHSMv2/src/lib/test/Makefile.am b/SoftHSMv2/src/lib/test/Makefile.am index 4345878..3723399 100644 --- a/SoftHSMv2/src/lib/test/Makefile.am +++ b/SoftHSMv2/src/lib/test/Makefile.am @@ -35,6 +35,4 @@ p11test_LDFLAGS = @CRYPTO_LIBS@ @CPPUNIT_LIBS@ -no-install -pthread -static TESTS = p11test EXTRA_DIST = $(srcdir)/*.h \ - $(srcdir)/softhsm2-alt.conf.win32 \ - $(srcdir)/softhsm2.conf.win32 \ $(srcdir)/tokens/dummy.in diff --git a/SoftHSMv2/src/lib/test/SymmetricAlgorithmTests.cpp b/SoftHSMv2/src/lib/test/SymmetricAlgorithmTests.cpp index f301c73..bbc340c 100644 --- a/SoftHSMv2/src/lib/test/SymmetricAlgorithmTests.cpp +++ b/SoftHSMv2/src/lib/test/SymmetricAlgorithmTests.cpp @@ -370,7 +370,54 @@ CK_RV SymmetricAlgorithmTests::generateRsaPrivateKey(CK_SESSION_HANDLE hSession, return rv; } -void SymmetricAlgorithmTests::aesWrapUnwrap(CK_MECHANISM_TYPE mechanismType, CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hKey) +#ifdef WITH_GOST +CK_RV SymmetricAlgorithmTests::generateGostPrivateKey(CK_SESSION_HANDLE hSession, CK_BBOOL bToken, CK_BBOOL bPrivate, CK_OBJECT_HANDLE &hKey) +{ + CK_MECHANISM mechanism = { CKM_GOSTR3410_KEY_PAIR_GEN, NULL_PTR, 0 }; + CK_BYTE param_a[] = { 0x06, 0x07, 0x2a, 0x85, 0x03, 0x02, 0x02, 0x23, 0x01 }; + CK_BYTE param_b[] = { 0x06, 0x07, 0x2a, 0x85, 0x03, 0x02, 0x02, 0x1e, 0x01 }; + CK_BYTE subject[] = { 0x12, 0x34 }; // dummy + CK_BYTE id[] = { 123 } ; // dummy + CK_BBOOL bFalse = CK_FALSE; + CK_BBOOL bTrue = CK_TRUE; + CK_ATTRIBUTE pubAttribs[] = { + { CKA_TOKEN, &bToken, sizeof(bToken) }, + { CKA_PRIVATE, &bPrivate, sizeof(bPrivate) }, + { CKA_ENCRYPT, &bFalse, sizeof(bFalse) }, + { CKA_VERIFY, &bTrue, sizeof(bTrue) }, + { CKA_WRAP, &bFalse, sizeof(bFalse) }, + { CKA_GOSTR3410_PARAMS, ¶m_a[0], sizeof(param_a) }, + { CKA_GOSTR3411_PARAMS, ¶m_b[0], sizeof(param_b) } + }; + CK_ATTRIBUTE privAttribs[] = { + { CKA_TOKEN, &bToken, sizeof(bToken) }, + { CKA_PRIVATE, &bPrivate, sizeof(bPrivate) }, + { CKA_SUBJECT, &subject[0], sizeof(subject) }, + { CKA_ID, &id[0], sizeof(id) }, + { CKA_SENSITIVE, &bTrue, sizeof(bTrue) }, + { CKA_DECRYPT, &bFalse, sizeof(bFalse) }, + { CKA_SIGN, &bTrue, sizeof(bTrue) }, + { CKA_UNWRAP, &bFalse, sizeof(bFalse) }, + { CKA_SENSITIVE, &bFalse, sizeof(bFalse) }, + { CKA_EXTRACTABLE, &bTrue, sizeof(bTrue) } + }; + + CK_OBJECT_HANDLE hPub = CK_INVALID_HANDLE; + hKey = CK_INVALID_HANDLE; + CK_RV rv; + rv = CRYPTOKI_F_PTR( C_GenerateKeyPair(hSession, &mechanism, + pubAttribs, sizeof(pubAttribs)/sizeof(CK_ATTRIBUTE), + privAttribs, sizeof(privAttribs)/sizeof(CK_ATTRIBUTE), + &hPub, &hKey) ); + if (hPub != CK_INVALID_HANDLE) + { + CRYPTOKI_F_PTR( C_DestroyObject(hSession, hPub) ); + } + return rv; +} +#endif + +void SymmetricAlgorithmTests::aesWrapUnwrapGeneric(CK_MECHANISM_TYPE mechanismType, CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hKey) { CK_MECHANISM mechanism = { mechanismType, NULL_PTR, 0 }; CK_BBOOL bFalse = CK_FALSE; @@ -455,54 +502,61 @@ void SymmetricAlgorithmTests::aesWrapUnwrap(CK_MECHANISM_TYPE mechanismType, CK_ wrappedPtr = NULL_PTR; rv = CRYPTOKI_F_PTR( C_DestroyObject(hSession, hSecret) ); CPPUNIT_ASSERT(rv == CKR_OK); +} - CK_OBJECT_HANDLE hRsa; - hRsa = CK_INVALID_HANDLE; - rv = generateRsaPrivateKey(hSession, CK_TRUE, CK_TRUE, hRsa); +void SymmetricAlgorithmTests::aesWrapUnwrapRsa(CK_MECHANISM_TYPE mechanismType, CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hKey) +{ + CK_MECHANISM mechanism = { mechanismType, NULL_PTR, 0 }; + CK_BBOOL bFalse = CK_FALSE; + CK_BBOOL bTrue = CK_TRUE; + CK_OBJECT_HANDLE hPrk = CK_INVALID_HANDLE; + CK_RV rv = generateRsaPrivateKey(hSession, CK_TRUE, CK_TRUE, hPrk); CPPUNIT_ASSERT(rv == CKR_OK); - CPPUNIT_ASSERT(hRsa != CK_INVALID_HANDLE); + CPPUNIT_ASSERT(hPrk != CK_INVALID_HANDLE); CK_OBJECT_CLASS privateClass = CKO_PRIVATE_KEY; - CK_KEY_TYPE rsaKeyType = CKK_RSA; - CK_BYTE_PTR p2Ptr = NULL_PTR; - CK_ULONG p2Len = 0UL; - CK_ATTRIBUTE rsaAttribs[] = { + CK_KEY_TYPE keyType = CKK_RSA; + CK_BYTE_PTR prkAttrPtr = NULL_PTR; + CK_ULONG prkAttrLen = 0UL; + CK_ATTRIBUTE prkAttribs[] = { { CKA_CLASS, &privateClass, sizeof(privateClass) }, - { CKA_KEY_TYPE, &rsaKeyType, sizeof(rsaKeyType) }, + { CKA_KEY_TYPE, &keyType, sizeof(keyType) }, { CKA_PRIME_2, NULL_PTR, 0UL } }; - rv = CRYPTOKI_F_PTR( C_GetAttributeValue(hSession, hRsa, rsaAttribs, sizeof(rsaAttribs)/sizeof(CK_ATTRIBUTE)) ); + rv = CRYPTOKI_F_PTR( C_GetAttributeValue(hSession, hPrk, prkAttribs, sizeof(prkAttribs)/sizeof(CK_ATTRIBUTE)) ); CPPUNIT_ASSERT(rv == CKR_OK); - CPPUNIT_ASSERT(rsaAttribs[0].ulValueLen == sizeof(CK_OBJECT_CLASS)); - CPPUNIT_ASSERT(*(CK_OBJECT_CLASS*)rsaAttribs[0].pValue == CKO_PRIVATE_KEY); - CPPUNIT_ASSERT(rsaAttribs[1].ulValueLen == sizeof(CK_KEY_TYPE)); - CPPUNIT_ASSERT(*(CK_KEY_TYPE*)rsaAttribs[1].pValue == CKK_RSA); + CPPUNIT_ASSERT(prkAttribs[0].ulValueLen == sizeof(CK_OBJECT_CLASS)); + CPPUNIT_ASSERT(*(CK_OBJECT_CLASS*)prkAttribs[0].pValue == CKO_PRIVATE_KEY); + CPPUNIT_ASSERT(prkAttribs[1].ulValueLen == sizeof(CK_KEY_TYPE)); + CPPUNIT_ASSERT(*(CK_KEY_TYPE*)prkAttribs[1].pValue == CKK_RSA); - p2Len = rsaAttribs[2].ulValueLen; - p2Ptr = (CK_BYTE_PTR) malloc(2 * p2Len); - CPPUNIT_ASSERT(p2Ptr != NULL_PTR); - rsaAttribs[2].pValue = p2Ptr; - rsaAttribs[2].ulValueLen = p2Len; + prkAttrLen = prkAttribs[2].ulValueLen; + prkAttrPtr = (CK_BYTE_PTR) malloc(2 * prkAttrLen); + CPPUNIT_ASSERT(prkAttrPtr != NULL_PTR); + prkAttribs[2].pValue = prkAttrPtr; + prkAttribs[2].ulValueLen = prkAttrLen; - rv = CRYPTOKI_F_PTR( C_GetAttributeValue(hSession, hRsa, rsaAttribs, sizeof(rsaAttribs)/sizeof(CK_ATTRIBUTE)) ); + rv = CRYPTOKI_F_PTR( C_GetAttributeValue(hSession, hPrk, prkAttribs, sizeof(prkAttribs)/sizeof(CK_ATTRIBUTE)) ); CPPUNIT_ASSERT(rv == CKR_OK); - CPPUNIT_ASSERT(rsaAttribs[2].ulValueLen == p2Len); + CPPUNIT_ASSERT(prkAttribs[2].ulValueLen == prkAttrLen); - rv = CRYPTOKI_F_PTR( C_WrapKey(hSession, &mechanism, hKey, hRsa, wrappedPtr, &wrappedLen) ); + CK_BYTE_PTR wrappedPtr = NULL_PTR; + CK_ULONG wrappedLen = 0UL; + rv = CRYPTOKI_F_PTR( C_WrapKey(hSession, &mechanism, hKey, hPrk, wrappedPtr, &wrappedLen) ); CPPUNIT_ASSERT(rv == CKR_OK); wrappedPtr = (CK_BYTE_PTR) malloc(wrappedLen); CPPUNIT_ASSERT(wrappedPtr != NULL_PTR); - rv = CRYPTOKI_F_PTR( C_WrapKey(hSession, &mechanism, hKey, hRsa, wrappedPtr, &wrappedLen) ); + rv = CRYPTOKI_F_PTR( C_WrapKey(hSession, &mechanism, hKey, hPrk, wrappedPtr, &wrappedLen) ); CPPUNIT_ASSERT(rv == CKR_OK); - rv = CRYPTOKI_F_PTR( C_DestroyObject(hSession, hRsa) ); + rv = CRYPTOKI_F_PTR( C_DestroyObject(hSession, hPrk) ); CPPUNIT_ASSERT(rv == CKR_OK); - CK_ATTRIBUTE nRsaAttribs[] = { + CK_ATTRIBUTE nPrkAttribs[] = { { CKA_CLASS, &privateClass, sizeof(privateClass) }, - { CKA_KEY_TYPE, &rsaKeyType, sizeof(rsaKeyType) }, + { CKA_KEY_TYPE, &keyType, sizeof(keyType) }, { CKA_TOKEN, &bFalse, sizeof(bFalse) }, { CKA_PRIVATE, &bTrue, sizeof(bTrue) }, { CKA_DECRYPT, &bTrue, sizeof(bTrue) }, @@ -512,28 +566,114 @@ void SymmetricAlgorithmTests::aesWrapUnwrap(CK_MECHANISM_TYPE mechanismType, CK_ { CKA_EXTRACTABLE, &bTrue, sizeof(bTrue) } }; - hRsa = CK_INVALID_HANDLE; - rv = CRYPTOKI_F_PTR( C_UnwrapKey(hSession, &mechanism, hKey, wrappedPtr, wrappedLen, nRsaAttribs, sizeof(nRsaAttribs)/sizeof(CK_ATTRIBUTE), &hRsa) ); + hPrk = CK_INVALID_HANDLE; + rv = CRYPTOKI_F_PTR( C_UnwrapKey(hSession, &mechanism, hKey, wrappedPtr, wrappedLen, nPrkAttribs, sizeof(nPrkAttribs)/sizeof(CK_ATTRIBUTE), &hPrk) ); CPPUNIT_ASSERT(rv == CKR_OK); - CPPUNIT_ASSERT(hRsa != CK_INVALID_HANDLE); + CPPUNIT_ASSERT(hPrk != CK_INVALID_HANDLE); - rsaAttribs[2].pValue = p2Ptr + p2Len; - rv = CRYPTOKI_F_PTR( C_GetAttributeValue(hSession, hRsa, rsaAttribs, sizeof(rsaAttribs)/sizeof(CK_ATTRIBUTE)) ); + prkAttribs[2].pValue = prkAttrPtr + prkAttrLen; + rv = CRYPTOKI_F_PTR( C_GetAttributeValue(hSession, hPrk, prkAttribs, sizeof(prkAttribs)/sizeof(CK_ATTRIBUTE)) ); CPPUNIT_ASSERT(rv == CKR_OK); - CPPUNIT_ASSERT(rsaAttribs[0].ulValueLen == sizeof(CK_OBJECT_CLASS)); - CPPUNIT_ASSERT(*(CK_OBJECT_CLASS*)rsaAttribs[0].pValue == CKO_PRIVATE_KEY); - CPPUNIT_ASSERT(rsaAttribs[1].ulValueLen == sizeof(CK_KEY_TYPE)); - CPPUNIT_ASSERT(*(CK_KEY_TYPE*)rsaAttribs[1].pValue == CKK_RSA); - CPPUNIT_ASSERT(rsaAttribs[2].ulValueLen == p2Len); - CPPUNIT_ASSERT(memcmp(p2Ptr, p2Ptr + p2Len, p2Len) == 0); + CPPUNIT_ASSERT(prkAttribs[0].ulValueLen == sizeof(CK_OBJECT_CLASS)); + CPPUNIT_ASSERT(*(CK_OBJECT_CLASS*)prkAttribs[0].pValue == CKO_PRIVATE_KEY); + CPPUNIT_ASSERT(prkAttribs[1].ulValueLen == sizeof(CK_KEY_TYPE)); + CPPUNIT_ASSERT(*(CK_KEY_TYPE*)prkAttribs[1].pValue == CKK_RSA); + CPPUNIT_ASSERT(prkAttribs[2].ulValueLen == prkAttrLen); + CPPUNIT_ASSERT(memcmp(prkAttrPtr, prkAttrPtr + prkAttrLen, prkAttrLen) == 0); free(wrappedPtr); - free(p2Ptr); - rv = CRYPTOKI_F_PTR( C_DestroyObject(hSession, hRsa) ); + free(prkAttrPtr); + rv = CRYPTOKI_F_PTR( C_DestroyObject(hSession, hPrk) ); CPPUNIT_ASSERT(rv == CKR_OK); } +#ifdef WITH_GOST +void SymmetricAlgorithmTests::aesWrapUnwrapGost(CK_MECHANISM_TYPE mechanismType, CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hKey) +{ + CK_MECHANISM mechanism = { mechanismType, NULL_PTR, 0 }; + CK_BBOOL bFalse = CK_FALSE; + CK_BBOOL bTrue = CK_TRUE; + CK_OBJECT_HANDLE hPrk = CK_INVALID_HANDLE; + CK_RV rv = generateGostPrivateKey(hSession, CK_TRUE, CK_TRUE, hPrk); + CPPUNIT_ASSERT(rv == CKR_OK); + CPPUNIT_ASSERT(hPrk != CK_INVALID_HANDLE); + + CK_OBJECT_CLASS privateClass = CKO_PRIVATE_KEY; + CK_KEY_TYPE keyType = CKK_GOSTR3410; + CK_BYTE_PTR prkAttrPtr = NULL_PTR; + CK_ULONG prkAttrLen = 0UL; + CK_ATTRIBUTE prkAttribs[] = { + { CKA_CLASS, &privateClass, sizeof(privateClass) }, + { CKA_KEY_TYPE, &keyType, sizeof(keyType) }, + { CKA_VALUE, NULL_PTR, 0UL } + }; + + rv = CRYPTOKI_F_PTR( C_GetAttributeValue(hSession, hPrk, prkAttribs, sizeof(prkAttribs)/sizeof(CK_ATTRIBUTE)) ); + CPPUNIT_ASSERT(rv == CKR_OK); + + CPPUNIT_ASSERT(prkAttribs[0].ulValueLen == sizeof(CK_OBJECT_CLASS)); + CPPUNIT_ASSERT(*(CK_OBJECT_CLASS*)prkAttribs[0].pValue == CKO_PRIVATE_KEY); + CPPUNIT_ASSERT(prkAttribs[1].ulValueLen == sizeof(CK_KEY_TYPE)); + CPPUNIT_ASSERT(*(CK_KEY_TYPE*)prkAttribs[1].pValue == CKK_GOSTR3410); + + prkAttrLen = prkAttribs[2].ulValueLen; + prkAttrPtr = (CK_BYTE_PTR) malloc(2 * prkAttrLen); + CPPUNIT_ASSERT(prkAttrPtr != NULL_PTR); + prkAttribs[2].pValue = prkAttrPtr; + prkAttribs[2].ulValueLen = prkAttrLen; + + rv = CRYPTOKI_F_PTR( C_GetAttributeValue(hSession, hPrk, prkAttribs, sizeof(prkAttribs)/sizeof(CK_ATTRIBUTE)) ); + CPPUNIT_ASSERT(rv == CKR_OK); + CPPUNIT_ASSERT(prkAttribs[2].ulValueLen == prkAttrLen); + + CK_BYTE_PTR wrappedPtr = NULL_PTR; + CK_ULONG wrappedLen = 0UL; + rv = CRYPTOKI_F_PTR( C_WrapKey(hSession, &mechanism, hKey, hPrk, wrappedPtr, &wrappedLen) ); + CPPUNIT_ASSERT(rv == CKR_OK); + wrappedPtr = (CK_BYTE_PTR) malloc(wrappedLen); + CPPUNIT_ASSERT(wrappedPtr != NULL_PTR); + rv = CRYPTOKI_F_PTR( C_WrapKey(hSession, &mechanism, hKey, hPrk, wrappedPtr, &wrappedLen) ); + CPPUNIT_ASSERT(rv == CKR_OK); + + rv = CRYPTOKI_F_PTR( C_DestroyObject(hSession, hPrk) ); + CPPUNIT_ASSERT(rv == CKR_OK); + + CK_ATTRIBUTE nPrkAttribs[] = { + { CKA_CLASS, &privateClass, sizeof(privateClass) }, + { CKA_KEY_TYPE, &keyType, sizeof(keyType) }, + { CKA_TOKEN, &bFalse, sizeof(bFalse) }, + { CKA_PRIVATE, &bTrue, sizeof(bTrue) }, + { CKA_DECRYPT, &bTrue, sizeof(bTrue) }, + { CKA_SIGN, &bFalse,sizeof(bFalse) }, + { CKA_UNWRAP, &bTrue, sizeof(bTrue) }, + { CKA_SENSITIVE, &bFalse, sizeof(bFalse) }, + { CKA_EXTRACTABLE, &bTrue, sizeof(bTrue) } + }; + + hPrk = CK_INVALID_HANDLE; + rv = CRYPTOKI_F_PTR( C_UnwrapKey(hSession, &mechanism, hKey, wrappedPtr, wrappedLen, nPrkAttribs, sizeof(nPrkAttribs)/sizeof(CK_ATTRIBUTE), &hPrk) ); + CPPUNIT_ASSERT(rv == CKR_OK); + CPPUNIT_ASSERT(hPrk != CK_INVALID_HANDLE); + + prkAttribs[2].pValue = prkAttrPtr + prkAttrLen; + rv = CRYPTOKI_F_PTR( C_GetAttributeValue(hSession, hPrk, prkAttribs, sizeof(prkAttribs)/sizeof(CK_ATTRIBUTE)) ); + CPPUNIT_ASSERT(rv == CKR_OK); + + CPPUNIT_ASSERT(prkAttribs[0].ulValueLen == sizeof(CK_OBJECT_CLASS)); + CPPUNIT_ASSERT(*(CK_OBJECT_CLASS*)prkAttribs[0].pValue == CKO_PRIVATE_KEY); + CPPUNIT_ASSERT(prkAttribs[1].ulValueLen == sizeof(CK_KEY_TYPE)); + CPPUNIT_ASSERT(*(CK_KEY_TYPE*)prkAttribs[1].pValue == CKK_GOSTR3410); + CPPUNIT_ASSERT(prkAttribs[2].ulValueLen == prkAttrLen); + CPPUNIT_ASSERT(memcmp(prkAttrPtr, prkAttrPtr + prkAttrLen, prkAttrLen) == 0); + + free(wrappedPtr); + free(prkAttrPtr); + rv = CRYPTOKI_F_PTR( C_DestroyObject(hSession, hPrk) ); + CPPUNIT_ASSERT(rv == CKR_OK); +} +#endif + void SymmetricAlgorithmTests::testAesEncryptDecrypt() { CK_RV rv; @@ -620,9 +760,18 @@ void SymmetricAlgorithmTests::testAesWrapUnwrap() rv = generateAesKey(hSession,IN_SESSION,IS_PUBLIC,hKey); CPPUNIT_ASSERT(rv == CKR_OK); - aesWrapUnwrap(CKM_AES_KEY_WRAP, hSession, hKey); + aesWrapUnwrapGeneric(CKM_AES_KEY_WRAP, hSession, hKey); + aesWrapUnwrapRsa(CKM_AES_KEY_WRAP, hSession, hKey); +#ifdef WITH_GOST + aesWrapUnwrapGost(CKM_AES_KEY_WRAP, hSession, hKey); +#endif + #ifdef HAVE_AES_KEY_WRAP_PAD - aesWrapUnwrap(CKM_AES_KEY_WRAP_PAD, hSession, hKey); + aesWrapUnwrapGeneric(CKM_AES_KEY_WRAP_PAD, hSession, hKey); + aesWrapUnwrapRsa(CKM_AES_KEY_WRAP_PAD, hSession, hKey); +#ifdef WITH_GOST + aesWrapUnwrapGost(CKM_AES_KEY_WRAP_PAD, hSession, hKey); +#endif #endif } diff --git a/SoftHSMv2/src/lib/test/SymmetricAlgorithmTests.h b/SoftHSMv2/src/lib/test/SymmetricAlgorithmTests.h index 9b96ae1..76191d9 100644 --- a/SoftHSMv2/src/lib/test/SymmetricAlgorithmTests.h +++ b/SoftHSMv2/src/lib/test/SymmetricAlgorithmTests.h @@ -73,8 +73,13 @@ protected: CK_OBJECT_HANDLE hKey, size_t messageSize, bool isSizeOK=true); - void aesWrapUnwrap(CK_MECHANISM_TYPE mechanismType, CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hKey); + void aesWrapUnwrapGeneric(CK_MECHANISM_TYPE mechanismType, CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hKey); + void aesWrapUnwrapRsa(CK_MECHANISM_TYPE mechanismType, CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hKey); CK_RV generateRsaPrivateKey(CK_SESSION_HANDLE hSession, CK_BBOOL bToken, CK_BBOOL bPrivate, CK_OBJECT_HANDLE &hKey); +#ifdef WITH_GOST + void aesWrapUnwrapGost(CK_MECHANISM_TYPE mechanismType, CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hKey); + CK_RV generateGostPrivateKey(CK_SESSION_HANDLE hSession, CK_BBOOL bToken, CK_BBOOL bPrivate, CK_OBJECT_HANDLE &hKey); +#endif }; #endif // !_SOFTHSM_V2_SYMENCRYPTDECRYPTTESTS_H diff --git a/SoftHSMv2/src/lib/win32/dllmain.cc b/SoftHSMv2/src/lib/win32/dllmain.cc deleted file mode 100644 index 359227d..0000000 --- a/SoftHSMv2/src/lib/win32/dllmain.cc +++ /dev/null @@ -1,18 +0,0 @@ -#include - -__declspec(dllexport) BOOL WINAPI -DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpvReserved) -{ - hModule = hModule; - lpvReserved = lpvReserved; - - switch (ul_reason_for_call) { - case DLL_PROCESS_ATTACH: - case DLL_THREAD_ATTACH: - case DLL_THREAD_DETACH: - case DLL_PROCESS_DETACH: - default: - break; - } - return (TRUE); -} diff --git a/SoftHSMv2/src/lib/win32/setenv.cpp b/SoftHSMv2/src/lib/win32/setenv.cpp deleted file mode 100644 index da41a62..0000000 --- a/SoftHSMv2/src/lib/win32/setenv.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include -#include -#include - -#ifdef _WIN32 - -int -setenv(const char *name, const char *value, int overwrite) -{ - std::string vv = name; - vv += "="; - vv += value; - - if (overwrite != 1) - return false; - - return _putenv(vv.c_str()) == 0; -} - -#endif diff --git a/SoftHSMv2/src/lib/win32/setenv.h b/SoftHSMv2/src/lib/win32/setenv.h deleted file mode 100644 index e199227..0000000 --- a/SoftHSMv2/src/lib/win32/setenv.h +++ /dev/null @@ -1,12 +0,0 @@ -#include - -#ifdef _WIN32 - -#ifndef _SETENV_H -#define _SETENV_H - -int setenv(const char *name, const char *value, int overwrite); - -#endif - -#endif \ No newline at end of file diff --git a/SoftHSMv2/src/lib/win32/syslog.cpp b/SoftHSMv2/src/lib/win32/syslog.cpp deleted file mode 100644 index 927592e..0000000 --- a/SoftHSMv2/src/lib/win32/syslog.cpp +++ /dev/null @@ -1,69 +0,0 @@ -#include - -#include -#include -#include -#include -#include - -#ifdef _WIN32 - -static HANDLE hEventLog = NULL; - -/* - * Close the Handle to the application Event Log - */ -void -closelog() { - DeregisterEventSource(hEventLog); -} - -/* - * Initialize event logging - */ -void -openlog(const char *ident, int logopt, int facility) { - /* Get a handle to the Application event log */ - hEventLog = RegisterEventSourceA(NULL, ident); -} - -/* - * Log to the NT Event Log - */ -void -syslog(int priority, const char *message, ...) { - va_list ap; - char buf[1024]; - LPCSTR str[1]; - - str[0] = buf; - - va_start(ap, message); - vsprintf(buf, message, ap); - va_end(ap); - - /* Make sure that the channel is open to write the event */ - if (hEventLog == NULL) { - openlog("SoftHSM", 0, 0); - } - if (hEventLog != NULL) { - switch (priority) { - case LOG_INFO: - case LOG_NOTICE: - case LOG_DEBUG: - ReportEventA(hEventLog, EVENTLOG_INFORMATION_TYPE, 0, - 0x40000003, NULL, 1, 0, str, NULL); - break; - case LOG_WARNING: - ReportEventA(hEventLog, EVENTLOG_WARNING_TYPE, 0, - 0x80000002, NULL, 1, 0, str, NULL); - break; - default: - ReportEventA(hEventLog, EVENTLOG_ERROR_TYPE, 0, - 0xc0000001, NULL, 1, 0, str, NULL); - break; - } - } -} - -#endif diff --git a/SoftHSMv2/src/lib/win32/syslog.h b/SoftHSMv2/src/lib/win32/syslog.h deleted file mode 100644 index 1ed207c..0000000 --- a/SoftHSMv2/src/lib/win32/syslog.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef _SYSLOG_H -#define _SYSLOG_H - -#include - -/* priorities */ -#define LOG_EMERG 0 /* system is unusable */ -#define LOG_ALERT 1 /* action must be taken immediately */ -#define LOG_CRIT 2 /* critical conditions */ -#define LOG_ERR 3 /* error conditions */ -#define LOG_WARNING 4 /* warning conditions */ -#define LOG_NOTICE 5 /* normal but signification condition */ -#define LOG_INFO 6 /* informational */ -#define LOG_DEBUG 7 /* debug-level messages */ - -/* NT event log does not support facility level */ -#define LOG_KERN 0 -#define LOG_USER 0 -#define LOG_MAIL 0 -#define LOG_DAEMON 0 -#define LOG_AUTH 0 -#define LOG_SYSLOG 0 -#define LOG_LPR 0 -#define LOG_LOCAL0 0 -#define LOG_LOCAL1 0 -#define LOG_LOCAL2 0 -#define LOG_LOCAL3 0 -#define LOG_LOCAL4 0 -#define LOG_LOCAL5 0 -#define LOG_LOCAL6 0 -#define LOG_LOCAL7 0 - -/* Constant definitions for openlog() */ -#define LOG_PID 1 -#define LOG_CONS 2 - -void -closelog(void); - -void -openlog(const char *ident, int logopt, int facility); - -void -syslog(int priority, const char *message, ...); - -#endif diff --git a/SoftHSMv2/testing/appveyor/APPVEYOR-NOTES.MD b/SoftHSMv2/testing/appveyor/APPVEYOR-NOTES.MD deleted file mode 100644 index b2347b0..0000000 --- a/SoftHSMv2/testing/appveyor/APPVEYOR-NOTES.MD +++ /dev/null @@ -1,27 +0,0 @@ -# AppVeyor integration with SoftHSMv2 on GitHub - -This document describes the process of integrating AppVeyor with SoftHSMv2 on GitHub. - -## Integration - -### Add project - -To add the project, click on the following: - -1. New Project -2. GitHub -3. opendnssec -> SoftHSMv2 -> Add - -### Settings - -The following settings where changed. - -#### General - -* Custom configuration .yml file name: .appveyor.yml -* Skip branches without appveyor.yml: check - -## Dependencies - -Prebuilt dependencies (OpenSSL and CppUnit) are currently hosted in a dedicated -repository by [disig/SoftHSM2-AppVeyor](https://github.com/disig/SoftHSM2-AppVeyor/) diff --git a/SoftHSMv2/testing/appveyor/appveyor_build.bat b/SoftHSMv2/testing/appveyor/appveyor_build.bat deleted file mode 100644 index 4e7f41f..0000000 --- a/SoftHSMv2/testing/appveyor/appveyor_build.bat +++ /dev/null @@ -1,51 +0,0 @@ -setlocal - -echo "Setting visual studio variables" - -call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %VCVARS_PLATFORM% -@echo on - -echo "Setting PATH and other variables" -set cur_dir=%CD% -set PATH=%PATH%;%PYTHON_PATH% - -echo %cur_dir% -cd win32 - -python Configure.py %CONFIGURE_OPTIONS% || goto :error - -msbuild softhsm2.sln /p:Configuration="Release" /p:Platform="%MSBUILD_PLATFORM%" /p:PlatformToolset=v140 /target:Build || goto :error - -cd %cur_dir% - -IF "%ENV_PLATFORM%"=="x86" (set from_dir=%CD%\win32\Release) ELSE (set from_dir=%CD%\win32\x64\Release) - -echo "Testing build" - -cd %from_dir% -cryptotest.exe || goto :error -datamgrtest.exe || goto :error -handlemgrtest.exe || goto :error -objstoretest.exe || goto :error -p11test.exe || goto :error -sessionmgrtest.exe || goto :error -slotmgrtest.exe || goto :error - -echo "Preparing output package" -copy %from_dir%\softhsm2.dll %RELEASE_DIR% || goto :error -copy %from_dir%\softhsm2-dump-file.exe %RELEASE_DIR% || goto :error -copy %from_dir%\softhsm2-keyconv.exe %RELEASE_DIR% || goto :error -copy %from_dir%\softhsm2-util.exe %RELEASE_DIR% || goto :error -copy %cur_dir%\src\lib\common\softhsm2.conf.in %RELEASE_DIR%\softhsm2.conf || goto :error - -dir %RELEASE_DIR% - -@echo *** BUILD SUCCESSFUL *** -endlocal -@exit /b 0 - - -:error -@echo *** BUILD FAILED *** -endlocal -@exit /b 1 diff --git a/SoftHSMv2/testing/appveyor/appveyor_download_requirements.ps1 b/SoftHSMv2/testing/appveyor/appveyor_download_requirements.ps1 deleted file mode 100644 index cc374f5..0000000 --- a/SoftHSMv2/testing/appveyor/appveyor_download_requirements.ps1 +++ /dev/null @@ -1,80 +0,0 @@ -Add-Type -AssemblyName System.IO.Compression.FileSystem -function Unzip -{ - param([string]$zipfile, [string]$outpath) - - [System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $outpath) -} - -$CURRENT_DIR_PATH = (Get-Item -Path ".\" -Verbose).FullName -$BUILD_DIR = Join-Path $CURRENT_DIR_PATH build - -#prepare directories -Write-Host "Preparing directories" - -$exists = Test-Path build -if ($exists -eq $false) { - mkdir build -} -cd build - -$exists = Test-Path $env:RELEASE_DIR -if ($exists -eq $false) { - mkdir $env:RELEASE_DIR -} - -$exists = Test-Path python -if ($exists -eq $true) { - Remove-Item python -recurse -} - -$exists = Test-Path "$env:CPPUNIT_PATH" -if ($exists -eq $true) { - Remove-Item "$env:CPPUNIT_PATH" -recurse -} - -$exists = Test-Path "$env:CRYPTO_PACKAGE_PATH" -if ($exists -eq $true) { - Remove-Item "$env:CRYPTO_PACKAGE_PATH" -recurse -} - -mkdir python - -Write-Host "Preparing directories - OK" - -Write-Host "Downloading needed tools and dependencies" - -$exists = Test-Path "$env:CRYPTO_PACKAGE_NAME" -if ($exists -eq $false) { - $source = "https://github.com/disig/SoftHSM2-AppVeyor/raw/master/$env:PACKAGE_VERSION_NAME/$env:CRYPTO_PACKAGE" - Invoke-WebRequest $source -OutFile $env:CRYPTO_PACKAGE -} - -$exists = Test-Path "$env:CPPUNIT_PACKAGE" -if ($exists -eq $false) { - $source = "https://github.com/disig/SoftHSM2-AppVeyor/raw/master/$env:CPPUNIT_VERSION_NAME/$env:CPPUNIT_PACKAGE" - Invoke-WebRequest $source -OutFile $env:CPPUNIT_PACKAGE -} - -$exists = Test-Path python-3.5.2-embed-win32.zip -if ($exists -eq $false) { - $source = "https://www.python.org/ftp/python/3.5.2/python-3.5.2-embed-win32.zip" - Invoke-WebRequest $source -OutFile python-3.5.2-embed-win32.zip -} - -Write-Host "Downloading needed tools and dependencies - OK" - -Write-Host "Extracting ..." -Unzip "$BUILD_DIR/python-3.5.2-embed-win32.zip" "$env:PYTHON_PATH" - -Unzip "$BUILD_DIR/$env:CRYPTO_PACKAGE" "$BUILD_DIR" - -Unzip "$BUILD_DIR/$env:CPPUNIT_PACKAGE" "$BUILD_DIR" - -dir - -dir "$env:PYTHON_PATH" -dir "$env:CRYPTO_PACKAGE_PATH" -dir "$env:CPPUNIT_PATH" - -cd $CURRENT_DIR_PATH \ No newline at end of file diff --git a/SoftHSMv2/win32/.gitignore b/SoftHSMv2/win32/.gitignore deleted file mode 100644 index 997db95..0000000 --- a/SoftHSMv2/win32/.gitignore +++ /dev/null @@ -1,35 +0,0 @@ -# get back config.h.in -!config.h.in - -# Visual Studio -*.opensdf -*.sdf -*.suo -.vs/ - -# Object files -*.obj -*.exe - -# Generated project files -convarch.vcxproj -convarch.vcxproj.filters -cryptotest.vcxproj -datamgrtest.vcxproj -dump.vcxproj -handlemgrtest.vcxproj -keyconv.vcxproj -keyconv.vcxproj.filters -objstoretest.vcxproj -p11test.vcxproj -sessionmgrtest.vcxproj -slotmgrtest.vcxproj -softhsm2.vcxproj -softhsm2.sln -util.vcxproj -util.vcxproj.filters - -# Build files -Debug/ -Release/ -x64/ \ No newline at end of file diff --git a/SoftHSMv2/win32/Configure.py b/SoftHSMv2/win32/Configure.py deleted file mode 100644 index a39a046..0000000 --- a/SoftHSMv2/win32/Configure.py +++ /dev/null @@ -1,1167 +0,0 @@ -#!python - -# Configure -- python version -# -# this script builds Visual Studio files - -from __future__ import print_function - -import sys -import os -import os.path -import re -import subprocess - -# files to configure - -filelist = ["config.h", - "softhsm2.sln", - "convarch\\convarch.vcxproj.filters", - "convarch\\convarch.vcxproj", - "cryptotest\\cryptotest.vcxproj", - "datamgrtest\\datamgrtest.vcxproj", - "dump\\dump.vcxproj", - "handlemgrtest\\handlemgrtest.vcxproj", - "keyconv\\keyconv.vcxproj.filters", - "keyconv\\keyconv.vcxproj", - "objstoretest\\objstoretest.vcxproj", - "p11test\\p11test.vcxproj", - "sessionmgrtest\\sessionmgrtest.vcxproj", - "slotmgrtest\\slotmgrtest.vcxproj", - "softhsm2\\softhsm2.vcxproj", - "util\\util.vcxproj.filters", - "util\\util.vcxproj"] - -# test files -testlist = ["botan", - "ecc", - "gnump", - "gost", - "ossl", - "osslv", - "rawpss", - "rfc3394", - "rfc5649"] - -# variables to expand - -varvals = {} - -varnames = ["CUINCPATH", - "CULIBPATH", - "DEBUGDLLPATH", - "DEBUGINCPATH", - "DEBUGLIBPATH", - "DLLPATH", - "EXTRALIBS", - "INCLUDEPATH", - "LIBNAME", - "LIBPATH", - "PLATFORM", - "PLATFORMDIR", - "PLATFORMTOOLSET", - "RUNTIMELIBRARY"] - -# conditions to stack - -condvals = {} - -condnames = ["AESGCM", - "BOTAN", - "ECC", - "GOST", - "NONPAGE", - "OPENSSL", - "RAWPSS", - "RFC3394", - "RFC5649", - "TESTS"] - -# enable-xxx/disable-xxx arguments - -enablelist = ["64bit", - "debug", - "ecc", - "gost", - "keep", - "non-paged-memory", - "static-runtime", - "verbose"] - -# with-xxx/without-xxx arguments - -withlist = ["botan", - "cppunit", - "crypto-backend", - "debug-botan", - "debug-openssl", - "openssl", - "toolset"] - -# general commands - -commandlist = ["help", "clean"] # verbose, keep - -# usage - -usage = ["Usage: python Configure.py help", - " python Configure.py options*", - " python Configure.py clean"] - -# help - -myhelp = ["'python Configure.py' configures SoftHSMv2 build files.\n"] +\ -usage + [\ -"\nGeneral Commands:", -" help print this help", -" clean clean up generated files", -" print a summary of the configuration", -"\nOptional Features:", -" enable-verbose print messages [default=no]", -" enable-keep keep test files after config [default=no]", -" enable-64bit enable 64-bit compiling [default=no]", -" enable-debug enable build of Debug config [default=yes]", -" enable-ecc enable support for ECC [default=yes]", -" enable-gost enable support for GOST [default=yes]", -" enable-static-runtime enable build with static CRT (/MT) [default=no]", -" enable-non-paged-memory enable non-paged memory [default=yes]", -"\nOptional Packages:", -" with-crypto-backend select the crypto backend [openssl|botan]", -" with-botan=PATH speficy prefix of path of Botan (Release)", -" with-debug-botan=PATH speficy prefix of path of Botan (Debug)", -" with-openssl=PATH speficy prefix of path of OpenSSL (Release)", -" with-debug-openssl=PATH speficy prefix of path of OpenSSL (Debug)", -" with-cppunit=PATH specify prefix of path of CppUnit", -" with-toolset=VALUE set Visual Studio platform toolset version (eg v110 for vs2012)", -] - -# variables for parsing - -verbose = False -configargs = None -want_help = False -want_clean = False -want_unknown = False -unknown_value = None -enable_keep = False -enable_debug = True -enable_ecc = True -enable_gost = True -enable_static_runtime = False -enable_non_paged = True -platform = 32 -crypto_backend = "openssl" -botan_path = "..\\..\\btn" -debug_botan_path = None -openssl_path = "..\\..\\ssl" -debug_openssl_path = None -want_tests = True -cppunit_path = "..\\..\\cu" -toolset = "" - -def dodetectplatform(visualstudio): - # detect platform tool set >= VS2010 - global toolset - - if "Microsoft Visual Studio 10.0" in visualstudio: - toolset="v100" - elif "Microsoft Visual Studio 11.0" in visualstudio: - toolset="v110" - elif "Microsoft Visual Studio 12.0" in visualstudio: - toolset="v120" - elif "Microsoft Visual Studio 14.0" in visualstudio: - toolset="v140" - else: - print("PlatformToolset for \""+visualstudio+"\" not supported") - toolset="" - -def dodetectvisualstudio(): - """detect visual studio version""" - if os.environ.get('VSINSTALLDIR'): - dodetectplatform(os.environ.get('VSINSTALLDIR')) - -def parseargs(args): - """parse arguments""" - global verbose - global enable_keep - global want_help - global want_clean - global want_unknown - global unknown_value - global debug_botan_path - global debug_openssl_path - for arg in args: - if arg.lower() == "verbose": - verbose = True - continue - if arg.lower() == "keep": - enable_keep = True - continue - if arg.lower() == "help": - want_help = True - continue - di = re.match(r'disable-(.*)', arg, re.I) - if di: - appargs(arg) - myenable(di.group(1), False) - continue - en = re.match(r'enable-(.*)', arg, re.I) - if en: - appargs(arg) - myenable(en.group(1), True) - continue - wo = re.match(r'without-(.*)', arg, re.I) - if wo: - appargs(arg) - mywith(wo.group(1), False) - continue - wv = re.match(r'with-(.*)=(.*)', arg, re.I) - if wv: - appargs(arg) - if wv.group(2).lower() == "no": - mywith(wv.group(1), False) - continue - mywith(wv.group(1), True, wv.group(2)) - continue - wi = re.match(r'with-(.*)', arg, re.I) - if wi: - appargs(arg) - mywith(wi.group(1), True) - continue - if arg.lower() == "clean": - want_clean = True - continue - want_unknown = True - unknown_value = arg - break - - # debug - if enable_debug: - if debug_botan_path is None: - debug_botan_path = botan_path + "_d" - if debug_openssl_path is None: - debug_openssl_path = openssl_path + "_d" - -def appargs(arg): - """append seen arguments to configargs""" - global configargs - # escape backslashes, spaces and double quotes - escaped = "" - - for x in arg: - if (x == "\\") or (x == " ") or (x == "\""): - escaped += "\\" - escaped += x - if configargs: - configargs += " " + escaped - else: - configargs = escaped - -def myenable(key, val): - """parse enable/disable""" - global platform - global enable_debug - global enable_ecc - global enable_gost - global enable_static_runtime - global enable_non_paged - global enable_keep - global verbose - global want_unknown - global unknown_value - if key.lower() == "64bit": - if val: - platform = 64 - return - if key.lower() == "debug": - if not val: - enable_debug = False - return - if key.lower() == "ecc": - if not val: - enable_ecc = False - return - if key.lower() == "gost": - if not val: - enable_gost = False - return - if key.lower() == "static-runtime": - if val: - enable_static_runtime = True - return - if key.lower() == "non-paged-memory": - if not val: - enable_non_paged = False - return - if key.lower() == "keep": - if val: - enable_keep = True - return - if key.lower() == "verbose": - if val: - verbose = True - return - want_unknown = True - if not val: - unknown_value = "disable-" + key - else: - unknown_value = "enable-" + key - -def mywith(key, val, detail=None): - """parse with/without""" - global crypto_backend - global botan_path - global debug_botan_path - global openssl_path - global debug_openssl_path - global want_tests - global cppunit_path - global want_unknown - global unknown_value - global toolset - - if key.lower() == "crypto-backend": - if val and (detail.lower() == "openssl"): - crypto_backend = "openssl" - return - if val and (detail.lower() == "botan"): - crypto_backend = "botan" - return - want_unknown = True - unknown_value = "with-crypto-backend=" + detail - return - if key.lower() == "botan": - if not val: - want_unknown = True - unknown_value = "without-botan doesn't make sense" - return - if detail.lower() != "yes": - botan_path = detail - return - if key.lower() == "debug-botan": - if not val: - want_unknown = True - unknown_value = "without-debug-botan doesn't make sense" - return - if detail.lower() != "yes": - debug_botan_path = detail - return - if key.lower() == "openssl": - if not val: - want_unknown = True - unknown_value = "without-openssl doesn't make sense" - return - if detail.lower() != "yes": - openssl_path = detail - return - if key.lower() == "debug-openssl": - if not val: - want_unknown = True - unknown_value = "without-debug-openssl doesn't make sense" - return - if detail.lower() != "yes": - debug_openssl_path = detail - return - if key.lower() == "cppunit": - if not val: - want_tests = False - return - if detail.lower() != "yes": - cppunit_path = detail - return - if key.lower() == "toolset": - if not val: - want_tests = False - return - if detail: - toolset=detail.lower() - return - want_unknown = True - if not val: - unknown_value = "without-" + key - else: - unknown_value = "with-" + key - -def dohelp(): - """help""" - for line in myhelp: - print(line) - sys.exit(1) - -def docleantest(): - """clean test files""" - for basename in testlist: - filename = "test" + basename + ".c" - if os.path.isfile(filename): - os.unlink(filename) - filename = "test" + basename + ".cpp" - if os.path.isfile(filename): - os.unlink(filename) - filename = "test" + basename + ".obj" - if os.path.isfile(filename): - os.unlink(filename) - filename = "test" + basename + ".exe" - if os.path.isfile(filename): - os.unlink(filename) - if os.path.isfile("botan.dll"): - os.unlink("botan.dll") - if os.path.isfile("libeay32.dll"): - os.unlink("libeay32.dll") - if os.path.isfile("libeaycompat32.dll"): - os.unlink("libeaycompat32.dll") - if os.path.isfile("libcrypto-1_1.dll"): - os.unlink("libcrypto-1_1.dll") - if os.path.isfile("libcrypto-1_1-x64.dll"): - os.unlink("libcrypto-1_1-x64.dll") - -def doclean(): - """clean""" - docleantest() - for filename in filelist: - if os.path.isfile(filename): - os.unlink(filename) - sys.exit(0) - -def dounknown(): - """parsing error""" - print("can't parse " + unknown_value + "", file=sys.stderr) - sys.exit(1) - -def doconfig(): - """config itself""" - global botan_path - global debug_botan_path - global openssl_path - global debug_openssl_path - global cppunit_path - - # configure the platform - if platform == 32: - varvals["PLATFORM"] = "Win32" - else: - varvals["PLATFORM"] = "x64" - varvals["PLATFORMDIR"] = "x64\\" - - # configure the runtime library - if enable_static_runtime: - varvals["RUNTIMELIBRARY"] = "MultiThreaded" - else: - varvals["RUNTIMELIBRARY"] = "MultiThreadedDLL" - - # configure ECC and GOST - if enable_ecc: - condvals["ECC"] = True - if enable_gost: - condvals["GOST"] = True - - # configure the crypto - if crypto_backend == "botan": - condvals["BOTAN"] = True - varvals["LIBNAME"] = "botan.lib" - botan_path = os.path.abspath(botan_path) - botan_inc = os.path.join(botan_path, "include") - botan_dll = "" - if os.path.exists(os.path.join(botan_inc, "botan-2\\botan\\init.h")): - varvals["INCLUDEPATH"] = os.path.join(botan_inc, "botan-2") - elif os.path.exists(os.path.join(botan_inc, "botan-1.11\\botan\\init.h")): - varvals["INCLUDEPATH"] = os.path.join(botan_inc, "botan-1.11") - elif os.path.exists(os.path.join(botan_inc, "botan\\init.h")): - varvals["INCLUDEPATH"] = botan_inc - else: - print("can't find Botan includes", file=sys.stderr) - sys.exit(1) - if os.path.exists(os.path.join(botan_path, "lib\\botan.lib")): - varvals["LIBPATH"] = os.path.join(botan_path, "lib") - botan_dll = os.path.join(botan_path, "lib\\botan.dll") - elif os.path.exists(os.path.join(botan_path, "botan.lib")): - varvals["LIBPATH"] = botan_path - botan_dll = os.path.join(botan_path, "botan.dll") - else: - print("can't find Botan library", file=sys.stderr) - sys.exit(1) - varvals["DLLPATH"] = botan_dll - if enable_debug: - debug_botan_path = os.path.abspath(debug_botan_path) - debug_botan_inc = os.path.join(debug_botan_path, "include") - debug_botan_dll = "" - if os.path.exists(os.path.join(debug_botan_inc, "botan-2\\botan\\init.h")): - varvals["DEBUGINCPATH"] = os.path.join(debug_botan_inc, "botan-2") - elif os.path.exists(os.path.join(debug_botan_inc, "botan-1.11\\botan\\init.h")): - varvals["DEBUGINCPATH"] = os.path.join(debug_botan_inc, "botan-1.11") - elif os.path.exists(os.path.join(debug_botan_inc, "botan\\init.h")): - varvals["DEBUGINCPATH"] = debug_botan_inc - else: - print("can't find debug Botan includes", file=sys.stderr) - sys.exit(1) - if os.path.exists(os.path.join(debug_botan_path, "lib\\botan.lib")): - varvals["DEBUGLIBPATH"] = os.path.join(debug_botan_path, "lib") - debug_botan_dll = os.path.join(debug_botan_path, "lib\\botan.dll") - if os.path.exists(os.path.join(debug_botan_path, "botan.lib")): - varvals["DEBUGLIBPATH"] = debug_botan_path - debug_botan_dll = os.path.join(debug_botan_path, "botan.dll") - else: - print("can't find debug Botan library", file=sys.stderr) - sys.exit(1) - varvals["DEBUGDLLPATH"] = debug_botan_dll - else: - varvals["DEBUGDLLPATH"] = varvals["DLLPATH"] - varvals["DEBUGINCPATH"] = varvals["INCLUDEPATH"] - varvals["DEBUGLIBPATH"] = varvals["LIBPATH"] - - # Botan version - if verbose: - print("checking Botan version") - botan_version_major = 0 - botan_version_minor = 0 - system_libs = [] - if os.path.exists(botan_dll): - subprocess.call(["copy", botan_dll, "."], shell=True) - else: - system_libs = ["user32.lib", "advapi32.lib"] - inc = varvals["INCLUDEPATH"] - lib = os.path.join(varvals["LIBPATH"], "botan.lib") - testfile = open("testbotan.cpp", "w") - print('\ -#include \n\ -int main() {\n\ -#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(2,0,0)\n\ - return 3;\n\ -#elif BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,11,0)\n\ - return 2;\n\ -#elif BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,10,0)\n\ - return 1;\n\ -#else\n\ - return 0;\n\ -#endif\n\ -}', file=testfile) - testfile.close() - command = ["cl", "/nologo", "/MD", "/I", inc, "testbotan.cpp", lib] - command.extend(system_libs) - subprocess.check_output(command, stderr=subprocess.STDOUT) - if not os.path.exists(".\\testbotan.exe"): - print("can't create .\\testbotan.exe", file=sys.stderr) - sys.exit(1) - ret = subprocess.call(".\\testbotan.exe") - if ret == 0: - print("Botan version too old", file=sys.stderr) - sys.exit(1) - elif ret == 1: - botan_version_major = 1 - botan_version_minor = 10 - elif ret == 2: - botan_version_major = 1 - botan_version_minor = 11 - print("Botan version 1.11 not yet supported", file=sys.stderr) - sys.exit(1) - elif ret == 3: - botan_version_major = 2 - botan_version_minor = 0 - print("Botan version 2.0 not yet supported", file=sys.stderr) - sys.exit(1) - else: - print("Botan test failed", file=sys.stderr) - sys.exit(1) - - # Botan ECC support - if enable_ecc: - if verbose: - print("checking Botan ECC support") - testfile = open("testecc.cpp", "w") - print('\ -#include \n\ -#include \n\ -#include \n\ -#include \n\ -int main() {\n\ - Botan::LibraryInitializer::initialize();\n\ - const std::string name("secp256r1");\n\ - const Botan::OID oid(Botan::OIDS::lookup(name));\n\ - const Botan::EC_Group ecg(oid);\n\ - try {\n\ -#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,11,0)\n\ - const std::vector der =\n\ - ecg.DER_encode(Botan::EC_DOMPAR_ENC_OID);\n\ -#else\n\ - const Botan::SecureVector der =\n\ - ecg.DER_encode(Botan::EC_DOMPAR_ENC_OID);\n\ -#endif\n\ - } catch(...) {\n\ - return 1;\n\ - }\n\ - return 0;\n\ -}', file=testfile) - testfile.close() - command = ["cl", "/nologo", "/MD", "/I", inc, "testecc.cpp", lib] - command.extend(system_libs) - subprocess.check_output(command, stderr=subprocess.STDOUT) - if not os.path.exists(".\\testecc.exe"): - print("can't create .\\testecc.exe", file=sys.stderr) - sys.exit(1) - if subprocess.call(".\\testecc.exe") != 0: - print("can't find P256: upgrade to Botan >= 1.10.6", file=sys.stderr) - sys.exit(1) - - # Botan GOST support - if enable_gost: - if verbose: - print("checking Botan GOST support") - testfile = open("testgost.cpp", "w") - print('\ -#include \n\ -#include \n\ -#include \n\ -#include \n\ -int main() {\n\ - Botan::LibraryInitializer::initialize();\n\ - const std::string name("gost_256A");\n\ - const Botan::OID oid(Botan::OIDS::lookup(name));\n\ - const Botan::EC_Group ecg(oid);\n\ - try {\n\ -#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,11,0)\n\ - const std::vector der =\n\ - ecg.DER_encode(Botan::EC_DOMPAR_ENC_OID);\n\ -#else\n\ - const Botan::SecureVector der =\n\ - ecg.DER_encode(Botan::EC_DOMPAR_ENC_OID);\n\ -#endif\n\ - } catch(...) {\n\ - return 1;\n\ - }\n\ - return 0;\n\ -}', file=testfile) - testfile.close() - command = ["cl", "/nologo", "/MD", "/I", inc, "testgost.cpp", lib] - command.extend(system_libs) - subprocess.check_output(command, stderr=subprocess.STDOUT) - if not os.path.exists(".\\testgost.exe"): - print("can't create .\\testgost.exe", file=sys.stderr) - sys.exit(1) - if subprocess.call(".\\testgost.exe") != 0: - print("can't find GOST: upgrade to Botan >= 1.10.6", file=sys.stderr) - sys.exit(1) - - # no check for Botan RFC3394 support - condvals["RFC3394"] = True - - # Botan RFC5649 support - if verbose: - print("checking Botan RFC5649 support") - testfile = open("testrfc5649.cpp", "w") - print('\ -#include \n\ -#include \n\ -#include \n\ -using namespace Botan;\n\ -int main() {\n\ -#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(1,11,0)\n\ - secure_vector key(10);\n\ - SymmetricKey kek("AABB");\n\ - secure_vector x = rfc5649_keywrap(key, kek);\n\ -#else\n\ - SecureVector key(10);\n\ - SymmetricKey kek("AABB");\n\ - Algorithm_Factory& af = global_state().algorithm_factory();\n\ - SecureVector x = rfc5649_keywrap(key, kek, af);\n\ -#endif\n\ - return 1;\n\ -}', file=testfile) - testfile.close() - command = ["cl", "/nologo", "/MD", "/EHsc","/I", inc, "testrfc5649.cpp", lib] - command.extend(system_libs) - subprocess.call(command) - if os.path.exists(".\\testrfc5649.exe"): - if verbose: - print("Found AES key wrap with pad") - condvals["RFC5649"] = True - else: - if verbose: - print("can't compile Botan AES key wrap with pad") - - # Botan GNU MP support - if botan_version_major == 1 and botan_version_minor == 10: - if verbose: - print("checking Botan GNU MP support") - testfile = open("testgnump.cpp", "w") - print('\ -#include \n\ -int main() {\n\ -#ifndef BOTAN_HAS_ENGINE_GNU_MP\n\ -#error "No GNU MP support";\n\ -#endif\n\ -}', file=testfile) - testfile.close() - command = ["cl", "/nologo", "/MD", "/I", inc, "testgnump.cpp", lib] - command.extend(system_libs) - subprocess.call(command) - if os.path.exists(".\\testgnump.exe"): - if verbose: - print("Botan GNU MP is supported") - else: - if verbose: - print("Botan GNU MP is not supported") - - # Botan raw PSS support - if verbose: - print("checking Botan raw PSS support") - testfile = open("testrawpss.cpp", "w") - print('\ -#include \n\ -#include \n\ -int main() {\n\ -#if BOTAN_VERSION_CODE >= BOTAN_VERSION_CODE_FOR(2,3,0)\n\ - return 0;\n\ -#endif\n\ - return 1;\n\ -}', file=testfile) - testfile.close() - command = ["cl", "/nologo", "/MD", "/I", inc, "testrawpss.cpp", lib] - command.extend(system_libs) - subprocess.check_output(command, stderr=subprocess.STDOUT) - if not os.path.exists(".\\testrawpss.exe"): - if verbose: - print("can't create .\\testrawpss.exe", file=sys.stderr) - else: - if subprocess.call(".\\testrawpss.exe") != 0: - if verbose: - print("can't find raw PSS: upgrade to Botan >= 2.3.0", file=sys.stderr) - else: - condvals["RAWPSS"] = True - - else: - - condvals["OPENSSL"] = True - varvals["EXTRALIBS"] = "crypt32.lib;ws2_32.lib;" - openssl_path = os.path.abspath(openssl_path) - openssl_inc = os.path.join(openssl_path, "include") - if not os.path.exists(os.path.join(openssl_inc, "openssl\\ssl.h")): - print("can't find OpenSSL headers", file=sys.stderr) - sys.exit(1) - varvals["INCLUDEPATH"] = openssl_inc - openssl_lib = os.path.join(openssl_path, "lib") - openssl_lib_name = "" - openssl_lib_dll = "" - if os.path.exists(os.path.join(openssl_lib, "libeay32.lib")): - openssl_lib_name = "libeay32.lib" - openssl_lib_dll = "bin\\libeay32.dll" - elif os.path.exists(os.path.join(openssl_lib, "libeaycompat32.lib")): - openssl_lib_name = "libeaycompat32.lib" - openssl_lib_dll = "bin\\libeaycompat32.dll" - elif os.path.exists(os.path.join(openssl_lib, "libcrypto.lib")): - openssl_lib_name = "libcrypto.lib" - if platform == 32: - openssl_lib_dll = "bin\\libcrypto-1_1.dll" - else: - openssl_lib_dll = "bin\\libcrypto-1_1-x64.dll" - - else: - print("can't find OpenSSL library", file=sys.stderr) - sys.exit(1) - openssl_dll = os.path.join(openssl_path,openssl_lib_dll) - varvals["LIBPATH"] = openssl_lib - varvals["LIBNAME"] = openssl_lib_name - varvals["DLLPATH"] = openssl_dll - if enable_debug: - debug_openssl_path = os.path.abspath(debug_openssl_path) - varvals["DEBUGDLLPATH"] = \ - os.path.join(debug_openssl_path, openssl_lib_dll) - debug_openssl_inc = os.path.join(debug_openssl_path, "include") - if not os.path.exists(os.path.join(debug_openssl_inc, - "openssl\\ssl.h")): - print("can't find debug OpenSSL headers", file=sys.stderr) - sys.exit(1) - varvals["DEBUGINCPATH"] = debug_openssl_inc - debug_openssl_lib = os.path.join(debug_openssl_path, "lib") - if not os.path.exists(os.path.join(debug_openssl_lib, - openssl_lib_name)): - print("can't find debug OpenSSL library", file=sys.stderr) - sys.exit(1) - varvals["DEBUGLIBPATH"] = debug_openssl_lib - else: - varvals["DEBUGDLLPATH"] = varvals["DLLPATH"] - varvals["DEBUGINCPATH"] = varvals["INCLUDEPATH"] - varvals["DEBUGLIBPATH"] = varvals["LIBPATH"] - - # OpenSSL support - if verbose: - print("checking OpenSSL") - system_libs = [] - if os.path.exists(openssl_dll): - subprocess.call(["copy", openssl_dll, "."], shell=True) - else: - system_libs = ["user32.lib", "advapi32.lib", "gdi32.lib", "crypt32.lib", "ws2_32.lib"] - inc = openssl_inc - lib = os.path.join(openssl_lib, openssl_lib_name) - testfile = open("testossl.c", "w") - print('\ -#include \n\ -int main() {\n\ - ERR_clear_error();\n\ - return 0;\n\ -}', file=testfile) - testfile.close() - command = ["cl", "/nologo", "/MD", "/I", inc, "testossl.c", lib] - command.extend(system_libs) - subprocess.check_output(command, stderr=subprocess.STDOUT) - if not os.path.exists(".\\testossl.exe"): - print("can't create .\\testossl.exe", file=sys.stderr) - sys.exit(1) - if subprocess.call(".\\testossl.exe") != 0: - print("OpenSSL test failed", file=sys.stderr) - sys.exit(1) - - # OpenSSL version - if verbose: - print("checking OpenSSL version") - testfile = open("testosslv.c", "w") - print('\ -#include \n\ -#include \n\ -int main() {\n\ -#ifndef OPENSSL_VERSION_NUMBER\n\ - return -1;\n\ -#endif\n\ -#if OPENSSL_VERSION_NUMBER >= 0x010000000L\n\ - return 0;\n\ -#else\n\ - return 1;\n\ -#endif\n\ -}', file=testfile) - testfile.close() - command = ["cl", "/nologo", "/MD", "/I", inc, "testosslv.c", lib] - command.extend(system_libs) - subprocess.check_output(command, stderr=subprocess.STDOUT) - if not os.path.exists(".\\testosslv.exe"): - print("can't create .\\testosslv.exe", file=sys.stderr) - sys.exit(1) - if subprocess.call(".\\testosslv.exe") != 0: - print("OpenSLL version too old (1.0.0 or later required)", file=sys.stderr) - sys.exit(1) - - # OpenSSL ECC support - if enable_ecc: - if verbose: - print("checking OpenSSL ECC support") - testfile = open("testecc.c", "w") - print('\ -#include \n\ -#include \n\ -int main() {\n\ - EC_KEY *ec256, *ec384, *ec521;\n\ - ec256 = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);\n\ - ec384 = EC_KEY_new_by_curve_name(NID_secp384r1);\n\ - ec521 = EC_KEY_new_by_curve_name(NID_secp521r1);\n\ - if (ec256 == NULL || ec384 == NULL || ec521 == NULL)\n\ - return 1;\n\ - return 0;\n\ -}', file=testfile) - testfile.close() - command = ["cl", "/nologo", "/MD", "/I", inc, "testecc.c", lib] - command.extend(system_libs) - subprocess.check_output(command, stderr=subprocess.STDOUT) - if not os.path.exists(".\\testecc.exe"): - print("can't create .\\testecc.exe", file=sys.stderr) - sys.exit(1) - if subprocess.call(".\\testecc.exe") != 0: - print("can't find P256, P384, or P521: no ECC support", file=sys.stderr) - sys.exit(1) - - # OpenSSL GOST support - if enable_gost: - if verbose: - print("checking OpenSSL GOST support") - testfile = open("testgost.c", "w") - print('\ -#include \n\ -#include \n\ -#include \n\ -#include \n\ -int main() {\n\ - ENGINE *eg;\n\ - const EVP_MD* EVP_GOST_34_11;\n\ - OpenSSL_add_all_algorithms();\n\ -#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)\n\ - ENGINE_load_builtin_engines();\n\ -#else\n\ - OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_ALL_BUILTIN | OPENSSL_INIT_LOAD_CONFIG, NULL);\n\ -#endif\n\ - eg = ENGINE_by_id("gost");\n\ - if (eg == NULL)\n\ - return 1;\n\ - if (ENGINE_init(eg) <= 0)\n\ - return 1;\n\ - EVP_GOST_34_11 = ENGINE_get_digest(eg, NID_id_GostR3411_94);\n\ - if (EVP_GOST_34_11 == NULL)\n\ - return 1;\n\ - if (ENGINE_register_pkey_asn1_meths(eg) <= 0)\n\ - return 1;\n\ - if (ENGINE_ctrl_cmd_string(eg, "CRYPT_PARAMS",\n\ - "id-Gost28147-89-CryptoPro-A-ParamSet", 0) <= 0)\n\ - return 1;\n\ - return 0;\n\ -}', file=testfile) - testfile.close() - command = ["cl", "/nologo", "/MD", "/I", inc, "testgost.c", lib] - command.extend(system_libs) - subprocess.check_output(command, stderr=subprocess.STDOUT) - if not os.path.exists(".\\testgost.exe"): - print("can't create .\\testgost.exe", file=sys.stderr) - sys.exit(1) - if subprocess.call(".\\testgost.exe") != 0: - print("can't find GOST: no GOST support", file=sys.stderr) - sys.exit(1) - - # OpenSSL EVP interface for AES key wrapping (aka RFC 3394) - if verbose: - print("checking OpenSSL EVP interface for AES key wrapping") - testfile = open("testrfc3394.c", "w") - print('\ -#include \n\ -int main() {\n\ - EVP_aes_128_wrap();\n\ - return 1;\n\ -}', file=testfile) - testfile.close() - command = ["cl", "/nologo", "/MD", "/I", inc, "testrfc3394.c", lib] - command.extend(system_libs) - subprocess.call(command) - if os.path.exists(".\\testrfc3394.exe"): - if verbose: - print("RFC 3394 is supported") - condvals["RFC3394"] = True - else: - if verbose: - print("can't compile OpenSSL RFC 3394") - - # OpenSSL EVP interface for AES key wrap with pad (aka RFC 5649) - if verbose: - print("checking OpenSSL EVP interface for AES key wrapping with pad") - testfile = open("testrfc5649.c", "w") - print('\ -#include \n\ -int main() {\n\ - EVP_aes_128_wrap_pad();\n\ - return 1;\n\ -}', file=testfile) - testfile.close() - command = ["cl", "/nologo", "/MD", "/I", inc, "testrfc5649.c", lib] - command.extend(system_libs) - subprocess.call(command) - if os.path.exists(".\\testrfc5649.exe"): - if verbose: - print("RFC 5649 is supported") - condvals["RFC5649"] = True - else: - if verbose: - print("can't compile OpenSSL RFC 5649") - - # no check for OpenSSL raw PSS support - condvals["RAWPSS"] = True - # no check for OpenSSL AES GCM - condvals["AESGCM"] = True - - # configure CppUnit - if want_tests: - condvals["TESTS"] = True - cppunit_path = os.path.abspath(cppunit_path) - cppunit_inc = os.path.join(cppunit_path, "include") - if not os.path.exists(os.path.join(cppunit_inc, "cppunit\\Test.h")): - print("can't find CppUnit headers", file=sys.stderr) - sys.exit(1) - varvals["CUINCPATH"] = cppunit_inc - cppunit_lib = os.path.join(cppunit_path, "lib") - if not os.path.exists(os.path.join(cppunit_lib, "cppunit.lib")): - cppunit_lib = cppunit_path - if not os.path.exists(os.path.join(cppunit_lib, "cppunit.lib")): - print("can't find CppUnit library", file=sys.stderr) - sys.exit(1) - if enable_debug: - if not os.path.exists(os.path.join(cppunit_lib, "cppunitd.lib")): - print("can't find debug CppUnit library", file=sys.stderr) - sys.exit(1) - varvals["CULIBPATH"] = cppunit_lib - - # misc - if enable_non_paged: - condvals["NONPAGE"] = True - -def kw(path): - """escape spaces""" - if re.search(r' ', path): - return '"' + path + '"' - else: - return path - -def setupfile(filename): - """setup files with condition stacks and variable expansions""" - cond = "@@@" - conds = [] - passing = True - passes = [] - filein = open(filename + ".in", "r") - fileout = open(filename, "w") - - for line in filein: - line = line.rstrip("\r\n") - cif = re.match(r'@IF (.*)', line) - if cif: - conds.append(cond) - passes.append(passing) - cond = cif.group(1) - if condvals.get(cond): - # do nothing - pass - else: - passing = False - continue - celse = re.match(r'@ELSE (.*)', line) - if celse: - if cond != celse.group(1): - raise SyntaxError("@ELSE " + celse.group(1) + - " mismatch in " + filename) - if condvals.get(cond): - passing = False - else: - if len(passes) > 0: - passing = passes[-1] - else: - passing = True - continue - cend = re.match(r'@END (.*)', line) - if cend: - if cond != cend.group(1): - raise SyntaxError("@END " + cend.group(1) + - " mismatch in " + filename) - cond = conds.pop() - if len(passes) > 0: - passing = passes.pop() - else: - passing = True - continue - if not passing: - continue - while True: - vm = re.match(r'([^@]*)@([^@ ]*)@(.*)', line) - if vm: - if vm.group(2) in varnames: - if varvals.get(vm.group(2)): - val = kw(varvals[vm.group(2)]) - else: - val = "" - line = vm.group(1) + val + vm.group(3) - continue - else: - raise SyntaxError("unknown control @" + vm.group(2) + - "@ in " + filename) - break - print(line, file=fileout) - if verbose: - print("Setting up " + filename) - filein.close() - fileout.close() - -def main(args): - """run it""" - - # no arguments -> usage - if len(args) <= 1: - for line in usage: - print(line) - sys.exit(1) - - parseargs(args[1:]) - - if want_help: - dohelp() - if want_clean: - doclean() - if want_unknown: - dounknown() - if not toolset: - dodetectvisualstudio() - if not toolset: - print("Build skipped. To build, this file needs to run from VS command prompt.") - sys.exit(1) - - varvals["PLATFORMTOOLSET"] = toolset - - # status before config - if verbose: - if enable_keep: - print("keep: enabled") - else: - print("keep: disabled") - if platform == 64: - print("64bit: enabled") - else: - print("64bit: disabled") - if enable_debug: - print("debug: enabled") - else: - print("debug: disabled") - if enable_ecc: - print("ecc: enabled") - else: - print("ecc: disabled") - if enable_gost: - print("gost: enabled") - else: - print("gost: disabled") - if enable_non_paged: - print("non-paged-memory: enabled") - else: - print("non-paged-memory: disabled") - print("crypto-backend: " + crypto_backend) - if crypto_backend == "botan": - print("botan-path: " + botan_path) - if enable_debug: - print("debug-botan-path: " + debug_botan_path) - else: - print("openssl-path: " + openssl_path) - if enable_debug: - print("debug-openssl-path: " + debug_openssl_path) - if want_tests: - print("cppunit-path: " + cppunit_path) - print("toolset: "+toolset) - - - doconfig() - - # status after config - if verbose: - print("Configuration Status") - print("\tconditions:") - for name in condnames: - if condvals.get(name): - print("\t\t" + name + " is true") - else: - print("\t\t" + name + " is false") - print("\tsubstitutions:") - for name in varnames: - if varvals.get(name): - print("\t\t" + name + '-> "' + varvals[name] + '"') - print() - - for filename in filelist: - setupfile(filename) - - # clean test file - if not enable_keep: - docleantest() - - print("Configured.") - sys.exit(0) - -main(sys.argv) - -# Notes: Unix configure.ac options -# --enable-64bit supported -# --enable-ecc supported -# --enable-gost supported -# --enable-non-paged-memory supported -# --enable-visibility (enforced by DLLs) -# --with-crypto-backend supported -# --with-botan supported (Release and Debug) -# --with-openssl supported (Release and Debug) -# --with-migrate (useless as SoftHSMv1 is not supported) -# --with-objectstore-backend-db (TODO) -# --with-sqlite3 (useless until objectstore backend can be chosen) diff --git a/SoftHSMv2/win32/config.h.in b/SoftHSMv2/win32/config.h.in deleted file mode 100644 index f2b56ba..0000000 --- a/SoftHSMv2/win32/config.h.in +++ /dev/null @@ -1,185 +0,0 @@ -/* config.h for WIN32 */ - -/* The default log level */ -#define DEFAULT_LOG_LEVEL "INFO" - -/* Default storage backend for token objects */ -#define DEFAULT_OBJECTSTORE_BACKEND "file" - -/* The default PKCS#11 library */ -#define DEFAULT_PKCS11_LIB "softhsm2.dll" - -/* The default location of softhsm2.conf */ -#define DEFAULT_SOFTHSM2_CONF "softhsm2.conf" - -/* The default location of the token directory */ -#define DEFAULT_TOKENDIR "tokens" - -/* Define if advanced AES key wrap without pad is supported */ -@IF RFC3394 -#define HAVE_AES_KEY_WRAP 1 -@ELSE RFC3394 -#undef HAVE_AES_KEY_WRAP -@END RFC3394 - -/* Define if advanced AES key wrap with pad is supported */ -@IF RFC5649 -#define HAVE_AES_KEY_WRAP_PAD 1 -@ELSE RFC5649 -#undef HAVE_AES_KEY_WRAP_PAD -@END RFC5649 - -/* Whether LoadLibrary is available */ -#define HAVE_LOADLIBRARY 1 - -/* Define to 1 if you have the header file. */ -#undef HAVE_SQLITE3_H - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Maximum PIN length */ -#define MAX_PIN_LEN 255 - -/* Minimum PIN length */ -#define MIN_PIN_LEN 4 - -/* Name of package */ -#define PACKAGE "softhsm" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "SoftHSM" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "SoftHSM 2.3.0" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "softhsm" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "2.3.0" - -/* Non-paged memory for secure storage */ -@IF NONPAGE -#define SENSITIVE_NON_PAGE 1 -@ELSE NONPAGE -#undef SENSITIVE_NON_PAGE -@END NONPAGE - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Version number of package */ -#define VERSION "2.3.0" - -/* SoftHSM major version number via PKCS#11 */ -#define VERSION_MAJOR 2 - -/* SoftHSM minor version number via PKCS#11 */ -#define VERSION_MINOR 3 - -/* Compile with Botan support */ -@IF BOTAN -#define WITH_BOTAN 1 -@ELSE BOTAN -#undef WITH_BOTAN -@END BOTAN - -/* Compile with ECC support */ -@IF ECC -#define WITH_ECC 1 -@ELSE ECC -#undef WITH_ECC -@END ECC - -/* Compile with GOST support */ -@IF GOST -#define WITH_GOST 1 -@ELSE GOST -#undef WITH_GOST -@END GOST - -/* Compile with OpenSSL support */ -@IF OPENSSL -#define WITH_OPENSSL 1 -@ELSE OPENSSL -#undef WITH_OPENSSL -@END OPENSSL - -/* Compile with raw PSS support */ -@IF RAWPSS -#define WITH_RAW_PSS 1 -@ELSE RAWPSS -#undef WITH_RAW_PSS -@END RAWPSS - -/* Compile with AES GCM support */ -@IF AESGCM -#define WITH_AES_GCM 1 -@ELSE AESGCM -#undef WITH_AES_GCM -@END AESGCM - -/* 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 - -/* avoid collision from min and max macros */ - -#undef min -#undef max - -@IF BOTAN -/* For Botan */ - -#pragma warning(disable: 4275 4267) -@END BOTAN - -/* Temporary for debug */ - -#undef DEBUG_LOG_STDERR -// #define DEBUG_LOG_STDERR 1 - -/* To avoid unsafe warnings (off) */ - -// #pragma warning(disable: 4996) diff --git a/SoftHSMv2/win32/convarch/convarch.vcxproj.filters.in b/SoftHSMv2/win32/convarch/convarch.vcxproj.filters.in deleted file mode 100644 index d3c84f1..0000000 --- a/SoftHSMv2/win32/convarch/convarch.vcxproj.filters.in +++ /dev/null @@ -1,928 +0,0 @@ - - - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - {b657b1af-4cc4-4d97-ba6a-0a7231c5f243} - h;hpp;hxx;hm;inl;inc;xsd - - - {aacfc93a-d2e0-4935-aa15-ea0d3690fbcd} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {6337c51f-53e3-440a-9ab9-40f0b9a4f26e} - h;hpp;hxx;hm;inl;inc;xsd - - - {8566a5d1-d688-41da-bbc3-3d860f2db764} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {b427db7b-49c3-47b0-982a-7da01cf39c8e} - h;hpp;hxx;hm;inl;inc;xsd - - - {04a46825-a433-4b5c-9c3f-8c489978cb8a} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {9e67afe5-3252-4c46-a24f-096e4a35e174} - h;hpp;hxx;hm;inl;inc;xsd - - - {b8a7e894-ebbe-43de-ad66-3c45d91aac8e} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {0c47956d-aa5e-4c26-bee4-63ec89c0ab64} - h;hpp;hxx;hm;inl;inc;xsd - - - {45c69303-5073-4bde-8b63-2f2e2a688362} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {d1a8b25d-8ebb-4a79-ae8c-70ef3c0bed5f} - h;hpp;hxx;hm;inl;inc;xsd - - - {cb379241-3d4b-4f7c-b7d1-c6c83d3a1b62} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {5420eba7-6b85-4daf-a916-c85421362984} - h;hpp;hxx;hm;inl;inc;xsd - - - {3c9f55a5-d1a8-4716-a416-ec172a676e63} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {63e3d8a2-0853-4f98-bcaa-de05da380d37} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {59b2221a-36a3-4f2c-9883-6173599baf5a} - h;hpp;hxx;hm;inl;inc;xsd - - - - - Common Header Files - - - Common Header Files - - - Common Header Files - - - Common Header Files - - - Common Header Files - - - Common Header Files - - - Common Header Files - - - Common Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - -@IF BOTAN - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - -@END BOTAN - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - -@IF OPENSSL - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - -@END OPENSSL - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Crypto Header Files - - - Data Mgr Header Files - - - Data Mgr Header Files - - - Data Mgr Header Files - - - Data Mgr Header Files - - - Data Mgr Header Files - - - Data Mgr Header Files - - - Handle Mgr Header Files - - - Handle Mgr Header Files - - - Object Store Header Files - - - Object Store Header Files - - - Object Store Header Files - - - Object Store Header Files - - - Object Store Header Files - - - Object Store Header Files - - - Object Store Header Files - - - Object Store Header Files - - - Object Store Header Files - - - Object Store Header Files - - - Object Store Header Files - - - Object Store Header Files - - - Object Store Header Files - - - Object Store Header Files - - - Object Store Header Files - - - Session Mgr Header Files - - - Session Mgr Header Files - - - Slot Mgr Header Files - - - Slot Mgr Header Files - - - Slot Mgr Header Files - - - Win32 Header Files - - - - - Common Source Files - - - Common Source Files - - - Common Source Files - - - Common Source Files - - - Common Source Files - - - Common Source Files - - - Crypto Source Files - - - Crypto Source Files - -@IF BOTAN - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - -@END BOTAN - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - -@IF OPENSSL - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - -@END OPENSSL - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Crypto Source Files - - - Data Mgr Source Files - - - Data Mgr Source Files - - - Data Mgr Source Files - - - Data Mgr Source Files - - - Data Mgr Source Files - - - Handle Mgr Source Files - - - Handle Mgr Source Files - - - Object Store Source Files - - - Object Store Source Files - - - Object Store Source Files - - - Object Store Source Files - - - Object Store Source Files - - - Object Store Source Files - - - Object Store Source Files - - - Object Store Source Files - - - Object Store Source Files - - - Object Store Source Files - - - Object Store Source Files - - - Object Store Source Files - - - Session Mgr Source Files - - - Session Mgr Source Files - - - Slot Mgr Source Files - - - Slot Mgr Source Files - - - Slot Mgr Source Files - - - Win32 Source Files - - - diff --git a/SoftHSMv2/win32/convarch/convarch.vcxproj.in b/SoftHSMv2/win32/convarch/convarch.vcxproj.in deleted file mode 100644 index b711f35..0000000 --- a/SoftHSMv2/win32/convarch/convarch.vcxproj.in +++ /dev/null @@ -1,374 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - - - - - - - - - - - - -@IF BOTAN - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@END BOTAN - - - - - - - - - - - - - - - - -@IF OPENSSL - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@END OPENSSL - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@IF BOTAN - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@END BOTAN - - - - - - - - - - - - - - - -@IF OPENSSL - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@END OPENSSL - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {F64541B6-FFBF-4368-B93A-A5CA8ADAD795} - Win32Proj - convarch - - - - StaticLibrary - true - Unicode - @PLATFORMTOOLSET@ - - - StaticLibrary - false - true - Unicode - @PLATFORMTOOLSET@ - - - - - - - - - - - - - - - - - Level3 - Disabled - _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\pkcs11;..\..\src\lib\common;..\..\src\lib\object_store;..\..\src\lib\slot_mgr;..\..\src\lib\session_mgr;..\..\src\lib\handle_mgr;..\..\src\lib\crypto;..\..\src\lib\win32;..\..\src\lib\data_mgr;@DEBUGINCPATH@;%(AdditionalIncludeDirectories) - @RUNTIMELIBRARY@ - - - Windows - true - - - - - Level3 - - - MaxSpeed - true - true - _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\pkcs11;..\..\src\lib\common;..\..\src\lib\object_store;..\..\src\lib\slot_mgr;..\..\src\lib\session_mgr;..\..\src\lib\handle_mgr;..\..\src\lib\crypto;..\..\src\lib\win32;..\..\src\lib\data_mgr;@INCLUDEPATH@;%(AdditionalIncludeDirectories) - @RUNTIMELIBRARY@ - - - Windows - true - true - true - - - - - - diff --git a/SoftHSMv2/win32/convarch/convarch.vcxproj.user b/SoftHSMv2/win32/convarch/convarch.vcxproj.user deleted file mode 100644 index 695b5c7..0000000 --- a/SoftHSMv2/win32/convarch/convarch.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/SoftHSMv2/win32/cryptotest/cryptotest.vcxproj.filters b/SoftHSMv2/win32/cryptotest/cryptotest.vcxproj.filters deleted file mode 100644 index 9aee71d..0000000 --- a/SoftHSMv2/win32/cryptotest/cryptotest.vcxproj.filters +++ /dev/null @@ -1,123 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - diff --git a/SoftHSMv2/win32/cryptotest/cryptotest.vcxproj.in b/SoftHSMv2/win32/cryptotest/cryptotest.vcxproj.in deleted file mode 100644 index 010b890..0000000 --- a/SoftHSMv2/win32/cryptotest/cryptotest.vcxproj.in +++ /dev/null @@ -1,127 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {07E03E0B-C525-4A72-88C6-2238896A4D8C} - Win32Proj - cryptotest - - - - Application - true - Unicode - @PLATFORMTOOLSET@ - - - Application - false - true - Unicode - @PLATFORMTOOLSET@ - - - - - - - - - - - - - true - - - false - - - - - - Level3 - Disabled - _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\crypto;..\..\src\lib\common;..\..\src\lib\pkcs11;..\..\src\lib\data_mgr;..\..\src\lib\object_store;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\win32;@CUINCPATH@;@DEBUGINCPATH@;%(AdditionalIncludeDirectories) - @RUNTIMELIBRARY@ - - - Console - true - ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@DEBUGLIBPATH@;%(AdditionalLibraryDirectories) - convarch.lib;cppunitd.lib;@LIBNAME@;@EXTRALIBS@%(AdditionalDependencies) - - - - - Level3 - - - MaxSpeed - true - true - _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\crypto;..\..\src\lib\common;..\..\src\lib\pkcs11;..\..\src\lib\data_mgr;..\..\src\lib\object_store;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\win32;@CUINCPATH@;@INCLUDEPATH@;%(AdditionalIncludeDirectories) - @RUNTIMELIBRARY@ - - - Console - true - true - true - ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@LIBPATH@;%(AdditionalLibraryDirectories) - convarch.lib;cppunit.lib;@LIBNAME@;@EXTRALIBS@%(AdditionalDependencies) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SoftHSMv2/win32/cryptotest/cryptotest.vcxproj.user b/SoftHSMv2/win32/cryptotest/cryptotest.vcxproj.user deleted file mode 100644 index 695b5c7..0000000 --- a/SoftHSMv2/win32/cryptotest/cryptotest.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/SoftHSMv2/win32/datamgrtest/datamgrtest.vcxproj.filters b/SoftHSMv2/win32/datamgrtest/datamgrtest.vcxproj.filters deleted file mode 100644 index 645ba69..0000000 --- a/SoftHSMv2/win32/datamgrtest/datamgrtest.vcxproj.filters +++ /dev/null @@ -1,54 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - diff --git a/SoftHSMv2/win32/datamgrtest/datamgrtest.vcxproj.in b/SoftHSMv2/win32/datamgrtest/datamgrtest.vcxproj.in deleted file mode 100644 index 0251af3..0000000 --- a/SoftHSMv2/win32/datamgrtest/datamgrtest.vcxproj.in +++ /dev/null @@ -1,104 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {E20315B5-B49E-46D7-B7EC-1A439F347C95} - Win32Proj - datamgrtest - - - - Application - true - Unicode - @PLATFORMTOOLSET@ - - - Application - false - true - Unicode - @PLATFORMTOOLSET@ - - - - - - - - - - - - - true - - - false - - - - - - Level3 - Disabled - _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\data_mgr;..\..\src\lib\common;..\..\src\lib\pkcs11;..\..\src\lib\crypto;..\..\src\lib\object_store;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\win32;@CUINCPATH@;@INCLUDEPATH@;%(AdditionalIncludeDirectories) - @RUNTIMELIBRARY@ - - - Console - true - ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@DEBUGLIBPATH@;%(AdditionalLibraryDirectories) - convarch.lib;cppunitd.lib;@LIBNAME@;@EXTRALIBS@%(AdditionalDependencies) - - - - - Level3 - - - MaxSpeed - true - true - _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\data_mgr;..\..\src\lib\common;..\..\src\lib\pkcs11;..\..\src\lib\crypto;..\..\src\lib\object_store;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\win32;@CUINCPATH@;@INCLUDEPATH@;%(AdditionalIncludeDirectories) - @RUNTIMELIBRARY@ - - - Console - true - true - true - ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@LIBPATH@;%(AdditionalLibraryDirectories) - convarch.lib;cppunit.lib;@LIBNAME@;@EXTRALIBS@%(AdditionalDependencies) - - - - - - - - - - - - - - - - - - - - - diff --git a/SoftHSMv2/win32/datamgrtest/datamgrtest.vcxproj.user b/SoftHSMv2/win32/datamgrtest/datamgrtest.vcxproj.user deleted file mode 100644 index 695b5c7..0000000 --- a/SoftHSMv2/win32/datamgrtest/datamgrtest.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/SoftHSMv2/win32/dump/dump.vcxproj.filters b/SoftHSMv2/win32/dump/dump.vcxproj.filters deleted file mode 100644 index c4546a6..0000000 --- a/SoftHSMv2/win32/dump/dump.vcxproj.filters +++ /dev/null @@ -1,33 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - diff --git a/SoftHSMv2/win32/dump/dump.vcxproj.in b/SoftHSMv2/win32/dump/dump.vcxproj.in deleted file mode 100644 index 2521562..0000000 --- a/SoftHSMv2/win32/dump/dump.vcxproj.in +++ /dev/null @@ -1,95 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {F60ACB12-7D05-4A89-B2D1-DD16E1F3566B} - Win32Proj - dump - - - - Application - true - Unicode - @PLATFORMTOOLSET@ - - - Application - false - true - Unicode - @PLATFORMTOOLSET@ - - - - - - - - - - - - - true - softhsm2-dump-file - - - false - softhsm2-dump-file - - - - - - Level3 - Disabled - _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib\pkcs11;..\..\src\lib\object_store;..\..\src\lib;%(AdditionalIncludeDirectories) - @RUNTIMELIBRARY@ - - - Console - true - - - - - Level3 - - - MaxSpeed - true - true - _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib\pkcs11;..\..\src\lib\object_store;..\..\src\lib;%(AdditionalIncludeDirectories) - @RUNTIMELIBRARY@ - - - Console - true - true - true - - - - - - - - - - - - - - diff --git a/SoftHSMv2/win32/dump/dump.vcxproj.user b/SoftHSMv2/win32/dump/dump.vcxproj.user deleted file mode 100644 index 695b5c7..0000000 --- a/SoftHSMv2/win32/dump/dump.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/SoftHSMv2/win32/handlemgrtest/handlemgrtest.vcxproj.filters b/SoftHSMv2/win32/handlemgrtest/handlemgrtest.vcxproj.filters deleted file mode 100644 index 38ddc83..0000000 --- a/SoftHSMv2/win32/handlemgrtest/handlemgrtest.vcxproj.filters +++ /dev/null @@ -1,42 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - diff --git a/SoftHSMv2/win32/handlemgrtest/handlemgrtest.vcxproj.in b/SoftHSMv2/win32/handlemgrtest/handlemgrtest.vcxproj.in deleted file mode 100644 index ddc9add..0000000 --- a/SoftHSMv2/win32/handlemgrtest/handlemgrtest.vcxproj.in +++ /dev/null @@ -1,100 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {014B1E10-EC68-4BEC-B992-F92CA2B6816F} - Win32Proj - handlemgrtest - - - - Application - true - Unicode - @PLATFORMTOOLSET@ - - - Application - false - true - Unicode - @PLATFORMTOOLSET@ - - - - - - - - - - - - - true - - - false - - - - - - Level3 - Disabled - _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\handle_mgr;..\..\src\lib\common;..\..\src\lib\pkcs11;..\..\src\lib\crypto;..\..\src\lib\object_store;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\data_mgr;..\..\src\lib\win32;@CUINCPATH@;%(AdditionalIncludeDirectories) - @RUNTIMELIBRARY@ - - - Console - true - ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@DEBUGLIBPATH@;%(AdditionalLibraryDirectories) - convarch.lib;cppunitd.lib;@LIBNAME@;%(AdditionalDependencies) - - - - - Level3 - - - MaxSpeed - true - true - _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\handle_mgr;..\..\src\lib\common;..\..\src\lib\pkcs11;..\..\src\lib\crypto;..\..\src\lib\object_store;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\data_mgr;..\..\src\lib\win32;@CUINCPATH@;%(AdditionalIncludeDirectories) - @RUNTIMELIBRARY@ - - - Console - true - true - true - ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@LIBPATH@;%(AdditionalLibraryDirectories) - convarch.lib;cppunit.lib;@LIBNAME@;%(AdditionalDependencies) - - - - - - - - - - - - - - - - - diff --git a/SoftHSMv2/win32/handlemgrtest/handlemgrtest.vcxproj.user b/SoftHSMv2/win32/handlemgrtest/handlemgrtest.vcxproj.user deleted file mode 100644 index 695b5c7..0000000 --- a/SoftHSMv2/win32/handlemgrtest/handlemgrtest.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/SoftHSMv2/win32/keyconv/keyconv.vcxproj.filters.in b/SoftHSMv2/win32/keyconv/keyconv.vcxproj.filters.in deleted file mode 100644 index bd6ce41..0000000 --- a/SoftHSMv2/win32/keyconv/keyconv.vcxproj.filters.in +++ /dev/null @@ -1,88 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {6f8944db-01c2-47c3-a4b4-265d91e99ba0} - h;hpp;hxx;hm;inl;inc;xsd - - - {b6a2e68c-2518-456b-8592-561c011e0390} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {14914ba7-3ec3-4f58-a83a-4596a7f52075} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {3253c2c0-ca7a-4902-8b31-87ab6c4c754f} - h;hpp;hxx;hm;inl;inc;xsd - - - - - Common Header Files - - - Common Header Files - - - Header Files - -@IF OPENSSL - - Header Files - -@END OPENSSL - - Header Files - - - Win32 Header Files - - - - - Source Files - -@IF BOTAN - - Source Files - -@END BOTAN -@IF OPENSSL - - Source Files - - - Source Files - -@END OPENSSL - - Common Source Files - - - Common Source Files - - - Source Files - - - Win32 Source Files - - - Win32 Source Files - - - diff --git a/SoftHSMv2/win32/keyconv/keyconv.vcxproj.in b/SoftHSMv2/win32/keyconv/keyconv.vcxproj.in deleted file mode 100644 index 87c1b5e..0000000 --- a/SoftHSMv2/win32/keyconv/keyconv.vcxproj.in +++ /dev/null @@ -1,116 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {9B003E52-F02A-47EA-9942-2D9AE8738161} - Win32Proj - keyconv - - - - Application - true - Unicode - @PLATFORMTOOLSET@ - - - Application - false - true - Unicode - @PLATFORMTOOLSET@ - - - - - - - - - - - - - true - softhsm2-keyconv - - - false - softhsm2-keyconv - - - - - - Level3 - Disabled - _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\bin\common;..\..\src\bin\win32;..\..\src\lib\pkcs11;..\..\src\lib\crypto;@DEBUGINCPATH@;%(AdditionalIncludeDirectories) - @RUNTIMELIBRARY@ - - - Console - true - @DEBUGLIBPATH@;%(AdditionalLibraryDirectories) - @LIBNAME@;@EXTRALIBS@%(AdditionalDependencies) - - - - - Level3 - - - MaxSpeed - true - true - _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\bin\common;..\..\src\bin\win32;..\..\src\lib\pkcs11;..\..\src\lib\crypto;@INCLUDEPATH@;%(AdditionalIncludeDirectories) - @RUNTIMELIBRARY@ - - - Console - true - true - true - @LIBPATH@;%(AdditionalLibraryDirectories) - @LIBNAME@;@EXTRALIBS@%(AdditionalDependencies) - - - - - - -@IF OPENSSL - -@END OPENSSL - - - - - - - -@IF BOTAN - -@END BOTAN -@IF OPENSSL - - -@END OPENSSL - - - - - - - - diff --git a/SoftHSMv2/win32/keyconv/keyconv.vcxproj.user b/SoftHSMv2/win32/keyconv/keyconv.vcxproj.user deleted file mode 100644 index 695b5c7..0000000 --- a/SoftHSMv2/win32/keyconv/keyconv.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/SoftHSMv2/win32/objstoretest/objstoretest.vcxproj.filters b/SoftHSMv2/win32/objstoretest/objstoretest.vcxproj.filters deleted file mode 100644 index 11d8d84..0000000 --- a/SoftHSMv2/win32/objstoretest/objstoretest.vcxproj.filters +++ /dev/null @@ -1,84 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - diff --git a/SoftHSMv2/win32/objstoretest/objstoretest.vcxproj.in b/SoftHSMv2/win32/objstoretest/objstoretest.vcxproj.in deleted file mode 100644 index d26e7cb..0000000 --- a/SoftHSMv2/win32/objstoretest/objstoretest.vcxproj.in +++ /dev/null @@ -1,114 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {44F77533-A4A1-4175-8C4C-07106B3F9C08} - Win32Proj - objstoretest - - - - Application - true - Unicode - @PLATFORMTOOLSET@ - - - Application - false - true - Unicode - @PLATFORMTOOLSET@ - - - - - - - - - - - - - true - - - false - - - - - - Level3 - Disabled - _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\object_store;..\..\src\lib\common;..\..\src\lib\pkcs11;..\..\src\lib\crypto;..\..\src\lib\data_mgr;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\win32;@CUINCPATH@;@INCLUDEPATH@;%(AdditionalIncludeDirectories) - @RUNTIMELIBRARY@ - - - Console - true - ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@DEBUGLIBPATH@;%(AdditionalLibraryDirectories) - convarch.lib;cppunitd.lib;@LIBNAME@;@EXTRALIBS@%(AdditionalDependencies) - - - - - Level3 - - - MaxSpeed - true - true - _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\object_store;..\..\src\lib\common;..\..\src\lib\pkcs11;..\..\src\lib\crypto;..\..\src\lib\data_mgr;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\win32;@CUINCPATH@;@INCLUDEPATH@;%(AdditionalIncludeDirectories) - @RUNTIMELIBRARY@ - - - Console - true - true - true - ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@LIBPATH@;%(AdditionalLibraryDirectories) - convarch.lib;cppunit.lib;@LIBNAME@;@EXTRALIBS@%(AdditionalDependencies) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SoftHSMv2/win32/objstoretest/objstoretest.vcxproj.user b/SoftHSMv2/win32/objstoretest/objstoretest.vcxproj.user deleted file mode 100644 index 695b5c7..0000000 --- a/SoftHSMv2/win32/objstoretest/objstoretest.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/SoftHSMv2/win32/p11test/p11test.vcxproj.filters b/SoftHSMv2/win32/p11test/p11test.vcxproj.filters deleted file mode 100644 index fa7e86f..0000000 --- a/SoftHSMv2/win32/p11test/p11test.vcxproj.filters +++ /dev/null @@ -1,181 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - {8440d7eb-5530-4f5e-a355-a43435742c60} - h;hpp;hxx;hm;inl;inc;xsd - - - {3c33d54e-4bd1-43e0-bcc7-0d6adcfd5dc7} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {ff435d2e-c67a-4f47-9731-28d88617e559} - h;hpp;hxx;hm;inl;inc;xsd - - - {5df8b0a3-ecc7-4876-aea2-8421c0846535} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Other Header Files - - - Other Header Files - - - Lib Header Files - - - Lib Header Files - - - Other Header Files - - - Other Header Files - - - Other Header Files - - - Lib Header Files - - - Lib Header Files - - - Lib Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Other Source Files - - - Other Source Files - - - Lib Source Files - - - Lib Source Files - - - Lib Source Files - - - Lib Source Files - - - Lib Source Files - - - Source Files - - - diff --git a/SoftHSMv2/win32/p11test/p11test.vcxproj.in b/SoftHSMv2/win32/p11test/p11test.vcxproj.in deleted file mode 100644 index c8a493c..0000000 --- a/SoftHSMv2/win32/p11test/p11test.vcxproj.in +++ /dev/null @@ -1,159 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {7C5EE7FC-B5FC-47BF-8164-A452FE689472} - Win32Proj - p11test - - - - Application - true - Unicode - @PLATFORMTOOLSET@ - - - Application - false - true - Unicode - @PLATFORMTOOLSET@ - - - - - - - - - - - - - true - - - false - - - - - - Level3 - Disabled - _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\test;..\..\src\lib\pkcs11;..\..\src\lib\common;..\..\src\lib\crypto;..\..\src\lib\object_store;..\..\src\lib\data_mgr;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\handle_mgr;..\..\src\lib\win32;@CUINCPATH@;@INCLUDEPATH@;%(AdditionalIncludeDirectories) - @RUNTIMELIBRARY@ - - - Console - true - ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@DEBUGLIBPATH@;%(AdditionalLibraryDirectories) - convarch.lib;cppunitd.lib;@LIBNAME@;@EXTRALIBS@%(AdditionalDependencies) - - - -copy ..\..\src\lib\test\softhsm2.conf.win32 "$(TargetDir)\softhsm2.conf" -copy ..\..\src\lib\test\softhsm2-alt.conf.win32 "$(TargetDir)\softhsm2-alt.conf" -mkdir "$(TargetDir)\tokens" 2> nul -copy ..\..\src\lib\test\tokens\dummy.in "$(TargetDir)\tokens\dummy" - - Copying dummy test files to Debug folder - - - - - Level3 - - - MaxSpeed - true - true - _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\test;..\..\src\lib\pkcs11;..\..\src\lib\common;..\..\src\lib\crypto;..\..\src\lib\object_store;..\..\src\lib\data_mgr;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\handle_mgr;..\..\src\lib\win32;@CUINCPATH@;@INCLUDEPATH@;%(AdditionalIncludeDirectories) - @RUNTIMELIBRARY@ - - - Console - true - true - true - ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@LIBPATH@;%(AdditionalLibraryDirectories) - convarch.lib;cppunit.lib;@LIBNAME@;@EXTRALIBS@%(AdditionalDependencies) - - - -copy ..\..\src\lib\test\softhsm2.conf.win32 "$(TargetDir)\softhsm2.conf" -copy ..\..\src\lib\test\softhsm2-alt.conf.win32 "$(TargetDir)\softhsm2-alt.conf" -mkdir "$(TargetDir)\tokens" 2> nul -copy ..\..\src\lib\test\tokens\dummy.in "$(TargetDir)\tokens\dummy" - - Copying dummy test files to Release folder - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SoftHSMv2/win32/p11test/p11test.vcxproj.user b/SoftHSMv2/win32/p11test/p11test.vcxproj.user deleted file mode 100644 index 695b5c7..0000000 --- a/SoftHSMv2/win32/p11test/p11test.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/SoftHSMv2/win32/sessionmgrtest/sessionmgrtest.vcxproj.filters b/SoftHSMv2/win32/sessionmgrtest/sessionmgrtest.vcxproj.filters deleted file mode 100644 index dbfb705..0000000 --- a/SoftHSMv2/win32/sessionmgrtest/sessionmgrtest.vcxproj.filters +++ /dev/null @@ -1,42 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - diff --git a/SoftHSMv2/win32/sessionmgrtest/sessionmgrtest.vcxproj.in b/SoftHSMv2/win32/sessionmgrtest/sessionmgrtest.vcxproj.in deleted file mode 100644 index 572c9c3..0000000 --- a/SoftHSMv2/win32/sessionmgrtest/sessionmgrtest.vcxproj.in +++ /dev/null @@ -1,100 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {45E2ABF6-91A7-4AA5-A82B-0C8E54BCCCB9} - Win32Proj - sessionmgrtest - - - - Application - true - Unicode - @PLATFORMTOOLSET@ - - - Application - false - true - Unicode - @PLATFORMTOOLSET@ - - - - - - - - - - - - - true - - - false - - - - - - Level3 - Disabled - _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\session_mgr;..\..\src\lib\common;..\..\src\lib\pkcs11;..\..\src\lib\crypto;..\..\src\lib\data_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\object_store;..\..\src\lib\win32;@CUINCPATH@;@DEBUGINCPATH@;%(AdditionalIncludeDirectories) - @RUNTIMELIBRARY@ - - - Console - true - ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@DEBUGLIBPATH@;%(AdditionalLibraryDirectories) - convarch.lib;cppunitd.lib;@LIBNAME@;@EXTRALIBS@%(AdditionalDependencies) - - - - - Level3 - - - MaxSpeed - true - true - _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\session_mgr;..\..\src\lib\common;..\..\src\lib\pkcs11;..\..\src\lib\crypto;..\..\src\lib\data_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\object_store;..\..\src\lib\win32;@CUINCPATH@;@INCLUDEPATH@;%(AdditionalIncludeDirectories) - @RUNTIMELIBRARY@ - - - Console - true - true - true - ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@LIBPATH@;%(AdditionalLibraryDirectories) - convarch.lib;cppunit.lib;@LIBNAME@;@EXTRALIBS@%(AdditionalDependencies) - - - - - - - - - - - - - - - - - diff --git a/SoftHSMv2/win32/sessionmgrtest/sessionmgrtest.vcxproj.user b/SoftHSMv2/win32/sessionmgrtest/sessionmgrtest.vcxproj.user deleted file mode 100644 index 695b5c7..0000000 --- a/SoftHSMv2/win32/sessionmgrtest/sessionmgrtest.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/SoftHSMv2/win32/slotmgrtest/slotmgrtest.vcxproj.filters b/SoftHSMv2/win32/slotmgrtest/slotmgrtest.vcxproj.filters deleted file mode 100644 index 7ddbae5..0000000 --- a/SoftHSMv2/win32/slotmgrtest/slotmgrtest.vcxproj.filters +++ /dev/null @@ -1,42 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - diff --git a/SoftHSMv2/win32/slotmgrtest/slotmgrtest.vcxproj.in b/SoftHSMv2/win32/slotmgrtest/slotmgrtest.vcxproj.in deleted file mode 100644 index ea52e3b..0000000 --- a/SoftHSMv2/win32/slotmgrtest/slotmgrtest.vcxproj.in +++ /dev/null @@ -1,100 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {F62E31E5-0F8D-4B70-8F26-44AFA1A9E645} - Win32Proj - slotmgrtest - - - - Application - true - Unicode - @PLATFORMTOOLSET@ - - - Application - false - true - Unicode - @PLATFORMTOOLSET@ - - - - - - - - - - - - - true - - - false - - - - - - Level3 - Disabled - _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\slot_mgr;..\..\src\lib\common;..\..\src\lib\pkcs11;..\..\src\lib\crypto;..\..\src\lib\object_store;..\..\src\lib\session_mgr;..\..\src\lib\data_mgr;..\..\src\lib\win32;@CUINCPATH@;@INCLUDEPATH@;%(AdditionalIncludeDirectories) - @RUNTIMELIBRARY@ - - - Console - true - ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@DEBUGLIBPATH@;%(AdditionalLibraryDirectories) - convarch.lib;cppunitd.lib;@LIBNAME@;@EXTRALIBS@%(AdditionalDependencies) - - - - - Level3 - - - MaxSpeed - true - true - _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\slot_mgr;..\..\src\lib\common;..\..\src\lib\pkcs11;..\..\src\lib\crypto;..\..\src\lib\object_store;..\..\src\lib\session_mgr;..\..\src\lib\data_mgr;..\..\src\lib\win32;@CUINCPATH@;@INCLUDEPATH@;%(AdditionalIncludeDirectories) - @RUNTIMELIBRARY@ - - - Console - true - true - true - ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@LIBPATH@;%(AdditionalLibraryDirectories) - convarch.lib;cppunit.lib;@LIBNAME@;@EXTRALIBS@%(AdditionalDependencies) - - - - - - - - - - - - - - - - - diff --git a/SoftHSMv2/win32/slotmgrtest/slotmgrtest.vcxproj.user b/SoftHSMv2/win32/slotmgrtest/slotmgrtest.vcxproj.user deleted file mode 100644 index 695b5c7..0000000 --- a/SoftHSMv2/win32/slotmgrtest/slotmgrtest.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/SoftHSMv2/win32/softhsm2.sln.in b/SoftHSMv2/win32/softhsm2.sln.in deleted file mode 100644 index 4d98c0d..0000000 --- a/SoftHSMv2/win32/softhsm2.sln.in +++ /dev/null @@ -1,117 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual C++ Express 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "softhsm2", "softhsm2\softhsm2.vcxproj", "{801F5AB2-7A62-4085-B129-D15E2D717219}" - ProjectSection(ProjectDependencies) = postProject - {F64541B6-FFBF-4368-B93A-A5CA8ADAD795} = {F64541B6-FFBF-4368-B93A-A5CA8ADAD795} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "convarch", "convarch\convarch.vcxproj", "{F64541B6-FFBF-4368-B93A-A5CA8ADAD795}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "keyconv", "keyconv\keyconv.vcxproj", "{9B003E52-F02A-47EA-9942-2D9AE8738161}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "util", "util\util.vcxproj", "{05901466-4184-47C8-9D6C-3BB99BBF5378}" - ProjectSection(ProjectDependencies) = postProject - {801F5AB2-7A62-4085-B129-D15E2D717219} = {801F5AB2-7A62-4085-B129-D15E2D717219} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dump", "dump\dump.vcxproj", "{F60ACB12-7D05-4A89-B2D1-DD16E1F3566B}" -EndProject -@IF TESTS -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "p11test", "p11test\p11test.vcxproj", "{7C5EE7FC-B5FC-47BF-8164-A452FE689472}" - ProjectSection(ProjectDependencies) = postProject - {801F5AB2-7A62-4085-B129-D15E2D717219} = {801F5AB2-7A62-4085-B129-D15E2D717219} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cryptotest", "cryptotest\cryptotest.vcxproj", "{07E03E0B-C525-4A72-88C6-2238896A4D8C}" - ProjectSection(ProjectDependencies) = postProject - {F64541B6-FFBF-4368-B93A-A5CA8ADAD795} = {F64541B6-FFBF-4368-B93A-A5CA8ADAD795} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "datamgrtest", "datamgrtest\datamgrtest.vcxproj", "{E20315B5-B49E-46D7-B7EC-1A439F347C95}" - ProjectSection(ProjectDependencies) = postProject - {F64541B6-FFBF-4368-B93A-A5CA8ADAD795} = {F64541B6-FFBF-4368-B93A-A5CA8ADAD795} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "handlemgrtest", "handlemgrtest\handlemgrtest.vcxproj", "{014B1E10-EC68-4BEC-B992-F92CA2B6816F}" - ProjectSection(ProjectDependencies) = postProject - {F64541B6-FFBF-4368-B93A-A5CA8ADAD795} = {F64541B6-FFBF-4368-B93A-A5CA8ADAD795} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "objstoretest", "objstoretest\objstoretest.vcxproj", "{44F77533-A4A1-4175-8C4C-07106B3F9C08}" - ProjectSection(ProjectDependencies) = postProject - {F64541B6-FFBF-4368-B93A-A5CA8ADAD795} = {F64541B6-FFBF-4368-B93A-A5CA8ADAD795} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sessionmgrtest", "sessionmgrtest\sessionmgrtest.vcxproj", "{45E2ABF6-91A7-4AA5-A82B-0C8E54BCCCB9}" - ProjectSection(ProjectDependencies) = postProject - {F64541B6-FFBF-4368-B93A-A5CA8ADAD795} = {F64541B6-FFBF-4368-B93A-A5CA8ADAD795} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "slotmgrtest", "slotmgrtest\slotmgrtest.vcxproj", "{F62E31E5-0F8D-4B70-8F26-44AFA1A9E645}" - ProjectSection(ProjectDependencies) = postProject - {F64541B6-FFBF-4368-B93A-A5CA8ADAD795} = {F64541B6-FFBF-4368-B93A-A5CA8ADAD795} - EndProjectSection -EndProject -@END TESTS -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|@PLATFORM@ = Debug|@PLATFORM@ - Release|@PLATFORM@ = Release|@PLATFORM@ - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {801F5AB2-7A62-4085-B129-D15E2D717219}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {801F5AB2-7A62-4085-B129-D15E2D717219}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {801F5AB2-7A62-4085-B129-D15E2D717219}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {801F5AB2-7A62-4085-B129-D15E2D717219}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {F64541B6-FFBF-4368-B93A-A5CA8ADAD795}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {F64541B6-FFBF-4368-B93A-A5CA8ADAD795}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {F64541B6-FFBF-4368-B93A-A5CA8ADAD795}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {F64541B6-FFBF-4368-B93A-A5CA8ADAD795}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {9B003E52-F02A-47EA-9942-2D9AE8738161}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {9B003E52-F02A-47EA-9942-2D9AE8738161}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {9B003E52-F02A-47EA-9942-2D9AE8738161}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {9B003E52-F02A-47EA-9942-2D9AE8738161}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {05901466-4184-47C8-9D6C-3BB99BBF5378}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {05901466-4184-47C8-9D6C-3BB99BBF5378}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {05901466-4184-47C8-9D6C-3BB99BBF5378}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {05901466-4184-47C8-9D6C-3BB99BBF5378}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {F60ACB12-7D05-4A89-B2D1-DD16E1F3566B}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {F60ACB12-7D05-4A89-B2D1-DD16E1F3566B}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {F60ACB12-7D05-4A89-B2D1-DD16E1F3566B}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {F60ACB12-7D05-4A89-B2D1-DD16E1F3566B}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ -@IF TESTS - {7C5EE7FC-B5FC-47BF-8164-A452FE689472}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {7C5EE7FC-B5FC-47BF-8164-A452FE689472}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {7C5EE7FC-B5FC-47BF-8164-A452FE689472}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {7C5EE7FC-B5FC-47BF-8164-A452FE689472}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {07E03E0B-C525-4A72-88C6-2238896A4D8C}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {07E03E0B-C525-4A72-88C6-2238896A4D8C}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {07E03E0B-C525-4A72-88C6-2238896A4D8C}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {07E03E0B-C525-4A72-88C6-2238896A4D8C}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {E20315B5-B49E-46D7-B7EC-1A439F347C95}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {E20315B5-B49E-46D7-B7EC-1A439F347C95}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {E20315B5-B49E-46D7-B7EC-1A439F347C95}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {E20315B5-B49E-46D7-B7EC-1A439F347C95}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {014B1E10-EC68-4BEC-B992-F92CA2B6816F}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {014B1E10-EC68-4BEC-B992-F92CA2B6816F}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {014B1E10-EC68-4BEC-B992-F92CA2B6816F}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {014B1E10-EC68-4BEC-B992-F92CA2B6816F}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {44F77533-A4A1-4175-8C4C-07106B3F9C08}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {44F77533-A4A1-4175-8C4C-07106B3F9C08}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {44F77533-A4A1-4175-8C4C-07106B3F9C08}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {44F77533-A4A1-4175-8C4C-07106B3F9C08}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {45E2ABF6-91A7-4AA5-A82B-0C8E54BCCCB9}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {45E2ABF6-91A7-4AA5-A82B-0C8E54BCCCB9}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {45E2ABF6-91A7-4AA5-A82B-0C8E54BCCCB9}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {45E2ABF6-91A7-4AA5-A82B-0C8E54BCCCB9}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {F62E31E5-0F8D-4B70-8F26-44AFA1A9E645}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {F62E31E5-0F8D-4B70-8F26-44AFA1A9E645}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {F62E31E5-0F8D-4B70-8F26-44AFA1A9E645}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {F62E31E5-0F8D-4B70-8F26-44AFA1A9E645}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ -@END TESTS - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/SoftHSMv2/win32/softhsm2/softhsm2.vcxproj.filters b/SoftHSMv2/win32/softhsm2/softhsm2.vcxproj.filters deleted file mode 100644 index 1f7b8b2..0000000 --- a/SoftHSMv2/win32/softhsm2/softhsm2.vcxproj.filters +++ /dev/null @@ -1,63 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - diff --git a/SoftHSMv2/win32/softhsm2/softhsm2.vcxproj.in b/SoftHSMv2/win32/softhsm2/softhsm2.vcxproj.in deleted file mode 100644 index efa808e..0000000 --- a/SoftHSMv2/win32/softhsm2/softhsm2.vcxproj.in +++ /dev/null @@ -1,107 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {801F5AB2-7A62-4085-B129-D15E2D717219} - Win32Proj - softhsm2 - - - - DynamicLibrary - true - Unicode - @PLATFORMTOOLSET@ - - - DynamicLibrary - false - true - Unicode - @PLATFORMTOOLSET@ - - - - - - - - - - - - - true - - - false - - - - - - Level3 - Disabled - _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_WINDOWS;_USRDLL;SOFTHSM2_EXPORTS;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\pkcs11;..\..\src\lib\common;..\..\src\lib\object_store;..\..\src\lib\slot_mgr;..\..\src\lib\session_mgr;..\..\src\lib\data_mgr;..\..\src\lib\handle_mgr;..\..\src\lib\crypto;..\..\src\lib\win32;@INCLUDEPATH@;%(AdditionalIncludeDirectories) - @RUNTIMELIBRARY@ - - - Windows - true - ..\@PLATFORMDIR@$(Configuration);@DEBUGLIBPATH@;%(AdditionalLibraryDirectories) - convarch.lib;@LIBNAME@;@EXTRALIBS@%(AdditionalDependencies) - - - - - Level3 - - - MaxSpeed - true - true - _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_WINDOWS;_USRDLL;SOFTHSM2_EXPORTS;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\pkcs11;..\..\src\lib\common;..\..\src\lib\object_store;..\..\src\lib\slot_mgr;..\..\src\lib\session_mgr;..\..\src\lib\data_mgr;..\..\src\lib\handle_mgr;..\..\src\lib\crypto;..\..\src\lib\win32;@INCLUDEPATH@;%(AdditionalIncludeDirectories) - @RUNTIMELIBRARY@ - - - Windows - true - true - true - ..\@PLATFORMDIR@$(Configuration);@LIBPATH@;%(AdditionalLibraryDirectories) - convarch.lib;@LIBNAME@;@EXTRALIBS@%(AdditionalDependencies) - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SoftHSMv2/win32/softhsm2/softhsm2.vcxproj.user b/SoftHSMv2/win32/softhsm2/softhsm2.vcxproj.user deleted file mode 100644 index 695b5c7..0000000 --- a/SoftHSMv2/win32/softhsm2/softhsm2.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/SoftHSMv2/win32/util/util.vcxproj.filters.in b/SoftHSMv2/win32/util/util.vcxproj.filters.in deleted file mode 100644 index 2c4171b..0000000 --- a/SoftHSMv2/win32/util/util.vcxproj.filters.in +++ /dev/null @@ -1,108 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - {21eda3a1-8da0-4a99-967c-f218e4eecd08} - h;hpp;hxx;hm;inl;inc;xsd - - - {fd946626-7e24-4f78-834b-a4c0ac6dc2f5} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {f3a7acce-323d-4465-95bf-a326189dcdd5} - h;hpp;hxx;hm;inl;inc;xsd - - - {2b77905a-99da-49cf-9cac-aa72e7e3182b} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - - - Common Header Files - - - Common Header Files - - - Common Header Files - - - Header Files - -@IF BOTAN - - Header Files - -@END BOTAN -@IF OPENSSL - - Header Files - - - Header Files - -@END OPENSSL - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Win32 Header Files - - - - - Common Source Files - - - Common Source Files - - - Common Source Files - - - Source Files - -@IF BOTAN - - Source Files - -@END BOTAN -@IF OPENSSL - - Source Files - - - Source Files - -@END OPENSSL - - Win32 Source Files - - - Win32 Source Files - - - diff --git a/SoftHSMv2/win32/util/util.vcxproj.in b/SoftHSMv2/win32/util/util.vcxproj.in deleted file mode 100644 index 28bdcd0..0000000 --- a/SoftHSMv2/win32/util/util.vcxproj.in +++ /dev/null @@ -1,130 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {05901466-4184-47C8-9D6C-3BB99BBF5378} - Win32Proj - util - - - - Application - true - Unicode - @PLATFORMTOOLSET@ - - - Application - false - true - Unicode - @PLATFORMTOOLSET@ - - - - - - - - - - - - - true - softhsm2-util - - - false - softhsm2-util - - - - - - Level3 - Disabled - _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\bin\common;..\..\src\bin\win32;..\..\src\lib\pkcs11;..\..\src\lib;..\..\src\lib\common;..\..\src\lib\crypto;..\..\src\lib\data_mgr;..\..\src\lib\object_store;..\..\src\lib\win32\;@DEBUGINCPATH@;%(AdditionalIncludeDirectories) - @RUNTIMELIBRARY@ - - - Console - true - ..\@PLATFORMDIR@$(Configuration);@DEBUGLIBPATH@;%(AdditionalLibraryDirectories) - convarch.lib;@LIBNAME@;@EXTRALIBS@%(AdditionalDependencies) - - - if exist @DEBUGDLLPATH@ copy @DEBUGDLLPATH@ ..\@PLATFORMDIR@$(Configuration) - - - - - Level3 - - - MaxSpeed - true - true - _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\bin\common;..\..\src\bin\win32;..\..\src\lib\pkcs11;..\..\src\lib;..\..\src\lib\common;..\..\src\lib\crypto;..\..\src\lib\data_mgr;..\..\src\lib\object_store;..\..\src\lib\win32\;@INCLUDEPATH@;%(AdditionalIncludeDirectories) - @RUNTIMELIBRARY@ - - - Console - true - true - true - ..\@PLATFORMDIR@$(Configuration);@LIBPATH@;%(AdditionalLibraryDirectories) - convarch.lib;@LIBNAME@;@EXTRALIBS@%(AdditionalDependencies) - - - if exist @DLLPATH@ copy @DLLPATH@ ..\@PLATFORMDIR@$(Configuration) - - - - - - -@IF BOTAN - -@END BOTAN -@IF OPENSSL - - -@END OPENSSL - - - - - - - - - - - -@IF BOTAN - -@END BOTAN -@IF OPENSSL - - -@END OPENSSL - - - - - - - - diff --git a/SoftHSMv2/win32/util/util.vcxproj.user b/SoftHSMv2/win32/util/util.vcxproj.user deleted file mode 100644 index 695b5c7..0000000 --- a/SoftHSMv2/win32/util/util.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/TPM2-Plugin/.gitignore b/TPM2-Plugin/.gitignore new file mode 100644 index 0000000..de2b4fa --- /dev/null +++ b/TPM2-Plugin/.gitignore @@ -0,0 +1,8 @@ +# Created during build +autom4te.cache +build-aux +m4 +configure +config.h.in +aclocal.m4 +Makefile.in diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..2e0da1d --- /dev/null +++ b/build.sh @@ -0,0 +1,30 @@ +#!/etc/bash + +set -e +sudo kill -9 $(ps -ef | grep "apt" | grep -v grep | awk '{print $2}') + +sudo rm /var/lib/dpkg/lock +sudo rm /var/lib/apt/lists/lock +sudo rm /var/cache/apt/archives/lock + +sudo dpkg --configure -a + +sudo apt -y install autoconf +sudo apt -y install automake +sudo apt -y install libtool +sudo apt -y install autotools-dev +sudo apt -y install tpm2-tools + +echo "Build SoftHSMv2..." +cd SoftHSMv2 +sh autogen.sh +./configure +make +cd .. + +#echo "Build TPM2_plugin..." +#cd TPM2-Plugin +#./bootstrap +#./configure +#make +#cd .. -- cgit 1.2.3-korg