The heart of the TLS protocol.
This class can work in server or client mode.
This doesn't fully implement the TLS protocol.
Things missing that I'd like to add:
- support for client-side certificates
- general code clean-up to make sure we don't have gaping securite holes
Things that aren't there that I won't add:
- support for "export" cypher suites (deprecated in later TLS versions)
- support for "anon" cypher suites (deprecated in later TLS versions)
Things that I'm unsure about adding later:
- compression. Compressing encrypted streams is barely worth the CPU cycles.
- diffie-hellman based key exchange mechanisms. Nifty, but would we miss it?
peerCertificate:X509Certificate [read-only]
Implementation public function get peerCertificate():X509Certificatepublic var protocol_version:uintpublic function TLSEngine(config:TLSConfig, iStream:IDataInput, oStream:IDataOutput, otherIdentity:String = null)
Parameters | config:TLSConfig — A TLSConfig instance describing how we're supposed to work
|
| |
| iStream:IDataInput — An input stream to read TLS data from
|
| |
| oStream:IDataOutput — An output stream to write TLS data to
|
| |
| otherIdentity:String (default = null) — An optional identifier. If set, this will be checked against the Subject CN of the other side's certificate.
|
public function acceptPeerCertificate():void public function close(e:TLSError = null):void Parameters
public function dataAvailable(e:* = null):void Parameters
public function rejectPeerCertificate():void public function sendApplicationData(data:ByteArray, offset:uint = 0, length:uint = 0):void Parameters
| data:ByteArray |
| |
| offset:uint (default = 0) |
| |
| length:uint (default = 0) |
public function start():void
This starts the TLS negotiation for a TLS Client.
This is a no-op for a TLS Server.
Event Object Type: flash.events.Event Event Object Type: flash.events.ProgressEvent public static const CLIENT:uint = 1public static const SERVER:uint = 0
Mon May 20 2013, 09:16 PM +02:00