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

Struct ssl_st cannot reference to s3 variables. Show an error invalid use of incomplete type ‘const SSL {aka const struct ssl_st}’ ssl->s3;. #1914

Closed
rchatsiri opened this issue Nov 26, 2016 · 10 comments
Assignees

Comments

@rchatsiri
Copy link

Hello contributor,
I cannot build rippled core engine with Make step cause build tools show an error as below

workspacecpp/rippled/src/ripple/basics/impl/make_SSLContext.cpp:348:5: error: invalid use of incomplete type ‘const SSL {aka const struct ssl_st}’
  ssl->s3;
     ^~
In file included from /usr/local/include/openssl/crypto.h:31:0,
                 from /usr/local/include/openssl/bio.h:20,
                 from /usr/local/include/openssl/conf.h:13,

Pointer to constant SSL at member funciton name info_handler(SSL const * ssl, int event, int) should reference to s3, but represent an error invalid use of incomplete type ‘const SSL {aka const struct ssl_st}`. How to work around is issue? I build source code completed by comments declare variable at info_handler() member function.

@nbougalis
Copy link
Contributor

nbougalis commented Nov 26, 2016

Thank you for the report.

Sorry you're having build issues. What platform are you working on, and if Linux, which distribution? Also, which compiler are you using and what is the version of OpenSSL that is installed?

@nbougalis nbougalis self-assigned this Nov 26, 2016
@rchatsiri
Copy link
Author

rchatsiri commented Nov 26, 2016

Hello @nbougalis , I use Linux debian-dev-00 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19) x86_64 GNU/Linux. OpenSSL branch is OpenSSL_1_0_2-stable cause Rippled Cmake requires OpenSSL version above 1.0.1. In additional source code compiled by G++ version 6.2.0-13

@vinniefalco
Copy link
Contributor

Maybe we need to add #include <ssl/ssl3.h> or perhaps we have to set some macro to get that declaration.

@rchatsiri
Copy link
Author

I think in the master branch of Ripple supports BoringSSL instead of OpenSSL library. After built the source code in the current master branch with OpenSSL show error at variable SSL_R_SHORT_READ. SSL_R_SHORT_READ replaced by SSL_R_UNEXPECTED_RECORD variable in is_short_read() of ssl_error.h file.

Ref : chriskohlhoff/asio#52

@nbougalis
Copy link
Contributor

@rchatsiri: interesting, thanks for the link. Ripple doesn't use BoringSSL. I will sort this issue and get a patch. I'll keep you up to date.

@vinniefalco
Copy link
Contributor

Is this still an issue?

@MarkusTeufelberger
Copy link
Collaborator

Both errors occur to me with OpenSSL 1.1 (seee #2047). Are you sure you're using 1.0.2?

@nbougalis - please check out if you can reproduce this with OpenSSL 1.1, it is getting into more and more distributions these days and rippled currently fails building with these 2 errors (short read and s3).

@MarkusTeufelberger
Copy link
Collaborator

Anything else you might need to reproduce this or that could help moving this along? This bug is blocking rippled from being compiled on at least every distribution that has made the switch to OpenSSL 1.1.

@MarkusTeufelberger
Copy link
Collaborator

@rchatsiri #2151 should have fixed this, does this still happen with 0.70.1?

@rchatsiri
Copy link
Author

rchatsiri commented Jul 21, 2017

I change OpenSSL version to 1.0.2g 1 Mar 2016. it was bulit completed. Rippled source code version 0.80.0-b1+DEBUG

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants