Problem compiling "warning: ‘EC_KEY_???’ is deprecated: Since OpenSSL 3.0 [-Wdeprecate" help?

Get help, report and discuss bugs.
Post Reply
get39678
Posts: 222
Joined: 09 Jun 2014, 10:49

Problem compiling "warning: ‘EC_KEY_???’ is deprecated: Since OpenSSL 3.0 [-Wdeprecate" help?

Post by get39678 » 31 Jul 2022, 10:47

I am trying to compile on a Ubuntu 22.04 system with --with-tlslib=OpenSSL but I am getting the following errors?

Does anyone have any idea on how to get it to work?

Thanks

Code: Select all

daemon/connect/TlsSocket.cpp: In static member function ‘static void TlsSocket::Final()’:
daemon/connect/TlsSocket.cpp:192:9: error: ‘FIPS_mode_set’ was not declared in this scope
  192 |         FIPS_mode_set(0);
      |         ^~~~~~~~~~~~~
daemon/connect/TlsSocket.cpp: In member function ‘bool TlsSocket::Start()’:
daemon/connect/TlsSocket.cpp:392:56: warning: ‘EC_KEY* EC_KEY_new_by_curve_name(int)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  392 |                 EC_KEY* ecdh = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
      |                                ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from /usr/include/openssl/ssl.h:31,
                 from ./daemon/main/nzbget.h:257,
                 from daemon/connect/TlsSocket.cpp:21:
/usr/include/openssl/ec.h:998:31: note: declared here
  998 | OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_new_by_curve_name(int nid);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~
daemon/connect/TlsSocket.cpp:402:36: warning: ‘void EC_KEY_free(EC_KEY*)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  402 |                         EC_KEY_free(ecdh);
      |                         ~~~~~~~~~~~^~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from /usr/include/openssl/ssl.h:31,
                 from ./daemon/main/nzbget.h:257,
                 from daemon/connect/TlsSocket.cpp:21:
/usr/include/openssl/ec.h:1003:28: note: declared here
 1003 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
      |                            ^~~~~~~~~~~
daemon/connect/TlsSocket.cpp:406:28: warning: ‘void EC_KEY_free(EC_KEY*)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  406 |                 EC_KEY_free(ecdh);
      |                 ~~~~~~~~~~~^~~~~~
In file included from /usr/include/openssl/x509.h:33,
                 from /usr/include/openssl/ssl.h:31,
                 from ./daemon/main/nzbget.h:257,
                 from daemon/connect/TlsSocket.cpp:21:
/usr/include/openssl/ec.h:1003:28: note: declared here
 1003 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
      |                            ^~~~~~~~~~~
daemon/connect/Connection.cpp: In function ‘hostent* android_read_hostent(FILE*, hostent*, char*, size_t)’:
daemon/connect/Connection.cpp:1206:22: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
 1206 |                 fread(&size, 1, sizeof(size), proxy);
      |                 ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:1656: daemon/connect/TlsSocket.o] Error 1

sanderj
Posts: 184
Joined: 10 Feb 2014, 21:46

Re: Problem compiling "warning: ‘EC_KEY_???’ is deprecated: Since OpenSSL 3.0 [-Wdeprecate" help?

Post by sanderj » 01 Aug 2022, 19:43

I only count one (1) error. If you agree ... did you Google that error?

But why are you trying to compile nzbget yourself? Why not the version from the Ubuntu repo? Or the pre-compiled version from https://nzbget.net/download ?

sanderj
Posts: 184
Joined: 10 Feb 2014, 21:46

Re: Problem compiling "warning: ‘EC_KEY_???’ is deprecated: Since OpenSSL 3.0 [-Wdeprecate" help?

Post by sanderj » 01 Aug 2022, 20:38

PS:

I you really want to compile from source, see ... https://github.com/nzbget/nzbget/pull/7 ... 1201694263 ... just one command to solve it.

get39678
Posts: 222
Joined: 09 Jun 2014, 10:49

Re: Problem compiling "warning: ‘EC_KEY_???’ is deprecated: Since OpenSSL 3.0 [-Wdeprecate" help?

Post by get39678 » 02 Aug 2022, 09:22

Thanks. My Googling failed as for whatever reason I was searching for the deprecated warnings instead of the actual error! Historically I have always compiled from git to use the latest version I guess it is not as important as development has paused/ceased.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests