Skip to content
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

can't complete call to TLS_method #106

Closed
ghost opened this issue Jun 21, 2019 · 10 comments
Closed

can't complete call to TLS_method #106

ghost opened this issue Jun 21, 2019 · 10 comments

Comments

@ghost
Copy link

ghost commented Jun 21, 2019

Using this file:

import requests, std.stdio;
void main() {
   write(getContent("https://speed.hetzner.de"));
}

I get this result:

object.Exception@C:\Users\Steven\AppData\Local\dub\packages\requests-1.0.9\
requests\source\requests\ssl_adapter.d(249): can't complete call to TLS_method
@ikod
Copy link
Owner

ikod commented Jun 21, 2019

Hello, @cup

This error means that requests was unable to load ssl library.

Please, compile and run next code and show me complete output.

import std.experimental.logger;
import requests;
void main() {
}

Also I need more info on your system (OS version, ssl library installed)

Thanks

@ghost
Copy link
Author

ghost commented Jun 21, 2019

that source doesnt create any output...

@ikod
Copy link
Owner

ikod commented Jun 21, 2019

Ok, what is your OS and openssl library installed?

@ikod
Copy link
Owner

ikod commented Jun 21, 2019

Hello @cup

Just in case you are on windows https://github.com/ikod/dlang-requests#windows-ssl-notes

@ghost
Copy link
Author

ghost commented Jun 21, 2019

that link is not going to work for me as its a shared build. can you recommend a static build?

@ikod
Copy link
Owner

ikod commented Jun 21, 2019

Hello @cup

If you mean that you have to distribute executable to the machine where openssl library did not installed, then sorry - no, you can't do this with requests

@ghost
Copy link
Author

ghost commented Jun 21, 2019

@ikod are you certain? I found a static build here:

https://curl.haxx.se/windows

so I would just need a way to link it

@ikod
Copy link
Owner

ikod commented Jun 21, 2019

@cup ,

If you will use std.net.curl in your code - then maybe yes, you can link ssl library statically(I never tried).

But not with requests, because requests load ssl library dynamically during application start and detect openssl version at runtime (because openssl 1.0 and openssl 1.1 have different API and there is no easy and portable way to detect openssl version at library build time). You can find details here #45 in case you interested.

@ghost
Copy link
Author

ghost commented Jun 21, 2019

@ikod ok thank you, then I definitely cannot use requests.

@ikod
Copy link
Owner

ikod commented Jun 21, 2019

Sorry for that, @cup
I'll close issue for now.

@ikod ikod closed this as completed Jun 21, 2019
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

No branches or pull requests

1 participant