tong / hxssl

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

Needs to be compiled for Android #29

Open player-03 opened 10 years ago

player-03 commented 10 years ago

Issue #27 was marked as closed without actually being resolved. I'm getting the same "Could not load module hxssl@hxssl_SSL_recv__4" error, apparently because this hasn't been compiled for Android.

Unfortunately, I'm unable to find any information on how to compile from source (much less information on how to compile from source to a .so file), so I can't fix this myself.

Tell me how, and I'll do it myself. Otherwise, could someone compile for Android?

delahee commented 10 years ago

The lib now uses the build.XML file with the hxcpp toolchain Theoretically you can use haxelib run hxcpp build.xml -D Android but nobody tried before afaik so surprise might arise. ++ Le 5 févr. 2014 04:17, "player-03" notifications@github.com a écrit :

Issue #27 https://github.com/tong/hxssl/issues/27 was marked as closed without actually being resolved. I'm getting the same "Could not load module hxssl@hxssl_SSL_recv__4" error, apparently because this hasn't been compiled for Android.

Unfortunately, I'm unable to find any information on how to compile from source (much less information on how to compile from source to a .so file), so I can't fix this myself.

Tell me how, and I'll do it myself. Otherwise, could someone compile for Android?

— Reply to this email directly or view it on GitHubhttps://github.com/tong/hxssl/issues/29 .

player-03 commented 10 years ago

That helps, but it complains about missing header files (sha.h, bio.h, md5.h, and ripemd.h). It does this even if I specify Windows instead of Android.

I'm assuming I should run this command from the src folder, where build.xml is located. Is that wrong?

delahee commented 10 years ago

The .h things come from that you miss headers in your compiler directives , you must add them with your hxcpp config file. You ll also have trouble with libraries because you must posess their Android .so build. The path you are taking is arduous. Good luck. Le 5 févr. 2014 06:44, "player-03" notifications@github.com a écrit :

That helps, but it complains about missing header files (sha.h, bio.h, md5.h, and ripemd.h). It does this even if I specify Windows instead of Android.

I'm assuming I should run this command from the src folder, where build.xml is located. Is that wrong?

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

delahee commented 10 years ago

I dont know what you want to achieve but if you have time constraints, it might be slightly easier to delegate the https call via JNI because i am not aware of anybody ported hxssl to droid. Gl. Le 5 févr. 2014 08:38, "David Elahee" david.elahee@gmail.com a écrit :

The .h things come from that you miss headers in your compiler directives , you must add them with your hxcpp config file. You ll also have trouble with libraries because you must posess their Android .so build. The path you are taking is arduous. Good luck. Le 5 févr. 2014 06:44, "player-03" notifications@github.com a écrit :

That helps, but it complains about missing header files (sha.h, bio.h, md5.h, and ripemd.h). It does this even if I specify Windows instead of Android.

I'm assuming I should run this command from the src folder, where build.xml is located. Is that wrong?

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

hopewise commented 10 years ago

Whats your project type in which you need to use ssl? Is it openfl? On Feb 5, 2014 9:43 AM, "delahee" notifications@github.com wrote:

I dont know what you want to achieve but if you have time constraints, it might be slightly easier to delegate the https call via JNI because i am not aware of anybody ported hxssl to droid. Gl. Le 5 févr. 2014 08:38, "David Elahee" david.elahee@gmail.com a écrit :

The .h things come from that you miss headers in your compiler directives , you must add them with your hxcpp config file. You ll also have trouble with libraries because you must posess their Android .so build. The path you are taking is arduous. Good luck. Le 5 févr. 2014 06:44, "player-03" notifications@github.com a écrit :

That helps, but it complains about missing header files (sha.h, bio.h, md5.h, and ripemd.h). It does this even if I specify Windows instead of Android.

I'm assuming I should run this command from the src folder, where build.xml is located. Is that wrong?

Reply to this email directly or view it on GitHub< https://github.com/tong/hxssl/issues/29#issuecomment-34139413> .

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

player-03 commented 10 years ago

OpenFL, yes. And for the moment, I'm just using HTTP, because the data I'm sending doesn't necessarily need security.

I'll keep trying to compile this, but maybe not until after the next release...

delahee commented 10 years ago

I vaguely recall curl is embedded in openfl builds, maybe you should take a look at a native curl call.

2014-02-06 player-03 notifications@github.com:

OpenFL, yes. And for the moment, I'm just using HTTP, because the data I'm sending doesn't necessarily need security.

I'll keep trying to compile this, but maybe not until after the next release...

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

David Elahee

hopewise commented 10 years ago

If you are using openFL, you can do this:

request = new URLRequest(); request.url = "https://www.yourdomainname.com"; request.url += ("?param1=" + value1 + "&param2=" + value2); request.method = URLRequestMethod.GET; loader = new URLLoader(); loader.dataFormat = URLLoaderDataFormat.TEXT; loader.addEventListener(Event.COMPLETE, loaderCompleteHandler); loader.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler); loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler); loader.load(request);

it worked for me, but I didn't try to use POST method ..

On Thu, Feb 6, 2014 at 12:56 PM, player-03 notifications@github.com wrote:

OpenFL, yes. And for the moment, I'm just using HTTP, because the data I'm sending doesn't necessarily need security.

I'll keep trying to compile this, but maybe not until after the next release...

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

Kind Regards,

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

player-03 commented 10 years ago

It works! Thanks, hopewise.

As for compiling hxssl (which I still want to do for the practice), I'm not sure where to find the header files in question. They aren't included in hxssl; am I supposed to compile MD5.hx and so on? Or am I supposed to use sources from an entirely separate ssl project, like OpenSSL?

hopewise commented 10 years ago

Glad that it worked! the library author can answer this question, but I like to know please, did you tried GET or POST method at openFL?

On Sun, Feb 9, 2014 at 9:50 AM, player-03 notifications@github.com wrote:

It works! Thanks, hopewise.

As for compiling hxssl (which I still want to do for the practice), I'm not sure where to find these header files so as to include them. They aren't included in hxssl; am I supposed to compile MD5.hx and so on? Or am I supposed to use sources from an entirely separate ssl project, like OpenSSL?

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

Kind Regards,

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

player-03 commented 10 years ago

I used POST, and I tested the Flash, Windows, and Android targets.

hopewise commented 10 years ago

Very cool, thanks, I just tested it with GET

On Sun, Feb 9, 2014 at 12:03 PM, player-03 notifications@github.com wrote:

I used POST, and I tested the Flash, Windows, and Android targets.

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

Kind Regards,

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