Skip to content

Fix windows ssl - #3210

Merged
youknowone merged 7 commits into
mainfrom
coolreader18/fix-windows-ssl
Oct 4, 2021
Merged

youknowone merged 7 commits into
mainfrom
coolreader18/fix-windows-ssl

Conversation

@coolreader18

Copy link
Copy Markdown
Member

No description provided.

@coolreader18
coolreader18 force-pushed the coolreader18/fix-windows-ssl branch from 7314a8c to 7ba2187 Compare October 3, 2021 03:20
Comment thread stdlib/src/ssl.rs Resolved
Comment thread stdlib/src/ssl.rs

fn x509_stack_from_der(der: &[u8]) -> Result<Vec<X509>, ErrorStack> {
unsafe {
openssl::init();

Copy link
Copy Markdown
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
Copy Markdown
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