-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
openssl not use locking after 1.1.0 #434
Conversation
acb422b
to
ca70993
Compare
@@ -281,9 +281,9 @@ IFileSystem* new_httpfs_v2(bool default_https, uint64_t conn_timeout, | |||
client, client_ownership); | |||
} | |||
|
|||
IFile* new_httpfile_v2(const char* url, HttpFs_v2* httpfs, uint64_t conn_timeout, | |||
IFile* new_httpfile_v2(const char* url, IFileSystem* httpfs, uint64_t conn_timeout, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mismatch to header file, cause undefined symbols
@@ -139,7 +139,8 @@ class KernelSocketStream : public SocketStreamBase { | |||
return (Object*) (uint64_t) fd; | |||
} | |||
int close() final { | |||
get_vcpu()->master_event_engine->wait_for_fd(fd, 0, -1UL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (fd < 0) return 0;
@@ -76,17 +76,21 @@ class GlobalSSLContext : public Singleton<GlobalSSLContext> { | |||
OpenSSL_add_all_ciphers(); | |||
OpenSSL_add_all_digests(); | |||
OpenSSL_add_all_algorithms(); | |||
#if OPENSSL_VERSION_NUMBER < 0x10100000L |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a function to obtain openssl version dynamically? If so, it's better to use if
instead of #if
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SSLeay_version()
. But it will output string like OpenSSL 1.0.1a 15 Oct 2015
, not handy to use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to https://github.com/openssl/openssl/blob/OpenSSL_1_1_0-stable/crypto/cversion.c
we can use SSLeay()
for versions before 1.1, and OpenSSL_version_num()
for those after 1.1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can probe for the above functions with dlopen(filename==NULL)
and dlsymbol()
, and decide which one to use.
Going to backport to 0.7