[Libreoffice-commits] core.git: svl/Library_svl.mk svl/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Thu May 6 08:36:51 UTC 2021
svl/Library_svl.mk | 3 ---
svl/source/crypto/cryptosign.cxx | 10 +++++-----
2 files changed, 5 insertions(+), 8 deletions(-)
New commits:
commit 1f6b98f21495f0ecc5ded493cb3273da03852191
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu May 6 08:59:56 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu May 6 10:34:37 2021 +0200
replace SVL_CRYPTO_MSCRYPTO with _WIN32
just to reduce the number of different #defines at work in this
file.
Change-Id: I586b09a3c3c4c8eed4971a0e89d8def9d848b9fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115166
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/svl/Library_svl.mk b/svl/Library_svl.mk
index 291e2557638c..19b9d9f8b940 100644
--- a/svl/Library_svl.mk
+++ b/svl/Library_svl.mk
@@ -97,9 +97,6 @@ $(eval $(call gb_Library_use_system_win32_libs,svl,\
))
ifeq ($(OS),WNT)
-$(eval $(call gb_Library_add_defs,svl,\
- -DSVL_CRYPTO_MSCRYPTO \
-))
$(eval $(call gb_Library_use_system_win32_libs,svl,\
crypt32 \
))
diff --git a/svl/source/crypto/cryptosign.cxx b/svl/source/crypto/cryptosign.cxx
index 8aa47ee36cba..f2dffc4d76b7 100644
--- a/svl/source/crypto/cryptosign.cxx
+++ b/svl/source/crypto/cryptosign.cxx
@@ -929,7 +929,7 @@ std::vector<unsigned char> DecodeHexString(const OString& rHex)
}
-#if defined(SVL_CRYPTO_NSS) || defined(SVL_CRYPTO_MSCRYPTO)
+#if defined(SVL_CRYPTO_NSS) || defined(_WIN32)
bool Signing::Sign(OStringBuffer& rCMSHexBuffer)
{
@@ -1633,7 +1633,7 @@ bool Signing::Sign(OStringBuffer&)
{
return false;
}
-#endif //!SVL_CRYPTO_NSS && !SVL_CRYPTO_MSCRYPTO
+#endif //!SVL_CRYPTO_NSS && !_WIN32
namespace
@@ -1789,7 +1789,7 @@ bad_data:
}
return rv;
}
-#elif defined SVL_CRYPTO_MSCRYPTO
+#elif defined _WIN32
/// Verifies a non-detached signature using CryptoAPI.
bool VerifyNonDetachedSignature(const std::vector<unsigned char>& aData, const std::vector<BYTE>& rExpectedHash)
{
@@ -2105,7 +2105,7 @@ bool Signing::Verify(const std::vector<unsigned char>& aData,
return true;
-#elif defined SVL_CRYPTO_MSCRYPTO
+#elif defined _WIN32
// Open a message for decoding.
HCRYPTMSG hMsg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING | X509_ASN_ENCODING,
CMSG_DETACHED_FLAG,
@@ -2336,7 +2336,7 @@ bool Signing::Verify(SvStream& rStream,
const std::vector<unsigned char>& aSignature,
SignatureInformation& rInformation)
{
-#if defined(SVL_CRYPTO_NSS) || defined(SVL_CRYPTO_MSCRYPTO)
+#if defined(SVL_CRYPTO_NSS) || defined(_WIN32)
std::vector<unsigned char> buffer;
More information about the Libreoffice-commits
mailing list