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

Fix warnings building secp256k1 tests with openssl 3.0 #23048

Closed
andypost opened this issue Sep 20, 2021 · 4 comments
Closed

Fix warnings building secp256k1 tests with openssl 3.0 #23048

andypost opened this issue Sep 20, 2021 · 4 comments
Labels

Comments

@andypost
Copy link

Is your feature request related to a problem? Please describe.

Building package 22.0 for Alpinelinux using OpenSSL 3.0 getting warnings that tests using deprecated in 3.0 functions (only tests affected)

log of `make check`
make[4]: Entering directory '/home/skilld/aports/community/bitcoin/src/bitcoin-22.0/src/secp256k1'
  CC       src/exhaustive_tests-tests_exhaustive.o
  CC       src/tests-tests.o
src/tests.c: In function 'get_openssl_key':
src/tests.c:6161:5: warning: 'EC_KEY_new_by_curve_name' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 6161 |     EC_KEY *ec_key = EC_KEY_new_by_curve_name(NID_secp256k1);
      |     ^~~~~~
In file included from src/tests.c:25:
/usr/include/openssl/ec.h:996:31: note: declared here
  996 | OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_new_by_curve_name(int nid);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~
src/tests.c:6163:5: warning: 'd2i_ECPrivateKey' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 6163 |     CHECK(d2i_ECPrivateKey(&ec_key, &pbegin, privkeylen));
      |     ^~~~~
In file included from src/tests.c:25:
/usr/include/openssl/ec.h:1185:31: note: declared here
 1185 | OSSL_DEPRECATEDIN_3_0 EC_KEY *d2i_ECPrivateKey(EC_KEY **key,
      |                               ^~~~~~~~~~~~~~~~
src/tests.c:6164:5: warning: 'EC_KEY_check_key' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 6164 |     CHECK(EC_KEY_check_key(ec_key));
      |     ^~~~~
In file included from src/tests.c:25:
/usr/include/openssl/ec.h:1105:27: note: declared here
 1105 | OSSL_DEPRECATEDIN_3_0 int EC_KEY_check_key(const EC_KEY *key);
      |                           ^~~~~~~~~~~~~~~~
src/tests.c: In function 'test_ecdsa_openssl':
src/tests.c:6189:5: warning: 'ECDSA_sign' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 6189 |     CHECK(ECDSA_sign(0, message, sizeof(message), signature, &sigsize, ec_key));
      |     ^~~~~
In file included from src/tests.c:25:
/usr/include/openssl/ec.h:1412:27: note: declared here
 1412 | OSSL_DEPRECATEDIN_3_0 int ECDSA_sign(int type, const unsigned char *dgst,
      |                           ^~~~~~~~~~
src/tests.c:6198:5: warning: 'ECDSA_verify' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 6198 |     CHECK(ECDSA_verify(0, message, sizeof(message), signature, secp_sigsize, ec_key) == 1);
      |     ^~~~~
In file included from src/tests.c:25:
/usr/include/openssl/ec.h:1445:27: note: declared here
 1445 | OSSL_DEPRECATEDIN_3_0 int ECDSA_verify(int type, const unsigned char *dgst,
      |                           ^~~~~~~~~~~~
src/tests.c:6200:5: warning: 'EC_KEY_free' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
 6200 |     EC_KEY_free(ec_key);
      |     ^~~~~~~~~~~
In file included from src/tests.c:25:
/usr/include/openssl/ec.h:1001:28: note: declared here
 1001 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
      |                            ^~~~~~~~~~~
  CCLD     exhaustive_tests
  CCLD     tests
make  check-TESTS
make[5]: Entering directory '/home/skilld/aports/community/bitcoin/src/bitcoin-22.0/src/secp256k1'
make[6]: Entering directory '/home/skilld/aports/community/bitcoin/src/bitcoin-22.0/src/secp256k1'
PASS: exhaustive_tests
FAIL: tests
============================================================================
Testsuite summary for libsecp256k1 0.1
============================================================================
# TOTAL: 2
# PASS:  1
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

Describe the solution you'd like

According to man it needs replacement

Describe alternatives you've considered

Used to configure with --disable-openssl-tests

Additional context

Alpinelinux started OpenSSL 3.0 adoption

@fanquake
Copy link
Member

If you'd like these "fixed" you should open an issue in the upstream secp256k1 repo: https://github.com/bitcoin-core/secp256k1.

@andypost
Copy link
Author

Thank you, will do

@hebasto
Copy link
Member

hebasto commented Oct 3, 2021

Could be closed here?

@fanquake
Copy link
Member

fanquake commented Oct 3, 2021

Yes. Looks like the OpenSSL related code may even be removed shortly upstream.

@fanquake fanquake closed this as completed Oct 3, 2021
fanquake added a commit to fanquake/bitcoin that referenced this issue Oct 20, 2021
These tests are failing when run against OpenSSL 3, and have been
removed upstream, bitcoin-core/secp256k1#983, so
disabled them for now to avoid `make check` failures.

Note that this will also remove warning output from our build, due to
the use of deprecated OpenSSL API functions. See bitcoin#23048.
laanwj added a commit that referenced this issue Oct 20, 2021
d752454 build: explicitly disable libsecp256k1 openssl based tests (fanquake)

Pull request description:

  These tests are failing when run against OpenSSL 3, and have been
  removed upstream, bitcoin-core/secp256k1#983, so
  disabled them for now to avoid `make check` failures.

  Note that this will also remove warning output from our build, due to
  the use of deprecated OpenSSL API functions. See #23048.

ACKs for top commit:
  MarcoFalke:
    cr ACK d752454
  elichai:
    Code review ACK d752454

Tree-SHA512: a3805b4123ec49aaf21378066d86be382d11a022a7530682c2d8c0e756e785f32f18bea6fe73b1eca73f70bc3aee9166c391a9bf6adc0e450ebb0ce0bcf5a45e
fanquake added a commit to fanquake/bitcoin that referenced this issue Oct 20, 2021
These tests are failing when run against OpenSSL 3, and have been
removed upstream, bitcoin-core/secp256k1#983, so
disabled them for now to avoid `make check` failures.

Note that this will also remove warning output from our build, due to
the use of deprecated OpenSSL API functions. See bitcoin#23048.

Github-Pull: bitcoin#23314
Rebased-From: d752454
maflcko pushed a commit that referenced this issue Oct 21, 2021
…ased tests

e959b46 build: explicitly disable libsecp256k1 openssl based tests (fanquake)

Pull request description:

  Backport of #23314

  These tests are failing when run against OpenSSL 3, and have been
  removed upstream, bitcoin-core/secp256k1#983, so
  disabled them for now to avoid `make check` failures.

  Note that this will also remove warning output from our build, due to
  the use of deprecated OpenSSL API functions. See #23048.

Top commit has no ACKs.

Tree-SHA512: ab3213dc82e7a64a005ce237710009bb447dee2702c4c02245e70df62063a00add73c4e80e9c619ce57345d4a2808fd4dc08e2e02a319b0f3d9285b8b0056599
luke-jr pushed a commit to bitcoinknots/bitcoin that referenced this issue Dec 14, 2021
These tests are failing when run against OpenSSL 3, and have been
removed upstream, bitcoin-core/secp256k1#983, so
disabled them for now to avoid `make check` failures.

Note that this will also remove warning output from our build, due to
the use of deprecated OpenSSL API functions. See bitcoin#23048.

Github-Pull: bitcoin#23314
Rebased-From: d752454
knst pushed a commit to knst/dash that referenced this issue Jul 27, 2022
…enssl based tests

e959b46 build: explicitly disable libsecp256k1 openssl based tests (fanquake)

Pull request description:

  Backport of bitcoin#23314

  These tests are failing when run against OpenSSL 3, and have been
  removed upstream, bitcoin-core/secp256k1#983, so
  disabled them for now to avoid `make check` failures.

  Note that this will also remove warning output from our build, due to
  the use of deprecated OpenSSL API functions. See bitcoin#23048.

Top commit has no ACKs.

Tree-SHA512: ab3213dc82e7a64a005ce237710009bb447dee2702c4c02245e70df62063a00add73c4e80e9c619ce57345d4a2808fd4dc08e2e02a319b0f3d9285b8b0056599
UdjinM6 pushed a commit to dashpay/dash that referenced this issue Jul 27, 2022
…enssl based tests (#4941)

e959b46 build: explicitly disable libsecp256k1 openssl based tests (fanquake)

Pull request description:

  Backport of bitcoin#23314

  These tests are failing when run against OpenSSL 3, and have been
  removed upstream, bitcoin-core/secp256k1#983, so
  disabled them for now to avoid `make check` failures.

  Note that this will also remove warning output from our build, due to
  the use of deprecated OpenSSL API functions. See bitcoin#23048.

Top commit has no ACKs.

Tree-SHA512: ab3213dc82e7a64a005ce237710009bb447dee2702c4c02245e70df62063a00add73c4e80e9c619ce57345d4a2808fd4dc08e2e02a319b0f3d9285b8b0056599

Co-authored-by: MarcoFalke <falke.marco@gmail.com>
@bitcoin bitcoin locked and limited conversation to collaborators Oct 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants