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

Check for openssl v. 1.1 during build #1165

Open
jjcnn opened this issue Sep 8, 2022 · 1 comment
Open

Check for openssl v. 1.1 during build #1165

jjcnn opened this issue Sep 8, 2022 · 1 comment

Comments

@jjcnn
Copy link
Contributor

jjcnn commented Sep 8, 2022

Versions of openssl after 1.1 are not supported by the crypto submodules, and build errors due to later versions of openssl are difficult to identify as being caused by this.

The version requirement is documented in INSTALL.md, but we should introduce an actual check somewhere (@anton-trunov suggests here: https://github.com/ocaml/opam-repository/blob/master/packages/conf-openssl/conf-openssl.1/opam) that the correct version is being used.

Depending on how the issue is resolved we should also document this in the troubleshooting part of https://github.com/Zilliqa/scilla/wiki#installation-troubleshooting.

Examples of build errors you may encounter:

In file included from /home/cnn/Projects/scilla/deps/schnorr/src/src/libSchnorr/src/SchnorrInternal.h:36,
                 from /home/cnn/Projects/scilla/deps/schnorr/src/src/libSchnorr/src/Schnorr_Signature.cpp:24:
/home/cnn/Projects/scilla/deps/schnorr/src/src/libSchnorr/src/Sha2.h: In member function ‘void SHA2<SIZE>::Update(const bytes&)’:
/home/cnn/Projects/scilla/deps/schnorr/src/src/libSchnorr/src/Sha2.h:59:18: error: ‘int SHA256_Update(SHA256_CTX*, const void*, size_t)’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
   59 |     SHA256_Update(&m_context, input.data(), input.size());
      |     ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/cnn/Projects/scilla/deps/schnorr/src/src/libSchnorr/src/Sha2.h:21,
                 from /home/cnn/Projects/scilla/deps/schnorr/src/src/libSchnorr/src/SchnorrInternal.h:36,
                 from /home/cnn/Projects/scilla/deps/schnorr/src/src/libSchnorr/src/Schnorr_Signature.cpp:24:
/usr/include/openssl/sha.h:74:27: note: declared here
   74 | OSSL_DEPRECATEDIN_3_0 int SHA256_Update(SHA256_CTX *c,
      |                           ^~~~~~~~~~~~~
[  6%] Building C object src/libSchnorr/src/CMakeFiles/Schnorr.dir/generate_dsa_nonce.c.o
/home/cnn/Projects/scilla/deps/schnorr/src/src/libSchnorr/src/generate_dsa_nonce.c: In function ‘BN_generate_dsa_nonce’:
/home/cnn/Projects/scilla/deps/schnorr/src/src/libSchnorr/src/generate_dsa_nonce.c:89:23: error: invalid use of incomplete typedef ‘BIGNUM’ {aka ‘const struct bignum_st’}
   89 |     todo = sizeof(priv->d[0]) * priv->top;
      |                       ^~
@jjcnn
Copy link
Contributor Author

jjcnn commented Sep 12, 2022

Before introducing this check we should investigate whether we can upgrade to the most recent version of openssl. I think openssl is only used in the crypto submodules, which may complicate matters, but it would be simpler if we can make it work with off-the-shelf openssl.

@jjcnn jjcnn added this to the Scilla 0.14.0 milestone Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant