-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix windows ssl #3210
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
Fix windows ssl #3210
Conversation
7314a8c
to
7ba2187
Compare
@@ -992,6 +1021,33 @@ fn convert_ssl_error( | |||
vm.new_exception_msg(cls, msg.to_owned()) | |||
} | |||
|
|||
fn x509_stack_from_der(der: &[u8]) -> Result<Vec<X509>, ErrorStack> { | |||
unsafe { | |||
openssl::init(); |
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.
does openssl::init()
is designed to be called whenever this function is called?
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.
Most of rust-openssl's functions call init()
at the start of the function, e.g. X509::stack_from_pem
's first line calls it, since it's invalid to use the openssl api without calling it. Obviously we wouldn't get to the point since we call it in make_module
but I figured since it's a more generic function it would be good to follow their convention.
No description provided.