-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
Milestone
Description
Describe the bug
I get a compile error for Poco 1.12.0 and 1.12.2 on CentOS 7 (with GCC 10) or Ubuntu 16 (both have OpenSSL 1.0.0) in the Crypto component. Compilation works for 1.11.1, 1.11.2, and 1.11.3.
To Reproduce
CentOS 7, Use devtoolset-10, Download Poco 1.12.2 source. Compile.
Expected behavior
I didn't see anything in the change log to suggest that OpenSSL 1.0.0 support had been dropped for Poco 1.12.x or that OpenSSL 1.1.1 is required. I thought it would build.
Logs
/opt/rh/devtoolset-10/root/usr/bin/g++ -DPOCO_ENABLE_CPP11 -DPOCO_ENABLE_CPP14 -DPOCO_HAVE_FD_EPOLL -DPOCO_OS_FAMILY_UNIX -DPOCO_STATIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_REENTRANT -D_THREAD_SAFE -D_XOPEN_SOURCE=500 -I/home/builder/src/poco_container/poco/Crypto/include -I/home/builder/src/poco_container/poco/Crypto/src -I/home/builder/src/poco_container/poco/Foundation/include -O2 -g -DNDEBUG -std=gnu++14 -MD -MT Crypto/CMakeFiles/Crypto.dir/src/Envelope.cpp.o -MF Crypto/CMakeFiles/Crypto.dir/src/Envelope.cpp.o.d -o Crypto/CMakeFiles/Crypto.dir/src/Envelope.cpp.o -c /home/builder/src/poco_container/poco/Crypto/src/Envelope.cpp
/home/builder/src/poco_container/poco/Crypto/src/Envelope.cpp: In constructor 'Poco::Crypto::Envelope::Envelope(int)':
/home/builder/src/poco_container/poco/Crypto/src/Envelope.cpp:27:8: error: invalid operands of types 'int' and 'void' to binary 'operator!='
27 | if (1 != EVP_CIPHER_CTX_init(_pCtx))
| ~ ^~ ~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| int void
/home/builder/src/poco_container/poco/Crypto/src/EVPCipherImpl.cpp: In constructor 'Poco::Crypto::{anonymous}::EVPEncryptImpl::EVP
EncryptImpl(const EVP_PKEY*)':
/home/builder/src/poco_container/poco/Crypto/src/EVPCipherImpl.cpp:87:31: error: invalid conversion from 'const EVP_PKEY*' {aka 'c
onst evp_pkey_st*'} to 'EVP_PKEY*' {aka 'evp_pkey_st*'} [-fpermissive]
87 | _blockSize = EVP_PKEY_size(_pEVP);
| ^~~~~
| |
| const EVP_PKEY* {aka const evp_pkey_st*}
In file included from /home/builder/src/poco_container/poco/Crypto/include/Poco/Crypto/EV
PPKey.h:28,
from /home/builder/src/poco_container/poco/Crypto/include/Poco/Crypto/EVPCipherImpl.h:23,
from /home/builder/src/poco_container/poco/Crypto/src/EVPCipherImpl.cpp:15:
/usr/include/openssl/evp.h:959:29: note: initializing argument 1 of 'int EVP_PKEY_size(EVP_PKEY*)'
959 | int EVP_PKEY_size(EVP_PKEY *pkey);
| ~~~~~~~~~~^~~~
/home/builder/src/poco_container/poco/Crypto/src/EVPCipherImpl.cpp: In constructor 'Poco::Crypto::{anonymous}::EVPDecryptImpl::EVPDecryptImpl(const EVP_PKEY*)':
/home/builder/src/poco_container/poco/Crypto/src/EVPCipherImpl.cpp:200:31: error: invalid conversion from 'const EVP_PKEY*' {aka 'const evp_pkey_st*'} to 'EVP_PKEY*' {aka 'evp_pkey_st*'} [-fpermissive]
200 | _blockSize = EVP_PKEY_size(_pEVP);
| ^~~~~
| |
| const EVP_PKEY* {aka const evp_pkey_st*}
In file included from /home/builder/src/poco_container/poco/Crypto/include/Poco/Crypto/EVPPKey.h:28,
from /home/builder/src/poco_container/poco/Crypto/include/Poco/Crypto/EVPCipherImpl.h:23,
from /home/builder/src/poco_container/poco/Crypto/src/EVPCipherImpl.cpp:15:
/usr/include/openssl/evp.h:959:29: note: initializing argument 1 of 'int EVP_PKEY_size(EVP_PKEY*)'
959 | int EVP_PKEY_size(EVP_PKEY *pkey);
| ~~~~~~~~~~^~~~
Screenshots
NA
Please add relevant environment information:
- CentOS 7
- POCO Version 1.12.2
- OpenSSL 1.0.2k-fips
Additional context
NA
EDIT: Drop support for old OpenSSL
Reactions are currently unavailable