0

I am facing some issues around SSL (HTTPS calls) in an Adobe Air application. There is a bug on Adobe's list and its the exact same issue that I've bumped into:- https://forums.adobe.com/thread/1116924

The recommended solution (unless Adobe fixes this - they haven't done so in over 2 years) is to use as3crypto's SSL.

Can anyone here help me with the same? Right now, my HTTPService, which uses the default built in Adobe's SSL capabilities, looks like:-

var params:Object = getPOSTParameters();
var _httpservice:HttpService = new HTTPService();
            _httpservice.url = "https://myserver_url";
            _httpservice.resultFormat = "text";
            _httpservice.contentType="application/x-www-form-urlencoded";
            _httpservice.method = "POST";
            _httpservice.concurrency = "multiple";
            _httpservice.requestTimeout=600000;
            _httpservice.showBusyCursor = false;
            _httpservice.addEventListener(IOErrorEvent.IO_ERROR, httpIOError);
            _httpservice.addEventListener(HTTPStatusEvent.HTTP_RESPONSE_STATUS, httpResponseStatus);
var responder:Responder = new Responder(onResult, onError);
            var token:AsyncToken = _httpservice.send(params);
            token.addResponder(responder);

How should I go about implementing the same with as3crypto? Any example/ code pointers will be really helpful

Rohan
  • 871
  • 1
  • 16
  • 32

1 Answers1

1

There is no 100% working solution, at least I don't know it. When I needed https in Adobe Flash I used as3httpclient library where AS3Crypto used for implementig TLSSocket. It's much easier than write you own. But beware it's buggy and it isn't works in some cases.

EDIT: There is documentation available here for me it was enough, there is no difference between http and https request (except URL).

Dmitry Malugin
  • 882
  • 1
  • 7
  • 25
  • Dmitry, thanks a lot for the pointer. I nearly lost hope of getting any answers :) Could you please help me with a sample code snippet of how I should go about implementing the code above in my question, with as3httpclient and as3crypto (as3httpclient readme says that https requests are done using TLS from as3crypto library) – Rohan Apr 12 '15 at 11:53
  • Just added link to documentation – Dmitry Malugin Apr 12 '15 at 20:21
  • Dmitry, thanks a bunch for the response. By any chance, have you ever experienced this issue too:- http://stackoverflow.com/questions/29635775/different-versions-of-air-and-flash-being-used-in-release-and-debug – Rohan Apr 14 '15 at 19:27