open-eid/libdigidocpp

Build fails with OpenSSL 3.0.0

smirnov opened this issue · 7 comments

In file included from /builddir/build/BUILD/libdigidocpp-3.14.8/src/crypto/Digest.cpp:23:
/builddir/build/BUILD/libdigidocpp-3.14.8/src/crypto/OpenSSLHelpers.h: In constructor 'digidoc::OpenSSLException::OpenSSLException(const std::string&, int, const std::string&)':
/builddir/build/BUILD/libdigidocpp-3.14.8/src/crypto/OpenSSLHelpers.h:122:21: error: 'ERR_GET_FUNC' was not declared in this scope; did you mean 'ERR_GET_LIB'?
122 | ERR_GET_FUNC(error) == BIO_F_BIO_LOOKUP_EX &&
| ^~~~~~~~~~~~
| ERR_GET_LIB
In file included from /builddir/build/BUILD/libdigidocpp-3.14.8/src/crypto/Connect.cpp:24:
/builddir/build/BUILD/libdigidocpp-3.14.8/src/crypto/OpenSSLHelpers.h: In constructor 'digidoc::OpenSSLException::OpenSSLException(const std::string&, int, const std::string&)':
/builddir/build/BUILD/libdigidocpp-3.14.8/src/crypto/OpenSSLHelpers.h:122:21: error: 'ERR_GET_FUNC' was not declared in this scope; did you mean 'ERR_GET_LIB'?
122 | ERR_GET_FUNC(error) == BIO_F_BIO_LOOKUP_EX &&
| ^~~~~~~~~~~~
| ERR_GET_LIB
gmake[2]: *** [src/CMakeFiles/digidocpp_priv.dir/build.make:349: src/CMakeFiles/digidocpp_priv.dir/crypto/Digest.cpp.o] Error 1

OpenSSL 3.0 is currently unsupported.
Which linux distribution is this? Is the xml-security-c package ported to OpenSSL 3.0?

That would be Fedora 36. Well, xml-security-c is installed and dependencies are satisfied, so I'd guess it was. Will need to take a closer look. Unfortunately direct dependency on openssl-1.1.1 also doesn't work due to conflict

You cannot mix different openssl versions. It must be same as xml-security-c using.

Openssl 3.0.0 is the version of openssl for Fedora 36

Turns out that this is not ported yet and currently broken, if I understand correctly - then xml-security-c will need to be ported to OpenSSL 3.0.0 first and only then can libdigidocpp be ported?

Also, not trying to be annoying or anything, but xml-security-c library upstream (on sourceforge) seems abandoned, last update is beta version 0.0.3 from 19 years ago (2003) and it doesn't look like there might be any porting attempts.

Latest is available at https://santuario.apache.org/cindex.html.
But it does not make it less abandoned

We will look into it soon because ubuntu 22.04 also moved openssl 3.0