Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poco 1.12.x compile error on systems with OpenSSL 1.0.0 #3739

Open
gyee-penguin opened this issue Aug 10, 2022 · 8 comments
Open

Poco 1.12.x compile error on systems with OpenSSL 1.0.0 #3739

gyee-penguin opened this issue Aug 10, 2022 · 8 comments
Labels

Comments

@gyee-penguin
Copy link
Contributor

gyee-penguin commented Aug 10, 2022

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

@aleks-f
Copy link
Member

aleks-f commented Aug 10, 2022

It wasn't intentional, the >10 year span between 1.0 and 3.0 is stretching us thin; if you want to send a devel branch pull to fix it, I'll merge it for 1.12.3 after all the CI passes.

@gyee-penguin
Copy link
Contributor Author

Sounds good. I'm not sure if I can do this right now, but I may be able to later. Thank you @aleks-f

gyee-penguin added a commit to gyee-penguin/poco that referenced this issue Jan 3, 2023
@gyee-penguin
Copy link
Contributor Author

Hello @aleks-f, we finally found some time to look into this and we have submitted a PR that should allow this to compile #3909

gyee-penguin added a commit to gyee-penguin/poco that referenced this issue Jan 5, 2023
gyee-penguin added a commit to gyee-penguin/poco that referenced this issue Jan 11, 2023
@gyee-penguin
Copy link
Contributor Author

I don't think our patch is the cause of the checks failing. I believe the devel branch was failing checks before we rebased our patch top of it, which is why it's failing now.

gyee-penguin added a commit to gyee-penguin/poco that referenced this issue Feb 1, 2023
gyee-penguin added a commit to gyee-penguin/poco that referenced this issue Feb 9, 2023
gyee-penguin added a commit to gyee-penguin/poco that referenced this issue Feb 9, 2023
@gyee-penguin
Copy link
Contributor Author

Hello @aleks-f @obiltschnig ,

Do either of you know roughly when Poco 1.12.5 is expected to be released and whether our patch for this issue will be part of it?

Thanks!

Copy link

This issue is stale because it has been open for 365 days with no activity.

@github-actions github-actions bot added the stale label Feb 22, 2024
@matejk
Copy link
Contributor

matejk commented Feb 23, 2024

Envelope.cpp was changed in 1.13. Does it compile with OpenSSL 1.0?

OTOH, shall OpenSSL 1.0 still be supported? Even 1.1 reached EOL.

@obiltschnig
Copy link
Member

I think we should drop support for OpenSSL < 1.1.1. And any new features we might add should be OpenSSL 3 only.

@github-actions github-actions bot removed the stale label Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants