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
4182bc5a
Unverified
Commit
4182bc5a
authored
Jul 05, 2018
by
Dominik Charousset
Committed by
GitHub
Jul 05, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #717
Fix "unused" warnings when using OpenSSL 1.1
parents
3707ba7d
fef0a5f7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
libcaf_openssl/src/manager.cpp
libcaf_openssl/src/manager.cpp
+6
-0
libcaf_openssl/src/session.cpp
libcaf_openssl/src/session.cpp
+1
-1
No files found.
libcaf_openssl/src/manager.cpp
View file @
4182bc5a
...
...
@@ -45,6 +45,7 @@ struct CRYPTO_dynlock_value {
namespace
caf
{
namespace
openssl
{
#if OPENSSL_VERSION_NUMBER < 0x10100000L
static
int
init_count
=
0
;
static
std
::
mutex
init_mutex
;
static
std
::
vector
<
std
::
mutex
>
mutexes
;
...
...
@@ -74,8 +75,10 @@ static void dynlock_destroy(CRYPTO_dynlock_value* dynlock,
const
char
*
/* file */
,
int
/* line */
)
{
delete
dynlock
;
}
#endif
manager
::~
manager
()
{
#if OPENSSL_VERSION_NUMBER < 0x10100000L
std
::
lock_guard
<
std
::
mutex
>
lock
{
init_mutex
};
--
init_count
;
if
(
init_count
==
0
)
{
...
...
@@ -85,6 +88,7 @@ manager::~manager() {
CRYPTO_set_dynlock_destroy_callback
(
nullptr
);
mutexes
=
std
::
vector
<
std
::
mutex
>
(
0
);
}
#endif
}
void
manager
::
start
()
{
...
...
@@ -115,6 +119,7 @@ void manager::init(actor_system_config&) {
CAF_RAISE_ERROR
(
"No private key configured for SSL endpoint"
);
}
#if OPENSSL_VERSION_NUMBER < 0x10100000L
std
::
lock_guard
<
std
::
mutex
>
lock
{
init_mutex
};
++
init_count
;
if
(
init_count
==
1
)
{
...
...
@@ -125,6 +130,7 @@ void manager::init(actor_system_config&) {
CRYPTO_set_dynlock_destroy_callback
(
dynlock_destroy
);
// OpenSSL's default thread ID callback should work, so don't set our own.
}
#endif
}
actor_system
::
module
::
id_t
manager
::
id
()
const
{
...
...
libcaf_openssl/src/session.cpp
View file @
4182bc5a
...
...
@@ -243,7 +243,7 @@ SSL_CTX* session::create_ssl_context() {
}
else
{
// No authentication.
SSL_CTX_set_verify
(
ctx
,
SSL_VERIFY_NONE
,
nullptr
);
#if
def CAF_SSL_HAS_ECDH_AUTO
#if
defined(CAF_SSL_HAS_ECDH_AUTO) && (OPENSSL_VERSION_NUMBER < 0x10100000L)
SSL_CTX_set_ecdh_auto
(
ctx
,
1
);
#else
auto
ecdh
=
EC_KEY_new_by_curve_name
(
NID_secp384r1
);
...
...
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