Reorganize SSL examples

This commit is contained in:
Vinnie Falco
2017-06-18 17:10:38 -07:00
parent 8f627b0748
commit 8b5f5c6feb
11 changed files with 37 additions and 34 deletions

View File

@@ -190,7 +190,5 @@ add_subdirectory (test)
add_subdirectory (example) add_subdirectory (example)
if (OPENSSL_FOUND) if (OPENSSL_FOUND)
add_subdirectory (example/ssl-http-client)
add_subdirectory (example/ssl-websocket-client)
add_subdirectory (test/websocket/ssl) add_subdirectory (test/websocket/ssl)
endif() endif()

View File

@@ -57,7 +57,7 @@ as measured by Alexa.
This example demonstrates sending and receiving HTTP messages This example demonstrates sending and receiving HTTP messages
over a TLS connection. Requires OpenSSL to build. over a TLS connection. Requires OpenSSL to build.
* [repo_file example/ssl-http-client/ssl_http_client.cpp] * [repo_file example/http-client-ssl/http_client_ssl.cpp]
[endsect] [endsect]
@@ -68,7 +68,7 @@ over a TLS connection. Requires OpenSSL to build.
Establish a WebSocket connection over an encrypted TLS connection, Establish a WebSocket connection over an encrypted TLS connection,
send a message and receive the reply. Requires OpenSSL to build. send a message and receive the reply. Requires OpenSSL to build.
* [repo_file example/ssl-websocket-client/ssl_websocket_client.cpp] * [repo_file example/websocket-client-ssl/websocket_client_ssl.cpp]
[endsect] [endsect]

View File

@@ -5,3 +5,8 @@ add_subdirectory (http-client)
add_subdirectory (http-crawl) add_subdirectory (http-crawl)
add_subdirectory (server-framework) add_subdirectory (server-framework)
add_subdirectory (websocket-client) add_subdirectory (websocket-client)
if (OPENSSL_FOUND)
add_subdirectory (http-client-ssl)
add_subdirectory (websocket-client-ssl)
endif()

View File

@@ -0,0 +1,14 @@
# Part of Beast
GroupSources(include/beast beast)
GroupSources(example/http-client-ssl "/")
include_directories(${OPENSSL_INCLUDE_DIR})
add_executable (http-client-ssl
${BEAST_INCLUDES}
http_client_ssl.cpp
)
target_link_libraries(http-client-ssl Beast ${OPENSSL_LIBRARIES})

View File

@@ -43,7 +43,7 @@ project
<library>crypto <library>crypto
; ;
exe ssl-http-client exe http-client-ssl
: :
ssl_http_client.cpp http_client_ssl.cpp
; ;

View File

@@ -1,14 +0,0 @@
# Part of Beast
GroupSources(include/beast beast)
GroupSources(example/ssl-http-client "/")
include_directories(${OPENSSL_INCLUDE_DIR})
add_executable (ssl-http-client
${BEAST_INCLUDES}
ssl_http_client.cpp
)
target_link_libraries(ssl-http-client Beast ${OPENSSL_LIBRARIES})

View File

@@ -1,14 +0,0 @@
# Part of Beast
GroupSources(include/beast beast)
GroupSources(example/ssl-websocket-client "/")
include_directories(${OPENSSL_INCLUDE_DIR})
add_executable (ssl-websocket-client
${BEAST_INCLUDES}
ssl_websocket_client.cpp
)
target_link_libraries(ssl-websocket-client Beast ${OPENSSL_LIBRARIES})

View File

@@ -0,0 +1,14 @@
# Part of Beast
GroupSources(include/beast beast)
GroupSources(example/websocket-client-ssl "/")
include_directories(${OPENSSL_INCLUDE_DIR})
add_executable (websocket-client-ssl
${BEAST_INCLUDES}
websocket_client_ssl.cpp
)
target_link_libraries(websocket-client-ssl Beast ${OPENSSL_LIBRARIES})