From ea35607bb0ce50bc7f485ebe30e9ae035ae9b7d2 Mon Sep 17 00:00:00 2001 From: Francis Dupont Date: Sat, 1 Nov 2014 22:39:57 +0100 Subject: [PATCH 1/5] rebased (need to be checked) --- WIN32-NOTES.md | 23 +- src/bin/keyconv/softhsm2-keyconv.cpp | 6 + src/lib/P11Attributes.cpp | 2 +- src/lib/SoftHSM.cpp | 5 +- src/lib/crypto/BotanDSA.cpp | 12 +- src/lib/crypto/BotanGOST.cpp | 12 +- src/lib/crypto/BotanHashAlgorithm.cpp | 5 +- src/lib/crypto/BotanMacAlgorithm.cpp | 12 +- src/lib/crypto/BotanRSA.cpp | 12 +- src/lib/crypto/BotanSymmetricAlgorithm.cpp | 4 +- src/lib/crypto/test/AESTests.cpp | 2 +- src/lib/test/softhsm2.conf.in | 1 + src/lib/test/softhsm2.conf.win32 | 1 + win32+botan/dump/dump.vcxproj | 91 -- win32+botan/softhsm2.sln | 113 --- win32+botan/softhsm2/softhsm2.vcxproj.filters | 57 -- win32+openssl/config.h | 132 --- win32+openssl/convarch/convarch.vcxproj | 271 ------ .../convarch/convarch.vcxproj.filters | 650 -------------- win32+openssl/convarch/convarch.vcxproj.user | 3 - win32+openssl/cryptotest/cryptotest.vcxproj | 126 --- .../cryptotest/cryptotest.vcxproj.filters | 114 --- .../cryptotest/cryptotest.vcxproj.user | 3 - win32+openssl/datamgrtest/datamgrtest.vcxproj | 97 -- .../datamgrtest/datamgrtest.vcxproj.filters | 45 - .../datamgrtest/datamgrtest.vcxproj.user | 3 - win32+openssl/dump/dump.vcxproj | 91 -- win32+openssl/dump/dump.vcxproj.filters | 33 - win32+openssl/dump/dump.vcxproj.user | 3 - .../handlemgrtest/handlemgrtest.vcxproj | 93 -- .../handlemgrtest.vcxproj.filters | 33 - .../handlemgrtest/handlemgrtest.vcxproj.user | 3 - win32+openssl/keyconv/keyconv.vcxproj | 103 --- win32+openssl/keyconv/keyconv.vcxproj.filters | 73 -- win32+openssl/keyconv/keyconv.vcxproj.user | 3 - .../objstoretest/objstoretest.vcxproj | 107 --- .../objstoretest/objstoretest.vcxproj.filters | 75 -- .../objstoretest/objstoretest.vcxproj.user | 3 - win32+openssl/p11test/p11test.vcxproj | 145 --- win32+openssl/p11test/p11test.vcxproj.filters | 151 ---- win32+openssl/p11test/p11test.vcxproj.user | 3 - .../sessionmgrtest/sessionmgrtest.vcxproj | 93 -- .../sessionmgrtest.vcxproj.filters | 33 - .../sessionmgrtest.vcxproj.user | 3 - win32+openssl/slotmgrtest/slotmgrtest.vcxproj | 93 -- .../slotmgrtest/slotmgrtest.vcxproj.filters | 33 - .../slotmgrtest/slotmgrtest.vcxproj.user | 3 - win32+openssl/softhsm2.sln | 113 --- win32+openssl/softhsm2/softhsm2.vcxproj | 101 --- win32+openssl/softhsm2/softhsm2.vcxproj.user | 3 - win32+openssl/util/util.vcxproj | 103 --- win32+openssl/util/util.vcxproj.filters | 73 -- win32+openssl/util/util.vcxproj.user | 3 - win32/.gitignore | 10 + win32/Configure.pl | 827 ++++++++++++++++++ win32/Configure.py | 787 +++++++++++++++++ win32+botan/config.h => win32/config.h.in | 41 +- .../convarch/convarch.vcxproj.filters.in | 713 ++++++++++----- .../convarch/convarch.vcxproj.in | 107 ++- .../convarch/convarch.vcxproj.user | 0 .../cryptotest/cryptotest.vcxproj.filters | 0 .../cryptotest/cryptotest.vcxproj.in | 38 +- .../cryptotest/cryptotest.vcxproj.user | 0 .../datamgrtest/datamgrtest.vcxproj.filters | 0 .../datamgrtest/datamgrtest.vcxproj.in | 36 +- .../datamgrtest/datamgrtest.vcxproj.user | 0 .../dump/dump.vcxproj.filters | 0 {win32+botan => win32}/dump/dump.vcxproj.user | 0 .../handlemgrtest.vcxproj.filters | 0 .../handlemgrtest/handlemgrtest.vcxproj.in | 36 +- .../handlemgrtest/handlemgrtest.vcxproj.user | 0 .../keyconv/keyconv.vcxproj.filters.in | 13 +- .../keyconv/keyconv.vcxproj.in | 41 +- .../keyconv/keyconv.vcxproj.user | 0 .../objstoretest/objstoretest.vcxproj.filters | 0 .../objstoretest/objstoretest.vcxproj.in | 36 +- .../objstoretest/objstoretest.vcxproj.user | 0 .../p11test/p11test.vcxproj.filters | 12 + .../p11test/p11test.vcxproj.in | 52 +- .../p11test/p11test.vcxproj.user | 0 .../sessionmgrtest.vcxproj.filters | 0 .../sessionmgrtest/sessionmgrtest.vcxproj.in | 36 +- .../sessionmgrtest.vcxproj.user | 0 .../slotmgrtest/slotmgrtest.vcxproj.filters | 0 .../slotmgrtest/slotmgrtest.vcxproj.in | 36 +- .../slotmgrtest/slotmgrtest.vcxproj.user | 0 win32/softhsm2.sln.in | 117 +++ .../softhsm2/softhsm2.vcxproj.filters | 0 .../softhsm2/softhsm2.vcxproj.in | 32 +- .../softhsm2/softhsm2.vcxproj.user | 0 .../util/util.vcxproj.filters.in | 26 +- .../util/util.vcxproj.in | 52 +- {win32+botan => win32}/util/util.vcxproj.user | 0 93 files changed, 2672 insertions(+), 3751 deletions(-) delete mode 100755 win32+botan/dump/dump.vcxproj delete mode 100755 win32+botan/softhsm2.sln delete mode 100755 win32+botan/softhsm2/softhsm2.vcxproj.filters delete mode 100644 win32+openssl/config.h delete mode 100755 win32+openssl/convarch/convarch.vcxproj delete mode 100755 win32+openssl/convarch/convarch.vcxproj.filters delete mode 100755 win32+openssl/convarch/convarch.vcxproj.user delete mode 100755 win32+openssl/cryptotest/cryptotest.vcxproj delete mode 100755 win32+openssl/cryptotest/cryptotest.vcxproj.filters delete mode 100755 win32+openssl/cryptotest/cryptotest.vcxproj.user delete mode 100755 win32+openssl/datamgrtest/datamgrtest.vcxproj delete mode 100755 win32+openssl/datamgrtest/datamgrtest.vcxproj.filters delete mode 100755 win32+openssl/datamgrtest/datamgrtest.vcxproj.user delete mode 100755 win32+openssl/dump/dump.vcxproj delete mode 100755 win32+openssl/dump/dump.vcxproj.filters delete mode 100755 win32+openssl/dump/dump.vcxproj.user delete mode 100755 win32+openssl/handlemgrtest/handlemgrtest.vcxproj delete mode 100755 win32+openssl/handlemgrtest/handlemgrtest.vcxproj.filters delete mode 100755 win32+openssl/handlemgrtest/handlemgrtest.vcxproj.user delete mode 100755 win32+openssl/keyconv/keyconv.vcxproj delete mode 100755 win32+openssl/keyconv/keyconv.vcxproj.filters delete mode 100755 win32+openssl/keyconv/keyconv.vcxproj.user delete mode 100755 win32+openssl/objstoretest/objstoretest.vcxproj delete mode 100755 win32+openssl/objstoretest/objstoretest.vcxproj.filters delete mode 100755 win32+openssl/objstoretest/objstoretest.vcxproj.user delete mode 100755 win32+openssl/p11test/p11test.vcxproj delete mode 100755 win32+openssl/p11test/p11test.vcxproj.filters delete mode 100755 win32+openssl/p11test/p11test.vcxproj.user delete mode 100755 win32+openssl/sessionmgrtest/sessionmgrtest.vcxproj delete mode 100755 win32+openssl/sessionmgrtest/sessionmgrtest.vcxproj.filters delete mode 100755 win32+openssl/sessionmgrtest/sessionmgrtest.vcxproj.user delete mode 100755 win32+openssl/slotmgrtest/slotmgrtest.vcxproj delete mode 100755 win32+openssl/slotmgrtest/slotmgrtest.vcxproj.filters delete mode 100755 win32+openssl/slotmgrtest/slotmgrtest.vcxproj.user delete mode 100755 win32+openssl/softhsm2.sln delete mode 100755 win32+openssl/softhsm2/softhsm2.vcxproj delete mode 100755 win32+openssl/softhsm2/softhsm2.vcxproj.user delete mode 100755 win32+openssl/util/util.vcxproj delete mode 100755 win32+openssl/util/util.vcxproj.filters delete mode 100755 win32+openssl/util/util.vcxproj.user create mode 100644 win32/.gitignore create mode 100644 win32/Configure.pl create mode 100644 win32/Configure.py rename win32+botan/config.h => win32/config.h.in (81%) rename win32+botan/convarch/convarch.vcxproj.filters => win32/convarch/convarch.vcxproj.filters.in (73%) mode change 100755 => 100644 rename win32+botan/convarch/convarch.vcxproj => win32/convarch/convarch.vcxproj.in (73%) mode change 100755 => 100644 rename {win32+botan => win32}/convarch/convarch.vcxproj.user (100%) mode change 100755 => 100644 rename {win32+botan => win32}/cryptotest/cryptotest.vcxproj.filters (100%) mode change 100755 => 100644 rename win32+botan/cryptotest/cryptotest.vcxproj => win32/cryptotest/cryptotest.vcxproj.in (81%) mode change 100755 => 100644 rename {win32+botan => win32}/cryptotest/cryptotest.vcxproj.user (100%) mode change 100755 => 100644 rename {win32+botan => win32}/datamgrtest/datamgrtest.vcxproj.filters (100%) mode change 100755 => 100644 rename win32+botan/datamgrtest/datamgrtest.vcxproj => win32/datamgrtest/datamgrtest.vcxproj.in (77%) mode change 100755 => 100644 rename {win32+botan => win32}/datamgrtest/datamgrtest.vcxproj.user (100%) mode change 100755 => 100644 rename {win32+botan => win32}/dump/dump.vcxproj.filters (100%) mode change 100755 => 100644 rename {win32+botan => win32}/dump/dump.vcxproj.user (100%) mode change 100755 => 100644 rename {win32+botan => win32}/handlemgrtest/handlemgrtest.vcxproj.filters (100%) mode change 100755 => 100644 rename win32+botan/handlemgrtest/handlemgrtest.vcxproj => win32/handlemgrtest/handlemgrtest.vcxproj.in (78%) mode change 100755 => 100644 rename {win32+botan => win32}/handlemgrtest/handlemgrtest.vcxproj.user (100%) mode change 100755 => 100644 rename win32+botan/keyconv/keyconv.vcxproj.filters => win32/keyconv/keyconv.vcxproj.filters.in (92%) mode change 100755 => 100644 rename win32+botan/keyconv/keyconv.vcxproj => win32/keyconv/keyconv.vcxproj.in (78%) mode change 100755 => 100644 rename {win32+botan => win32}/keyconv/keyconv.vcxproj.user (100%) mode change 100755 => 100644 rename {win32+botan => win32}/objstoretest/objstoretest.vcxproj.filters (100%) mode change 100755 => 100644 rename win32+botan/objstoretest/objstoretest.vcxproj => win32/objstoretest/objstoretest.vcxproj.in (80%) mode change 100755 => 100644 rename {win32+botan => win32}/objstoretest/objstoretest.vcxproj.user (100%) mode change 100755 => 100644 rename {win32+botan => win32}/p11test/p11test.vcxproj.filters (90%) mode change 100755 => 100644 rename win32+botan/p11test/p11test.vcxproj => win32/p11test/p11test.vcxproj.in (77%) mode change 100755 => 100644 rename {win32+botan => win32}/p11test/p11test.vcxproj.user (100%) mode change 100755 => 100644 rename {win32+botan => win32}/sessionmgrtest/sessionmgrtest.vcxproj.filters (100%) mode change 100755 => 100644 rename win32+botan/sessionmgrtest/sessionmgrtest.vcxproj => win32/sessionmgrtest/sessionmgrtest.vcxproj.in (76%) mode change 100755 => 100644 rename {win32+botan => win32}/sessionmgrtest/sessionmgrtest.vcxproj.user (100%) mode change 100755 => 100644 rename {win32+botan => win32}/slotmgrtest/slotmgrtest.vcxproj.filters (100%) mode change 100755 => 100644 rename win32+botan/slotmgrtest/slotmgrtest.vcxproj => win32/slotmgrtest/slotmgrtest.vcxproj.in (76%) mode change 100755 => 100644 rename {win32+botan => win32}/slotmgrtest/slotmgrtest.vcxproj.user (100%) mode change 100755 => 100644 create mode 100644 win32/softhsm2.sln.in rename {win32+openssl => win32}/softhsm2/softhsm2.vcxproj.filters (100%) mode change 100755 => 100644 rename win32+botan/softhsm2/softhsm2.vcxproj => win32/softhsm2/softhsm2.vcxproj.in (83%) mode change 100755 => 100644 rename {win32+botan => win32}/softhsm2/softhsm2.vcxproj.user (100%) mode change 100755 => 100644 rename win32+botan/util/util.vcxproj.filters => win32/util/util.vcxproj.filters.in (88%) mode change 100755 => 100644 rename win32+botan/util/util.vcxproj => win32/util/util.vcxproj.in (73%) mode change 100755 => 100644 rename {win32+botan => win32}/util/util.vcxproj.user (100%) mode change 100755 => 100644 diff --git a/WIN32-NOTES.md b/WIN32-NOTES.md index ff15b008f..e2e05baf6 100644 --- a/WIN32-NOTES.md +++ b/WIN32-NOTES.md @@ -1,19 +1,26 @@ # WIN32 Specific Notes Works and checked on Visual Studio 2010 C++ Express, should work with any -Visual Studio 2010 or 2012 Desktop. +Visual Studio 2010, 2012 or 2013 Desktop. -OpenSSL in ssl directory at the same level, Botan in btn, if you want Debug -versions you need ssl+dbg and botand.{lib,dll}. Note openssl.exe should be in -the PATH for cryptotest.exe. +Default locations and names are: +OpenSSL in ssl directory at the same level, Botan in btn, CppUnit in cu, +if you want Debug versions you need ssl_d, btn_d and cu/lib/cppunitd.lib +or cu/cppunitd.lib. You can use the DLL or the static library for +Botan and OpenSSL, if it exists the DLL is copied in the Configuration +(i.e., Release or Debug) directory so is at the same place than +other binaries. -win32+openssl and win32+botan, flags in config.h, solution file in softhsm2. +Configure scripts in win32, same syntax than autotools but without --, +e.g., 'perl Configure.pl with-crypto-backend=botan' (or if you prefer +Python 2 'python Configure.py with-crypto-backend=botan'). ## Project List -- convarch: internal static library +- convarch: internal "convenience" static library - softhsm2 (main project): softhsm2.dll -- keyconv, util, dump: softhsm2-keyconv.exe, softhsm2-util.exe, and softhsm2-dump-file.exe tools +- keyconv, util, dump: softhsm2-keyconv.exe, softhsm2-util.exe, and + softhsm2-dump-file.exe tools - p11test, cryptotest, datamgrtest, handlemgrtest, objstoretest, sessionmgrtest, slotmgrtest: checking tools @@ -22,7 +29,7 @@ win32+openssl and win32+botan, flags in config.h, solution file in softhsm2. - fopen - getenv - gmtime -- _snprint +- _snprintf (or snprintf on Visual Studio 14) - sprintf - sscanf - strncpy diff --git a/src/bin/keyconv/softhsm2-keyconv.cpp b/src/bin/keyconv/softhsm2-keyconv.cpp index 24e289cc3..aeb75c3aa 100644 --- a/src/bin/keyconv/softhsm2-keyconv.cpp +++ b/src/bin/keyconv/softhsm2-keyconv.cpp @@ -46,6 +46,12 @@ #include #ifndef _WIN32 #include +#else +#include +#define S_IRUSR 0400 +#define S_IWUSR 0200 +#define open _open +#define close _close #endif #include #include diff --git a/src/lib/P11Attributes.cpp b/src/lib/P11Attributes.cpp index f63edc8c0..fde0d619a 100644 --- a/src/lib/P11Attributes.cpp +++ b/src/lib/P11Attributes.cpp @@ -337,7 +337,7 @@ CK_RV P11Attribute::retrieve(Token *token, bool isPrivate, CK_VOID_PTR pValue, C const unsigned char* attrPtr = value.const_byte_str(); memcpy(pValue,attrPtr,attrSize); } - else + else if (attr.getByteStringValue().size() != 0) { const unsigned char* attrPtr = attr.getByteStringValue().const_byte_str(); memcpy(pValue,attrPtr,attrSize); diff --git a/src/lib/SoftHSM.cpp b/src/lib/SoftHSM.cpp index 94e50547c..f99f4958d 100644 --- a/src/lib/SoftHSM.cpp +++ b/src/lib/SoftHSM.cpp @@ -2257,7 +2257,10 @@ static CK_RV SymEncryptFinal(Session* session, CK_BYTE_PTR pEncryptedData, CK_UL return CKR_GENERAL_ERROR; } - memcpy(pEncryptedData, encryptedFinal.byte_str(), encryptedFinal.size()); + if (encryptedFinal.size() != 0) + { + memcpy(pEncryptedData, encryptedFinal.byte_str(), encryptedFinal.size()); + } *pulEncryptedDataLen = encryptedFinal.size(); session->resetOp(); diff --git a/src/lib/crypto/BotanDSA.cpp b/src/lib/crypto/BotanDSA.cpp index ed9e444f4..2a597243f 100644 --- a/src/lib/crypto/BotanDSA.cpp +++ b/src/lib/crypto/BotanDSA.cpp @@ -227,7 +227,11 @@ bool BotanDSA::signUpdate(const ByteString& dataToSign) try { - signer->update(dataToSign.const_byte_str(), dataToSign.size()); + if (dataToSign.size() != 0) + { + signer->update(dataToSign.const_byte_str(), + dataToSign.size()); + } } catch (...) { @@ -444,7 +448,11 @@ bool BotanDSA::verifyUpdate(const ByteString& originalData) try { - verifier->update(originalData.const_byte_str(), originalData.size()); + if (originalData.size() != 0) + { + verifier->update(originalData.const_byte_str(), + originalData.size()); + } } catch (...) { diff --git a/src/lib/crypto/BotanGOST.cpp b/src/lib/crypto/BotanGOST.cpp index b0c2b8e42..1628bed89 100644 --- a/src/lib/crypto/BotanGOST.cpp +++ b/src/lib/crypto/BotanGOST.cpp @@ -138,7 +138,11 @@ bool BotanGOST::signUpdate(const ByteString& dataToSign) try { - signer->update(dataToSign.const_byte_str(), dataToSign.size()); + if (dataToSign.size() != 0) + { + signer->update(dataToSign.const_byte_str(), + dataToSign.size()); + } } catch (...) { @@ -276,7 +280,11 @@ bool BotanGOST::verifyUpdate(const ByteString& originalData) try { - verifier->update(originalData.const_byte_str(), originalData.size()); + if (originalData.size() != 0) + { + verifier->update(originalData.const_byte_str(), + originalData.size()); + } } catch (...) { diff --git a/src/lib/crypto/BotanHashAlgorithm.cpp b/src/lib/crypto/BotanHashAlgorithm.cpp index 366460ca4..9630dfc3c 100644 --- a/src/lib/crypto/BotanHashAlgorithm.cpp +++ b/src/lib/crypto/BotanHashAlgorithm.cpp @@ -89,7 +89,10 @@ bool BotanHashAlgorithm::hashUpdate(const ByteString& data) // Continue digesting try { - hash->update(data.const_byte_str(), data.size()); + if (data.size() != 0) + { + hash->update(data.const_byte_str(), data.size()); + } } catch (...) { diff --git a/src/lib/crypto/BotanMacAlgorithm.cpp b/src/lib/crypto/BotanMacAlgorithm.cpp index 4300b1dde..9523ec432 100644 --- a/src/lib/crypto/BotanMacAlgorithm.cpp +++ b/src/lib/crypto/BotanMacAlgorithm.cpp @@ -108,7 +108,11 @@ bool BotanMacAlgorithm::signUpdate(const ByteString& dataToSign) try { - hmac->update(dataToSign.const_byte_str(), dataToSign.size()); + if (dataToSign.size() != 0) + { + hmac->update(dataToSign.const_byte_str(), + dataToSign.size()); + } } catch (...) { @@ -223,7 +227,11 @@ bool BotanMacAlgorithm::verifyUpdate(const ByteString& originalData) try { - hmac->update(originalData.const_byte_str(), originalData.size()); + if (originalData.size() != 0) + { + hmac->update(originalData.const_byte_str(), + originalData.size()); + } } catch (...) { diff --git a/src/lib/crypto/BotanRSA.cpp b/src/lib/crypto/BotanRSA.cpp index 7d2311228..e59d36b03 100644 --- a/src/lib/crypto/BotanRSA.cpp +++ b/src/lib/crypto/BotanRSA.cpp @@ -346,7 +346,11 @@ bool BotanRSA::signUpdate(const ByteString& dataToSign) try { - signer->update(dataToSign.const_byte_str(), dataToSign.size()); + if (dataToSign.size() != 0) + { + signer->update(dataToSign.const_byte_str(), + dataToSign.size()); + } } catch (...) { @@ -684,7 +688,11 @@ bool BotanRSA::verifyUpdate(const ByteString& originalData) try { - verifier->update(originalData.const_byte_str(), originalData.size()); + if (originalData.size() != 0) + { + verifier->update(originalData.const_byte_str(), + originalData.size()); + } } catch (...) { diff --git a/src/lib/crypto/BotanSymmetricAlgorithm.cpp b/src/lib/crypto/BotanSymmetricAlgorithm.cpp index 21107eb8e..75c19fbed 100644 --- a/src/lib/crypto/BotanSymmetricAlgorithm.cpp +++ b/src/lib/crypto/BotanSymmetricAlgorithm.cpp @@ -101,13 +101,13 @@ bool BotanSymmetricAlgorithm::encryptInit(const SymmetricKey* key, const SymMode try { Botan::SymmetricKey botanKey = Botan::SymmetricKey(key->getKeyBits().const_byte_str(), key->getKeyBits().size()); - Botan::InitializationVector botanIV = Botan::InitializationVector(IV.const_byte_str(), IV.size()); if (mode == SymMode::ECB) { cryption = new Botan::Pipe(Botan::get_cipher(cipherName, botanKey, Botan::ENCRYPTION)); } else { + Botan::InitializationVector botanIV = Botan::InitializationVector(IV.const_byte_str(), IV.size()); cryption = new Botan::Pipe(Botan::get_cipher(cipherName, botanKey, botanIV, Botan::ENCRYPTION)); } cryption->start_msg(); @@ -273,13 +273,13 @@ bool BotanSymmetricAlgorithm::decryptInit(const SymmetricKey* key, const SymMode try { Botan::SymmetricKey botanKey = Botan::SymmetricKey(key->getKeyBits().const_byte_str(), key->getKeyBits().size()); - Botan::InitializationVector botanIV = Botan::InitializationVector(IV.const_byte_str(), IV.size()); if (mode == SymMode::ECB) { cryption = new Botan::Pipe(Botan::get_cipher(cipherName, botanKey, Botan::DECRYPTION)); } else { + Botan::InitializationVector botanIV = Botan::InitializationVector(IV.const_byte_str(), IV.size()); cryption = new Botan::Pipe(Botan::get_cipher(cipherName, botanKey, botanIV, Botan::DECRYPTION)); } cryption->start_msg(); diff --git a/src/lib/crypto/test/AESTests.cpp b/src/lib/crypto/test/AESTests.cpp index 70819113a..0c3b35b51 100644 --- a/src/lib/crypto/test/AESTests.cpp +++ b/src/lib/crypto/test/AESTests.cpp @@ -510,7 +510,7 @@ void AESTests::testECB() // Test 128-bit key - // First, use the OpenSSL command line tool to encrypt the test data + // Get the reference for the encrypted data cipherText = ByteString(testResult[i][j][0]); // Now, do the same thing using our AES implementation diff --git a/src/lib/test/softhsm2.conf.in b/src/lib/test/softhsm2.conf.in index 932ad4147..fa59f8320 100644 --- a/src/lib/test/softhsm2.conf.in +++ b/src/lib/test/softhsm2.conf.in @@ -2,3 +2,4 @@ directories.tokendir = @builddir@/tokens objectstore.backend = file +log.level = DEBUG diff --git a/src/lib/test/softhsm2.conf.win32 b/src/lib/test/softhsm2.conf.win32 index 7de53a912..3d44bff7b 100644 --- a/src/lib/test/softhsm2.conf.win32 +++ b/src/lib/test/softhsm2.conf.win32 @@ -2,3 +2,4 @@ directories.tokendir = .\tokens objectstore.backend = file +log.level = DEBUG diff --git a/win32+botan/dump/dump.vcxproj b/win32+botan/dump/dump.vcxproj deleted file mode 100755 index 00c4b21f7..000000000 --- a/win32+botan/dump/dump.vcxproj +++ /dev/null @@ -1,91 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {F60ACB12-7D05-4A89-B2D1-DD16E1F3566B} - Win32Proj - dump - - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - true - softhsm2-dump-file - - - false - softhsm2-dump-file - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib\cryptoki_compat;..\..\src\lib\object_store;..\..\src\lib;%(AdditionalIncludeDirectories) - - - Console - true - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib\cryptoki_compat;..\..\src\lib\object_store;..\..\src\lib;%(AdditionalIncludeDirectories) - - - Console - true - true - true - - - - - - - - - - - - - - \ No newline at end of file diff --git a/win32+botan/softhsm2.sln b/win32+botan/softhsm2.sln deleted file mode 100755 index 831528161..000000000 --- a/win32+botan/softhsm2.sln +++ /dev/null @@ -1,113 +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}") = "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 -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 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "convarch", "convarch\convarch.vcxproj", "{F64541B6-FFBF-4368-B93A-A5CA8ADAD795}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {801F5AB2-7A62-4085-B129-D15E2D717219}.Debug|Win32.ActiveCfg = Debug|Win32 - {801F5AB2-7A62-4085-B129-D15E2D717219}.Debug|Win32.Build.0 = Debug|Win32 - {801F5AB2-7A62-4085-B129-D15E2D717219}.Release|Win32.ActiveCfg = Release|Win32 - {801F5AB2-7A62-4085-B129-D15E2D717219}.Release|Win32.Build.0 = Release|Win32 - {9B003E52-F02A-47EA-9942-2D9AE8738161}.Debug|Win32.ActiveCfg = Debug|Win32 - {9B003E52-F02A-47EA-9942-2D9AE8738161}.Debug|Win32.Build.0 = Debug|Win32 - {9B003E52-F02A-47EA-9942-2D9AE8738161}.Release|Win32.ActiveCfg = Release|Win32 - {9B003E52-F02A-47EA-9942-2D9AE8738161}.Release|Win32.Build.0 = Release|Win32 - {05901466-4184-47C8-9D6C-3BB99BBF5378}.Debug|Win32.ActiveCfg = Debug|Win32 - {05901466-4184-47C8-9D6C-3BB99BBF5378}.Debug|Win32.Build.0 = Debug|Win32 - {05901466-4184-47C8-9D6C-3BB99BBF5378}.Release|Win32.ActiveCfg = Release|Win32 - {05901466-4184-47C8-9D6C-3BB99BBF5378}.Release|Win32.Build.0 = Release|Win32 - {F60ACB12-7D05-4A89-B2D1-DD16E1F3566B}.Debug|Win32.ActiveCfg = Debug|Win32 - {F60ACB12-7D05-4A89-B2D1-DD16E1F3566B}.Debug|Win32.Build.0 = Debug|Win32 - {F60ACB12-7D05-4A89-B2D1-DD16E1F3566B}.Release|Win32.ActiveCfg = Release|Win32 - {F60ACB12-7D05-4A89-B2D1-DD16E1F3566B}.Release|Win32.Build.0 = Release|Win32 - {7C5EE7FC-B5FC-47BF-8164-A452FE689472}.Debug|Win32.ActiveCfg = Debug|Win32 - {7C5EE7FC-B5FC-47BF-8164-A452FE689472}.Debug|Win32.Build.0 = Debug|Win32 - {7C5EE7FC-B5FC-47BF-8164-A452FE689472}.Release|Win32.ActiveCfg = Release|Win32 - {7C5EE7FC-B5FC-47BF-8164-A452FE689472}.Release|Win32.Build.0 = Release|Win32 - {07E03E0B-C525-4A72-88C6-2238896A4D8C}.Debug|Win32.ActiveCfg = Debug|Win32 - {07E03E0B-C525-4A72-88C6-2238896A4D8C}.Debug|Win32.Build.0 = Debug|Win32 - {07E03E0B-C525-4A72-88C6-2238896A4D8C}.Release|Win32.ActiveCfg = Release|Win32 - {07E03E0B-C525-4A72-88C6-2238896A4D8C}.Release|Win32.Build.0 = Release|Win32 - {E20315B5-B49E-46D7-B7EC-1A439F347C95}.Debug|Win32.ActiveCfg = Debug|Win32 - {E20315B5-B49E-46D7-B7EC-1A439F347C95}.Debug|Win32.Build.0 = Debug|Win32 - {E20315B5-B49E-46D7-B7EC-1A439F347C95}.Release|Win32.ActiveCfg = Release|Win32 - {E20315B5-B49E-46D7-B7EC-1A439F347C95}.Release|Win32.Build.0 = Release|Win32 - {014B1E10-EC68-4BEC-B992-F92CA2B6816F}.Debug|Win32.ActiveCfg = Debug|Win32 - {014B1E10-EC68-4BEC-B992-F92CA2B6816F}.Debug|Win32.Build.0 = Debug|Win32 - {014B1E10-EC68-4BEC-B992-F92CA2B6816F}.Release|Win32.ActiveCfg = Release|Win32 - {014B1E10-EC68-4BEC-B992-F92CA2B6816F}.Release|Win32.Build.0 = Release|Win32 - {44F77533-A4A1-4175-8C4C-07106B3F9C08}.Debug|Win32.ActiveCfg = Debug|Win32 - {44F77533-A4A1-4175-8C4C-07106B3F9C08}.Debug|Win32.Build.0 = Debug|Win32 - {44F77533-A4A1-4175-8C4C-07106B3F9C08}.Release|Win32.ActiveCfg = Release|Win32 - {44F77533-A4A1-4175-8C4C-07106B3F9C08}.Release|Win32.Build.0 = Release|Win32 - {45E2ABF6-91A7-4AA5-A82B-0C8E54BCCCB9}.Debug|Win32.ActiveCfg = Debug|Win32 - {45E2ABF6-91A7-4AA5-A82B-0C8E54BCCCB9}.Debug|Win32.Build.0 = Debug|Win32 - {45E2ABF6-91A7-4AA5-A82B-0C8E54BCCCB9}.Release|Win32.ActiveCfg = Release|Win32 - {45E2ABF6-91A7-4AA5-A82B-0C8E54BCCCB9}.Release|Win32.Build.0 = Release|Win32 - {F62E31E5-0F8D-4B70-8F26-44AFA1A9E645}.Debug|Win32.ActiveCfg = Debug|Win32 - {F62E31E5-0F8D-4B70-8F26-44AFA1A9E645}.Debug|Win32.Build.0 = Debug|Win32 - {F62E31E5-0F8D-4B70-8F26-44AFA1A9E645}.Release|Win32.ActiveCfg = Release|Win32 - {F62E31E5-0F8D-4B70-8F26-44AFA1A9E645}.Release|Win32.Build.0 = Release|Win32 - {F64541B6-FFBF-4368-B93A-A5CA8ADAD795}.Debug|Win32.ActiveCfg = Debug|Win32 - {F64541B6-FFBF-4368-B93A-A5CA8ADAD795}.Debug|Win32.Build.0 = Debug|Win32 - {F64541B6-FFBF-4368-B93A-A5CA8ADAD795}.Release|Win32.ActiveCfg = Release|Win32 - {F64541B6-FFBF-4368-B93A-A5CA8ADAD795}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/win32+botan/softhsm2/softhsm2.vcxproj.filters b/win32+botan/softhsm2/softhsm2.vcxproj.filters deleted file mode 100755 index fbedc5cc0..000000000 --- a/win32+botan/softhsm2/softhsm2.vcxproj.filters +++ /dev/null @@ -1,57 +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 - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/win32+openssl/config.h b/win32+openssl/config.h deleted file mode 100644 index 66589bdd6..000000000 --- a/win32+openssl/config.h +++ /dev/null @@ -1,132 +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 to 1 if you have the `crypto' library (-lcrypto). */ -#define HAVE_LIBCRYPTO 1 - -/* 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.0.0a1" - -/* 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.0.0a1" - -/* Non-paged memory for secure storage */ -#undef SENSITIVE_NON_PAGE - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Version number of package */ -#define VERSION "2.0.0a1" - -/* SoftHSM major version number via PKCS#11 */ -#define VERSION_MAJOR 2 - -/* SoftHSM minor version number via PKCS#11 */ -#define VERSION_MINOR 0 - -/* Compile with Botan support */ -#undef WITH_BOTAN - -/* Compile with ECC support */ -#define WITH_ECC 1 - -/* Compile with GOST support */ -#define WITH_GOST 1 - -/* Compile with OpenSSL support */ -#define WITH_OPENSSL 1 - -/* 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 - -#define snprintf _snprintf -#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 - -/* Temporary for debug */ - -#undef DEBUG_LOG_STDERR -// #define DEBUG_LOG_STDERR 1 - -/* To avoid unsafe warnings (off) */ - -// #pragma warning(disable: 4996) diff --git a/win32+openssl/convarch/convarch.vcxproj b/win32+openssl/convarch/convarch.vcxproj deleted file mode 100755 index 54ebeb066..000000000 --- a/win32+openssl/convarch/convarch.vcxproj +++ /dev/null @@ -1,271 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {F64541B6-FFBF-4368-B93A-A5CA8ADAD795} - Win32Proj - convarch - - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - - - - - - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\cryptoki_compat;..\..\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;..\..\..\ssl\include;%(AdditionalIncludeDirectories) - - - Windows - true - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\cryptoki_compat;..\..\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;..\..\..\ssl\include;%(AdditionalIncludeDirectories) - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/win32+openssl/convarch/convarch.vcxproj.filters b/win32+openssl/convarch/convarch.vcxproj.filters deleted file mode 100755 index 142e6950b..000000000 --- a/win32+openssl/convarch/convarch.vcxproj.filters +++ /dev/null @@ -1,650 +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 - - - 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 - - - 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 - - - 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 - - - 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 - - - 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 - - - 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 - - - Crypto Source Files - - - \ No newline at end of file diff --git a/win32+openssl/convarch/convarch.vcxproj.user b/win32+openssl/convarch/convarch.vcxproj.user deleted file mode 100755 index 695b5c78b..000000000 --- a/win32+openssl/convarch/convarch.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/win32+openssl/cryptotest/cryptotest.vcxproj b/win32+openssl/cryptotest/cryptotest.vcxproj deleted file mode 100755 index 53df77ae9..000000000 --- a/win32+openssl/cryptotest/cryptotest.vcxproj +++ /dev/null @@ -1,126 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {07E03E0B-C525-4A72-88C6-2238896A4D8C} - Win32Proj - cryptotest - - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - true - - - false - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\crypto;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\data_mgr;..\..\src\lib\object_store;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\win32;..\..\..\cu\include;..\..\..\ssl\include;%(AdditionalIncludeDirectories) - - - Console - true - ..\$(Configuration);..\..\..\cu\lib;..\..\..\ssl\lib;%(AdditionalLibraryDirectories) - convarch.lib;cppunitd.lib;libeay32.lib;%(AdditionalDependencies) - - - ..\..\..\ssl\bin\openssl version - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\crypto;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\data_mgr;..\..\src\lib\object_store;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\win32;..\..\..\cu\include;..\..\..\ssl\include;%(AdditionalIncludeDirectories) - - - Console - true - true - true - ..\$(Configuration);..\..\..\cu\lib;..\..\..\ssl\lib;%(AdditionalLibraryDirectories) - convarch.lib;cppunit.lib;libeay32.lib;%(AdditionalDependencies) - - - ..\..\..\ssl\bin\openssl version - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32+openssl/cryptotest/cryptotest.vcxproj.filters b/win32+openssl/cryptotest/cryptotest.vcxproj.filters deleted file mode 100755 index 214fd1abe..000000000 --- a/win32+openssl/cryptotest/cryptotest.vcxproj.filters +++ /dev/null @@ -1,114 +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 - - - - - 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 - - - \ No newline at end of file diff --git a/win32+openssl/cryptotest/cryptotest.vcxproj.user b/win32+openssl/cryptotest/cryptotest.vcxproj.user deleted file mode 100755 index 695b5c78b..000000000 --- a/win32+openssl/cryptotest/cryptotest.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/win32+openssl/datamgrtest/datamgrtest.vcxproj b/win32+openssl/datamgrtest/datamgrtest.vcxproj deleted file mode 100755 index c11df9cdd..000000000 --- a/win32+openssl/datamgrtest/datamgrtest.vcxproj +++ /dev/null @@ -1,97 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {E20315B5-B49E-46D7-B7EC-1A439F347C95} - Win32Proj - datamgrtest - - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - true - - - false - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\data_mgr;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\crypto;..\..\src\lib\object_store;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\win32;..\..\..\cu\include;%(AdditionalIncludeDirectories) - - - Console - true - ..\$(Configuration);..\..\..\cu\lib;..\..\..\ssl\lib;%(AdditionalLibraryDirectories) - convarch.lib;cppunitd.lib;libeay32.lib;%(AdditionalDependencies) - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\data_mgr;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\crypto;..\..\src\lib\object_store;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\win32;..\..\..\cu\include;%(AdditionalIncludeDirectories) - - - Console - true - true - true - ..\$(Configuration);..\..\..\cu\lib;..\..\..\ssl\lib;%(AdditionalLibraryDirectories) - convarch.lib;cppunit.lib;libeay32.lib;%(AdditionalDependencies) - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/win32+openssl/datamgrtest/datamgrtest.vcxproj.filters b/win32+openssl/datamgrtest/datamgrtest.vcxproj.filters deleted file mode 100755 index 364eaa595..000000000 --- a/win32+openssl/datamgrtest/datamgrtest.vcxproj.filters +++ /dev/null @@ -1,45 +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 - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - diff --git a/win32+openssl/datamgrtest/datamgrtest.vcxproj.user b/win32+openssl/datamgrtest/datamgrtest.vcxproj.user deleted file mode 100755 index 695b5c78b..000000000 --- a/win32+openssl/datamgrtest/datamgrtest.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/win32+openssl/dump/dump.vcxproj b/win32+openssl/dump/dump.vcxproj deleted file mode 100755 index 00c4b21f7..000000000 --- a/win32+openssl/dump/dump.vcxproj +++ /dev/null @@ -1,91 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {F60ACB12-7D05-4A89-B2D1-DD16E1F3566B} - Win32Proj - dump - - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - true - softhsm2-dump-file - - - false - softhsm2-dump-file - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib\cryptoki_compat;..\..\src\lib\object_store;..\..\src\lib;%(AdditionalIncludeDirectories) - - - Console - true - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib\cryptoki_compat;..\..\src\lib\object_store;..\..\src\lib;%(AdditionalIncludeDirectories) - - - Console - true - true - true - - - - - - - - - - - - - - \ No newline at end of file diff --git a/win32+openssl/dump/dump.vcxproj.filters b/win32+openssl/dump/dump.vcxproj.filters deleted file mode 100755 index c4546a64f..000000000 --- a/win32+openssl/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/win32+openssl/dump/dump.vcxproj.user b/win32+openssl/dump/dump.vcxproj.user deleted file mode 100755 index 695b5c78b..000000000 --- a/win32+openssl/dump/dump.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/win32+openssl/handlemgrtest/handlemgrtest.vcxproj b/win32+openssl/handlemgrtest/handlemgrtest.vcxproj deleted file mode 100755 index a7b4cedba..000000000 --- a/win32+openssl/handlemgrtest/handlemgrtest.vcxproj +++ /dev/null @@ -1,93 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {014B1E10-EC68-4BEC-B992-F92CA2B6816F} - Win32Proj - handlemgrtest - - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - true - - - false - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\handle_mgr;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\crypto;..\..\src\lib\object_store;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\data_mgr;..\..\src\lib\win32;..\..\..\cu\include;%(AdditionalIncludeDirectories) - - - Console - true - ..\$(Configuration);..\..\..\cu\lib;..\..\..\ssl\lib;%(AdditionalLibraryDirectories) - convarch.lib;cppunitd.lib;libeay32.lib;%(AdditionalDependencies) - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\handle_mgr;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\crypto;..\..\src\lib\object_store;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\data_mgr;..\..\src\lib\win32;..\..\..\cu\include;%(AdditionalIncludeDirectories) - - - Console - true - true - true - ..\$(Configuration);..\..\..\cu\lib;..\..\..\ssl\lib;%(AdditionalLibraryDirectories) - convarch.lib;cppunit.lib;libeay32.lib;%(AdditionalDependencies) - - - - - - - - - - - - - - \ No newline at end of file diff --git a/win32+openssl/handlemgrtest/handlemgrtest.vcxproj.filters b/win32+openssl/handlemgrtest/handlemgrtest.vcxproj.filters deleted file mode 100755 index b6727e62f..000000000 --- a/win32+openssl/handlemgrtest/handlemgrtest.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 - - - - - Source Files - - - Source Files - - - diff --git a/win32+openssl/handlemgrtest/handlemgrtest.vcxproj.user b/win32+openssl/handlemgrtest/handlemgrtest.vcxproj.user deleted file mode 100755 index 695b5c78b..000000000 --- a/win32+openssl/handlemgrtest/handlemgrtest.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/win32+openssl/keyconv/keyconv.vcxproj b/win32+openssl/keyconv/keyconv.vcxproj deleted file mode 100755 index 8f263b210..000000000 --- a/win32+openssl/keyconv/keyconv.vcxproj +++ /dev/null @@ -1,103 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {9B003E52-F02A-47EA-9942-2D9AE8738161} - Win32Proj - keyconv - - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - true - softhsm2-keyconv - - - false - softhsm2-keyconv - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\bin\common;..\..\src\bin\win32;..\..\src\lib\cryptoki_compat;..\..\..\ssl\include;%(AdditionalIncludeDirectories) - - - Console - true - ..\..\..\ssl\lib;%(AdditionalLibraryDirectories) - libeay32.lib;%(AdditionalDependencies) - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\bin\common;..\..\src\bin\win32;..\..\src\lib\cryptoki_compat;..\..\..\ssl\include;%(AdditionalIncludeDirectories) - - - Console - true - true - true - ..\..\..\ssl\lib;%(AdditionalLibraryDirectories) - libeay32.lib;%(AdditionalDependencies) - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/win32+openssl/keyconv/keyconv.vcxproj.filters b/win32+openssl/keyconv/keyconv.vcxproj.filters deleted file mode 100755 index cc1807e9b..000000000 --- a/win32+openssl/keyconv/keyconv.vcxproj.filters +++ /dev/null @@ -1,73 +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 - - - Header Files - - - Win32 Header Files - - - - - Source Files - - - Source Files - - - Common Source Files - - - Common Source Files - - - Source Files - - - Win32 Source Files - - - Win32 Source Files - - - diff --git a/win32+openssl/keyconv/keyconv.vcxproj.user b/win32+openssl/keyconv/keyconv.vcxproj.user deleted file mode 100755 index 695b5c78b..000000000 --- a/win32+openssl/keyconv/keyconv.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/win32+openssl/objstoretest/objstoretest.vcxproj b/win32+openssl/objstoretest/objstoretest.vcxproj deleted file mode 100755 index f246e1858..000000000 --- a/win32+openssl/objstoretest/objstoretest.vcxproj +++ /dev/null @@ -1,107 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {44F77533-A4A1-4175-8C4C-07106B3F9C08} - Win32Proj - objstoretest - - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - true - - - false - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\object_store;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\crypto;..\..\src\lib\data_mgr;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\win32;..\..\..\cu\include;%(AdditionalIncludeDirectories) - - - Console - true - ..\$(Configuration);..\..\..\cu\lib;..\..\..\ssl\lib;%(AdditionalLibraryDirectories) - convarch.lib;cppunitd.lib;libeay32.lib;%(AdditionalDependencies) - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\object_store;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\crypto;..\..\src\lib\data_mgr;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\win32;..\..\..\cu\include;%(AdditionalIncludeDirectories) - - - Console - true - true - true - ..\$(Configuration);..\..\..\cu\lib;..\..\..\ssl\lib;%(AdditionalLibraryDirectories) - convarch.lib;cppunit.lib;libeay32.lib;%(AdditionalDependencies) - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/win32+openssl/objstoretest/objstoretest.vcxproj.filters b/win32+openssl/objstoretest/objstoretest.vcxproj.filters deleted file mode 100755 index fca6ad14b..000000000 --- a/win32+openssl/objstoretest/objstoretest.vcxproj.filters +++ /dev/null @@ -1,75 +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 - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - diff --git a/win32+openssl/objstoretest/objstoretest.vcxproj.user b/win32+openssl/objstoretest/objstoretest.vcxproj.user deleted file mode 100755 index 695b5c78b..000000000 --- a/win32+openssl/objstoretest/objstoretest.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/win32+openssl/p11test/p11test.vcxproj b/win32+openssl/p11test/p11test.vcxproj deleted file mode 100755 index ced0a1931..000000000 --- a/win32+openssl/p11test/p11test.vcxproj +++ /dev/null @@ -1,145 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {7C5EE7FC-B5FC-47BF-8164-A452FE689472} - Win32Proj - p11test - - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - true - - - false - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\cryptoki_compat;..\..\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;..\..\..\cu\include;%(AdditionalIncludeDirectories) - - - Console - true - ..\$(Configuration);..\..\..\cu\lib;..\..\..\ssl\lib;%(AdditionalLibraryDirectories) - convarch.lib;cppunitd.lib;libeay32.lib;%(AdditionalDependencies) - - - copy ..\..\src\lib\test\softhsm2.conf.win32 ..\..\softhsm2.conf -mkdir ..\..\tokens 2> nul -copy ..\..\src\lib\test\tokens\dummy.in ..\..\tokens\dummy - -copy ..\..\src\lib\test\softhsm2.conf.win32 ..\..\"win32+openssl"\p11test\softhsm2.conf -mkdir ..\..\"win32+openssl"\p11test\tokens 2> nul -copy ..\..\src\lib\test\tokens\dummy.in ..\..\"win32+openssl"\p11test\tokens\dummy - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\cryptoki_compat;..\..\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;..\..\..\cu\include;%(AdditionalIncludeDirectories) - - - Console - true - true - true - ..\$(Configuration);..\..\..\cu\lib;..\..\..\ssl\lib;%(AdditionalLibraryDirectories) - convarch.lib;cppunit.lib;libeay32.lib;%(AdditionalDependencies) - - - copy ..\..\src\lib\test\softhsm2.conf.win32 ..\..\softhsm2.conf -mkdir ..\..\tokens 2> nul -copy ..\..\src\lib\test\tokens\dummy.in ..\..\tokens\dummy - -copy ..\..\src\lib\test\softhsm2.conf.win32 ..\..\"win32+openssl"\p11test\softhsm2.conf -mkdir ..\..\"win32+openssl"\p11test\tokens 2> nul -copy ..\..\src\lib\test\tokens\dummy.in ..\..\"win32+openssl"\p11test\tokens\dummy - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/win32+openssl/p11test/p11test.vcxproj.filters b/win32+openssl/p11test/p11test.vcxproj.filters deleted file mode 100755 index fba8ef3f4..000000000 --- a/win32+openssl/p11test/p11test.vcxproj.filters +++ /dev/null @@ -1,151 +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 - - - Other Header Files - - - Lib Header Files - - - Lib 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 - - - Other Source Files - - - Other Source Files - - - Lib Source Files - - - Lib Source Files - - - Lib Source Files - - - Lib Source Files - - - Lib Source Files - - - Source Files - - - \ No newline at end of file diff --git a/win32+openssl/p11test/p11test.vcxproj.user b/win32+openssl/p11test/p11test.vcxproj.user deleted file mode 100755 index 695b5c78b..000000000 --- a/win32+openssl/p11test/p11test.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/win32+openssl/sessionmgrtest/sessionmgrtest.vcxproj b/win32+openssl/sessionmgrtest/sessionmgrtest.vcxproj deleted file mode 100755 index 06ea9d1b8..000000000 --- a/win32+openssl/sessionmgrtest/sessionmgrtest.vcxproj +++ /dev/null @@ -1,93 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {45E2ABF6-91A7-4AA5-A82B-0C8E54BCCCB9} - Win32Proj - sessionmgrtest - - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - true - - - false - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\session_mgr;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\crypto;..\..\src\lib\data_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\object_store;..\..\src\lib\win32;..\..\..\cu\include;..\..\..\ssl\include;%(AdditionalIncludeDirectories) - - - Console - true - ..\$(Configuration);..\..\..\cu\lib;..\..\..\ssl\lib;%(AdditionalLibraryDirectories) - convarch.lib;cppunitd.lib;libeay32.lib;%(AdditionalDependencies) - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\session_mgr;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\crypto;..\..\src\lib\data_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\object_store;..\..\src\lib\win32;..\..\..\cu\include;..\..\..\ssl\include;%(AdditionalIncludeDirectories) - - - Console - true - true - true - ..\$(Configuration);..\..\..\cu\lib;..\..\..\ssl\lib;%(AdditionalLibraryDirectories) - convarch.lib;cppunit.lib;libeay32.lib;%(AdditionalDependencies) - - - - - - - - - - - - - - \ No newline at end of file diff --git a/win32+openssl/sessionmgrtest/sessionmgrtest.vcxproj.filters b/win32+openssl/sessionmgrtest/sessionmgrtest.vcxproj.filters deleted file mode 100755 index 9533a79a2..000000000 --- a/win32+openssl/sessionmgrtest/sessionmgrtest.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 - - - - - Source Files - - - Source Files - - - diff --git a/win32+openssl/sessionmgrtest/sessionmgrtest.vcxproj.user b/win32+openssl/sessionmgrtest/sessionmgrtest.vcxproj.user deleted file mode 100755 index 695b5c78b..000000000 --- a/win32+openssl/sessionmgrtest/sessionmgrtest.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/win32+openssl/slotmgrtest/slotmgrtest.vcxproj b/win32+openssl/slotmgrtest/slotmgrtest.vcxproj deleted file mode 100755 index a2bb7fe70..000000000 --- a/win32+openssl/slotmgrtest/slotmgrtest.vcxproj +++ /dev/null @@ -1,93 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {F62E31E5-0F8D-4B70-8F26-44AFA1A9E645} - Win32Proj - slotmgrtest - - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - true - - - false - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\slot_mgr;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\crypto;..\..\src\lib\object_store;..\..\src\lib\session_mgr;..\..\src\lib\data_mgr;..\..\src\lib\win32;..\..\..\cu\include;%(AdditionalIncludeDirectories) - - - Console - true - ..\$(Configuration);..\..\..\cu\lib;..\..\..\ssl\lib;%(AdditionalLibraryDirectories) - convarch.lib;cppunitd.lib;libeay32.lib;%(AdditionalDependencies) - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\slot_mgr;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\crypto;..\..\src\lib\object_store;..\..\src\lib\session_mgr;..\..\src\lib\data_mgr;..\..\src\lib\win32;..\..\..\cu\include;%(AdditionalIncludeDirectories) - - - Console - true - true - true - ..\$(Configuration);..\..\..\cu\lib;..\..\..\ssl\lib;%(AdditionalLibraryDirectories) - convarch.lib;cppunit.lib;libeay32.lib;%(AdditionalDependencies) - - - - - - - - - - - - - - \ No newline at end of file diff --git a/win32+openssl/slotmgrtest/slotmgrtest.vcxproj.filters b/win32+openssl/slotmgrtest/slotmgrtest.vcxproj.filters deleted file mode 100755 index 3fe9f5bfd..000000000 --- a/win32+openssl/slotmgrtest/slotmgrtest.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 - - - - - Source Files - - - Source Files - - - diff --git a/win32+openssl/slotmgrtest/slotmgrtest.vcxproj.user b/win32+openssl/slotmgrtest/slotmgrtest.vcxproj.user deleted file mode 100755 index 695b5c78b..000000000 --- a/win32+openssl/slotmgrtest/slotmgrtest.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/win32+openssl/softhsm2.sln b/win32+openssl/softhsm2.sln deleted file mode 100755 index 831528161..000000000 --- a/win32+openssl/softhsm2.sln +++ /dev/null @@ -1,113 +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}") = "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 -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 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "convarch", "convarch\convarch.vcxproj", "{F64541B6-FFBF-4368-B93A-A5CA8ADAD795}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {801F5AB2-7A62-4085-B129-D15E2D717219}.Debug|Win32.ActiveCfg = Debug|Win32 - {801F5AB2-7A62-4085-B129-D15E2D717219}.Debug|Win32.Build.0 = Debug|Win32 - {801F5AB2-7A62-4085-B129-D15E2D717219}.Release|Win32.ActiveCfg = Release|Win32 - {801F5AB2-7A62-4085-B129-D15E2D717219}.Release|Win32.Build.0 = Release|Win32 - {9B003E52-F02A-47EA-9942-2D9AE8738161}.Debug|Win32.ActiveCfg = Debug|Win32 - {9B003E52-F02A-47EA-9942-2D9AE8738161}.Debug|Win32.Build.0 = Debug|Win32 - {9B003E52-F02A-47EA-9942-2D9AE8738161}.Release|Win32.ActiveCfg = Release|Win32 - {9B003E52-F02A-47EA-9942-2D9AE8738161}.Release|Win32.Build.0 = Release|Win32 - {05901466-4184-47C8-9D6C-3BB99BBF5378}.Debug|Win32.ActiveCfg = Debug|Win32 - {05901466-4184-47C8-9D6C-3BB99BBF5378}.Debug|Win32.Build.0 = Debug|Win32 - {05901466-4184-47C8-9D6C-3BB99BBF5378}.Release|Win32.ActiveCfg = Release|Win32 - {05901466-4184-47C8-9D6C-3BB99BBF5378}.Release|Win32.Build.0 = Release|Win32 - {F60ACB12-7D05-4A89-B2D1-DD16E1F3566B}.Debug|Win32.ActiveCfg = Debug|Win32 - {F60ACB12-7D05-4A89-B2D1-DD16E1F3566B}.Debug|Win32.Build.0 = Debug|Win32 - {F60ACB12-7D05-4A89-B2D1-DD16E1F3566B}.Release|Win32.ActiveCfg = Release|Win32 - {F60ACB12-7D05-4A89-B2D1-DD16E1F3566B}.Release|Win32.Build.0 = Release|Win32 - {7C5EE7FC-B5FC-47BF-8164-A452FE689472}.Debug|Win32.ActiveCfg = Debug|Win32 - {7C5EE7FC-B5FC-47BF-8164-A452FE689472}.Debug|Win32.Build.0 = Debug|Win32 - {7C5EE7FC-B5FC-47BF-8164-A452FE689472}.Release|Win32.ActiveCfg = Release|Win32 - {7C5EE7FC-B5FC-47BF-8164-A452FE689472}.Release|Win32.Build.0 = Release|Win32 - {07E03E0B-C525-4A72-88C6-2238896A4D8C}.Debug|Win32.ActiveCfg = Debug|Win32 - {07E03E0B-C525-4A72-88C6-2238896A4D8C}.Debug|Win32.Build.0 = Debug|Win32 - {07E03E0B-C525-4A72-88C6-2238896A4D8C}.Release|Win32.ActiveCfg = Release|Win32 - {07E03E0B-C525-4A72-88C6-2238896A4D8C}.Release|Win32.Build.0 = Release|Win32 - {E20315B5-B49E-46D7-B7EC-1A439F347C95}.Debug|Win32.ActiveCfg = Debug|Win32 - {E20315B5-B49E-46D7-B7EC-1A439F347C95}.Debug|Win32.Build.0 = Debug|Win32 - {E20315B5-B49E-46D7-B7EC-1A439F347C95}.Release|Win32.ActiveCfg = Release|Win32 - {E20315B5-B49E-46D7-B7EC-1A439F347C95}.Release|Win32.Build.0 = Release|Win32 - {014B1E10-EC68-4BEC-B992-F92CA2B6816F}.Debug|Win32.ActiveCfg = Debug|Win32 - {014B1E10-EC68-4BEC-B992-F92CA2B6816F}.Debug|Win32.Build.0 = Debug|Win32 - {014B1E10-EC68-4BEC-B992-F92CA2B6816F}.Release|Win32.ActiveCfg = Release|Win32 - {014B1E10-EC68-4BEC-B992-F92CA2B6816F}.Release|Win32.Build.0 = Release|Win32 - {44F77533-A4A1-4175-8C4C-07106B3F9C08}.Debug|Win32.ActiveCfg = Debug|Win32 - {44F77533-A4A1-4175-8C4C-07106B3F9C08}.Debug|Win32.Build.0 = Debug|Win32 - {44F77533-A4A1-4175-8C4C-07106B3F9C08}.Release|Win32.ActiveCfg = Release|Win32 - {44F77533-A4A1-4175-8C4C-07106B3F9C08}.Release|Win32.Build.0 = Release|Win32 - {45E2ABF6-91A7-4AA5-A82B-0C8E54BCCCB9}.Debug|Win32.ActiveCfg = Debug|Win32 - {45E2ABF6-91A7-4AA5-A82B-0C8E54BCCCB9}.Debug|Win32.Build.0 = Debug|Win32 - {45E2ABF6-91A7-4AA5-A82B-0C8E54BCCCB9}.Release|Win32.ActiveCfg = Release|Win32 - {45E2ABF6-91A7-4AA5-A82B-0C8E54BCCCB9}.Release|Win32.Build.0 = Release|Win32 - {F62E31E5-0F8D-4B70-8F26-44AFA1A9E645}.Debug|Win32.ActiveCfg = Debug|Win32 - {F62E31E5-0F8D-4B70-8F26-44AFA1A9E645}.Debug|Win32.Build.0 = Debug|Win32 - {F62E31E5-0F8D-4B70-8F26-44AFA1A9E645}.Release|Win32.ActiveCfg = Release|Win32 - {F62E31E5-0F8D-4B70-8F26-44AFA1A9E645}.Release|Win32.Build.0 = Release|Win32 - {F64541B6-FFBF-4368-B93A-A5CA8ADAD795}.Debug|Win32.ActiveCfg = Debug|Win32 - {F64541B6-FFBF-4368-B93A-A5CA8ADAD795}.Debug|Win32.Build.0 = Debug|Win32 - {F64541B6-FFBF-4368-B93A-A5CA8ADAD795}.Release|Win32.ActiveCfg = Release|Win32 - {F64541B6-FFBF-4368-B93A-A5CA8ADAD795}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/win32+openssl/softhsm2/softhsm2.vcxproj b/win32+openssl/softhsm2/softhsm2.vcxproj deleted file mode 100755 index fe8f4a074..000000000 --- a/win32+openssl/softhsm2/softhsm2.vcxproj +++ /dev/null @@ -1,101 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {801F5AB2-7A62-4085-B129-D15E2D717219} - Win32Proj - softhsm2 - - - - DynamicLibrary - true - Unicode - - - DynamicLibrary - false - true - Unicode - - - - - - - - - - - - - true - - - false - - - - - - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;_USRDLL;SOFTHSM2_EXPORTS;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\cryptoki_compat;..\..\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;%(AdditionalIncludeDirectories) - - - Windows - true - ..\$(Configuration);..\..\..\ssl\lib;%(AdditionalLibraryDirectories) - convarch.lib;libeay32.lib;%(AdditionalDependencies) - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_WINDOWS;_USRDLL;SOFTHSM2_EXPORTS;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\cryptoki_compat;..\..\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;%(AdditionalIncludeDirectories) - - - Windows - true - true - true - ..\$(Configuration);..\..\..\ssl\lib;%(AdditionalLibraryDirectories) - convarch.lib;libeay32.lib;%(AdditionalDependencies) - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/win32+openssl/softhsm2/softhsm2.vcxproj.user b/win32+openssl/softhsm2/softhsm2.vcxproj.user deleted file mode 100755 index 695b5c78b..000000000 --- a/win32+openssl/softhsm2/softhsm2.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/win32+openssl/util/util.vcxproj b/win32+openssl/util/util.vcxproj deleted file mode 100755 index 052ec7baa..000000000 --- a/win32+openssl/util/util.vcxproj +++ /dev/null @@ -1,103 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {05901466-4184-47C8-9D6C-3BB99BBF5378} - Win32Proj - util - - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - true - softhsm2-util - - - false - softhsm2-util - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\bin\common;..\..\src\bin\win32;..\..\src\lib\cryptoki_compat;..\..\..\ssl\include;%(AdditionalIncludeDirectories) - - - Console - true - ..\..\..\ssl\lib;%(AdditionalLibraryDirectories) - libeay32.lib;%(AdditionalDependencies) - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\bin\common;..\..\src\bin\win32;..\..\src\lib\cryptoki_compat;..\..\..\ssl\include;%(AdditionalIncludeDirectories) - - - Console - true - true - true - ..\..\..\ssl\lib;%(AdditionalLibraryDirectories) - libeay32.lib;%(AdditionalDependencies) - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/win32+openssl/util/util.vcxproj.filters b/win32+openssl/util/util.vcxproj.filters deleted file mode 100755 index 6c701b8b8..000000000 --- a/win32+openssl/util/util.vcxproj.filters +++ /dev/null @@ -1,73 +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 - - - Header Files - - - Header Files - - - Header Files - - - Win32 Header Files - - - - - Common Source Files - - - Common Source Files - - - Source Files - - - Source Files - - - Win32 Source Files - - - Win32 Source Files - - - diff --git a/win32+openssl/util/util.vcxproj.user b/win32+openssl/util/util.vcxproj.user deleted file mode 100755 index 695b5c78b..000000000 --- a/win32+openssl/util/util.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/win32/.gitignore b/win32/.gitignore new file mode 100644 index 000000000..9a7140112 --- /dev/null +++ b/win32/.gitignore @@ -0,0 +1,10 @@ +# get back config.h.in +!config.h.in + +# Visual Studio +*.sdf +*.suo + +# Object files +*.obj +*.exe diff --git a/win32/Configure.pl b/win32/Configure.pl new file mode 100644 index 000000000..eb918ee61 --- /dev/null +++ b/win32/Configure.pl @@ -0,0 +1,827 @@ +#!perl + +# Configure -- perl version +# +# this script builds Visual Studio files + +require 5.000; +use strict; +use File::Spec; +use Cwd; + +# files to configure + +my @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"); + +# variables to expand + +my %varvals; + +my @varnames = ("CUINCPATH", + "CULIBPATH", + "DEBUGDLLPATH", + "DEBUGINCPATH", + "DEBUGLIBPATH", + "DLLPATH", + "INCLUDEPATH", + "LIBNAME", + "LIBPATH", + "PLATFORM", + "PLATFORMDIR"); + +# conditions to stack + +my %condvals; + +my @condnames = ("BOTAN", + "ECC", + "GOST", + "OPENSSL", + "RFC3394", + "RFC5649", + "TESTS"); + +# enable-xxx/disable-xxx arguments + +my @enablelist = ("64bit", + "debug", + "ecc", + "gost"); + +# with-xxx/without-xxx arguments + +my @withlist = ("botan", + "cppunit", + "crypto-backend", + "openssl"); + +# general arguments + +my @optionlist = ("help", "verbose", "clean"); + +# usage + +my @usage = ("Usage: perl Configure.pl help\n", + " perl Configure.pl options*\n", + " perl Configure.pl clean\n"); + +# help + +my @help = ( +"'perl Configure.pl' configures SoftHSMv2 build files.\n\n", +@usage, +"\nGeneral Options and Commands:\n", +" verbose (options) print messages\n", +" help (command) print this help\n", +" clean (command) clean up generated files\n", +" (command) print a summary of the configuration\n", +"\nOptional Features:\n", +" enable-64bit enable 64-bit compiling [default=no]\n", +" enable-debug enable build of Debug config [default=yes]\n", +" enable-ecc enable support for ECC [default=yes]\n", +" enable-gost enable support for GOST [default=yes]\n", +"\nRequired Package:\n", +" with-crypto-backend select the crypto backend [botan|openssl]\n", +"\nOptional Packages:\n", +" with-botan=PATH speficy prefix of path of Botan\n", +" with-openssl=PATH speficy prefix of path of OpenSSL\n", +" with-cppunit=PATH specify prefix of path of CppUnit\n"); + +# variables for parsing + +my $configargs; +my $verbose = 0; +my $want_help = "no"; +my $want_clean = "no"; +my $want_unknown = "no"; +my $unknown_value; +my $enable_debug = "yes"; +my $enable_ecc = "yes"; +my $enable_gost = "yes"; +my $platform = "win32"; +my $crypto_backend = "none"; +my $botan_path = "..\\..\\btn"; +my $debug_botan_path = "..\\..\\btn_d"; +my $openssl_path = "..\\..\\ssl"; +my $debug_openssl_path = "..\\..\\ssl_d"; +my $want_tests = "yes"; +my $cppunit_path = "..\\..\\cu"; + +# no arguments -> usage + +if ($#ARGV < 0) { + foreach (@usage) { + print $_; + } + exit 1; +} + +# parse arguments + +foreach (@ARGV) { + if (/^verbose$/i) { + $verbose = 1; + } elsif (/^help$/i) { + $want_help = "yes"; + } elsif (/^disable-(.*)$/i) { + appargs($_); + myenable($1, "no"); + } elsif (/^enable-(.*)$/i) { + appargs($_); + myenable($1, "yes"); + } elsif (/^without-(.*)$/i) { + appargs($_); + mywith($1, "no"); + } elsif (/^with-(.*)=(.*)$/i) { + appargs($_); + mywith($1, $2); + } elsif (/^with-(.*)$/i) { + appargs($_); + mywith($1, "yes"); + } elsif (/^clean$/i) { + $want_clean = "yes"; + } else { + $want_unknown = "yes"; + $unknown_value = $_; + } +} + +# append seen arguments to configargs + +sub appargs { + my $arg = $_[0]; + # escape backslashes, spaces and double quotes + $arg =~ s/([\\ "])/\\$1/g; + if (defined($configargs)) { + $configargs .= " " . $arg; + } else { + $configargs = $arg; + } +} + +# parse enable/disable + +sub myenable { + my $key = $_[0]; + my $val = $_[1]; + + if ($key =~ /^64bit$/i) { + if ($val =~ /^yes$/i) { + $platform = "x64"; + } + } elsif ($key =~ /^debug$/i) { + if ($val =~ /^no$/i) { + $enable_debug = "no"; + } + } elsif ($key =~ /^ecc$/i) { + if ($val =~ /^no$/i) { + $enable_ecc = "no"; + } + } elsif ($key =~ /^gost$/i) { + if ($val =~ /^no$/i) { + $enable_gost = "no"; + } + } else { + $want_unknown = "yes"; + if ($val eq "no") { + $unknown_value = "disable-" . $key; + } else { + $unknown_value = "enable-" . $key; + } + } +} + +# parse with/without + +sub mywith { + my $key = $_[0]; + my $val = $_[1]; + + if ($key =~ /^crypto-backend$/i) { + if ($val =~ /^botan$/i) { + $crypto_backend = "botan"; + } elsif($val =~ /^openssl$/i) { + $crypto_backend = "openssl"; + } else { + $want_unknown = "yes"; + $unknown_value = "with-crypto-backend=" . $val; + } + } elsif ($key =~ /^botan$/i) { + if ($val =~ /^no$/i) { + $want_unknown = "yes"; + $unknown_value = "without-botan doesn't make sense\n"; + } elsif ($val !~ /^yes$/i) { + $botan_path = $val; + } + } elsif ($key =~ /^openssl$/i) { + if ($val =~ /^no$/i) { + $want_unknown = "yes"; + $unknown_value = "without-openssl doesn't make sense\n"; + } elsif ($val !~ /^yes$/i) { + $openssl_path = $val; + } + } elsif ($key =~ /^cppunit$/i) { + if ($val =~ /^no$/i) { + $want_tests = "no"; + } elsif ($val !~ /^yes$/i) { + $cppunit_path = $val; + } + } else { + $want_unknown = "yes"; + if ($val eq "no") { + $unknown_value = "without-" . $key; + } else { + $unknown_value = "with-" . $key; + } + } +} + +# help + +if ($want_help ne "no") { + foreach (@help) { + print $_; + } + exit 1; +} + +# clean + +if ($want_clean eq "yes") { + my $file; + foreach $file (@filelist) { + unlink($file); + } + exit 0; +} + +# parsing error + +if ($want_unknown ne "no") { + print STDERR "can't parse $unknown_value\n"; + exit 1; +} + +# required + +if ($crypto_backend eq "none") { + print STDERR "with-crypto-backend=[botan|openssl] is REQUIRED\n"; + exit 1; +} + +# debug + +if ($enable_debug eq "yes") { + $debug_botan_path = $botan_path . "_d"; + $debug_openssl_path = $openssl_path . "_d"; +} + +# verbose + +if ($verbose) { + if ($platform eq "x64") { + print "64bit: enabled\n"; + } else { + print "64bit: disabled\n"; + } + if ($enable_debug eq "yes") { + print "debug: enabled\n"; + } else { + print "debug: disabled\n"; + } + if ($enable_ecc eq "yes") { + print "ecc: enabled\n"; + } else { + print "ecc: disabled\n"; + } + if ($enable_gost eq "yes") { + print "gost: enabled\n"; + } else { + print "gost: disabled\n"; + } + print "crypto-backend: $crypto_backend\n"; + if ($crypto_backend eq "botan") { + print "botan-path: $botan_path\n"; + if ($enable_debug eq "yes") { + print "debug-botan-path: $debug_botan_path\n"; + } + } else { + print "openssl-path: $openssl_path\n"; + if ($enable_debug eq "yes") { + print "debug-openssl-path: $debug_openssl_path\n"; + } + } + if ($want_tests eq "yes") { + print "cppunit-path: $cppunit_path\n"; + } +} + +# configure the platform + +if ($platform eq "win32") { + $varvals{"PLATFORM"} = "Win32"; +} else { + $varvals{"PLATFORM"} = "x64"; + $varvals{"PLATFORMDIR"} = "x64\\"; +} + +# configure ECC and GOST + +if ($enable_ecc eq "yes") { + $condvals{"ECC"} = 1; +} +if ($enable_gost eq "yes") { + $condvals{"GOST"} = 1; +} + +# configure the crypto + +if ($crypto_backend eq "botan") { + $condvals{"BOTAN"} = 1; + $varvals{"LIBNAME"} = "botan.lib"; + $botan_path = File::Spec->rel2abs($botan_path); + my $botan_dll = File::Spec->catfile($botan_path, "botan.dll"); + $varvals{"DLLPATH"} = $botan_dll; + my $botan_inc = File::Spec->catfile($botan_path, "include"); + if (!-f File::Spec->catfile($botan_inc, "botan\\init.h")) { + die "can't find Botan includes\n"; + } + $varvals{"INCLUDEPATH"} = $botan_inc; + if (!-f File::Spec->catfile($botan_path, "botan.lib")) { + die "can't find Botan library\n"; + } + $varvals{"LIBPATH"} = $botan_path; + if ($enable_debug eq "yes") { + $debug_botan_path = File::Spec->rel2abs($debug_botan_path); + $varvals{"DEBUGDLLPATH"} = + File::Spec->catfile($debug_botan_path, "botan.dll"); + my $debug_botan_inc = + File::Spec->catfile($debug_botan_path, "include"); + if (!-f File::Spec->catfile($debug_botan_inc, "botan\\init.h")) { + die "can't find debug Botan includes\n"; + } + $varvals{"DEBUGINCPATH"} = $debug_botan_inc; + if (!-f File::Spec->catfile($debug_botan_path, "botan.lib")) { + die "can't find debug Botan library\n"; + } + $varvals{"DEBUGLIBPATH"} = $debug_botan_path; + } else { + $debug_botan_path = $botan_path; + $varvals{"DEBUGDLLPATH"} = $varvals{"DLLPATH"}; + $varvals{"DEBUGINCPATH"} = $varvals{"INCLUDEPATH"}; + $varvals{"DEBUGLIBPATH"} = $varvals{"LIBPATH"}; + } + if ($verbose) { + print "checking Botan version\n"; + } + `copy "$botan_dll" .`; + my $inc = $botan_inc; + my $lib = File::Spec->catfile($botan_path, "botan.lib"); + open F, ">testbotan.cpp" || die $!; + print F << 'EOF'; +#include +#include +#include +#include +#include +#include +#include +int main() { + using namespace Botan; + LibraryInitializer::initialize(); + new EMSA3_Raw(); +#if BOTAN_VERSION_CODE < BOTAN_VERSION_CODE_FOR(1,10,0) + return 1; +#endif +#if BOTAN_VERSION_CODE > BOTAN_VERSION_CODE_FOR(1,11,0) + return 2; +#endif + return 0; +} +EOF + close F; + my $compret = `cl /nologo /MD /I "$inc" testbotan.cpp "$lib"`; + if (grep { -f and -x } ".\\testbotan.exe") { + `.\\testbotan.exe`; + if ($? == 1) { + die "Botan version too old\n"; + } elsif ($? == 2) { + die "Botan version 11 not yet supported\n"; + } elsif ($? != 0) { + die "Botan test failed\n"; + } + } else { + die "can't compile Botan test: $compret\n"; + } + if ($enable_ecc eq "yes") { + if ($verbose) { + print "checking ECC support\n"; + } + open F, ">testecc.cpp" || die $!; + print F << 'EOF'; +#include +#include +#include +int main() { + Botan::LibraryInitializer::initialize(); + const std::string name("secp256r1"); + const Botan::OID oid(Botan::OIDS::lookup(name)); + const Botan::EC_Group ecg(oid); + try { + const Botan::SecureVector der = + ecg.DER_encode(Botan::EC_DOMPAR_ENC_OID); + } catch(...) { + return 1; + } + return 0; +} +EOF + close F; + $compret = `cl /nologo /MD /I "$inc" testecc.cpp "$lib"`; + if (grep { -f and -x } ".\\testecc.exe") { + `.\\testecc.exe`; + if ($? != 0) { + die "can't find P256: upgrade to Botan >= 1.10.6\n"; + } + } else { + die "can't compile ECC test: $compret\n"; + } + } + if ($enable_gost eq "yes") { + if ($verbose) { + print "checking GOST support\n"; + } + open F, ">testgost.cpp" || die $!; + print F << 'EOF'; +#include +#include +#include +int main() { + Botan::LibraryInitializer::initialize(); + const std::string name("gost_256A"); + const Botan::OID oid(Botan::OIDS::lookup(name)); + const Botan::EC_Group ecg(oid); + try { + const Botan::SecureVector der = + ecg.DER_encode(Botan::EC_DOMPAR_ENC_OID); + } catch(...) { + return 1; + } + return 0; +} +EOF + close F; + $compret = `cl /nologo /MD /I "$inc" testgost.cpp "$lib"`; + if (grep { -f and -x } ".\\testgost.exe") { + `.\\testgost.exe`; + if ($? != 0) { + die "can't find GOST: upgrade to Botan >= 1.10.6\n"; + } + } else { + die "can't compile GOST test: $compret\n"; + } + } + $condvals{"RFC3394"} = 1; + # TODO: Botan AES key wrap with pad + # TODO: Botan GNU MP support +} else { + $condvals{"OPENSSL"} = 1; + $varvals{"LIBNAME"} = "libeay32.lib"; + $openssl_path = File::Spec->rel2abs($openssl_path); + my $openssl_dll = File::Spec->catfile($openssl_path, "bin\\libeay32.dll"); + $varvals{"DLLPATH"} = $openssl_dll; + my $openssl_inc = File::Spec->catfile($openssl_path, "include"); + if (!-f File::Spec->catfile($openssl_inc, "openssl\\ssl.h")) { + die "can't find OpenSSL headers\n"; + } + $varvals{"INCLUDEPATH"} = $openssl_inc; + my $openssl_lib = File::Spec->catfile($openssl_path, "lib"); + if (!-f File::Spec->catfile($openssl_lib, "libeay32.lib")) { + die "can't find OpenSSL library\n"; + } + $varvals{"LIBPATH"} = $openssl_lib; + if ($enable_debug eq "yes") { + $debug_openssl_path = File::Spec->rel2abs($debug_openssl_path); + $varvals{"DEBUGDLLPATH"} = + File::Spec->catfile($debug_openssl_path, "bin\\libeay32.dll"); + my $debug_openssl_inc = + File::Spec->catfile($debug_openssl_path, "include"); + if (!-f File::Spec->catfile($debug_openssl_inc, "openssl\\ssl.h")) { + die "can't find debug OpenSSL headers\n"; + } + $varvals{"DEBUGINCPATH"} = $debug_openssl_inc; + my $debug_openssl_lib = + File::Spec->catfile($debug_openssl_path, "lib"); + if (!-f File::Spec->catfile($debug_openssl_lib, "libeay32.lib")) { + die "can't find debug OpenSSL library\n"; + } + $varvals{"DEBUGLIBPATH"} = $debug_openssl_lib; + + } else { + $debug_openssl_path = $openssl_path; + $varvals{"DEBUGDLLPATH"} = $varvals{"DLLPATH"}; + $varvals{"DEBUGINCPATH"} = $varvals{"INCLUDEPATH"}; + $varvals{"DEBUGLIBPATH"} = $varvals{"LIBPATH"}; + } + if ($verbose) { + print "checking OpenSSL\n"; + } + `copy "$openssl_dll" .`; + my $inc = $openssl_inc; + my $lib = File::Spec->catfile($openssl_lib, "libeay32.lib"); + open F, ">testossl.c" || die $!; + print F << 'EOF'; +#include +int main() { + ERR_clear_error(); + return 0; +} +EOF + close F; + my $compret = `cl /nologo /MD /I "$inc" testossl.c "$lib"`; + if (grep { -f and -x } ".\\testossl.exe") { + `.\\testossl.exe`; + if ($? != 0) { + die "OpenSSL test failed\n"; + } + } else { + die "can't compile OpenSSL test: $compret\n"; + } + if ($verbose) { + print "checking OpenSSL version\n"; + } + open F, ">testosslv.c" || die $!; + print F << 'EOF'; +#include +#include +int main() { +#ifndef OPENSSL_VERSION_NUMBER + return -1; +#endif +#if OPENSSL_VERSION_NUMBER >= 0x010000000L + return 0; +#else + return 1; +#endif +} +EOF + close F; + $compret = `cl /nologo /MD /I "$inc" testosslv.c "$lib"`; + if (grep { -f and -x } ".\\testosslv.exe") { + `.\\testosslv.exe`; + if ($? != 0) { + die "OpenSLL version too old (1.0.0 or later required)\n"; + } + } else { + die "can't compile OpenSSL version test: $compret\n"; + } + if ($enable_ecc eq "yes") { + if ($verbose) { + print "checking ECC support\n"; + } + open F, ">testecc.c" || die $!; + print F << 'EOF'; +#include +#include +int main() { + EC_KEY *ec256, *ec384; + ec256 = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1); + ec384 = EC_KEY_new_by_curve_name(NID_secp384r1); + if (ec256 == NULL || ec384 == NULL) + return 1; + return 0; +} +EOF + close F; + $compret = `cl /nologo /MD /I "$inc" testecc.c "$lib"`; + if (grep { -f and -x } ".\\testecc.exe") { + `.\\testecc.exe`; + if ($? != 0) { + die "can't find P256 or P384: no ECC support\n"; + } + } else { + die "can't compile ECC test: $compret\n"; + } + } + if ($enable_gost eq "yes") { + if ($verbose) { + print "checking GOST support\n"; + } + open F, ">testgost.c" || die $!; + print F << 'EOF'; +#include +#include +int main() { + ENGINE *e; + EC_KEY *ek; + ek = NULL; + OPENSSL_config(NULL); + e = ENGINE_by_id("gost"); + if (e == NULL) + return 1; + if (ENGINE_init(e) <= 0) + return 1; + return 0; +} +EOF + close F; + $compret = `cl /nologo /MD /I "$inc" testgost.c "$lib"`; + if (grep { -f and -x } ".\\testgost.exe") { + `.\\testgost.exe`; + if ($? != 0) { + die "can't find GOST: no GOST support\n"; + } + } else { + die "can't compile GOST test: $compret\n"; + } + } + # TODO: OpenSSL AES key wrap (aka RFC 3394) + # TODO: OpenSSL AES key wrap with pad (aka RFC 5649) +} + +# configure CppUnit + +if ($want_tests eq "yes") { + $condvals{"TESTS"} = 1; + $cppunit_path = File::Spec->rel2abs($cppunit_path); + my $cppunit_inc = File::Spec->catfile($cppunit_path, "include"); + if (!-f File::Spec->catfile($cppunit_inc, "cppunit\\Test.h")) { + die "can't find CppUnit headers\n"; + } + $varvals{"CUINCPATH"} = $cppunit_inc; + my $cppunit_lib = File::Spec->catfile($cppunit_path, "lib"); + if (!-f File::Spec->catfile($cppunit_lib, "cppunit.lib")) { + $cppunit_lib = $cppunit_path; + } + if (!-f File::Spec->catfile($cppunit_lib, "cppunit.lib")) { + die "can't find CppUnit library\n"; + } + if ($enable_debug eq "yes") { + if (!-f File::Spec->catfile($cppunit_lib, "cppunitd.lib")) { + die "can't find debug CppUnit library\n"; + } + } + $varvals{"CULIBPATH"} = $cppunit_lib; +} + +# escape spaces + +sub kw { + if ($_[0] =~ / /) { + return "\"$_[0]\""; + } else { + return "$_[0]"; + } +} + +# setup files with condition stacks and variable expansions + +sub setupfile { + my $line; + my @Linesin; + my @Linesout; + my $filename = $_[0]; + my $cond; + my @conds; + my $pass = 1; + my @passes; + my $val; + + open F, $filename . ".in" || die $!; + @Linesin = ; + close F; + + foreach $line (@Linesin) { + chomp $line; + if ($line =~ /^\@IF (.*)$/) { + if (defined($cond)) { + unshift(@conds, $cond); + unshift(@passes, $pass); + } + $cond = $1; + if (defined($condvals{$cond})) { + # do nothing + } else { + $pass = 0; + } + next; + } elsif ($line =~ /^\@ELSE (.*)$/) { + if ($cond ne $1) { + die "\@ELSE $1 mismatch in $filename\n"; + } + if (defined($condvals{$cond})) { + $pass = 0; + } else { + if (scalar(@conds) > 0) { + $pass = $passes[0]; + } else { + $pass = 1; + } + } + next; + } elsif ($line =~ /^\@END (.*)$/) { + if ($cond ne $1) { + die "\@END $1 mismatch in $filename\n"; + } + $cond = shift(@conds); + if (scalar(@passes) > 0) { + $pass = shift(@passes); + } else { + $pass = 1; + } + next; + } + if ($pass == 0) { + next; + } + while ($line =~ /@([^@ ]*)@/) { + if ($1 ~~ @varnames) { + if (defined($varvals{$1})) { + $val = kw($varvals{$1}); + $line = "$`$val$'"; + } else { + $line = "$`$'"; + } + } else { + die "unknown control $& in $filename\n"; + } + } + push @Linesout, $line; + } + + open F, ">" . $filename || die $!; + if ($verbose) { + print "Setting up $filename\n"; + } + foreach $line (@Linesout) { + print F $line . "\n"; + } + close F; +} + +# status + +if ($verbose) { + my $name; + + print "Configuration Status\n"; + + print "\tconditions:\n"; + foreach $name (@condnames) { + if (defined($condvals{$name})) { + print "\t\t$name is true\n"; + } else { + print "\t\t$name is false\n"; + } + } + + print "\tsubstitutions:\n"; + foreach $name (@varnames) { + if (defined($varvals{$name})) { + print qq(\t\t$name -> "$varvals{$name}"\n); + } + } + + print "\n"; +} + +# run + +my $file; + +foreach $file (@filelist) { + setupfile($file); +} + +print "Configured.\n"; + +exit 0; + +# Notes: Unix configure.ac options +# --enable-64bit supported +# --enable-ecc supported (no auto detection) +# --enable-gost supported (no auto detection) +# --enable-non-paged-memory (TODO) +# --enable-visibility (enforced by DLLS) +# --with-crypto-backend supported +# --with-openssl supported (TODO build check) +# --with-botan supported (TODO build check) +# --with-migrate (useless as SoftHSMv1 is not supported) +# --with-objectstore-backend-db (TODO) +# --with-sqlite3 (TODO) diff --git a/win32/Configure.py b/win32/Configure.py new file mode 100644 index 000000000..b55c72c40 --- /dev/null +++ b/win32/Configure.py @@ -0,0 +1,787 @@ +#!python + +# Configure -- python version +# +# this script builds Visual Studio files + +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"] + +# variables to expand + +varvals = {} + +varnames = ["CUINCPATH", + "CULIBPATH", + "DEBUGDLLPATH", + "DEBUGINCPATH", + "DEBUGLIBPATH", + "DLLPATH", + "INCLUDEPATH", + "LIBNAME", + "LIBPATH", + "PLATFORM", + "PLATFORMDIR"] + +# conditions to stack + +condvals = {} + +condnames = ["BOTAN", + "ECC", + "GOST", + "OPENSSL", + "RFC3394", + "RFC5649", + "TESTS"] + +# enable-xxx/disable-xxx arguments + +enablelist = ["64bit", + "debug", + "ecc", + "gost"] + +# with-xxx/without-xxx arguments + +withlist = ["botan", + "cppunit", + "crypto-backend", + "openssl"] + +# general arguments + +optionlist = ["help", "verbose", "clean"] + +# usage + +usage = ["Usage: perl Configure.pl help", + " perl Configure.pl options*", + " perl Configure.pl clean"] + +# help + +myhelp = [\ +"'perl Configure.pl' configures SoftHSMv2 build files.\n", +usage, +"\nGeneral Options and Commands:", +" verbose (options) print messages", +" help (command) print this help", +" clean (command) clean up generated files", +" (command) print a summary of the configuration", +"\nOptional Features:", +" enable-64bit enable 64-bit compiling [default=no]\n", +" 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]", +"\nRequired Package:", +" with-crypto-backend select the crypto backend [botan|openssl]", +"\nOptional Packages:", +" with-botan=PATH speficy prefix of path of Botan", +" with-openssl=PATH speficy prefix of path of OpenSSL", +" with-cppunit=PATH specify prefix of path of CppUnit"] + +# variables for parsing + +configargs = None +verbose = 0 +want_help = False +want_clean = False +want_unknown = False +unknown_value = None +enable_debug = True +enable_ecc = True +enable_gost = True +platform = 32 +crypto_backend = None +botan_path = "..\\..\\btn" +debug_botan_path = "..\\..\\btn_d" +openssl_path = "..\\..\\ssl" +debug_openssl_path = "..\\..\\ssl_d" +want_tests = True +cppunit_path = "..\\..\\cu" + +def parseargs(args): + """parse arguments""" + global verbose + 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 = 1 + 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: + debug_botan_path = botan_path + "_d" + 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 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 + 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 openssl_path + global want_tests + global cppunit_path + global want_unknown + global unknown_value + if key.lower() == "crypto-backend": + if val and (detail.lower() == "botan"): + crypto_backend = "botan" + return + if val and (detail.lower() == "openssl"): + crypto_backend = "openssl" + 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() == "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() == "cppunit": + if not val: + want_tests = False + return + if detail.lower() != "yes": + cppunit_path = detail + 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 doclean(): + """clean""" + for filename in filelist: + os.unlink(filename) + sys.exit(0) + +def dounknown(): + """parsing error""" + print >> sys.stderr, "can't parse " + unknown_value + "" + 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 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_dll = os.path.join(botan_path, "botan.dll") + varvals["DLLPATH"] = botan_dll + botan_inc = os.path.join(botan_path, "include") + if not os.path.exists(os.path.join(botan_inc, "botan\\init.h")): + print >> sys.stderr, "can't find Botan includes" + sys.exit(1) + varvals["INCLUDEPATH"] = botan_inc + if not os.path.exists(os.path.join(botan_path, "botan.lib")): + print >> sys.stderr, "can't find Botan library" + sys.exit(1) + varvals["LIBPATH"] = botan_path + if enable_debug: + debug_botan_path = os.path.abspath(debug_botan_path) + varvals["DEBUGDLLPATH"] = \ + os.path.join(debug_botan_path, "botan.dll") + debug_botan_inc = os.path.join(debug_botan_path, "include") + if not os.path.exists(os.path.join(debug_botan_inc, + "botan\\init.h")): + print >> sys.stderr, "can't find debug Botan includes" + sys.exit(1) + varvals["DEBUGINCPATH"] = debug_botan_inc + if not os.path.exists(os.path.join(debug_botan_path, "botan.lib")): + print >> sys.stderr, "can't find debug Botan library" + sys.exit(1) + varvals["DEBUGLIBPATH"] = debug_botan_path + else: + debug_botan_path = botan_path + varvals["DEBUGDLLPATH"] = varvals["DLLPATH"] + varvals["DEBUGINCPATH"] = varvals["INCLUDEPATH"] + varvals["DEBUGLIBPATH"] = varvals["LIBPATH"] + if verbose: + print "checking Botan version" + subprocess.call(["copy", botan_dll, "."], shell=True) + inc = botan_inc + lib = os.path.join(botan_path, "botan.lib") + testfile = open("testbotan.cpp", "w") + print >>testfile, '\ +#include \n\ +#include \n\ +#include \n\ +#include \n\ +#include \n\ +#include \n\ +#include \n\ +int main() {\n\ + using namespace Botan;\n\ + LibraryInitializer::initialize();\n\ + new EMSA3_Raw();\n\ +#if BOTAN_VERSION_CODE < BOTAN_VERSION_CODE_FOR(1,10,0)\n\ + return 1;\n\ +#endif\n\ +#if BOTAN_VERSION_CODE > BOTAN_VERSION_CODE_FOR(1,11,0)\n\ + return 2;\n\ +#endif\n\ + return 0;\n\ +}' + testfile.close() + subprocess.check_output( + ["cl", "/nologo", "/MD", "/I", inc, "testbotan.cpp", lib], + stderr=subprocess.STDOUT) + if not os.path.exists(".\\testbotan.exe"): + print >> sys.stderr, "can't create .\\testbotan.exe" + sys.exit(1) + ret = subprocess.call(".\\testbotan.exe") + if ret == 1: + print >> sys.stderr, "Botan version too old" + sys.exit(1) + if ret == 2: + print >> sys.stderr, "Botan version 11 not yet supported" + sys.exit(1) + if ret != 0: + print >> sys.stderr, "Botan test failed" + sys.exit(1) + if enable_ecc: + if verbose: + print "checking ECC support" + testfile = open("testecc.cpp", "w") + print >>testfile, '\ +#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\ + const Botan::SecureVector der =\n\ + ecg.DER_encode(Botan::EC_DOMPAR_ENC_OID);\n\ + } catch(...) {\n\ + return 1;\n\ + }\n\ + return 0;\n\ +}' + testfile.close() + subprocess.check_output( + ["cl", "/nologo", "/MD", "/I", inc, "testecc.cpp", lib], + stderr=subprocess.STDOUT) + if not os.path.exists(".\\testecc.exe"): + print >> sys.stderr, "can't create .\\testecc.exe" + sys.exit(1) + if subprocess.call(".\\testecc.exe") != 0: + print >> sys.stderr, \ + "can't find P256: upgrade to Botan >= 1.10.6" + sys.exit(1) + if enable_gost: + if verbose: + print "checking GOST support" + testfile = open("testgost.cpp", "w") + print >>testfile, '\ +#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\ + const Botan::SecureVector der =\n\ + ecg.DER_encode(Botan::EC_DOMPAR_ENC_OID);\n\ + } catch(...) {\n\ + return 1;\n\ + }\n\ + return 0;\n\ +}' + testfile.close() + subprocess.check_output( + ["cl", "/nologo", "/MD", "/I", inc, "testgost.cpp", lib], + stderr=subprocess.STDOUT) + if not os.path.exists(".\\testgost.exe"): + print >> sys.stderr, "can't create .\\testgost.exe" + sys.exit(1) + if subprocess.call(".\\testgost.exe") != 0: + print >> sys.stderr, \ + "can't find GOST: upgrade to Botan >= 1.10.6" + sys.exit(1) + condvals["RFC3394"] = True + # TODO: Botan AES key wrap with pad + # TODO: Botan GNU MP support + else: + condvals["OPENSSL"] = True + varvals["LIBNAME"] = "libeay32.lib" + openssl_path = os.path.abspath(openssl_path) + openssl_dll = os.path.join(openssl_path, "bin\\libeay32.dll") + varvals["DLLPATH"] = openssl_dll + openssl_inc = os.path.join(openssl_path, "include") + if not os.path.exists(os.path.join(openssl_inc, "openssl\\ssl.h")): + print >> sys.stderr, "can't find OpenSSL headers" + sys.exit(1) + varvals["INCLUDEPATH"] = openssl_inc + openssl_lib = os.path.join(openssl_path, "lib") + if not os.path.exists(os.path.join(openssl_lib, "libeay32.lib")): + print >> sys.stderr, "can't find OpenSSL library" + sys.exit(1) + varvals["LIBPATH"] = openssl_lib + if enable_debug: + debug_openssl_path = os.path.abspath(debug_openssl_path) + varvals["DEBUGDLLPATH"] = \ + os.path.join(debug_openssl_path, "bin\\libeay32.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 >> sys.stderr, "can't find debug OpenSSL headers" + 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, + "libeay32.lib")): + print >> sys.stderr, "can't find debug OpenSSL library" + sys.exit(1) + varvals["DEBUGLIBPATH"] = debug_openssl_lib + else: + debug_openssl_path = openssl_path + varvals["DEBUGDLLPATH"] = varvals["DLLPATH"] + varvals["DEBUGINCPATH"] = varvals["INCLUDEPATH"] + varvals["DEBUGLIBPATH"] = varvals["LIBPATH"] + if verbose: + print "checking OpenSSL" + subprocess.call(["copy", openssl_dll, "."], shell=True) + inc = openssl_inc + lib = os.path.join(openssl_lib, "libeay32.lib") + testfile = open("testossl.c", "w") + print >>testfile, '\ +#include \n\ +int main() {\n\ + ERR_clear_error();\n\ + return 0;\n\ +}' + testfile.close() + subprocess.check_output( + ["cl", "/nologo", "/MD", "/I", inc, "testossl.c", lib], + stderr=subprocess.STDOUT) + if not os.path.exists(".\\testossl.exe"): + print >> sys.stderr, "can't create .\\testossl.exe" + sys.exit(1) + if subprocess.call(".\\testossl.exe") != 0: + print >> sys.stderr, "OpenSSL test failed" + sys.exit(1) + if verbose: + print "checking OpenSSL version" + testfile = open("testosslv.c", "w") + print >>testfile, '\ +#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\ +}' + testfile.close() + subprocess.check_output( + ["cl", "/nologo", "/MD", "/I", inc, "testosslv.c", lib], + stderr=subprocess.STDOUT) + if not os.path.exists(".\\testosslv.exe"): + print >> sys.stderr, "can't create .\\testosslv.exe" + sys.exit(1) + if subprocess.call(".\\testosslv.exe") != 0: + print >> sys.stderr, \ + "OpenSLL version too old (1.0.0 or later required)" + sys.exit(1) + if enable_ecc: + if verbose: + print "checking ECC support" + testfile = open("testecc.c", "w") + print >>testfile, '\ +#include \n\ +#include \n\ +int main() {\n\ + EC_KEY *ec256, *ec384;\n\ + ec256 = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);\n\ + ec384 = EC_KEY_new_by_curve_name(NID_secp384r1);\n\ + if (ec256 == NULL || ec384 == NULL)\n\ + return 1;\n\ + return 0;\n\ +}' + testfile.close() + subprocess.check_output( + ["cl", "/nologo", "/MD", "/I", inc, "testecc.c", lib], + stderr=subprocess.STDOUT) + if not os.path.exists(".\\testecc.exe"): + print >> sys.stderr, "can't create .\\testecc.exe" + sys.exit(1) + if subprocess.call(".\\testecc.exe") != 0: + print >> sys.stderr, "can't find P256 or P384: no ECC support" + sys.exit(1) + if enable_gost: + if verbose: + print "checking GOST support" + testfile = open("testgost.c", "w") + print >>testfile, '\ +#include \n\ +#include \n\ +int main() {\n\ + ENGINE *e;\n\ + EC_KEY *ek;\n\ + ek = NULL;\n\ + OPENSSL_config(NULL);\n\ + e = ENGINE_by_id("gost");\n\ + if (e == NULL)\n\ + return 1;\n\ + if (ENGINE_init(e) <= 0)\n\ + return 1;\n\ + return 0;\n\ +}' + testfile.close() + subprocess.check_output( + ["cl", "/nologo", "/MD", "/I", inc, "testgost.c", lib], + stderr=subprocess.STDOUT) + if not os.path.exists(".\\testgost.exe"): + print >> sys.stderr, "can't create .\\testgost.exe" + sys.exit(1) + if subprocess.call(".\\testgost.exe") != 0: + print >> sys.stderr, "can't find GOST: no GOST support" + sys.exit(1) + # TODO: OpenSSL AES key wrap (aka RFC 3394) + # TODO: OpenSSL AES key wrap with pad (aka RFC 5649) + + # 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 >> sys.stderr, "can't find CppUnit headers" + 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 >> sys.stderr, "can't find CppUnit library" + sys.exit(1) + if enable_debug: + if not os.path.exists(os.path.join(cppunit_lib, "cppunitd.lib")): + print >> sys.stderr, "can't find debug CppUnit library" + sys.exit(1) + varvals["CULIBPATH"] = cppunit_lib + +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 >>fileout, line + 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() + + # required + + if crypto_backend is None: + print >> sys.stderr, "with-crypto-backend=[botan|openssl] is REQUIRED" + sys.exit(1) + + # status before config + + if verbose: + 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" + 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 + + 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) + print "Configured." + sys.exit(0) + +main(sys.argv) + +# Notes: Unix configure.ac options +# --enable-64bit supported +# --enable-ecc supported (no auto detection) +# --enable-gost supported (no auto detection) +# --enable-non-paged-memory (TODO) +# --enable-visibility (enforced by DLLS) +# --with-crypto-backend supported +# --with-openssl supported (TODO build check) +# --with-botan supported (TODO build check) +# --with-migrate (useless as SoftHSMv1 is not supported) +# --with-objectstore-backend-db (TODO) +# --with-sqlite3 (TODO) diff --git a/win32+botan/config.h b/win32/config.h.in similarity index 81% rename from win32+botan/config.h rename to win32/config.h.in index 78d8fc69b..6afb6c568 100644 --- a/win32+botan/config.h +++ b/win32/config.h.in @@ -15,8 +15,19 @@ /* The default location of the token directory */ #define DEFAULT_TOKENDIR "tokens" -/* Define to 1 if you have the `crypto' library (-lcrypto). */ -#define HAVE_LIBCRYPTO 1 +/* 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 @@ -55,7 +66,7 @@ #define PACKAGE_NAME "SoftHSM" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "SoftHSM 2.0.0a1" +#define PACKAGE_STRING "SoftHSM 2.0.0b1" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "softhsm" @@ -64,7 +75,7 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "2.0.0a1" +#define PACKAGE_VERSION "2.0.0b1" /* Non-paged memory for secure storage */ #undef SENSITIVE_NON_PAGE @@ -73,7 +84,7 @@ #undef STDC_HEADERS /* Version number of package */ -#define VERSION "2.0.0a1" +#define VERSION "2.0.0b1" /* SoftHSM major version number via PKCS#11 */ #define VERSION_MAJOR 2 @@ -82,16 +93,32 @@ #define VERSION_MINOR 0 /* 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 /* Define to 1 if you have getpassphrase(). */ #define HAVE_GETPASSPHRASE @@ -107,7 +134,9 @@ int setenv(const char *name, const char *value, int overwrite); #define _WIN32_WINNT 0x0600 #endif +#if _MSC_VER < 1900 #define snprintf _snprintf +#endif #define strcasecmp _stricmp #define strncasecmp _strnicmp @@ -122,9 +151,11 @@ int setenv(const char *name, const char *value, int overwrite); #undef min #undef max +@IF BOTAN /* For Botan */ #pragma warning(disable: 4275 4267) +@END BOTAN /* Temporary for debug */ diff --git a/win32+botan/convarch/convarch.vcxproj.filters b/win32/convarch/convarch.vcxproj.filters.in old mode 100755 new mode 100644 similarity index 73% rename from win32+botan/convarch/convarch.vcxproj.filters rename to win32/convarch/convarch.vcxproj.filters.in index 862533cc0..fd05ffbd8 --- a/win32+botan/convarch/convarch.vcxproj.filters +++ b/win32/convarch/convarch.vcxproj.filters.in @@ -107,6 +107,128 @@ 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 + +@END BOTAN Crypto Header Files @@ -152,6 +274,122 @@ 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 + +@END OPENSSL Crypto Header Files @@ -263,126 +501,6 @@ Win32 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 - @@ -409,6 +527,128 @@ 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 + +@END BOTAN Crypto Source Files @@ -454,6 +694,119 @@ 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 + +@END OPENSSL Crypto Source Files @@ -544,125 +897,5 @@ Win32 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 - \ No newline at end of file diff --git a/win32+botan/convarch/convarch.vcxproj b/win32/convarch/convarch.vcxproj.in old mode 100755 new mode 100644 similarity index 73% rename from win32+botan/convarch/convarch.vcxproj rename to win32/convarch/convarch.vcxproj.in index 8f2a316ba..a691fd09b --- a/win32+botan/convarch/convarch.vcxproj +++ b/win32/convarch/convarch.vcxproj.in @@ -1,13 +1,13 @@  - + Debug - Win32 + @PLATFORM@ - + Release - Win32 + @PLATFORM@ @@ -23,6 +23,7 @@ +@IF BOTAN @@ -63,6 +64,7 @@ +@END BOTAN @@ -78,6 +80,46 @@ + +@IF OPENSSL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@END OPENSSL @@ -125,6 +167,7 @@ +@IF BOTAN @@ -165,6 +208,7 @@ +@END BOTAN @@ -180,6 +224,45 @@ +@IF OPENSSL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@END OPENSSL @@ -217,12 +300,12 @@ convarch - + StaticLibrary true Unicode - + StaticLibrary false true @@ -231,29 +314,29 @@ - + - + - + Level3 Disabled WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\cryptoki_compat;..\..\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;..\..\..\btn\include;%(AdditionalIncludeDirectories) + ..;..\..\src\lib;..\..\src\lib\cryptoki_compat;..\..\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) Windows true - + Level3 @@ -262,7 +345,7 @@ true true WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\cryptoki_compat;..\..\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;..\..\..\btn\include;%(AdditionalIncludeDirectories) + ..;..\..\src\lib;..\..\src\lib\cryptoki_compat;..\..\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) Windows diff --git a/win32+botan/convarch/convarch.vcxproj.user b/win32/convarch/convarch.vcxproj.user old mode 100755 new mode 100644 similarity index 100% rename from win32+botan/convarch/convarch.vcxproj.user rename to win32/convarch/convarch.vcxproj.user diff --git a/win32+botan/cryptotest/cryptotest.vcxproj.filters b/win32/cryptotest/cryptotest.vcxproj.filters old mode 100755 new mode 100644 similarity index 100% rename from win32+botan/cryptotest/cryptotest.vcxproj.filters rename to win32/cryptotest/cryptotest.vcxproj.filters diff --git a/win32+botan/cryptotest/cryptotest.vcxproj b/win32/cryptotest/cryptotest.vcxproj.in old mode 100755 new mode 100644 similarity index 81% rename from win32+botan/cryptotest/cryptotest.vcxproj rename to win32/cryptotest/cryptotest.vcxproj.in index d38a47828..e31adc926 --- a/win32+botan/cryptotest/cryptotest.vcxproj +++ b/win32/cryptotest/cryptotest.vcxproj.in @@ -1,13 +1,13 @@  - + Debug - Win32 + @PLATFORM@ - + Release - Win32 + @PLATFORM@ @@ -16,12 +16,12 @@ cryptotest - + Application true Unicode - + Application false true @@ -30,36 +30,36 @@ - + - + - + true - + false - + Level3 Disabled WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\crypto;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\data_mgr;..\..\src\lib\object_store;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\win32;..\..\..\cu\include;..\..\..\btn\include;%(AdditionalIncludeDirectories) + ..;..\..\src\lib;..\..\src\lib\crypto;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\data_mgr;..\..\src\lib\object_store;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\win32;@CUINCPATH@;@DEBUGINCPATH@;%(AdditionalIncludeDirectories) Console true - ..\$(Configuration);..\..\..\cu\lib;..\..\..\btn\lib;%(AdditionalLibraryDirectories) - convarch.lib;cppunitd.lib;botand.lib;%(AdditionalDependencies) + ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@DEBUGLIBPATH@;%(AdditionalLibraryDirectories) + convarch.lib;cppunitd.lib;@LIBNAME@;%(AdditionalDependencies) - + Level3 @@ -68,15 +68,15 @@ true true WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\crypto;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\data_mgr;..\..\src\lib\object_store;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\win32;..\..\..\cu\include;..\..\..\btn\include;%(AdditionalIncludeDirectories) + ..;..\..\src\lib;..\..\src\lib\crypto;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\data_mgr;..\..\src\lib\object_store;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\win32;@CUINCPATH@;@INCLUDEPATH@;%(AdditionalIncludeDirectories) Console true true true - ..\$(Configuration);..\..\..\cu\lib;..\..\..\btn\lib;%(AdditionalLibraryDirectories) - convarch.lib;cppunit.lib;botan.lib;%(AdditionalDependencies) + ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@LIBPATH@;%(AdditionalLibraryDirectories) + convarch.lib;cppunit.lib;@LIBNAME@;%(AdditionalDependencies) @@ -117,4 +117,4 @@ - \ No newline at end of file + diff --git a/win32+botan/cryptotest/cryptotest.vcxproj.user b/win32/cryptotest/cryptotest.vcxproj.user old mode 100755 new mode 100644 similarity index 100% rename from win32+botan/cryptotest/cryptotest.vcxproj.user rename to win32/cryptotest/cryptotest.vcxproj.user diff --git a/win32+botan/datamgrtest/datamgrtest.vcxproj.filters b/win32/datamgrtest/datamgrtest.vcxproj.filters old mode 100755 new mode 100644 similarity index 100% rename from win32+botan/datamgrtest/datamgrtest.vcxproj.filters rename to win32/datamgrtest/datamgrtest.vcxproj.filters diff --git a/win32+botan/datamgrtest/datamgrtest.vcxproj b/win32/datamgrtest/datamgrtest.vcxproj.in old mode 100755 new mode 100644 similarity index 77% rename from win32+botan/datamgrtest/datamgrtest.vcxproj rename to win32/datamgrtest/datamgrtest.vcxproj.in index ec0e11e2e..a0ab8f4df --- a/win32+botan/datamgrtest/datamgrtest.vcxproj +++ b/win32/datamgrtest/datamgrtest.vcxproj.in @@ -1,13 +1,13 @@  - + Debug - Win32 + @PLATFORM@ - + Release - Win32 + @PLATFORM@ @@ -16,12 +16,12 @@ datamgrtest - + Application true Unicode - + Application false true @@ -30,36 +30,36 @@ - + - + - + true - + false - + Level3 Disabled WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\data_mgr;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\crypto;..\..\src\lib\object_store;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\win32;..\..\..\cu\include;%(AdditionalIncludeDirectories) + ..;..\..\src\lib;..\..\src\lib\data_mgr;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\crypto;..\..\src\lib\object_store;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\win32;@CUINCPATH@;%(AdditionalIncludeDirectories) Console true - ..\$(Configuration);..\..\..\cu\lib;..\..\..\btn\lib;%(AdditionalLibraryDirectories) - convarch.lib;cppunitd.lib;botand.lib;%(AdditionalDependencies) + ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@DEBUGLIBPATH@;%(AdditionalLibraryDirectories) + convarch.lib;cppunitd.lib;@LIBNAME@;%(AdditionalDependencies) - + Level3 @@ -68,15 +68,15 @@ true true WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\data_mgr;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\crypto;..\..\src\lib\object_store;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\win32;..\..\..\cu\include;%(AdditionalIncludeDirectories) + ..;..\..\src\lib;..\..\src\lib\data_mgr;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\crypto;..\..\src\lib\object_store;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\win32;@CUINCPATH@;%(AdditionalIncludeDirectories) Console true true true - ..\$(Configuration);..\..\..\cu\lib;..\..\..\btn\lib;%(AdditionalLibraryDirectories) - convarch.lib;cppunit.lib;botan.lib;%(AdditionalDependencies) + ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@LIBPATH@;%(AdditionalLibraryDirectories) + convarch.lib;cppunit.lib;@LIBNAME@;%(AdditionalDependencies) diff --git a/win32+botan/datamgrtest/datamgrtest.vcxproj.user b/win32/datamgrtest/datamgrtest.vcxproj.user old mode 100755 new mode 100644 similarity index 100% rename from win32+botan/datamgrtest/datamgrtest.vcxproj.user rename to win32/datamgrtest/datamgrtest.vcxproj.user diff --git a/win32+botan/dump/dump.vcxproj.filters b/win32/dump/dump.vcxproj.filters old mode 100755 new mode 100644 similarity index 100% rename from win32+botan/dump/dump.vcxproj.filters rename to win32/dump/dump.vcxproj.filters diff --git a/win32+botan/dump/dump.vcxproj.user b/win32/dump/dump.vcxproj.user old mode 100755 new mode 100644 similarity index 100% rename from win32+botan/dump/dump.vcxproj.user rename to win32/dump/dump.vcxproj.user diff --git a/win32+botan/handlemgrtest/handlemgrtest.vcxproj.filters b/win32/handlemgrtest/handlemgrtest.vcxproj.filters old mode 100755 new mode 100644 similarity index 100% rename from win32+botan/handlemgrtest/handlemgrtest.vcxproj.filters rename to win32/handlemgrtest/handlemgrtest.vcxproj.filters diff --git a/win32+botan/handlemgrtest/handlemgrtest.vcxproj b/win32/handlemgrtest/handlemgrtest.vcxproj.in old mode 100755 new mode 100644 similarity index 78% rename from win32+botan/handlemgrtest/handlemgrtest.vcxproj rename to win32/handlemgrtest/handlemgrtest.vcxproj.in index 92297bda5..a423025c3 --- a/win32+botan/handlemgrtest/handlemgrtest.vcxproj +++ b/win32/handlemgrtest/handlemgrtest.vcxproj.in @@ -1,13 +1,13 @@  - + Debug - Win32 + @PLATFORM@ - + Release - Win32 + @PLATFORM@ @@ -16,12 +16,12 @@ handlemgrtest - + Application true Unicode - + Application false true @@ -30,36 +30,36 @@ - + - + - + true - + false - + Level3 Disabled WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\handle_mgr;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\crypto;..\..\src\lib\object_store;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\data_mgr;..\..\src\lib\win32;..\..\..\cu\include;%(AdditionalIncludeDirectories) + ..;..\..\src\lib;..\..\src\lib\handle_mgr;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\crypto;..\..\src\lib\object_store;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\data_mgr;..\..\src\lib\win32;@CUINCPATH@;%(AdditionalIncludeDirectories) Console true - ..\$(Configuration);..\..\..\cu\lib;..\..\..\btn\lib;%(AdditionalLibraryDirectories) - convarch.lib;cppunitd.lib;botand.lib;%(AdditionalDependencies) + ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@DEBUGLIBPATH@;%(AdditionalLibraryDirectories) + convarch.lib;cppunitd.lib;@LIBNAME@;%(AdditionalDependencies) - + Level3 @@ -68,15 +68,15 @@ true true WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\handle_mgr;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\crypto;..\..\src\lib\object_store;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\data_mgr;..\..\src\lib\win32;..\..\..\cu\include;%(AdditionalIncludeDirectories) + ..;..\..\src\lib;..\..\src\lib\handle_mgr;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\crypto;..\..\src\lib\object_store;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\data_mgr;..\..\src\lib\win32;@CUINCPATH@;%(AdditionalIncludeDirectories) Console true true true - ..\$(Configuration);..\..\..\cu\lib;..\..\..\btn\lib;%(AdditionalLibraryDirectories) - convarch.lib;cppunit.lib;botan.lib;%(AdditionalDependencies) + ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@LIBPATH@;%(AdditionalLibraryDirectories) + convarch.lib;cppunit.lib;@LIBNAME@;%(AdditionalDependencies) diff --git a/win32+botan/handlemgrtest/handlemgrtest.vcxproj.user b/win32/handlemgrtest/handlemgrtest.vcxproj.user old mode 100755 new mode 100644 similarity index 100% rename from win32+botan/handlemgrtest/handlemgrtest.vcxproj.user rename to win32/handlemgrtest/handlemgrtest.vcxproj.user diff --git a/win32+botan/keyconv/keyconv.vcxproj.filters b/win32/keyconv/keyconv.vcxproj.filters.in old mode 100755 new mode 100644 similarity index 92% rename from win32+botan/keyconv/keyconv.vcxproj.filters rename to win32/keyconv/keyconv.vcxproj.filters.in index d6fa60c2a..70d08989f --- a/win32+botan/keyconv/keyconv.vcxproj.filters +++ b/win32/keyconv/keyconv.vcxproj.filters.in @@ -51,6 +51,16 @@ Source Files +@IF BOTAN + + Source Files + +@END BOTAN +@IF OPENSSL + + Source Files + +@END OPENSSL Common Source Files @@ -66,8 +76,5 @@ Win32 Source Files - - Source Files - diff --git a/win32+botan/keyconv/keyconv.vcxproj b/win32/keyconv/keyconv.vcxproj.in old mode 100755 new mode 100644 similarity index 78% rename from win32+botan/keyconv/keyconv.vcxproj rename to win32/keyconv/keyconv.vcxproj.in index 185cdb309..0e7786146 --- a/win32+botan/keyconv/keyconv.vcxproj +++ b/win32/keyconv/keyconv.vcxproj.in @@ -1,13 +1,13 @@  - + Debug - Win32 + @PLATFORM@ - + Release - Win32 + @PLATFORM@ @@ -16,12 +16,12 @@ keyconv - + Application true Unicode - + Application false true @@ -30,38 +30,38 @@ - + - + - + true softhsm2-keyconv - + false softhsm2-keyconv - + Level3 Disabled WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\bin\common;..\..\src\bin\win32;..\..\src\lib\cryptoki_compat;..\..\..\btn\include;%(AdditionalIncludeDirectories) + ..;..\..\src\bin\common;..\..\src\bin\win32;..\..\src\lib\cryptoki_compat;@DEBUGINCPATH@;%(AdditionalIncludeDirectories) Console true - ..\..\..\btn\lib;%(AdditionalLibraryDirectories) - botan.lib;%(AdditionalDependencies) + @DEBUGLIBPATH@;%(AdditionalLibraryDirectories) + @LIBNAME@;%(AdditionalDependencies) - + Level3 @@ -70,15 +70,15 @@ true true WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\bin\common;..\..\src\bin\win32;..\..\src\lib\cryptoki_compat;..\..\..\btn\include;%(AdditionalIncludeDirectories) + ..;..\..\src\bin\common;..\..\src\bin\win32;..\..\src\lib\cryptoki_compat;@INCLUDEPATH@;%(AdditionalIncludeDirectories) Console true true true - ..\..\..\btn\lib;%(AdditionalLibraryDirectories) - botan.lib;%(AdditionalDependencies) + @LIBPATH@;%(AdditionalLibraryDirectories) + @LIBNAME@;%(AdditionalDependencies) @@ -92,7 +92,12 @@ +@IF BOTAN +@END BOTAN +@IF OPENSSL + +@END OPENSSL diff --git a/win32+botan/keyconv/keyconv.vcxproj.user b/win32/keyconv/keyconv.vcxproj.user old mode 100755 new mode 100644 similarity index 100% rename from win32+botan/keyconv/keyconv.vcxproj.user rename to win32/keyconv/keyconv.vcxproj.user diff --git a/win32+botan/objstoretest/objstoretest.vcxproj.filters b/win32/objstoretest/objstoretest.vcxproj.filters old mode 100755 new mode 100644 similarity index 100% rename from win32+botan/objstoretest/objstoretest.vcxproj.filters rename to win32/objstoretest/objstoretest.vcxproj.filters diff --git a/win32+botan/objstoretest/objstoretest.vcxproj b/win32/objstoretest/objstoretest.vcxproj.in old mode 100755 new mode 100644 similarity index 80% rename from win32+botan/objstoretest/objstoretest.vcxproj rename to win32/objstoretest/objstoretest.vcxproj.in index dcfb2e9d7..61dad04fe --- a/win32+botan/objstoretest/objstoretest.vcxproj +++ b/win32/objstoretest/objstoretest.vcxproj.in @@ -1,13 +1,13 @@  - + Debug - Win32 + @PLATFORM@ - + Release - Win32 + @PLATFORM@ @@ -16,12 +16,12 @@ objstoretest - + Application true Unicode - + Application false true @@ -30,36 +30,36 @@ - + - + - + true - + false - + Level3 Disabled WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\object_store;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\crypto;..\..\src\lib\data_mgr;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\win32;..\..\..\cu\include;%(AdditionalIncludeDirectories) + ..;..\..\src\lib;..\..\src\lib\object_store;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\crypto;..\..\src\lib\data_mgr;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\win32;@CUINCPATH@;%(AdditionalIncludeDirectories) Console true - ..\$(Configuration);..\..\..\cu\lib;..\..\..\btn\lib;%(AdditionalLibraryDirectories) - convarch.lib;cppunitd.lib;botand.lib;%(AdditionalDependencies) + ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@DEBUGLIBPATH@;%(AdditionalLibraryDirectories) + convarch.lib;cppunitd.lib;@LIBNAME@;%(AdditionalDependencies) - + Level3 @@ -68,15 +68,15 @@ true true WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\object_store;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\crypto;..\..\src\lib\data_mgr;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\win32;..\..\..\cu\include;%(AdditionalIncludeDirectories) + ..;..\..\src\lib;..\..\src\lib\object_store;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\crypto;..\..\src\lib\data_mgr;..\..\src\lib\session_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\win32;@CUINCPATH@;%(AdditionalIncludeDirectories) Console true true true - ..\$(Configuration);..\..\..\cu\lib;..\..\..\btn\lib;%(AdditionalLibraryDirectories) - convarch.lib;cppunit.lib;botan.lib;%(AdditionalDependencies) + ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@LIBPATH@;%(AdditionalLibraryDirectories) + convarch.lib;cppunit.lib;@LIBNAME@;%(AdditionalDependencies) diff --git a/win32+botan/objstoretest/objstoretest.vcxproj.user b/win32/objstoretest/objstoretest.vcxproj.user old mode 100755 new mode 100644 similarity index 100% rename from win32+botan/objstoretest/objstoretest.vcxproj.user rename to win32/objstoretest/objstoretest.vcxproj.user diff --git a/win32+botan/p11test/p11test.vcxproj.filters b/win32/p11test/p11test.vcxproj.filters old mode 100755 new mode 100644 similarity index 90% rename from win32+botan/p11test/p11test.vcxproj.filters rename to win32/p11test/p11test.vcxproj.filters index fba8ef3f4..febf6d16d --- a/win32+botan/p11test/p11test.vcxproj.filters +++ b/win32/p11test/p11test.vcxproj.filters @@ -34,6 +34,12 @@ Header Files + + Header Files + + + Header Files + Header Files @@ -93,6 +99,12 @@ Source Files + + Source Files + + + Source Files + Source Files diff --git a/win32+botan/p11test/p11test.vcxproj b/win32/p11test/p11test.vcxproj.in old mode 100755 new mode 100644 similarity index 77% rename from win32+botan/p11test/p11test.vcxproj rename to win32/p11test/p11test.vcxproj.in index c12939bae..7c45c2d15 --- a/win32+botan/p11test/p11test.vcxproj +++ b/win32/p11test/p11test.vcxproj.in @@ -1,13 +1,13 @@  - + Debug - Win32 + @PLATFORM@ - + Release - Win32 + @PLATFORM@ @@ -16,12 +16,12 @@ p11test - + Application true Unicode - + Application false true @@ -30,45 +30,45 @@ - + - + - + true - + false - + Level3 Disabled WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\cryptoki_compat;..\..\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;..\..\..\cu\include;%(AdditionalIncludeDirectories) + ..;..\..\src\lib;..\..\src\lib\cryptoki_compat;..\..\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@;%(AdditionalIncludeDirectories) Console true - ..\$(Configuration);..\..\..\cu\lib;..\..\..\btn\lib;%(AdditionalLibraryDirectories) - convarch.lib;cppunitd.lib;botand.lib;%(AdditionalDependencies) + ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@DEBUGLIBPATH@;%(AdditionalLibraryDirectories) + convarch.lib;cppunitd.lib;@LIBNAME@;%(AdditionalDependencies) copy ..\..\src\lib\test\softhsm2.conf.win32 ..\..\softhsm2.conf mkdir ..\..\tokens 2> nul copy ..\..\src\lib\test\tokens\dummy.in ..\..\tokens\dummy -copy ..\..\src\lib\test\softhsm2.conf.win32 ..\..\"win32+botan"\p11test\softhsm2.conf -mkdir ..\..\"win32+botan"\p11test\tokens 2> nul -copy ..\..\src\lib\test\tokens\dummy.in ..\..\"win32+botan"\p11test\tokens\dummy +copy ..\..\src\lib\test\softhsm2.conf.win32 ..\..\win32\p11test\softhsm2.conf +mkdir ..\..\win32\p11test\tokens 2> nul +copy ..\..\src\lib\test\tokens\dummy.in ..\..\win32\p11test\tokens\dummy - + Level3 @@ -77,24 +77,24 @@ copy ..\..\src\lib\test\tokens\dummy.in ..\..\"win32+botan"\p11test\tokens\dumm true true WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\cryptoki_compat;..\..\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;..\..\..\cu\include;%(AdditionalIncludeDirectories) + ..;..\..\src\lib;..\..\src\lib\cryptoki_compat;..\..\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@;%(AdditionalIncludeDirectories) Console true true true - ..\$(Configuration);..\..\..\cu\lib;..\..\..\btn\lib;%(AdditionalLibraryDirectories) - convarch.lib;cppunit.lib;botan.lib;%(AdditionalDependencies) + ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@LIBPATH@;%(AdditionalLibraryDirectories) + convarch.lib;cppunit.lib;@LIBNAME@;%(AdditionalDependencies) copy ..\..\src\lib\test\softhsm2.conf.win32 ..\..\softhsm2.conf mkdir ..\..\tokens 2> nul copy ..\..\src\lib\test\tokens\dummy.in ..\..\tokens\dummy -copy ..\..\src\lib\test\softhsm2.conf.win32 ..\..\"win32+botan"\p11test\softhsm2.conf -mkdir ..\..\"win32+botan"\p11test\tokens 2> nul -copy ..\..\src\lib\test\tokens\dummy.in ..\..\"win32+botan"\p11test\tokens\dummy +copy ..\..\src\lib\test\softhsm2.conf.win32 ..\..\win32\p11test\softhsm2.conf +mkdir ..\..\win32\p11test\tokens 2> nul +copy ..\..\src\lib\test\tokens\dummy.in ..\..\win32\p11test\tokens\dummy @@ -106,6 +106,8 @@ copy ..\..\src\lib\test\tokens\dummy.in ..\..\"win32+botan"\p11test\tokens\dumm + + @@ -126,6 +128,8 @@ copy ..\..\src\lib\test\tokens\dummy.in ..\..\"win32+botan"\p11test\tokens\dumm + + diff --git a/win32+botan/p11test/p11test.vcxproj.user b/win32/p11test/p11test.vcxproj.user old mode 100755 new mode 100644 similarity index 100% rename from win32+botan/p11test/p11test.vcxproj.user rename to win32/p11test/p11test.vcxproj.user diff --git a/win32+botan/sessionmgrtest/sessionmgrtest.vcxproj.filters b/win32/sessionmgrtest/sessionmgrtest.vcxproj.filters old mode 100755 new mode 100644 similarity index 100% rename from win32+botan/sessionmgrtest/sessionmgrtest.vcxproj.filters rename to win32/sessionmgrtest/sessionmgrtest.vcxproj.filters diff --git a/win32+botan/sessionmgrtest/sessionmgrtest.vcxproj b/win32/sessionmgrtest/sessionmgrtest.vcxproj.in old mode 100755 new mode 100644 similarity index 76% rename from win32+botan/sessionmgrtest/sessionmgrtest.vcxproj rename to win32/sessionmgrtest/sessionmgrtest.vcxproj.in index 6d7bc6403..ed4c23fdf --- a/win32+botan/sessionmgrtest/sessionmgrtest.vcxproj +++ b/win32/sessionmgrtest/sessionmgrtest.vcxproj.in @@ -1,13 +1,13 @@  - + Debug - Win32 + @PLATFORM@ - + Release - Win32 + @PLATFORM@ @@ -16,12 +16,12 @@ sessionmgrtest - + Application true Unicode - + Application false true @@ -30,36 +30,36 @@ - + - + - + true - + false - + Level3 Disabled WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\session_mgr;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\crypto;..\..\src\lib\data_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\object_store;..\..\src\lib\win32;..\..\..\cu\include;..\..\..\btn\include;%(AdditionalIncludeDirectories) + ..;..\..\src\lib;..\..\src\lib\session_mgr;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\crypto;..\..\src\lib\data_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\object_store;..\..\src\lib\win32;@CUINCPATH@;@DEBUGINCPATH@;%(AdditionalIncludeDirectories) Console true - ..\$(Configuration);..\..\..\cu\lib;..\..\..\btn\lib;%(AdditionalLibraryDirectories) - convarch.lib;cppunitd.lib;botand.lib;%(AdditionalDependencies) + ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@DEBUGLIBPATH@;%(AdditionalLibraryDirectories) + convarch.lib;cppunitd.lib;@LIBNAME@;%(AdditionalDependencies) - + Level3 @@ -68,15 +68,15 @@ true true WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\session_mgr;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\crypto;..\..\src\lib\data_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\object_store;..\..\src\lib\win32;..\..\..\cu\include;..\..\..\btn\include;%(AdditionalIncludeDirectories) + ..;..\..\src\lib;..\..\src\lib\session_mgr;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\crypto;..\..\src\lib\data_mgr;..\..\src\lib\slot_mgr;..\..\src\lib\object_store;..\..\src\lib\win32;@CUINCPATH@;@INCLUDEPATH@;%(AdditionalIncludeDirectories) Console true true true - ..\$(Configuration);..\..\..\cu\lib;..\..\..\btn\lib;%(AdditionalLibraryDirectories) - convarch.lib;cppunit.lib;botan.lib;%(AdditionalDependencies) + ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@LIBPATH@;%(AdditionalLibraryDirectories) + convarch.lib;cppunit.lib;@LIBNAME@;%(AdditionalDependencies) diff --git a/win32+botan/sessionmgrtest/sessionmgrtest.vcxproj.user b/win32/sessionmgrtest/sessionmgrtest.vcxproj.user old mode 100755 new mode 100644 similarity index 100% rename from win32+botan/sessionmgrtest/sessionmgrtest.vcxproj.user rename to win32/sessionmgrtest/sessionmgrtest.vcxproj.user diff --git a/win32+botan/slotmgrtest/slotmgrtest.vcxproj.filters b/win32/slotmgrtest/slotmgrtest.vcxproj.filters old mode 100755 new mode 100644 similarity index 100% rename from win32+botan/slotmgrtest/slotmgrtest.vcxproj.filters rename to win32/slotmgrtest/slotmgrtest.vcxproj.filters diff --git a/win32+botan/slotmgrtest/slotmgrtest.vcxproj b/win32/slotmgrtest/slotmgrtest.vcxproj.in old mode 100755 new mode 100644 similarity index 76% rename from win32+botan/slotmgrtest/slotmgrtest.vcxproj rename to win32/slotmgrtest/slotmgrtest.vcxproj.in index 5d50c1f07..6de3758bb --- a/win32+botan/slotmgrtest/slotmgrtest.vcxproj +++ b/win32/slotmgrtest/slotmgrtest.vcxproj.in @@ -1,13 +1,13 @@  - + Debug - Win32 + @PLATFORM@ - + Release - Win32 + @PLATFORM@ @@ -16,12 +16,12 @@ slotmgrtest - + Application true Unicode - + Application false true @@ -30,36 +30,36 @@ - + - + - + true - + false - + Level3 Disabled WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\slot_mgr;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\crypto;..\..\src\lib\object_store;..\..\src\lib\session_mgr;..\..\src\lib\data_mgr;..\..\src\lib\win32;..\..\..\cu\include;%(AdditionalIncludeDirectories) + ..;..\..\src\lib;..\..\src\lib\slot_mgr;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\crypto;..\..\src\lib\object_store;..\..\src\lib\session_mgr;..\..\src\lib\data_mgr;..\..\src\lib\win32;@CUINCPATH@;%(AdditionalIncludeDirectories) Console true - ..\$(Configuration);..\..\..\cu\lib;..\..\..\btn\lib;%(AdditionalLibraryDirectories) - convarch.lib;cppunitd.lib;botand.lib;%(AdditionalDependencies) + ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@DEBUGLIBPATH@;%(AdditionalLibraryDirectories) + convarch.lib;cppunitd.lib;@LIBNAME@;%(AdditionalDependencies) - + Level3 @@ -68,15 +68,15 @@ true true WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\lib;..\..\src\lib\slot_mgr;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\crypto;..\..\src\lib\object_store;..\..\src\lib\session_mgr;..\..\src\lib\data_mgr;..\..\src\lib\win32;..\..\..\cu\include;%(AdditionalIncludeDirectories) + ..;..\..\src\lib;..\..\src\lib\slot_mgr;..\..\src\lib\common;..\..\src\lib\cryptoki_compat;..\..\src\lib\crypto;..\..\src\lib\object_store;..\..\src\lib\session_mgr;..\..\src\lib\data_mgr;..\..\src\lib\win32;@CUINCPATH@;%(AdditionalIncludeDirectories) Console true true true - ..\$(Configuration);..\..\..\cu\lib;..\..\..\btn\lib;%(AdditionalLibraryDirectories) - convarch.lib;cppunit.lib;botan.lib;%(AdditionalDependencies) + ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@LIBPATH@;%(AdditionalLibraryDirectories) + convarch.lib;cppunit.lib;@LIBNAME@;%(AdditionalDependencies) diff --git a/win32+botan/slotmgrtest/slotmgrtest.vcxproj.user b/win32/slotmgrtest/slotmgrtest.vcxproj.user old mode 100755 new mode 100644 similarity index 100% rename from win32+botan/slotmgrtest/slotmgrtest.vcxproj.user rename to win32/slotmgrtest/slotmgrtest.vcxproj.user diff --git a/win32/softhsm2.sln.in b/win32/softhsm2.sln.in new file mode 100644 index 000000000..4d98c0d3c --- /dev/null +++ b/win32/softhsm2.sln.in @@ -0,0 +1,117 @@ + +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/win32+openssl/softhsm2/softhsm2.vcxproj.filters b/win32/softhsm2/softhsm2.vcxproj.filters old mode 100755 new mode 100644 similarity index 100% rename from win32+openssl/softhsm2/softhsm2.vcxproj.filters rename to win32/softhsm2/softhsm2.vcxproj.filters diff --git a/win32+botan/softhsm2/softhsm2.vcxproj b/win32/softhsm2/softhsm2.vcxproj.in old mode 100755 new mode 100644 similarity index 83% rename from win32+botan/softhsm2/softhsm2.vcxproj rename to win32/softhsm2/softhsm2.vcxproj.in index 57b010423..cb379972a --- a/win32+botan/softhsm2/softhsm2.vcxproj +++ b/win32/softhsm2/softhsm2.vcxproj.in @@ -1,13 +1,13 @@  - + Debug - Win32 + @PLATFORM@ - + Release - Win32 + @PLATFORM@ @@ -16,12 +16,12 @@ softhsm2 - + DynamicLibrary true Unicode - + DynamicLibrary false true @@ -30,20 +30,20 @@ - + - + - + true - + false - + @@ -55,11 +55,11 @@ Windows true - ..\$(Configuration);..\..\..\btn\lib;%(AdditionalLibraryDirectories) - convarch.lib;botand.lib;%(AdditionalDependencies) + ..\@PLATFORMDIR@$(Configuration);@DEBUGLIBPATH@;%(AdditionalLibraryDirectories) + convarch.lib;@LIBNAME@;%(AdditionalDependencies) - + Level3 @@ -75,8 +75,8 @@ true true true - ..\$(Configuration);..\..\..\btn\lib;%(AdditionalLibraryDirectories) - convarch.lib;botan.lib;%(AdditionalDependencies) + ..\@PLATFORMDIR@$(Configuration);@LIBPATH@;%(AdditionalLibraryDirectories) + convarch.lib;@LIBNAME@;%(AdditionalDependencies) diff --git a/win32+botan/softhsm2/softhsm2.vcxproj.user b/win32/softhsm2/softhsm2.vcxproj.user old mode 100755 new mode 100644 similarity index 100% rename from win32+botan/softhsm2/softhsm2.vcxproj.user rename to win32/softhsm2/softhsm2.vcxproj.user diff --git a/win32+botan/util/util.vcxproj.filters b/win32/util/util.vcxproj.filters.in old mode 100755 new mode 100644 similarity index 88% rename from win32+botan/util/util.vcxproj.filters rename to win32/util/util.vcxproj.filters.in index cb68ce2ab..44fb6d2ae --- a/win32+botan/util/util.vcxproj.filters +++ b/win32/util/util.vcxproj.filters.in @@ -40,15 +40,22 @@ Header Files +@IF BOTAN + + Header Files + +@END BOTAN +@IF OPENSSL + + Header Files + +@END OPENSSL Header Files Win32 Header Files - - Header Files - @@ -60,14 +67,21 @@ Source Files +@IF BOTAN + + Source Files + +@END BOTAN +@IF OPENSSL + + Source Files + +@END OPENSSL Win32 Source Files Win32 Source Files - - Source Files - diff --git a/win32+botan/util/util.vcxproj b/win32/util/util.vcxproj.in old mode 100755 new mode 100644 similarity index 73% rename from win32+botan/util/util.vcxproj rename to win32/util/util.vcxproj.in index 487f7115b..37c9c4f90 --- a/win32+botan/util/util.vcxproj +++ b/win32/util/util.vcxproj.in @@ -1,13 +1,13 @@  - + Debug - Win32 + @PLATFORM@ - + Release - Win32 + @PLATFORM@ @@ -16,12 +16,12 @@ util - + Application true Unicode - + Application false true @@ -30,38 +30,41 @@ - + - + - + true softhsm2-util - + false softhsm2-util - + Level3 Disabled WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\bin\common;..\..\src\bin\win32;..\..\src\lib\cryptoki_compat;..\..\..\btn\include;%(AdditionalIncludeDirectories) + ..;..\..\src\bin\common;..\..\src\bin\win32;..\..\src\lib\cryptoki_compat;@DEBUGINCPATH@;%(AdditionalIncludeDirectories) Console true - ..\..\..\btn\lib;%(AdditionalLibraryDirectories) - botan.lib;%(AdditionalDependencies) + @DEBUGLIBPATH@;%(AdditionalLibraryDirectories) + @LIBNAME@;%(AdditionalDependencies) + + if exist @DEBUGDLLPATH@ copy @DEBUGDLLPATH@ ..\@PLATFORMDIR@$(Configuration) + - + Level3 @@ -70,21 +73,29 @@ true true WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..;..\..\src\bin\common;..\..\src\bin\win32;..\..\src\lib\cryptoki_compat;..\..\..\btn\include;%(AdditionalIncludeDirectories) + ..;..\..\src\bin\common;..\..\src\bin\win32;..\..\src\lib\cryptoki_compat;@INCLUDEPATH@;%(AdditionalIncludeDirectories) Console true true true - ..\..\..\btn\lib;%(AdditionalLibraryDirectories) - botan.lib;%(AdditionalDependencies) + @LIBPATH@;%(AdditionalLibraryDirectories) + @LIBNAME@;%(AdditionalDependencies) + + if exist @DLLPATH@ copy @DLLPATH@ ..\@PLATFORMDIR@$(Configuration) + +@IF BOTAN +@END BOTAN +@IF OPENSSL + +@END OPENSSL @@ -92,7 +103,12 @@ +@IF BOTAN +@END BOTAN +@IF OPENSSL + +@END OPENSSL diff --git a/win32+botan/util/util.vcxproj.user b/win32/util/util.vcxproj.user old mode 100755 new mode 100644 similarity index 100% rename from win32+botan/util/util.vcxproj.user rename to win32/util/util.vcxproj.user From 9823f0310eba29fc55ec865bdb465b5253d9d5d2 Mon Sep 17 00:00:00 2001 From: Francis Dupont Date: Sun, 2 Nov 2014 03:16:23 +0100 Subject: [PATCH 2/5] missing file --- win32/dump/dump.vcxproj.in | 91 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 win32/dump/dump.vcxproj.in diff --git a/win32/dump/dump.vcxproj.in b/win32/dump/dump.vcxproj.in new file mode 100644 index 000000000..506e2a228 --- /dev/null +++ b/win32/dump/dump.vcxproj.in @@ -0,0 +1,91 @@ + + + + + Debug + @PLATFORM@ + + + Release + @PLATFORM@ + + + + {F60ACB12-7D05-4A89-B2D1-DD16E1F3566B} + Win32Proj + dump + + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + true + softhsm2-dump-file + + + false + softhsm2-dump-file + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + ..;..\..\src\lib\cryptoki_compat;..\..\src\lib\object_store;..\..\src\lib;%(AdditionalIncludeDirectories) + + + Console + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + ..;..\..\src\lib\cryptoki_compat;..\..\src\lib\object_store;..\..\src\lib;%(AdditionalIncludeDirectories) + + + Console + true + true + true + + + + + + + + + + + + + + \ No newline at end of file From 3df9001e68045bf8c5a8e141b66b6b034f968717 Mon Sep 17 00:00:00 2001 From: Francis Dupont Date: Sun, 2 Nov 2014 20:36:45 +0100 Subject: [PATCH 3/5] fixed build with static libs --- win32/Configure.pl | 40 ++++++++----- win32/Configure.py | 66 +++++++++++++--------- win32/cryptotest/cryptotest.vcxproj.in | 4 +- win32/datamgrtest/datamgrtest.vcxproj.in | 4 +- win32/objstoretest/objstoretest.vcxproj.in | 4 +- win32/p11test/p11test.vcxproj.in | 4 +- win32/slotmgrtest/slotmgrtest.vcxproj.in | 4 +- win32/softhsm2/softhsm2.vcxproj.in | 4 +- 8 files changed, 76 insertions(+), 54 deletions(-) diff --git a/win32/Configure.pl b/win32/Configure.pl index eb918ee61..b1b0cb1f2 100644 --- a/win32/Configure.pl +++ b/win32/Configure.pl @@ -39,6 +39,7 @@ "DEBUGINCPATH", "DEBUGLIBPATH", "DLLPATH", + "EXTRALIBS", "INCLUDEPATH", "LIBNAME", "LIBPATH", @@ -390,7 +391,12 @@ sub mywith { if ($verbose) { print "checking Botan version\n"; } - `copy "$botan_dll" .`; + my $system_libs = ""; + if (-f $botan_dll) { + `copy "$botan_dll" .`; + } else { + $system_libs = " user32.lib advapi32.lib"; + } my $inc = $botan_inc; my $lib = File::Spec->catfile($botan_path, "botan.lib"); open F, ">testbotan.cpp" || die $!; @@ -416,7 +422,7 @@ sub mywith { } EOF close F; - my $compret = `cl /nologo /MD /I "$inc" testbotan.cpp "$lib"`; + my $compret = `cl /nologo /MD /I "$inc" testbotan.cpp "$lib"$system_libs`; if (grep { -f and -x } ".\\testbotan.exe") { `.\\testbotan.exe`; if ($? == 1) { @@ -453,7 +459,7 @@ sub mywith { } EOF close F; - $compret = `cl /nologo /MD /I "$inc" testecc.cpp "$lib"`; + $compret = `cl /nologo /MD /I "$inc" testecc.cpp "$lib"$system_libs`; if (grep { -f and -x } ".\\testecc.exe") { `.\\testecc.exe`; if ($? != 0) { @@ -487,7 +493,7 @@ sub mywith { } EOF close F; - $compret = `cl /nologo /MD /I "$inc" testgost.cpp "$lib"`; + $compret = `cl /nologo /MD /I "$inc" testgost.cpp "$lib"$system_libs`; if (grep { -f and -x } ".\\testgost.exe") { `.\\testgost.exe`; if ($? != 0) { @@ -503,6 +509,7 @@ sub mywith { } else { $condvals{"OPENSSL"} = 1; $varvals{"LIBNAME"} = "libeay32.lib"; + $varvals{"EXTRALIBS"} = "crypt32.lib;"; $openssl_path = File::Spec->rel2abs($openssl_path); my $openssl_dll = File::Spec->catfile($openssl_path, "bin\\libeay32.dll"); $varvals{"DLLPATH"} = $openssl_dll; @@ -542,7 +549,12 @@ sub mywith { if ($verbose) { print "checking OpenSSL\n"; } - `copy "$openssl_dll" .`; + my $system_libs = ""; + if (-f $openssl_dll) { + `copy "$openssl_dll" .`; + } else { + $system_libs = " user32.lib advapi32.lib gdi32.lib crypt32.lib"; + } my $inc = $openssl_inc; my $lib = File::Spec->catfile($openssl_lib, "libeay32.lib"); open F, ">testossl.c" || die $!; @@ -554,7 +566,7 @@ sub mywith { } EOF close F; - my $compret = `cl /nologo /MD /I "$inc" testossl.c "$lib"`; + my $compret = `cl /nologo /MD /I "$inc" testossl.c "$lib"$system_libs`; if (grep { -f and -x } ".\\testossl.exe") { `.\\testossl.exe`; if ($? != 0) { @@ -582,7 +594,7 @@ sub mywith { } EOF close F; - $compret = `cl /nologo /MD /I "$inc" testosslv.c "$lib"`; + $compret = `cl /nologo /MD /I "$inc" testosslv.c "$lib"$system_libs`; if (grep { -f and -x } ".\\testosslv.exe") { `.\\testosslv.exe`; if ($? != 0) { @@ -609,7 +621,7 @@ sub mywith { } EOF close F; - $compret = `cl /nologo /MD /I "$inc" testecc.c "$lib"`; + $compret = `cl /nologo /MD /I "$inc" testecc.c "$lib"$system_libs`; if (grep { -f and -x } ".\\testecc.exe") { `.\\testecc.exe`; if ($? != 0) { @@ -641,7 +653,7 @@ sub mywith { } EOF close F; - $compret = `cl /nologo /MD /I "$inc" testgost.c "$lib"`; + $compret = `cl /nologo /MD /I "$inc" testgost.c "$lib"$system_libs`; if (grep { -f and -x } ".\\testgost.exe") { `.\\testgost.exe`; if ($? != 0) { @@ -815,13 +827,13 @@ sub setupfile { # Notes: Unix configure.ac options # --enable-64bit supported -# --enable-ecc supported (no auto detection) -# --enable-gost supported (no auto detection) +# --enable-ecc supported +# --enable-gost supported # --enable-non-paged-memory (TODO) -# --enable-visibility (enforced by DLLS) +# --enable-visibility (enforced by DLLs) # --with-crypto-backend supported -# --with-openssl supported (TODO build check) -# --with-botan supported (TODO build check) +# --with-openssl supported (finish build check) +# --with-botan supported (finish build check) # --with-migrate (useless as SoftHSMv1 is not supported) # --with-objectstore-backend-db (TODO) # --with-sqlite3 (TODO) diff --git a/win32/Configure.py b/win32/Configure.py index b55c72c40..cf0c99e30 100644 --- a/win32/Configure.py +++ b/win32/Configure.py @@ -40,6 +40,7 @@ "DEBUGINCPATH", "DEBUGLIBPATH", "DLLPATH", + "EXTRALIBS", "INCLUDEPATH", "LIBNAME", "LIBPATH", @@ -346,7 +347,11 @@ def doconfig(): varvals["DEBUGLIBPATH"] = varvals["LIBPATH"] if verbose: print "checking Botan version" - subprocess.call(["copy", botan_dll, "."], shell=True) + system_libs = [] + if os.path.exists(botan_dll): + subprocess.call(["copy", botan_dll, "."], shell=True) + else: + system_libs = ["user32.lib", "advapi32.lib"] inc = botan_inc lib = os.path.join(botan_path, "botan.lib") testfile = open("testbotan.cpp", "w") @@ -371,9 +376,9 @@ def doconfig(): return 0;\n\ }' testfile.close() - subprocess.check_output( - ["cl", "/nologo", "/MD", "/I", inc, "testbotan.cpp", lib], - stderr=subprocess.STDOUT) + 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 >> sys.stderr, "can't create .\\testbotan.exe" sys.exit(1) @@ -409,9 +414,9 @@ def doconfig(): return 0;\n\ }' testfile.close() - subprocess.check_output( - ["cl", "/nologo", "/MD", "/I", inc, "testecc.cpp", lib], - stderr=subprocess.STDOUT) + 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 >> sys.stderr, "can't create .\\testecc.exe" sys.exit(1) @@ -441,9 +446,9 @@ def doconfig(): return 0;\n\ }' testfile.close() - subprocess.check_output( - ["cl", "/nologo", "/MD", "/I", inc, "testgost.cpp", lib], - stderr=subprocess.STDOUT) + 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 >> sys.stderr, "can't create .\\testgost.exe" sys.exit(1) @@ -457,6 +462,7 @@ def doconfig(): else: condvals["OPENSSL"] = True varvals["LIBNAME"] = "libeay32.lib" + varvals["EXTRALIBS"] = "crypt32.lib;" openssl_path = os.path.abspath(openssl_path) openssl_dll = os.path.join(openssl_path, "bin\\libeay32.dll") varvals["DLLPATH"] = openssl_dll @@ -493,7 +499,11 @@ def doconfig(): varvals["DEBUGLIBPATH"] = varvals["LIBPATH"] if verbose: print "checking OpenSSL" - subprocess.call(["copy", openssl_dll, "."], shell=True) + 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"] inc = openssl_inc lib = os.path.join(openssl_lib, "libeay32.lib") testfile = open("testossl.c", "w") @@ -504,9 +514,9 @@ def doconfig(): return 0;\n\ }' testfile.close() - subprocess.check_output( - ["cl", "/nologo", "/MD", "/I", inc, "testossl.c", lib], - stderr=subprocess.STDOUT) + 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 >> sys.stderr, "can't create .\\testossl.exe" sys.exit(1) @@ -530,9 +540,9 @@ def doconfig(): #endif\n\ }' testfile.close() - subprocess.check_output( - ["cl", "/nologo", "/MD", "/I", inc, "testosslv.c", lib], - stderr=subprocess.STDOUT) + 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 >> sys.stderr, "can't create .\\testosslv.exe" sys.exit(1) @@ -556,9 +566,9 @@ def doconfig(): return 0;\n\ }' testfile.close() - subprocess.check_output( - ["cl", "/nologo", "/MD", "/I", inc, "testecc.c", lib], - stderr=subprocess.STDOUT) + 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 >> sys.stderr, "can't create .\\testecc.exe" sys.exit(1) @@ -585,9 +595,9 @@ def doconfig(): return 0;\n\ }' testfile.close() - subprocess.check_output( - ["cl", "/nologo", "/MD", "/I", inc, "testgost.c", lib], - stderr=subprocess.STDOUT) + 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 >> sys.stderr, "can't create .\\testgost.exe" sys.exit(1) @@ -775,13 +785,13 @@ def main(args): # Notes: Unix configure.ac options # --enable-64bit supported -# --enable-ecc supported (no auto detection) -# --enable-gost supported (no auto detection) +# --enable-ecc supported +# --enable-gost supported # --enable-non-paged-memory (TODO) -# --enable-visibility (enforced by DLLS) +# --enable-visibility (enforced by DLLs) # --with-crypto-backend supported -# --with-openssl supported (TODO build check) -# --with-botan supported (TODO build check) +# --with-openssl supported (finish build check) +# --with-botan supported (finish build check) # --with-migrate (useless as SoftHSMv1 is not supported) # --with-objectstore-backend-db (TODO) # --with-sqlite3 (TODO) diff --git a/win32/cryptotest/cryptotest.vcxproj.in b/win32/cryptotest/cryptotest.vcxproj.in index e31adc926..76e7d1612 100644 --- a/win32/cryptotest/cryptotest.vcxproj.in +++ b/win32/cryptotest/cryptotest.vcxproj.in @@ -56,7 +56,7 @@ Console true ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@DEBUGLIBPATH@;%(AdditionalLibraryDirectories) - convarch.lib;cppunitd.lib;@LIBNAME@;%(AdditionalDependencies) + convarch.lib;cppunitd.lib;@LIBNAME@;@EXTRALIBS@%(AdditionalDependencies) @@ -76,7 +76,7 @@ true true ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@LIBPATH@;%(AdditionalLibraryDirectories) - convarch.lib;cppunit.lib;@LIBNAME@;%(AdditionalDependencies) + convarch.lib;cppunit.lib;@LIBNAME@;@EXTRALIBS@%(AdditionalDependencies) diff --git a/win32/datamgrtest/datamgrtest.vcxproj.in b/win32/datamgrtest/datamgrtest.vcxproj.in index a0ab8f4df..01a66cb52 100644 --- a/win32/datamgrtest/datamgrtest.vcxproj.in +++ b/win32/datamgrtest/datamgrtest.vcxproj.in @@ -56,7 +56,7 @@ Console true ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@DEBUGLIBPATH@;%(AdditionalLibraryDirectories) - convarch.lib;cppunitd.lib;@LIBNAME@;%(AdditionalDependencies) + convarch.lib;cppunitd.lib;@LIBNAME@;@EXTRALIBS@%(AdditionalDependencies) @@ -76,7 +76,7 @@ true true ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@LIBPATH@;%(AdditionalLibraryDirectories) - convarch.lib;cppunit.lib;@LIBNAME@;%(AdditionalDependencies) + convarch.lib;cppunit.lib;@LIBNAME@;@EXTRALIBS@%(AdditionalDependencies) diff --git a/win32/objstoretest/objstoretest.vcxproj.in b/win32/objstoretest/objstoretest.vcxproj.in index 61dad04fe..8ff6ae0fb 100644 --- a/win32/objstoretest/objstoretest.vcxproj.in +++ b/win32/objstoretest/objstoretest.vcxproj.in @@ -56,7 +56,7 @@ Console true ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@DEBUGLIBPATH@;%(AdditionalLibraryDirectories) - convarch.lib;cppunitd.lib;@LIBNAME@;%(AdditionalDependencies) + convarch.lib;cppunitd.lib;@LIBNAME@;@EXTRALIBS@%(AdditionalDependencies) @@ -76,7 +76,7 @@ true true ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@LIBPATH@;%(AdditionalLibraryDirectories) - convarch.lib;cppunit.lib;@LIBNAME@;%(AdditionalDependencies) + convarch.lib;cppunit.lib;@LIBNAME@;@EXTRALIBS@%(AdditionalDependencies) diff --git a/win32/p11test/p11test.vcxproj.in b/win32/p11test/p11test.vcxproj.in index 7c45c2d15..a2e0e26c8 100644 --- a/win32/p11test/p11test.vcxproj.in +++ b/win32/p11test/p11test.vcxproj.in @@ -56,7 +56,7 @@ Console true ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@DEBUGLIBPATH@;%(AdditionalLibraryDirectories) - convarch.lib;cppunitd.lib;@LIBNAME@;%(AdditionalDependencies) + convarch.lib;cppunitd.lib;@LIBNAME@;@EXTRALIBS@%(AdditionalDependencies) copy ..\..\src\lib\test\softhsm2.conf.win32 ..\..\softhsm2.conf @@ -85,7 +85,7 @@ copy ..\..\src\lib\test\tokens\dummy.in ..\..\win32\p11test\tokens\dummytrue true ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@LIBPATH@;%(AdditionalLibraryDirectories) - convarch.lib;cppunit.lib;@LIBNAME@;%(AdditionalDependencies) + convarch.lib;cppunit.lib;@LIBNAME@;@EXTRALIBS@%(AdditionalDependencies) copy ..\..\src\lib\test\softhsm2.conf.win32 ..\..\softhsm2.conf diff --git a/win32/slotmgrtest/slotmgrtest.vcxproj.in b/win32/slotmgrtest/slotmgrtest.vcxproj.in index 6de3758bb..e05f4b94b 100644 --- a/win32/slotmgrtest/slotmgrtest.vcxproj.in +++ b/win32/slotmgrtest/slotmgrtest.vcxproj.in @@ -56,7 +56,7 @@ Console true ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@DEBUGLIBPATH@;%(AdditionalLibraryDirectories) - convarch.lib;cppunitd.lib;@LIBNAME@;%(AdditionalDependencies) + convarch.lib;cppunitd.lib;@LIBNAME@;@EXTRALIBS@%(AdditionalDependencies) @@ -76,7 +76,7 @@ true true ..\@PLATFORMDIR@$(Configuration);@CULIBPATH@;@LIBPATH@;%(AdditionalLibraryDirectories) - convarch.lib;cppunit.lib;@LIBNAME@;%(AdditionalDependencies) + convarch.lib;cppunit.lib;@LIBNAME@;@EXTRALIBS@%(AdditionalDependencies) diff --git a/win32/softhsm2/softhsm2.vcxproj.in b/win32/softhsm2/softhsm2.vcxproj.in index cb379972a..f96614404 100644 --- a/win32/softhsm2/softhsm2.vcxproj.in +++ b/win32/softhsm2/softhsm2.vcxproj.in @@ -56,7 +56,7 @@ Windows true ..\@PLATFORMDIR@$(Configuration);@DEBUGLIBPATH@;%(AdditionalLibraryDirectories) - convarch.lib;@LIBNAME@;%(AdditionalDependencies) + convarch.lib;@LIBNAME@;@EXTRALIBS@%(AdditionalDependencies) @@ -76,7 +76,7 @@ true true ..\@PLATFORMDIR@$(Configuration);@LIBPATH@;%(AdditionalLibraryDirectories) - convarch.lib;@LIBNAME@;%(AdditionalDependencies) + convarch.lib;@LIBNAME@;@EXTRALIBS@%(AdditionalDependencies) From 834bff7f73f4b49e15f15961f451f7afc9b481ca Mon Sep 17 00:00:00 2001 From: Francis Dupont Date: Sun, 2 Nov 2014 21:46:08 +0100 Subject: [PATCH 4/5] cleanup (or not with keep) test files --- win32/Configure.pl | 63 ++++++++++++++++++++++++++++---- win32/Configure.py | 91 +++++++++++++++++++++++++++++++++++++--------- 2 files changed, 128 insertions(+), 26 deletions(-) diff --git a/win32/Configure.pl b/win32/Configure.pl index b1b0cb1f2..c53f098b2 100644 --- a/win32/Configure.pl +++ b/win32/Configure.pl @@ -29,6 +29,14 @@ "util\\util.vcxproj.filters", "util\\util.vcxproj"); +# test files + +my @testlist = ("botan", + "ecc", + "gost", + "ossl", + "osslv"); + # variables to expand my %varvals; @@ -63,7 +71,9 @@ my @enablelist = ("64bit", "debug", "ecc", - "gost"); + "gost", + "keep", + "verbose"); # with-xxx/without-xxx arguments @@ -72,9 +82,9 @@ "crypto-backend", "openssl"); -# general arguments +# general commands -my @optionlist = ("help", "verbose", "clean"); +my @commandlist = ("help", "clean"); # usage @@ -87,12 +97,13 @@ my @help = ( "'perl Configure.pl' configures SoftHSMv2 build files.\n\n", @usage, -"\nGeneral Options and Commands:\n", -" verbose (options) print messages\n", -" help (command) print this help\n", -" clean (command) clean up generated files\n", +"\nGeneral Commands:\n", +" help print this help\n", +" clean clean up generated files\n", " (command) print a summary of the configuration\n", "\nOptional Features:\n", +" enable-verbose print messages [default=no]\n", +" enable-keep keep test files after configuration [default=no]\n", " enable-64bit enable 64-bit compiling [default=no]\n", " enable-debug enable build of Debug config [default=yes]\n", " enable-ecc enable support for ECC [default=yes]\n", @@ -106,12 +117,13 @@ # variables for parsing -my $configargs; my $verbose = 0; +my $configargs; my $want_help = "no"; my $want_clean = "no"; my $want_unknown = "no"; my $unknown_value; +my $enable_keep = "no"; my $enable_debug = "yes"; my $enable_ecc = "yes"; my $enable_gost = "yes"; @@ -138,6 +150,9 @@ foreach (@ARGV) { if (/^verbose$/i) { $verbose = 1; + } elsif (/^keep$/i) { + appargs($_); + $enable_keep = "yes"; } elsif (/^help$/i) { $want_help = "yes"; } elsif (/^disable-(.*)$/i) { @@ -198,6 +213,14 @@ sub myenable { if ($val =~ /^no$/i) { $enable_gost = "no"; } + } elsif ($key =~ /^keep$/i) { + if ($val =~ /^yes$/i) { + $enable_keep = "yes"; + } + } elsif ($key =~ /^verbose$/i) { + if ($val =~ /^yes$/i) { + $verbose = 1; + } } else { $want_unknown = "yes"; if ($val eq "no") { @@ -264,8 +287,21 @@ sub mywith { # clean +sub cleantest { + my $file; + foreach $file (@testlist) { + unlink("test" . $file . ".c"); + unlink("test" . $file . ".cpp"); + unlink("test" . $file . ".obj"); + unlink("test" . $file . ".exe"); + } + unlink("botan.dll"); + unlink("libeay32.dll"); +} + if ($want_clean eq "yes") { my $file; + cleantest(); foreach $file (@filelist) { unlink($file); } @@ -316,6 +352,11 @@ sub mywith { } else { print "gost: disabled\n"; } + if ($enable_keep eq "yes") { + print "keep: enabled\n"; + } else { + print "keep: disabled\n"; + } print "crypto-backend: $crypto_backend\n"; if ($crypto_backend eq "botan") { print "botan-path: $botan_path\n"; @@ -821,6 +862,12 @@ sub setupfile { setupfile($file); } +# clean test files + +if ($enable_keep ne "yes") { + cleantest(); +} + print "Configured.\n"; exit 0; diff --git a/win32/Configure.py b/win32/Configure.py index cf0c99e30..aabb2fd24 100644 --- a/win32/Configure.py +++ b/win32/Configure.py @@ -30,6 +30,13 @@ "util\\util.vcxproj.filters", "util\\util.vcxproj"] +# test files +testlist = ["botan", + "ecc", + "gost", + "ossl", + "osslv"] + # variables to expand varvals = {} @@ -64,7 +71,9 @@ enablelist = ["64bit", "debug", "ecc", - "gost"] + "gost", + "keep", + "verbose"] # with-xxx/without-xxx arguments @@ -73,28 +82,28 @@ "crypto-backend", "openssl"] -# general arguments +# general commands -optionlist = ["help", "verbose", "clean"] +commandlist = ["help", "clean"] # usage -usage = ["Usage: perl Configure.pl help", - " perl Configure.pl options*", - " perl Configure.pl clean"] +usage = ["Usage: python Configure.pl help", + " python Configure.pl options*", + " python Configure.pl clean"] # help -myhelp = [\ -"'perl Configure.pl' configures SoftHSMv2 build files.\n", -usage, -"\nGeneral Options and Commands:", -" verbose (options) print messages", -" help (command) print this help", -" clean (command) clean up generated files", -" (command) print a summary of the configuration", +myhelp = ["'python Configure.pl' 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-64bit enable 64-bit compiling [default=no]\n", +" enable-verbose print messages [default=no]", +" enable-keep keep test files after configuration [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]", @@ -107,12 +116,13 @@ # variables for parsing +verbose = False configargs = None -verbose = 0 want_help = False want_clean = False want_unknown = False unknown_value = None +enable_keep = False enable_debug = True enable_ecc = True enable_gost = True @@ -128,6 +138,7 @@ def parseargs(args): """parse arguments""" global verbose + global enable_keep global want_help global want_clean global want_unknown @@ -136,7 +147,10 @@ def parseargs(args): global debug_openssl_path for arg in args: if arg.lower() == "verbose": - verbose = 1 + verbose = True + continue + if arg.lower() == "keep": + enable_keep = True continue if arg.lower() == "help": want_help = True @@ -200,6 +214,8 @@ def myenable(key, val): global enable_debug global enable_ecc global enable_gost + global enable_keep + global verbose global want_unknown global unknown_value if key.lower() == "64bit": @@ -218,6 +234,14 @@ def myenable(key, val): if not val: enable_gost = 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 @@ -278,10 +302,32 @@ def dohelp(): 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") + def doclean(): """clean""" + docleantest() for filename in filelist: - os.unlink(filename) + if os.path.isfile(filename): + os.unlink(filename) sys.exit(0) def dounknown(): @@ -746,6 +792,10 @@ def main(args): print "gost: enabled" else: print "gost: disabled" + if enable_keep: + print "keep: enabled" + else: + print "keep: disabled" print "crypto-backend: " + crypto_backend if crypto_backend == "botan": print "botan-path: " + botan_path @@ -778,6 +828,11 @@ def main(args): for filename in filelist: setupfile(filename) + + # clean test file + if not enable_keep: + cleantest() + print "Configured." sys.exit(0) From 59f00ad8c989eebf372043feec5479e32699c48d Mon Sep 17 00:00:00 2001 From: Francis Dupont Date: Fri, 7 Nov 2014 12:28:48 +0100 Subject: [PATCH 5/5] finished WIN32 build stuff --- WIN32-NOTES.md | 37 +++++- m4/acx_openssl_rfc5649.m4 | 2 +- win32/Configure.pl | 249 ++++++++++++++++++++++++++++++-------- win32/Configure.py | 237 +++++++++++++++++++++++++++++------- win32/config.h.in | 4 + 5 files changed, 432 insertions(+), 97 deletions(-) diff --git a/WIN32-NOTES.md b/WIN32-NOTES.md index e2e05baf6..baccc6fdb 100644 --- a/WIN32-NOTES.md +++ b/WIN32-NOTES.md @@ -13,7 +13,41 @@ other binaries. Configure scripts in win32, same syntax than autotools but without --, e.g., 'perl Configure.pl with-crypto-backend=botan' (or if you prefer -Python 2 'python Configure.py with-crypto-backend=botan'). +Python 2 'python Configure.py with-crypto-backend=botan') in a +Visual Studio Command Prompt windows (which is a command.exe windows +where the script \VC\vcvarsall.bat was invoked). + +After you can open the softhsm2.sln file with the Visual Studio GUI +or invoke MSBuild for instance with: +msbuild /t:Build /p:Configuration=Release softhsm2.sln + +## Botan build + +python configure.py --cpu=x86_32 --cc=msvc --link-mode=copy --prefix=... + options: --cpu=x86_64 --enable-debug --disable-shared + GNU MP: --with-gnump could be fine but GNU MP is not available on WIN32 +nmake /f Makefile +nmake /f Makefile check +.\check --validate +name /f Makefile install + +## OpenSSL build + +perl Configure --prefix=... enable-static-engine VC-WIN32 + options: VC-WIN64A debug-VS-WIN* +ms\do_ms (or ms\do_win64a) +nmake /f ms\ntdll.mak (or ms\nt.make) +nmake /f ms\ntdll.mak test +nmake /f ms\ntdll.mak install + +## CppUnit build + +Get a recent CppUnit distrib, for instance the 1.13.2 version. +Open with the Visual Studio GUI the src\CppUnitLibraries2010.sln solution file. +The interesting project is the cppunit one which builds the needed +cppunit.lib and cppunitd.lib static libraries. Note there is no installation +tool so you have to copy include and library files at the right place +yourselves. ## Project List @@ -29,6 +63,7 @@ Python 2 'python Configure.py with-crypto-backend=botan'). - fopen - getenv - gmtime +_ _open - _snprintf (or snprintf on Visual Studio 14) - sprintf - sscanf diff --git a/m4/acx_openssl_rfc5649.m4 b/m4/acx_openssl_rfc5649.m4 index 0bee8d50a..22dbd0dcc 100644 --- a/m4/acx_openssl_rfc5649.m4 +++ b/m4/acx_openssl_rfc5649.m4 @@ -26,7 +26,7 @@ AC_DEFUN([ACX_OPENSSL_EVPAESWRAP],[ AC_MSG_RESULT([RFC 3394 is not supported]) ]) - AC_MSG_CHECKING(OpenSSL EVP interface for AES key wrapping) + AC_MSG_CHECKING(OpenSSL EVP interface for AES key wrapping with pad) AC_LINK_IFELSE([ AC_LANG_SOURCE([[ #include diff --git a/win32/Configure.pl b/win32/Configure.pl index c53f098b2..370ba3b36 100644 --- a/win32/Configure.pl +++ b/win32/Configure.pl @@ -33,9 +33,12 @@ my @testlist = ("botan", "ecc", + "gnump", "gost", "ossl", - "osslv"); + "osslv", + "rfc3394", + "rfc5649"); # variables to expand @@ -61,6 +64,7 @@ my @condnames = ("BOTAN", "ECC", "GOST", + "NONPAGE", "OPENSSL", "RFC3394", "RFC5649", @@ -73,6 +77,7 @@ "ecc", "gost", "keep", + "non-paged-memory", "verbose"); # with-xxx/without-xxx arguments @@ -80,11 +85,13 @@ my @withlist = ("botan", "cppunit", "crypto-backend", + "debug-botan", + "debug-openssl", "openssl"); # general commands -my @commandlist = ("help", "clean"); +my @commandlist = ("help", "clean"); # verbose, keep # usage @@ -98,22 +105,24 @@ "'perl Configure.pl' configures SoftHSMv2 build files.\n\n", @usage, "\nGeneral Commands:\n", -" help print this help\n", -" clean clean up generated files\n", -" (command) print a summary of the configuration\n", +" help print this help\n", +" clean clean up generated files\n", +" print a summary of the configuration\n", "\nOptional Features:\n", -" enable-verbose print messages [default=no]\n", -" enable-keep keep test files after configuration [default=no]\n", -" enable-64bit enable 64-bit compiling [default=no]\n", -" enable-debug enable build of Debug config [default=yes]\n", -" enable-ecc enable support for ECC [default=yes]\n", -" enable-gost enable support for GOST [default=yes]\n", -"\nRequired Package:\n", -" with-crypto-backend select the crypto backend [botan|openssl]\n", +" enable-verbose print messages [default=no]\n", +" enable-keep keep test files after config [default=no]\n", +" enable-64bit enable 64-bit compiling [default=no]\n", +" enable-debug enable build of Debug config [default=yes]\n", +" enable-ecc enable support for ECC [default=yes]\n", +" enable-gost enable support for GOST [default=yes]\n", +" enable-non-paged-memory enable non-paged memory [default=yes]\n", "\nOptional Packages:\n", -" with-botan=PATH speficy prefix of path of Botan\n", -" with-openssl=PATH speficy prefix of path of OpenSSL\n", -" with-cppunit=PATH specify prefix of path of CppUnit\n"); +" with-crypto-backend select the crypto backend [openssl|botan]\n", +" with-botan=PATH speficy prefix of path of Botan (Release)\n", +" with-debug-botan=PATH speficy prefix of path of Botan (Debug)\n", +" with-openssl=PATH speficy prefix of path of OpenSSL (Release)\n", +" with-debug-openssl=PATH speficy prefix of path of OpenSSL (Debug)\n", +" with-cppunit=PATH specify prefix of path of CppUnit\n"); # variables for parsing @@ -127,12 +136,13 @@ my $enable_debug = "yes"; my $enable_ecc = "yes"; my $enable_gost = "yes"; +my $enable_non_paged = "yes"; my $platform = "win32"; -my $crypto_backend = "none"; +my $crypto_backend = "openssl"; my $botan_path = "..\\..\\btn"; -my $debug_botan_path = "..\\..\\btn_d"; +my $debug_botan_path; my $openssl_path = "..\\..\\ssl"; -my $debug_openssl_path = "..\\..\\ssl_d"; +my $debug_openssl_path; my $want_tests = "yes"; my $cppunit_path = "..\\..\\cu"; @@ -213,6 +223,10 @@ sub myenable { if ($val =~ /^no$/i) { $enable_gost = "no"; } + } elsif ($key =~ /^non-paged-memory$/i) { + if ($val =~ /^no$/i) { + $enable_non_paged = "no"; + } } elsif ($key =~ /^keep$/i) { if ($val =~ /^yes$/i) { $enable_keep = "yes"; @@ -238,10 +252,10 @@ sub mywith { my $val = $_[1]; if ($key =~ /^crypto-backend$/i) { - if ($val =~ /^botan$/i) { - $crypto_backend = "botan"; - } elsif($val =~ /^openssl$/i) { + if ($val =~ /^openssl$/i) { $crypto_backend = "openssl"; + } elsif ($val =~ /^botan$/i) { + $crypto_backend = "botan"; } else { $want_unknown = "yes"; $unknown_value = "with-crypto-backend=" . $val; @@ -253,6 +267,13 @@ sub mywith { } elsif ($val !~ /^yes$/i) { $botan_path = $val; } + } elsif ($key =~ /^debug-botan$/i) { + if ($val =~ /^no$/i) { + $want_unknown = "yes"; + $unknown_value = "without-debug-botan doesn't make sense\n"; + } elsif ($val !~ /^yes$/i) { + $debug_botan_path = $val; + } } elsif ($key =~ /^openssl$/i) { if ($val =~ /^no$/i) { $want_unknown = "yes"; @@ -260,6 +281,13 @@ sub mywith { } elsif ($val !~ /^yes$/i) { $openssl_path = $val; } + } elsif ($key =~ /^debug-openssl$/i) { + if ($val =~ /^no$/i) { + $want_unknown = "yes"; + $unknown_value = "without-debug-openssl doesn't make sense\n"; + } elsif ($val !~ /^yes$/i) { + $debug_openssl_path = $val; + } } elsif ($key =~ /^cppunit$/i) { if ($val =~ /^no$/i) { $want_tests = "no"; @@ -315,23 +343,25 @@ sub cleantest { exit 1; } -# required - -if ($crypto_backend eq "none") { - print STDERR "with-crypto-backend=[botan|openssl] is REQUIRED\n"; - exit 1; -} - # debug if ($enable_debug eq "yes") { - $debug_botan_path = $botan_path . "_d"; - $debug_openssl_path = $openssl_path . "_d"; + if (!defined($debug_botan_path)) { + $debug_botan_path = $botan_path . "_d"; + } + if (!defined($debug_openssl_path)) { + $debug_openssl_path = $openssl_path . "_d"; + } } # verbose if ($verbose) { + if ($enable_keep eq "yes") { + print "keep: enabled\n"; + } else { + print "keep: disabled\n"; + } if ($platform eq "x64") { print "64bit: enabled\n"; } else { @@ -352,10 +382,10 @@ sub cleantest { } else { print "gost: disabled\n"; } - if ($enable_keep eq "yes") { - print "keep: enabled\n"; + if ($enable_non_paged eq "yes") { + print "non-paged-memory: enabled\n"; } else { - print "keep: disabled\n"; + print "non-paged-memory: disabled\n"; } print "crypto-backend: $crypto_backend\n"; if ($crypto_backend eq "botan") { @@ -424,11 +454,12 @@ sub cleantest { } $varvals{"DEBUGLIBPATH"} = $debug_botan_path; } else { - $debug_botan_path = $botan_path; $varvals{"DEBUGDLLPATH"} = $varvals{"DLLPATH"}; $varvals{"DEBUGINCPATH"} = $varvals{"INCLUDEPATH"}; $varvals{"DEBUGLIBPATH"} = $varvals{"LIBPATH"}; } + + # Botan version if ($verbose) { print "checking Botan version\n"; } @@ -476,9 +507,11 @@ sub cleantest { } else { die "can't compile Botan test: $compret\n"; } + + # Botan ECC support if ($enable_ecc eq "yes") { if ($verbose) { - print "checking ECC support\n"; + print "checking Botan ECC support\n"; } open F, ">testecc.cpp" || die $!; print F << 'EOF'; @@ -510,9 +543,11 @@ sub cleantest { die "can't compile ECC test: $compret\n"; } } + + # Botan GOST support if ($enable_gost eq "yes") { if ($verbose) { - print "checking GOST support\n"; + print "checking Botan GOST support\n"; } open F, ">testgost.cpp" || die $!; print F << 'EOF'; @@ -544,10 +579,67 @@ sub cleantest { die "can't compile GOST test: $compret\n"; } } + + # no check for Botan RFC3394 support $condvals{"RFC3394"} = 1; - # TODO: Botan AES key wrap with pad - # TODO: Botan GNU MP support + + # Botan RFC5649 support + if ($verbose) { + print "checking Botan RFC5649 support\n"; + } + open F, ">testrfc5649.cpp" || die $!; + print F << 'EOF'; +#include +#include +int main() { + using namespace Botan; + SecureVector key(10); + SymmetricKey kek("AABB"); + Algorithm_Factory& af = global_state().algorithm_factory(); + SecureVector x = rfc5649_keywrap(key, kek, af); + return 1; +} +EOF + close F; + `cl /nologo /MD /I "$inc" testrfc5649.cpp "$lib"$system_libs`; + if (grep { -f and -x } ".\\testrfc5649.exe") { + if ($verbose) { + print "Found AES key wrap with pad\n"; + } + $condvals{"RFC5649"} = 1; + } else { + if ($verbose) { + print "can't compile Botan AES key wrap with pad\n"; + } + } + + # Botan GNU MP support + if ($verbose) { + print "checking Botan GNU MP support\n"; + } + open F, ">testgnump.cpp" || die $!; + print F << 'EOF'; +#include +int main() { +#ifndef BOTAN_HAS_ENGINE_GNU_MP +#error "No GNU MP support"; +#endif +} +EOF + close F; + `cl /nologo /MD /I "$inc" testgnump.cpp "$lib"$system_libs`; + if (grep { -f and -x } ".\\testgnump.exe") { + if ($verbose) { + print "Botan GNU MP is supported\n"; + } + } else { + if ($verbose) { + print "Botan GNU MP is not supported\n"; + } + } + } else { + $condvals{"OPENSSL"} = 1; $varvals{"LIBNAME"} = "libeay32.lib"; $varvals{"EXTRALIBS"} = "crypt32.lib;"; @@ -582,11 +674,12 @@ sub cleantest { $varvals{"DEBUGLIBPATH"} = $debug_openssl_lib; } else { - $debug_openssl_path = $openssl_path; $varvals{"DEBUGDLLPATH"} = $varvals{"DLLPATH"}; $varvals{"DEBUGINCPATH"} = $varvals{"INCLUDEPATH"}; $varvals{"DEBUGLIBPATH"} = $varvals{"LIBPATH"}; } + + # OpenSSL support if ($verbose) { print "checking OpenSSL\n"; } @@ -616,6 +709,8 @@ sub cleantest { } else { die "can't compile OpenSSL test: $compret\n"; } + + # OpenSSL version if ($verbose) { print "checking OpenSSL version\n"; } @@ -644,9 +739,11 @@ sub cleantest { } else { die "can't compile OpenSSL version test: $compret\n"; } + + # OpenSSL ECC support if ($enable_ecc eq "yes") { if ($verbose) { - print "checking ECC support\n"; + print "checking OpenSSL ECC support\n"; } open F, ">testecc.c" || die $!; print F << 'EOF'; @@ -672,9 +769,11 @@ sub cleantest { die "can't compile ECC test: $compret\n"; } } + + # OpenSSL GOST support if ($enable_gost eq "yes") { if ($verbose) { - print "checking GOST support\n"; + print "checking OpenSSL GOST support\n"; } open F, ">testgost.c" || die $!; print F << 'EOF'; @@ -704,8 +803,56 @@ sub cleantest { die "can't compile GOST test: $compret\n"; } } - # TODO: OpenSSL AES key wrap (aka RFC 3394) - # TODO: OpenSSL AES key wrap with pad (aka RFC 5649) + + # OpenSSL EVP interface for AES key wrapping (aka RFC 3394) + if ($verbose) { + print "checking OpenSSL EVP interface for AES key wrapping\n"; + } + open F, ">testrfc3394.c" || die $!; + print F << 'EOF'; +#include +int main() { + EVP_aes_128_wrap(); + return 1; +} +EOF + close F; + `cl /nologo /MD /I "$inc" testrfc3394.c "$lib"$system_libs`; + if (grep { -f and -x } ".\\testrfc3394.exe") { + if ($verbose) { + print "RFC 3394 is supported\n"; + } + $condvals{"RFC3394"} = 1; + } else { + if ($verbose) { + print "can't compile OpenSSL RFC 3394\n"; + } + } + + # 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\n"; + } + open F, ">testrfc5649.c" || die $!; + print F << 'EOF'; +#include +int main() { + EVP_aes_128_wrap_pad(); + return 1; +} +EOF + close F; + `cl /nologo /MD /I "$inc" testrfc5649.c "$lib"$system_libs`; + if (grep { -f and -x } ".\\testrfc5649.exe") { + if ($verbose) { + print "RFC 5649 is supported\n"; + } + $condvals{"RFC5649"} = 1; + } else { + if ($verbose) { + print "can't compile OpenSSL RFC 5649\n"; + } + } } # configure CppUnit @@ -733,6 +880,12 @@ sub cleantest { $varvals{"CULIBPATH"} = $cppunit_lib; } +# misc + +if ($enable_non_paged eq "yes") { + $condvals{"NONPAGE"} = 1; +} + # escape spaces sub kw { @@ -876,11 +1029,11 @@ sub setupfile { # --enable-64bit supported # --enable-ecc supported # --enable-gost supported -# --enable-non-paged-memory (TODO) +# --enable-non-paged-memory supported # --enable-visibility (enforced by DLLs) # --with-crypto-backend supported -# --with-openssl supported (finish build check) -# --with-botan supported (finish build check) +# --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 (TODO) +# --with-sqlite3 (useless until objectstore backend can be chosen) diff --git a/win32/Configure.py b/win32/Configure.py index aabb2fd24..d7997e86f 100644 --- a/win32/Configure.py +++ b/win32/Configure.py @@ -33,9 +33,12 @@ # test files testlist = ["botan", "ecc", + "gnump", "gost", "ossl", - "osslv"] + "osslv", + "rfc3394", + "rfc5649"] # variables to expand @@ -61,6 +64,7 @@ condnames = ["BOTAN", "ECC", "GOST", + "NONPAGE", "OPENSSL", "RFC3394", "RFC5649", @@ -73,6 +77,7 @@ "ecc", "gost", "keep", + "non-paged-memory", "verbose"] # with-xxx/without-xxx arguments @@ -80,11 +85,13 @@ withlist = ["botan", "cppunit", "crypto-backend", + "debug-botan", + "debug-openssl", "openssl"] # general commands -commandlist = ["help", "clean"] +commandlist = ["help", "clean"] # verbose, keep # usage @@ -97,22 +104,24 @@ myhelp = ["'python Configure.pl' configures SoftHSMv2 build files.\n"] +\ usage + [\ "\nGeneral Commands:", -" help print this help", -" clean clean up generated files", -" print a summary of the configuration", +" 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 configuration [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]", -"\nRequired Package:", -" with-crypto-backend select the crypto backend [botan|openssl]", +" 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-non-paged-memory enable non-paged memory [default=yes]", "\nOptional Packages:", -" with-botan=PATH speficy prefix of path of Botan", -" with-openssl=PATH speficy prefix of path of OpenSSL", -" with-cppunit=PATH specify prefix of path of CppUnit"] +" 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"] # variables for parsing @@ -126,12 +135,13 @@ enable_debug = True enable_ecc = True enable_gost = True +enable_non_paged = True platform = 32 -crypto_backend = None +crypto_backend = "openssl" botan_path = "..\\..\\btn" -debug_botan_path = "..\\..\\btn_d" +debug_botan_path = None openssl_path = "..\\..\\ssl" -debug_openssl_path = "..\\..\\ssl_d" +debug_openssl_path = None want_tests = True cppunit_path = "..\\..\\cu" @@ -189,10 +199,13 @@ def parseargs(args): want_unknown = True unknown_value = arg break + # debug if enable_debug: - debug_botan_path = botan_path + "_d" - debug_openssl_path = openssl_path + "_d" + 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""" @@ -214,6 +227,7 @@ def myenable(key, val): global enable_debug global enable_ecc global enable_gost + global enable_non_paged global enable_keep global verbose global want_unknown @@ -234,6 +248,10 @@ def myenable(key, val): if not val: enable_gost = False return + if key.lower() == "non-paged-memory": + if not val: + enable_non_paged = False + return if key.lower() == "keep": if val: enable_keep = True @@ -252,18 +270,20 @@ 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 if key.lower() == "crypto-backend": - if val and (detail.lower() == "botan"): - crypto_backend = "botan" - return 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 @@ -275,6 +295,14 @@ def mywith(key, val, detail=None): 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 @@ -283,6 +311,14 @@ def mywith(key, val, detail=None): 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 @@ -387,10 +423,11 @@ def doconfig(): sys.exit(1) varvals["DEBUGLIBPATH"] = debug_botan_path else: - debug_botan_path = botan_path varvals["DEBUGDLLPATH"] = varvals["DLLPATH"] varvals["DEBUGINCPATH"] = varvals["INCLUDEPATH"] varvals["DEBUGLIBPATH"] = varvals["LIBPATH"] + + # Botan version if verbose: print "checking Botan version" system_libs = [] @@ -438,9 +475,11 @@ def doconfig(): if ret != 0: print >> sys.stderr, "Botan test failed" sys.exit(1) + + # Botan ECC support if enable_ecc: if verbose: - print "checking ECC support" + print "checking Botan ECC support" testfile = open("testecc.cpp", "w") print >>testfile, '\ #include \n\ @@ -470,9 +509,11 @@ def doconfig(): print >> sys.stderr, \ "can't find P256: upgrade to Botan >= 1.10.6" sys.exit(1) + + # Botan GOST support if enable_gost: if verbose: - print "checking GOST support" + print "checking Botan GOST support" testfile = open("testgost.cpp", "w") print >>testfile, '\ #include \n\ @@ -502,10 +543,61 @@ def doconfig(): print >> sys.stderr, \ "can't find GOST: upgrade to Botan >= 1.10.6" sys.exit(1) + + # no check for Botan RFC3394 support condvals["RFC3394"] = True - # TODO: Botan AES key wrap with pad - # TODO: Botan GNU MP support + + # Botan RFC5649 support + if verbose: + print "checking Botan RFC5649 support" + testfile = open("testrfc5649.cpp", "w") + print >>testfile, '\ +#include \n\ +#include \n\ +int main() {\n\ + using namespace Botan;\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\ + return 1;\n\ +}' + testfile.close() + command = ["cl", "/nologo", "/MD", "/I", inc, "testrfc5649.cpp", lib] + command.extend(system_libs) + subprocess.call(command) + if not 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 verbose: + print "checking Botan GNU MP support" + testfile = open("testgnump.cpp", "w") + print >>testfile, '\ +#include \n\ +int main() {\n\ +#ifndef BOTAN_HAS_ENGINE_GNU_MP\n\ +#error "No GNU MP support";\n\ +#endif\n\ +}' + testfile.close() + command = ["cl", "/nologo", "/MD", "/I", inc, "testgnump.cpp", lib] + command.extend(system_libs) + subprocess.call(command) + if not os.path.exists(".\\testgnump.exe"): + if verbose: + print "Botan GNU MP is supported" + else: + if verbose: + print "Botan GNU MP is not supported" + else: + condvals["OPENSSL"] = True varvals["LIBNAME"] = "libeay32.lib" varvals["EXTRALIBS"] = "crypt32.lib;" @@ -539,10 +631,11 @@ def doconfig(): sys.exit(1) varvals["DEBUGLIBPATH"] = debug_openssl_lib else: - debug_openssl_path = openssl_path varvals["DEBUGDLLPATH"] = varvals["DLLPATH"] varvals["DEBUGINCPATH"] = varvals["INCLUDEPATH"] varvals["DEBUGLIBPATH"] = varvals["LIBPATH"] + + # OpenSSL support if verbose: print "checking OpenSSL" system_libs = [] @@ -569,6 +662,8 @@ def doconfig(): if subprocess.call(".\\testossl.exe") != 0: print >> sys.stderr, "OpenSSL test failed" sys.exit(1) + + # OpenSSL version if verbose: print "checking OpenSSL version" testfile = open("testosslv.c", "w") @@ -596,9 +691,11 @@ def doconfig(): print >> sys.stderr, \ "OpenSLL version too old (1.0.0 or later required)" sys.exit(1) + + # OpenSSL ECC support if enable_ecc: if verbose: - print "checking ECC support" + print "checking OpenSSL ECC support" testfile = open("testecc.c", "w") print >>testfile, '\ #include \n\ @@ -621,9 +718,11 @@ def doconfig(): if subprocess.call(".\\testecc.exe") != 0: print >> sys.stderr, "can't find P256 or P384: no ECC support" sys.exit(1) + + # OpenSSL GOST support if enable_gost: if verbose: - print "checking GOST support" + print "checking OpenSSL GOST support" testfile = open("testgost.c", "w") print >>testfile, '\ #include \n\ @@ -650,9 +749,51 @@ def doconfig(): if subprocess.call(".\\testgost.exe") != 0: print >> sys.stderr, "can't find GOST: no GOST support" sys.exit(1) - # TODO: OpenSSL AES key wrap (aka RFC 3394) - # TODO: OpenSSL AES key wrap with pad (aka RFC 5649) + # 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 >>testfile, '\ +#include \n\ +int main() {\n\ + EVP_aes_128_wrap();\n\ + return 1;\n\ +}' + 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 >>testfile, '\ +#include \n\ +int main() {\n\ + EVP_aes_128_wrap_pad();\n\ + return 1;\n\ +}' + 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" + # configure CppUnit if want_tests: condvals["TESTS"] = True @@ -674,6 +815,10 @@ def doconfig(): 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): @@ -767,15 +912,13 @@ def main(args): if want_unknown: dounknown() - # required - - if crypto_backend is None: - print >> sys.stderr, "with-crypto-backend=[botan|openssl] is REQUIRED" - sys.exit(1) - # status before config if verbose: + if enable_keep: + print "keep: enabled" + else: + print "keep: disabled" if platform == 64: print "64bit: enabled" else: @@ -792,10 +935,10 @@ def main(args): print "gost: enabled" else: print "gost: disabled" - if enable_keep: - print "keep: enabled" + if enable_non_paged: + print "non-paged-memory: enabled" else: - print "keep: disabled" + print "non-paged-memory: disabled" print "crypto-backend: " + crypto_backend if crypto_backend == "botan": print "botan-path: " + botan_path @@ -842,11 +985,11 @@ def main(args): # --enable-64bit supported # --enable-ecc supported # --enable-gost supported -# --enable-non-paged-memory (TODO) +# --enable-non-paged-memory supported # --enable-visibility (enforced by DLLs) # --with-crypto-backend supported -# --with-openssl supported (finish build check) -# --with-botan supported (finish build check) +# --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 (TODO) +# --with-sqlite3 (useless until objectstore backend can be chosen) diff --git a/win32/config.h.in b/win32/config.h.in index 6afb6c568..97cfb45c9 100644 --- a/win32/config.h.in +++ b/win32/config.h.in @@ -78,7 +78,11 @@ #define PACKAGE_VERSION "2.0.0b1" /* 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