Does Appcelerator support TLS/SSL Sockets?
A similar question was asked three months ago and has no response. Do Appcelerator developers read these forums? All I'm looking for is a "Yes, check out <link>" or "No, sorry"
Secure sockets are a must-have for our application, but I couldn't find any documentation about them in the Docs pages.
4 Answers
-
Appcelerator people, Can you please reply to this thread.
It would save a lot of hours of lot many people if you can answer this simple question, whether SSL/TLS is supported with Titanium.Network.Socket.TCP or not.
If you go by documentation and following issues TIMOB-6211,
TIMOB-6212 then the clear answer is No.
But the above issues were raised in the year 2011, and so I am still guessing&expecting some work around to be available in the latest release. -
I'm not sure if this is what you meant, but I am currently building an application that makes AJAX calls to an https:// address, and it seems to work just fine. I can also open a window with an SSL address/URL and it opens fine.
-
Does anyone have an android solution? Need solutions.
-
hope this helps :) I finally get it work!
- go to build/iphone/Classes
- edit TiNetworkTCPSocketProxy.mm
find initializeReadStream function
before this line:
CFReadStreamSetProperty((CFReadStreamRef)input, kCFStreamPropertyShouldCloseNativeSocket, kCFBooleanTrue);
add this
[input setProperty:NSStreamSocketSecurityLevelNegotiatedSSL forKey:NSStreamSocketSecurityLevelKey];
find initializeWriteStream (it's just after the other function)
ídem:
~~~
[output setProperty:NSStreamSocketSecurityLevelNegotiatedSSL forKey:NSStreamSocketSecurityLevelKey];
CFWriteStreamSetProperty((CFWriteStreamRef)output, kCFStreamPropertyShouldCloseNativeSocket, kCFBooleanTrue);
~~~- full rebuild (remove all the files/dirs inside build/iphone) and the make
I changed both functions because U use full duplex sockets (R+W)… don't know whether you need to for R only / W only sockets or not.
IMPORTANT: better change the source from the SDK, avoiding being rewritten by Titanium…