hxssl icon indicating copy to clipboard operation
hxssl copied to clipboard

Needs to be compiled for Android

Open player-03 opened this issue 11 years ago • 12 comments

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?

player-03 avatar Feb 05 '14 03:02 player-03

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" [email protected] 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 .

delahee avatar Feb 05 '14 05:02 delahee

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?

player-03 avatar Feb 05 '14 05:02 player-03

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" [email protected] 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 avatar Feb 05 '14 07:02 delahee

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" [email protected] 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" [email protected] 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 avatar Feb 05 '14 07:02 delahee

Whats your project type in which you need to use ssl? Is it openfl? On Feb 5, 2014 9:43 AM, "delahee" [email protected] 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" [email protected] 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" [email protected] 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 .

hopewise avatar Feb 05 '14 07:02 hopewise

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...

player-03 avatar Feb 06 '14 09:02 player-03

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 [email protected]:

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

delahee avatar Feb 06 '14 10:02 delahee

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 [email protected] 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

hopewise avatar Feb 06 '14 19:02 hopewise

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?

player-03 avatar Feb 09 '14 06:02 player-03

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 [email protected] 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

hopewise avatar Feb 09 '14 09:02 hopewise

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

player-03 avatar Feb 09 '14 09:02 player-03

Very cool, thanks, I just tested it with GET

On Sun, Feb 9, 2014 at 12:03 PM, player-03 [email protected] 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

hopewise avatar Feb 09 '14 09:02 hopewise