Skip to content

Commit 4478c99

Browse files
committed
refactor: remove SSL/OpenSSL support from beast2
- Remove ssl_stream.hpp, worker_ssl.hpp, https_server.hpp/cpp - Remove certificate.hpp/cpp SSL certificate utilities - Remove ssl_stream.cpp, https_server.cpp, stream.cpp tests - Remove OpenSSL dependency from CMakeLists.txt and Jamfile - Remove BOOST_BEAST2_HAS_CORO macro from config.hpp - Remove signal_set handling from asio_io_context.cpp - Clean up commented SSL includes in beast2.hpp - Remove conditional coro guards from body_write_stream.cpp
1 parent 060c66a commit 4478c99

19 files changed

Lines changed: 1 addition & 945 deletions

example/server/CMakeLists.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,18 @@ target_compile_definitions(beast2_server_example
2121
set_property(TARGET beast2_server_example
2222
PROPERTY FOLDER "examples")
2323

24-
find_package(OpenSSL REQUIRED)
2524
target_include_directories(beast2_server_example PRIVATE .)
2625
target_link_libraries(
2726
beast2_server_example
2827
Boost::beast2
2928
Boost::json
3029
Boost::url
31-
OpenSSL::SSL
32-
OpenSSL::Crypto
3330
)
3431

35-
if (WIN32)
36-
target_link_libraries(beast2_server_example crypt32)
37-
endif()
38-
3932
if (TARGET Boost::capy_zlib)
4033
target_link_libraries(beast2_server_example Boost::capy_zlib)
4134
endif()
4235

4336
if (TARGET Boost::capy_brotli)
4437
target_link_libraries(beast2_server_example Boost::capy_brotli)
4538
endif()
46-

example/server/Jamfile

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,15 @@
88
# Official repository: https://github.com/CPPAlliance/http
99
#
1010

11-
using openssl ;
1211
import ac ;
1312

14-
lib advapi32 ;
15-
lib crypt32 ;
16-
lib gdi32 ;
17-
lib user32 ;
18-
1913
project
2014
: requirements
2115
<library>/boost/beast2//boost_beast2
2216
<library>/boost/url//boost_url
2317
<library>/boost/json//boost_json
2418
[ ac.check-library /boost/capy//boost_capy_zlib : <library>/boost/capy//boost_capy_zlib : ]
2519
[ ac.check-library /boost/capy//boost_capy_brotli : <library>/boost/capy//boost_capy_brotli : ]
26-
[ ac.check-library /openssl//ssl : <library>/openssl//ssl/<link>shared : <build>no ]
27-
[ ac.check-library /openssl//crypto : <library>/openssl//crypto/<link>shared : <build>no ]
28-
<target-os>windows:<library>advapi32
29-
<target-os>windows:<library>crypt32
30-
<target-os>windows:<library>gdi32
31-
<target-os>windows:<library>user32
3220
<include>.
3321
;
3422

example/server/certificate.cpp

Lines changed: 0 additions & 138 deletions
This file was deleted.

example/server/certificate.hpp

Lines changed: 0 additions & 36 deletions
This file was deleted.

example/server/main.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
// Official repository: https://github.com/cppalliance/beast2
88
//
99

10-
#include "certificate.hpp"
1110
#include "serve_detached.hpp"
1211
#include "serve_log_admin.hpp"
1312
#include <boost/beast2/asio_io_context.hpp>

include/boost/beast2.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,12 @@
1515
#include <boost/beast2/server/fixed_array.hpp>
1616
#include <boost/beast2/server/http_server.hpp>
1717
#include <boost/beast2/server/http_stream.hpp>
18-
//#include <boost/beast2/server/https_server.hpp>
1918
#include <boost/beast2/server/plain_worker.hpp>
2019
#include <boost/beast2/server/route_handler_asio.hpp>
2120
#include <boost/beast2/server/router.hpp>
2221
#include <boost/beast2/server/router_asio.hpp>
2322
#include <boost/beast2/server/serve_redirect.hpp>
2423
#include <boost/beast2/server/serve_static.hpp>
25-
//#include <boost/beast2/server/worker_ssl.hpp>
2624
#include <boost/beast2/server/workers.hpp>
2725
#include <boost/beast2/test/error.hpp>
2826
#include <boost/beast2/test/fail_count.hpp>
@@ -40,7 +38,6 @@
4038
#include <boost/beast2/logger.hpp>
4139
#include <boost/beast2/body_read_stream.hpp>
4240
#include <boost/beast2/read.hpp>
43-
//#include <boost/beast2/ssl_stream.hpp>
4441
#include <boost/beast2/write.hpp>
4542

4643
#endif

include/boost/beast2/detail/config.hpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,6 @@ namespace beast2 {
3838

3939
//------------------------------------------------
4040

41-
#if defined(__cpp_lib_coroutine) && __cpp_lib_coroutine >= 201902L
42-
# define BOOST_BEAST2_HAS_CORO 1
43-
#elif defined(__cpp_impl_coroutine) && __cpp_impl_coroutines >= 201902L
44-
# define BOOST_BEAST2_HAS_CORO 1
45-
#endif
46-
47-
//------------------------------------------------
48-
4941
// Add source location to error codes
5042
#ifdef BOOST_BEAST2_NO_SOURCE_LOCATION
5143
# define BOOST_BEAST2_ERR(ev) (::boost::system::error_code(ev))

include/boost/beast2/server/http_stream.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,6 @@ do_suspend() ->
424424
BOOST_ASSERT(! pwg_);
425425
pwg_.reset(new work_guard(stream_.get_executor()));
426426

427-
// VFALCO cancel timer
428-
429427
return http::resumer(*this);
430428
}
431429

include/boost/beast2/server/https_server.hpp

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)