Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix for issue #444 "Unable to compile without OpenSSL"#541

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
deanberris merged 2 commits intocpp-netlib:0.11-develfromcelsius:0.11-devel-fix-disable-ssl
Jul 20, 2015
Merged

Fix for issue #444 "Unable to compile without OpenSSL"#541

deanberris merged 2 commits intocpp-netlib:0.11-develfromcelsius:0.11-devel-fix-disable-ssl
Jul 20, 2015

Conversation

celsius
Copy link

  • add an option CPP-NETLIB_ENABLE_HTTPS to enable/disable HTTPS in cmake config. By default it is turned ON (enable HTTPS) so as to preserve before-patch behavior. Turn it OFF to disable entirely SSL usage and linkage in libraries and header files.
  • when SSL is disabled, the 'stream_handler' struct is replaced by a simple tcp_socket, and function calls in the files option.hpp, async_server.hpp and async_connection.hpp are adapted and compiled accordingly.

Note that sync_...hpp files don't have problems (yet) since SSL is not integrated into these. Also note that a cleaner solution might be to consider implementing two separate struct 'stream_handler' and 'stream_handler_ssl', or something similar (in order to avoid most, if not all, the current #ifdef added by the commit in async_server and async_connection).

The changes to the code are quite simple but, for the record, I compiled this with the new option ON and OFF and successfully tested it for both configurations with a slightly adapted version of the asynchronous http server "hello world" example. I tried to be thorough while searching the code for SSL-related code, but I'm not very familiar with the whole code base, so some parts may have slipped past my attention.

- add an option CPP-NETLIB_ENABLE_HTTPS to enable/disable HTTPS in  cmake config. By default it is turned ON (enable HTTPS) so as to  preserve before-patch behavior. Turn it OFF to disable entirely  SSL usage and linkage in libraries and header files.- when SSL is disabled, the 'stream_handler' struct is replaced by  a simple tcp_socket, and function calls in the files option.hpp,  async_server.hpp and async_connection.hpp are adapted and compiled  accordingly.Note that sync_...hpp files don't have problems (yet) since SSL isnot integrated into these. Also note that a cleaner solution mightbe to consider implementing two separate struct 'stream_handler' and'stream_handler_ssl', or something similar.
@deanberris
Copy link
Member

Thanks@celsius -- can you also update the travis config too, so we can make sure this doesn't break in the configurations we care about and test continuously?

@celsius
Copy link
Author

I've never used travis before, am I supposed to add this into the "env:" section of ".travis.yml" ?

I'm asking because it would increase the number of compilation tests by a factor 2 (i.e. each test would be made with with HTTPS ON or OFF). If that's ok with you, then I'll proceed.

@deanberris
Copy link
Member

Yes@celsius -- thanks in advance!

@celsius
Copy link
Author

@deanberris pushed and Travis CI build passed. Always happy to help.

@deanberris
Copy link
Member

LGTM -- thanks@celsius!

deanberris added a commit that referenced this pull requestJul 20, 2015
Fix for issue#444 "Unable to compile without OpenSSL"
@deanberrisdeanberris merged commit2bc6afb intocpp-netlib:0.11-develJul 20, 2015
@celsiuscelsius deleted the 0.11-devel-fix-disable-ssl branchJuly 20, 2015 09:46
@celsiuscelsius restored the 0.11-devel-fix-disable-ssl branchJuly 20, 2015 09:46
@celsiuscelsius deleted the 0.11-devel-fix-disable-ssl branchJuly 20, 2015 09:47
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@celsius@deanberris

[8]ページ先頭

©2009-2025 Movatter.jp