diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-06 08:59:56 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-06 10:34:37 +0200 |
commit | 1f6b98f21495f0ecc5ded493cb3273da03852191 (patch) | |
tree | 48958a2823d747484056a05a0d74d106f0863304 /svl | |
parent | 6dfc49bb6a72bf6bb79167b12f0d2d0c5a155d06 (diff) |
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@collabora.co.uk>
Diffstat (limited to 'svl')
-rw-r--r-- | svl/Library_svl.mk | 3 | ||||
-rw-r--r-- | svl/source/crypto/cryptosign.cxx | 10 |
2 files changed, 5 insertions, 8 deletions
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; |