Skip to content

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

Merged
merged 7 commits into from
Oct 4, 2021
Merged

Fix windows ssl #3210

merged 7 commits into from
Oct 4, 2021

Conversation

coolreader18
Copy link
Member

No description provided.

@coolreader18 coolreader18 force-pushed the coolreader18/fix-windows-ssl branch from 7314a8c to 7ba2187 Compare October 3, 2021 03:20
@@ -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();
Copy link
Member

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?

Copy link
Member Author

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.

@youknowone youknowone merged commit efce02f into main Oct 4, 2021
@youknowone youknowone deleted the coolreader18/fix-windows-ssl branch October 4, 2021 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants