Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
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
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
Libraries
nghttp2
Commits
12a4e7c3
Commit
12a4e7c3
authored
8 years ago
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src: Use raw pointer for ssl_global_locks
parent
799a76de
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
7 deletions
+3
-7
src/ssl.cc
src/ssl.cc
+3
-6
src/ssl.h
src/ssl.h
+0
-1
No files found.
src/ssl.cc
View file @
12a4e7c3
...
...
@@ -42,12 +42,11 @@ namespace ssl {
// CRYPTO_LOCK is deprecated as of OpenSSL 1.1.0
LibsslGlobalLock
::
LibsslGlobalLock
()
{}
LibsslGlobalLock
::~
LibsslGlobalLock
()
{}
#else // !OPENSSL_1_1_API
namespace
{
std
::
vector
<
std
::
mutex
>
ssl_global_locks
;
std
::
mutex
*
ssl_global_locks
;
}
// namespace
namespace
{
...
...
@@ -61,11 +60,11 @@ void ssl_locking_cb(int mode, int type, const char *file, int line) {
}
// namespace
LibsslGlobalLock
::
LibsslGlobalLock
()
{
if
(
!
ssl_global_locks
.
empty
()
)
{
if
(
ssl_global_locks
)
{
std
::
cerr
<<
"OpenSSL global lock has been already set"
<<
std
::
endl
;
assert
(
0
);
}
ssl_global_locks
=
std
::
vector
<
std
::
mutex
>
(
CRYPTO_num_locks
())
;
ssl_global_locks
=
new
std
::
mutex
[
CRYPTO_num_locks
()]
;
// CRYPTO_set_id_callback(ssl_thread_id); OpenSSL manual says that
// if threadid_func is not specified using
// CRYPTO_THREADID_set_callback(), then default implementation is
...
...
@@ -73,8 +72,6 @@ LibsslGlobalLock::LibsslGlobalLock() {
CRYPTO_set_locking_callback
(
ssl_locking_cb
);
}
LibsslGlobalLock
::~
LibsslGlobalLock
()
{
ssl_global_locks
.
clear
();
}
#endif // !OPENSSL_1_1_API
const
char
*
get_tls_protocol
(
SSL
*
ssl
)
{
...
...
This diff is collapsed.
Click to expand it.
src/ssl.h
View file @
12a4e7c3
...
...
@@ -40,7 +40,6 @@ namespace ssl {
class
LibsslGlobalLock
{
public:
LibsslGlobalLock
();
~
LibsslGlobalLock
();
LibsslGlobalLock
(
const
LibsslGlobalLock
&
)
=
delete
;
LibsslGlobalLock
&
operator
=
(
const
LibsslGlobalLock
&
)
=
delete
;
};
...
...
This diff is collapsed.
Click to expand it.
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