Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
c93104b7
Commit
c93104b7
authored
Apr 27, 2022
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove OpenSSL headers from SSL transport test
parent
485c56f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
11 deletions
+6
-11
libcaf_net/test/net/ssl/transport.cpp
libcaf_net/test/net/ssl/transport.cpp
+6
-11
No files found.
libcaf_net/test/net/ssl/transport.cpp
View file @
c93104b7
...
@@ -17,11 +17,6 @@
...
@@ -17,11 +17,6 @@
#include "caf/net/ssl/context.hpp"
#include "caf/net/ssl/context.hpp"
#include "caf/net/stream_socket.hpp"
#include "caf/net/stream_socket.hpp"
CAF_PUSH_WARNINGS
#include <openssl/err.h>
#include <openssl/ssl.h>
CAF_POP_WARNINGS
using
namespace
caf
;
using
namespace
caf
;
using
namespace
caf
::
net
;
using
namespace
caf
::
net
;
...
@@ -187,15 +182,15 @@ void dummy_tls_client(stream_socket fd) {
...
@@ -187,15 +182,15 @@ void dummy_tls_client(stream_socket fd) {
BEGIN_FIXTURE_SCOPE
(
fixture
)
BEGIN_FIXTURE_SCOPE
(
fixture
)
SCENARIO
(
"
openssl::async_connec
t performs the client handshake"
)
{
SCENARIO
(
"
ssl::transport::make_clien
t performs the client handshake"
)
{
GIVEN
(
"a connection to a TLS server"
)
{
GIVEN
(
"a connection to a TLS server"
)
{
auto
[
server_fd
,
client_fd
]
=
no_sigpipe
(
unbox
(
make_stream_socket_pair
()));
auto
[
server_fd
,
client_fd
]
=
no_sigpipe
(
unbox
(
make_stream_socket_pair
()));
if
(
auto
err
=
net
::
nonblocking
(
client_fd
,
true
))
if
(
auto
err
=
net
::
nonblocking
(
client_fd
,
true
))
FAIL
(
"net::nonblocking failed: "
<<
err
);
FAIL
(
"net::nonblocking failed: "
<<
err
);
std
::
thread
server
{
dummy_tls_server
,
server_fd
,
cert_1_pem_path
,
std
::
thread
server
{
dummy_tls_server
,
server_fd
,
cert_1_pem_path
,
key_1_pem_path
};
key_1_pem_path
};
WHEN
(
"connecting as a client to an
Open
SSL server"
)
{
WHEN
(
"connecting as a client to an SSL server"
)
{
THEN
(
"
openssl::async_connect
transparently calls SSL_connect"
)
{
THEN
(
"
CAF
transparently calls SSL_connect"
)
{
net
::
multiplexer
mpx
{
nullptr
};
net
::
multiplexer
mpx
{
nullptr
};
mpx
.
set_thread_id
();
mpx
.
set_thread_id
();
auto
ctx
=
unbox
(
ssl
::
context
::
make_client
(
ssl
::
tls
::
any
));
auto
ctx
=
unbox
(
ssl
::
context
::
make_client
(
ssl
::
tls
::
any
));
...
@@ -225,14 +220,14 @@ SCENARIO("openssl::async_connect performs the client handshake") {
...
@@ -225,14 +220,14 @@ SCENARIO("openssl::async_connect performs the client handshake") {
}
}
}
}
SCENARIO
(
"
openssl::async_accept
performs the server handshake"
)
{
SCENARIO
(
"
ssl::transport::make_server
performs the server handshake"
)
{
GIVEN
(
"a socket that is connected to a client"
)
{
GIVEN
(
"a socket that is connected to a client"
)
{
auto
[
server_fd
,
client_fd
]
=
no_sigpipe
(
unbox
(
make_stream_socket_pair
()));
auto
[
server_fd
,
client_fd
]
=
no_sigpipe
(
unbox
(
make_stream_socket_pair
()));
if
(
auto
err
=
net
::
nonblocking
(
server_fd
,
true
))
if
(
auto
err
=
net
::
nonblocking
(
server_fd
,
true
))
FAIL
(
"net::nonblocking failed: "
<<
err
);
FAIL
(
"net::nonblocking failed: "
<<
err
);
std
::
thread
client
{
dummy_tls_client
,
client_fd
};
std
::
thread
client
{
dummy_tls_client
,
client_fd
};
WHEN
(
"acting as the
Open
SSL server"
)
{
WHEN
(
"acting as the SSL server"
)
{
THEN
(
"
openssl::async_accept
transparently calls SSL_accept"
)
{
THEN
(
"
CAF
transparently calls SSL_accept"
)
{
net
::
multiplexer
mpx
{
nullptr
};
net
::
multiplexer
mpx
{
nullptr
};
mpx
.
set_thread_id
();
mpx
.
set_thread_id
();
auto
ctx
=
unbox
(
ssl
::
context
::
make_server
(
ssl
::
tls
::
any
));
auto
ctx
=
unbox
(
ssl
::
context
::
make_server
(
ssl
::
tls
::
any
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment