From 2a48fd3fbb649218f66a58e70ad904411883c63d Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Fri, 9 Jun 2017 12:59:19 +0200 Subject: allow build without tls and ssl support for using --disable-openssl AND --without-tls (needed if you want to avoid including crypto code). Change-Id: I77650e9db679ddf1690560eda069d8645acacfc4 Reviewed-on: https://gerrit.libreoffice.org/38604 Tested-by: Jenkins Reviewed-by: jan iversen --- oox/source/crypto/CryptTools.cxx | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'oox/source') diff --git a/oox/source/crypto/CryptTools.cxx b/oox/source/crypto/CryptTools.cxx index b23d3ebbf57b..d40b2d57ea6a 100644 --- a/oox/source/crypto/CryptTools.cxx +++ b/oox/source/crypto/CryptTools.cxx @@ -111,6 +111,12 @@ void Crypto::setupContext(std::vector& key, std::vector& i Decrypt::Decrypt(std::vector& key, std::vector& iv, CryptoType type) : Crypto() { +#if USE_TLS_OPENSSL + USE_TLS_NSS == 0 + (void)key; + (void)iv; + (void)type; +#endif + #if USE_TLS_OPENSSL EVP_CIPHER_CTX_init(&mContext); @@ -132,7 +138,13 @@ sal_uInt32 Decrypt::update(std::vector& output, std::vector 0 sal_uInt32 actualInputLength = inputLength == 0 || inputLength > input.size() ? input.size() : inputLength; +#else + (void)output; + (void)input; + (void)inputLength; +#endif #if USE_TLS_OPENSSL (void)EVP_DecryptUpdate(&mContext, output.data(), &outputLength, input.data(), actualInputLength); @@ -159,6 +171,12 @@ sal_uInt32 Decrypt::aes128ecb(std::vector& output, std::vector& key, std::vector& iv, CryptoType type) : Crypto() { +#if USE_TLS_OPENSSL + USE_TLS_NSS == 0 + (void)key; + (void)iv; + (void)type; +#endif + #if USE_TLS_OPENSSL EVP_CIPHER_CTX_init(&mContext); @@ -180,7 +198,13 @@ sal_uInt32 Encrypt::update(std::vector& output, std::vector 0 sal_uInt32 actualInputLength = inputLength == 0 || inputLength > input.size() ? input.size() : inputLength; +#else + (void)output; + (void)input; + (void)inputLength; +#endif #if USE_TLS_OPENSSL (void)EVP_EncryptUpdate(&mContext, output.data(), &outputLength, input.data(), actualInputLength); -- cgit