tong / hxssl

Haxe→C++/Neko OpenSSL bindings
30 stars 45 forks source link

Could not load module hxssl@hxssl_SSL_recv__4 #27

Closed hopewise closed 10 years ago

hopewise commented 10 years ago

I have purchased a certificate from DNSimple, and I have added it to my website hosted by heroku: https://dcaclab.com/

When I target windows, I set the parameters of req like this:

var req; req = new haxe.Http('https://www.dcaclab.com/activate.json'); req.certFolder = "assets/ssl/certs/"; req.certFile = "assets/ssl/certs/purchased_certificate.crt";

in project.xml:

<haxelib name="hxssl"/>
<assets path="Assets" rename="assets" include="*" exclude="openfl.svg" />

As I am putting my purchased_certificate.crt in assets folder, I get this error:

Could not load module hxssl@hxssl_SSL_recv__4

Any idea please?

hexonaut commented 10 years ago

I'm not entirely sure about the error, but it looks like you are using the certFolder and certFile incorrectly.

The tls socket certificates are for verifying the certificate sent by the server. You want to put your purchased private key and public certificate on your webserver. Really you shouldn't be touching certFolder and certFile.

@tong What is the certificate validation process in windows? Is it automatic?

hopewise commented 10 years ago

Really you shouldn't be touching certFolder and certFile.

Shall I just ignore them and not use them in my case?

p.s: I still get the error even if I dont set certFolder and certFile, works fine in flash.. On Jan 23, 2014 10:17 PM, "Sam" notifications@github.com wrote:

I'm not entirely sure about the error, but it looks like you are using the certFolder and certFile incorrectly.

The tls socket certificates are for verifying the certificate sent by the server. You want to put your purchased private key and public certificate on your webserver. Really you shouldn't be touching certFolder and certFile.

@tong https://github.com/tong What is the certificate validation process in windows? Is it automatic?

— Reply to this email directly or view it on GitHubhttps://github.com/tong/hxssl/issues/27#issuecomment-33163889 .

hexonaut commented 10 years ago

That's correct; you shouldn't be using certFolder and certFile. They should be detected automatically and it's a bug on hxssl's end that it's generating an error.

I've opened an issue for this #28

hopewise commented 10 years ago

Thanks for clarification, I hope that its easy to fix the bug.. as I am working on a production project.. On Jan 23, 2014 11:02 PM, "Sam" notifications@github.com wrote:

That's correct; you shouldn't be using certFolder and certFile. They should be detected automatically and it's a bug on hxssl's end that it's generating an error.

I've opened an issue for this #28https://github.com/tong/hxssl/issues/28

— Reply to this email directly or view it on GitHubhttps://github.com/tong/hxssl/issues/27#issuecomment-33168086 .

hexonaut commented 10 years ago

Upon further inspection it looks as though the error may be unrelated to the certificate validation. An error of "Could not load module..." suggests that the hxssl library is not available to openfl. You will need to ensure tls.ndll is available to your compiled project.

I have not used openfl before so I cannot offer much help beyond that, but there should be an article somewhere on how to get hxssl working with openfl.

hopewise commented 10 years ago

Oh.. but adding hxssl in build.xml as a library shall be educate, I will put a question at openfl forum and may be os too..

Thanks On Jan 23, 2014 11:58 PM, "Sam" notifications@github.com wrote:

Upon further inspection it looks as though the error may be unrelated to the certificate validation. An error of "Could not load module..." suggests that the hxssl library is not available to openfl. You will need to ensure tls.ndll is available to your compiled project.

I have not used openfl before so I cannot offer much help beyond that, but there should be an article somewhere on how to get hxssl working with openfl.

— Reply to this email directly or view it on GitHubhttps://github.com/tong/hxssl/issues/27#issuecomment-33173672 .

hopewise commented 10 years ago

I can see new updates to code, have you fixed the bug?!

hexonaut commented 10 years ago

I believe your error is due to the hxssl library not being included with your openfl project which is unrelated to the changes I've made.

The recent changes automatically detect the OS's certificate authority bundle instead of having Haxe users required to manually specify them.

hopewise commented 10 years ago

I will try to download the library and haxelib dev path to it..

Thanks for the great work.. On Jan 26, 2014 8:30 PM, "Sam" notifications@github.com wrote:

I believe your error is due to the hxssl library not being included with your openfl project which is unrelated to the changes I've made.

The recent changes automatically detect the OS's certificate authority bundle instead of having Haxe users required to manually specify them.

— Reply to this email directly or view it on GitHubhttps://github.com/tong/hxssl/issues/27#issuecomment-33325651 .

hexonaut commented 10 years ago

Btw the compiled binaries in ndll may not be fully up to date in the git repo. You may need to compile from source. If you want a stable copy use the hxssl from haxelib.

hopewise commented 10 years ago

Thanks, I've used hxssl.ndll from haxelib, I can access https in windows target now, I've copied hxssl.ndll beside the exe file But, what about android?

On Sun, Jan 26, 2014 at 11:14 PM, Sam notifications@github.com wrote:

Btw the compiled binaries in ndll may not be fully up to date in the git repo. You may need to compile from source. If you want a stable copy use the hxssl from haxelib.

— Reply to this email directly or view it on GitHubhttps://github.com/tong/hxssl/issues/27#issuecomment-33328773 .

Kind Regards,

Samir Sabri Software Architect& Developer www.dcaclab.com Jordan-Middle East

hexonaut commented 10 years ago

Not sure; I've never used openfl.

hopewise commented 10 years ago

Oh sorry, you already told me so.. thank you.. On Jan 27, 2014 7:44 PM, "Sam" notifications@github.com wrote:

Not sure; I've never used openfl.

— Reply to this email directly or view it on GitHubhttps://github.com/tong/hxssl/issues/27#issuecomment-33398633 .

hexonaut commented 10 years ago

No problem. Good luck with your project! :)

hopewise commented 10 years ago

Thank you, by the way, as you didn't work on openfl, what do you use to build apps for Android, iPhone other platforms..? On Jan 27, 2014 8:26 PM, "Sam" notifications@github.com wrote:

No problem. Good luck with your project! :)

— Reply to this email directly or view it on GitHubhttps://github.com/tong/hxssl/issues/27#issuecomment-33404213 .

hexonaut commented 10 years ago

I mostly work in the web space (Neko, JS) so I don't touch native apps.

hopewise commented 10 years ago

Its easy for me to understand web relation to JS, but what about Neko? truly I have no idea.. On Jan 27, 2014 8:46 PM, "Sam" notifications@github.com wrote:

I mostly work in the web space (Neko, JS) so I don't touch native apps.

— Reply to this email directly or view it on GitHubhttps://github.com/tong/hxssl/issues/27#issuecomment-33406752 .

hexonaut commented 10 years ago

I use Neko for the web server.

thomasuster commented 8 years ago

@hopewise Did you ever get hxssl working on android / iOS?

hopewise commented 8 years ago

No.. I didn't this library then, I've used the native method of haxe as I remember.. On 31 Mar 2016 03:20, "Thomas Uster" notifications@github.com wrote:

@hopewise https://github.com/hopewise Did you ever get hxssl working on android / iOS?

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/tong/hxssl/issues/27#issuecomment-203705418