Fix USE_TLS_OPENSSL builds

...after c8cba8ae30 "move CryptTools from oox to
comphelper so we can reuse it"

Change-Id: Id899c9fac9f18833afd64f18d81a7ad50916872e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176041
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
This commit is contained in:
Stephan Bergmann 2024-11-05 08:31:16 +01:00
parent 2fe53b2e43
commit bb9090c60b

View file

@ -73,7 +73,7 @@ struct CryptoImpl
CryptoImpl() = default;
void setupEncryptContext(std::vector<sal_uInt8>& key, std::vector<sal_uInt8>& iv,
Crypto::CryptoType eType)
CryptoType eType)
{
mpContext.reset(EVP_CIPHER_CTX_new());
EVP_CIPHER_CTX_init(mpContext.get());
@ -90,7 +90,7 @@ struct CryptoImpl
}
void setupDecryptContext(std::vector<sal_uInt8>& key, std::vector<sal_uInt8>& iv,
Crypto::CryptoType eType)
CryptoType eType)
{
mpContext.reset(EVP_CIPHER_CTX_new());
EVP_CIPHER_CTX_init(mpContext.get());
@ -148,15 +148,15 @@ struct CryptoImpl
EVP_CIPHER_CTX_cleanup(mpContext.get());
}
static const EVP_CIPHER* getCipher(Crypto::CryptoType type)
static const EVP_CIPHER* getCipher(CryptoType type)
{
switch (type)
{
case Crypto::CryptoType::AES_128_ECB:
case CryptoType::AES_128_ECB:
return EVP_aes_128_ecb();
case Crypto::CryptoType::AES_128_CBC:
case CryptoType::AES_128_CBC:
return EVP_aes_128_cbc();
case Crypto::CryptoType::AES_256_CBC:
case CryptoType::AES_256_CBC:
return EVP_aes_256_cbc();
default:
break;