AS3: Sockets and HTTPS / SSL

I have successfully implemented the Socket class in AS3, especially so that HTTP requests retrieve binary (images) or ascii (JSON) data. However, I need to be flexible between HTTP and HTTPS - so given the current state of the AS3 Socket class, this becomes a problem.

My question is not necessarily limited to AS3, but maybe there is some understanding in the main library that I don't know about. It is clear that to change the port and HTTP-request protocol 443and ssl://is not enough - Apache (for example) will respond by saying that you are a fool (sic), and it will not tell you anything to serve SSL-connection.

So I referenced Bruce Wang on secure sockets on the Flex blog and tried to implement some of these methods, especially using the Hurlant classes crypto, but even after the initial call, socket.sendBytes(rsaEncryptedPublicKey)Apache returns an empty response body (including response headers).

I'm admittedly not an SSL expert, but is this possible in AS3, and if so, what will be different in writing / reading from a socket compared to a standard HTTP connection? In particular, how would you send and receive encoding / decoding information? Any thoughts would be appreciated.

+5
source share
1 answer

, , , SSL/TLS.

as3crypto TLSSocket , (. testHost HTTPS).

+6

All Articles