Open GoogleCodeExporter opened 9 years ago
ignacioalles's fix worked wonders for me when my client would not handshake
with a
server.
Thx ignacioalles!
Original comment by ockky...@gmail.com
on 15 Jan 2009 at 7:34
You're welcome. Are you developing a web application? Or a desktop one?
I think it would be nice to have it applied to the project.
Original comment by ignacioa...@gmail.com
on 15 Jan 2009 at 7:50
Incorporated most of this into the current commit.
Original comment by sh0rtw...@gmail.com
on 4 Jun 2009 at 11:42
Hello,
We are trying to connect with a JAVA socket server.
Without the encryption it works fine.
Encryption enabled, connection works fine ( note: debug player )
But when published for flash player 10.2 in a browser ( Published with Flex or
CS5 ) as (sandboxtype:remote), doesn't work anymore...
In short:
At first without encryption, connection works fine as sandboxtype: remote.
So, policy file is exchanged etc. and connection is made.
After as3crypto wrapper it connects fine in debug player (
sandboxtype:localThrusted )
Of course here is no policy file exchanged...
Chears!
Original comment by i.cazem...@gmail.com
on 8 Mar 2011 at 2:39
Hello everybody,
We debugged the as3crypto side, en determined that there is something wrong
with the handshaking routines ( sandbox:remote ). The weird thing is, that when
you try to connect a few times, the connection is estabished... Every time you
must connect a few times...
But in de sandbox:thrusted local, one connect action is needed to connect...
So, at the moment looking at JAVA side...
Anybody?
Cheers ( not Chears ).
Ivo
Original comment by i.cazem...@gmail.com
on 13 Mar 2011 at 1:34
Guys,
Please read:"http://forums.adobe.com/thread/497758?tstart=0"
Mister bjohnston@bsecure.com allready solved my problem!!! Thank you buddy!
Why are these changes improvements not commited???
[code]
public function connect(host:String, port:int, config:TLSConfig = null):void {
init(new Socket, config, host);
_socket.connect(host, port);
// make sure socket connects before having the engine start to use it
//_engine.start();
}
public function startTLS(socket:Socket, host:String, config:TLSConfig = null):void {
if (!socket.connected) {
throw new Error("Cannot STARTTLS on a socket that isn't connected.");
}
init(socket, config, host);
_engine.start();
}
private function init(socket:Socket, config:TLSConfig, host:String):void {
_iStream = new ByteArray;
_oStream = new ByteArray;
_iStream_cursor = 0;
objectEncoding = ObjectEncoding.DEFAULT;
endian = Endian.BIG_ENDIAN;
_socket = socket;
//_socket.addEventListener(Event.CONNECT, dispatchEvent);
// make sure socket connects before having the engine start to use it
_socket.addEventListener(Event.CONNECT, onSocketConnected);
_socket.addEventListener(IOErrorEvent.IO_ERROR, dispatchEvent);
_socket.addEventListener(SecurityErrorEvent.SECURITY_ERROR, dispatchEvent);
_socket.addEventListener(Event.CLOSE, dispatchEvent);
if (config == null) {
config = new TLSConfig(TLSEngine.CLIENT);
}
_engine = new TLSEngine(config, _socket, _socket, host);
_engine.addEventListener(TLSEvent.DATA, onTLSData);
_engine.addEventListener(TLSEvent.READY, onTLSReady);
_engine.addEventListener(Event.CLOSE, onTLSClose);
_engine.addEventListener(ProgressEvent.SOCKET_DATA, function(e:*):void { _socket.flush(); });
_socket.addEventListener(ProgressEvent.SOCKET_DATA, _engine.dataAvailable);
_ready = false;
}
// make sure socket connects before having the engine start to use it
private function onSocketConnected(evt:Event):void
{
_engine.start();
this.dispatchEvent(evt);
}
public function flush():void {
commitWrite();
_socket.flush();
}
[/code]
Original comment by i.cazem...@gmail.com
on 16 Mar 2011 at 8:34
Thank you VERY much. I've spent ages checking my code, checking the many
examples (with plain sockets), checking traffic, and wondering WHY it wasn't
working (note there are examples for standard sockets out there that suffer the
same problem namely using the socked before it's ready).
I only found the root problem when using openssl s_server, and I could see
there was a problem with the handshake.
This change is really important; without it TLSSocket is pretty broken. We
should let Mr. Hurlant (who I am also very grateful to) know.
Thanks again (and bjonhston),
Nick
Original comment by nick.p.d...@gmail.com
on 27 Oct 2011 at 5:04
Yes!
As I mentioned : "Why are these changes improvements not commited???"
At the moment, we left AS3Crypto development, and use red5 already...
Ivo
Original comment by i.cazem...@gmail.com
on 28 Oct 2011 at 10:42
Original issue reported on code.google.com by
ignacioa...@gmail.com
on 26 Sep 2008 at 7:20Attachments: