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
d7309c7a
Unverified
Commit
d7309c7a
authored
Nov 29, 2017
by
Dominik Charousset
Committed by
GitHub
Nov 29, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #627
Fix unit tests with OpenSSL 1.1.0
parents
8e08b12b
96803c60
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
10 deletions
+20
-10
CMakeLists.txt
CMakeLists.txt
+4
-2
libcaf_core/caf/config.hpp
libcaf_core/caf/config.hpp
+0
-1
libcaf_openssl/caf/openssl/session.hpp
libcaf_openssl/caf/openssl/session.hpp
+5
-0
libcaf_openssl/src/session.cpp
libcaf_openssl/src/session.cpp
+11
-7
No files found.
CMakeLists.txt
View file @
d7309c7a
...
@@ -45,6 +45,8 @@ if(CAF_BUILD_STATIC_RUNTIME)
...
@@ -45,6 +45,8 @@ if(CAF_BUILD_STATIC_RUNTIME)
endif
()
endif
()
endif
()
endif
()
endforeach
()
endforeach
()
else
()
set
(
CAF_BUILD_STATIC_RUNTIME no
)
endif
()
endif
()
# add helper target that simplifies re-running configure
# add helper target that simplifies re-running configure
...
@@ -537,7 +539,7 @@ if(NOT CAF_NO_OPENSSL)
...
@@ -537,7 +539,7 @@ if(NOT CAF_NO_OPENSSL)
# Check OpenSSL version >= 1.0.1
# Check OpenSSL version >= 1.0.1
if
(
OPENSSL_VERSION VERSION_LESS 1.0.1
)
if
(
OPENSSL_VERSION VERSION_LESS 1.0.1
)
message
(
STATUS
message
(
STATUS
"Disable OpenSSL. Required >= 1.0.1 due to TLSv2 support."
)
"Disable OpenSSL. Required >= 1.0.1 due to TLSv
1.
2 support."
)
set
(
CAF_NO_OPENSSL yes
)
set
(
CAF_NO_OPENSSL yes
)
else
()
else
()
# Check if openssl headers and library versions match
# Check if openssl headers and library versions match
...
@@ -552,7 +554,7 @@ if(NOT CAF_NO_OPENSSL)
...
@@ -552,7 +554,7 @@ if(NOT CAF_NO_OPENSSL)
}
}
return -1;
return -1;
}
}
"
OPENSSL_CORRECT_VERSION_NUMBER
)
"
OPENSSL_CORRECT_VERSION_NUMBER
)
if
(
NOT OPENSSL_CORRECT_VERSION_NUMBER
)
if
(
NOT OPENSSL_CORRECT_VERSION_NUMBER
)
message
(
FATAL_ERROR
message
(
FATAL_ERROR
"OpenSSL library version does not match headers"
)
"OpenSSL library version does not match headers"
)
...
...
libcaf_core/caf/config.hpp
View file @
d7309c7a
...
@@ -236,5 +236,4 @@
...
@@ -236,5 +236,4 @@
throw std::runtime_error(msg)
throw std::runtime_error(msg)
#endif // CAF_NO_EXCEPTIONS
#endif // CAF_NO_EXCEPTIONS
#endif // CAF_CONFIG_HPP
#endif // CAF_CONFIG_HPP
libcaf_openssl/caf/openssl/session.hpp
View file @
d7309c7a
...
@@ -33,6 +33,11 @@ CAF_POP_WARNINGS
...
@@ -33,6 +33,11 @@ CAF_POP_WARNINGS
#include "caf/io/network/native_socket.hpp"
#include "caf/io/network/native_socket.hpp"
#include "caf/io/network/default_multiplexer.hpp"
#include "caf/io/network/default_multiplexer.hpp"
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
# define CAF_SSL_HAS_SECURITY_LEVEL
# define CAF_SSL_HAS_NON_VERSIONED_TLS_FUN
#endif
namespace
caf
{
namespace
caf
{
namespace
openssl
{
namespace
openssl
{
...
...
libcaf_openssl/src/session.cpp
View file @
d7309c7a
...
@@ -204,7 +204,11 @@ const char* session::openssl_passphrase() {
...
@@ -204,7 +204,11 @@ const char* session::openssl_passphrase() {
SSL_CTX
*
session
::
create_ssl_context
()
{
SSL_CTX
*
session
::
create_ssl_context
()
{
CAF_BLOCK_SIGPIPE
();
CAF_BLOCK_SIGPIPE
();
#ifdef CAF_SSL_HAS_NON_VERSIONED_TLS_FUN
auto
ctx
=
SSL_CTX_new
(
TLS_method
());
#else
auto
ctx
=
SSL_CTX_new
(
TLSv1_2_method
());
auto
ctx
=
SSL_CTX_new
(
TLSv1_2_method
());
#endif
if
(
!
ctx
)
if
(
!
ctx
)
raise_ssl_error
(
"cannot create OpenSSL context"
);
raise_ssl_error
(
"cannot create OpenSSL context"
);
if
(
sys_
.
openssl_manager
().
authentication_enabled
())
{
if
(
sys_
.
openssl_manager
().
authentication_enabled
())
{
...
@@ -240,13 +244,13 @@ SSL_CTX* session::create_ssl_context() {
...
@@ -240,13 +244,13 @@ SSL_CTX* session::create_ssl_context() {
}
else
{
}
else
{
// No authentication.
// No authentication.
SSL_CTX_set_verify
(
ctx
,
SSL_VERIFY_NONE
,
nullptr
);
SSL_CTX_set_verify
(
ctx
,
SSL_VERIFY_NONE
,
nullptr
);
auto
ecdh
=
EC_KEY_new_by_curve_name
(
NID_secp384r
1
);
SSL_CTX_set_ecdh_auto
(
ctx
,
1
);
if
(
!
ecdh
)
#ifdef CAF_SSL_HAS_SECURITY_LEVEL
raise_ssl_error
(
"cannot get ECDH curve"
)
;
const
char
*
cipher
=
"AECDH-AES256-SHA@SECLEVEL=0"
;
CAF_PUSH_WARNINGS
#else
SSL_CTX_set_tmp_ecdh
(
ctx
,
ecdh
)
;
const
char
*
cipher
=
"AECDH-AES256-SHA"
;
CAF_POP_WARNINGS
#endif
if
(
SSL_CTX_set_cipher_list
(
ctx
,
"AECDH-AES256-SHA"
)
!=
1
)
if
(
SSL_CTX_set_cipher_list
(
ctx
,
cipher
)
!=
1
)
raise_ssl_error
(
"cannot set anonymous cipher"
);
raise_ssl_error
(
"cannot set anonymous cipher"
);
}
}
return
ctx
;
return
ctx
;
...
...
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