ActionScript 3 Cryptography Library | All Packages | All Classes | Index | Frames No Frames |
TLSSocket

Package | com.hurlant.crypto.tls
Class | public class TLSSocket
Inheritance | TLSSocket flash.net.Socket
Implements | flash.utils.IDataInput, flash.utils.IDataOutput

It feels like a socket, but it wraps the stream over TLS 1.0 That's all.

Public Properties

| Property | Defined By
--- | --- | ---
|  | bytesAvailable : uint [override] [read-only] | TLSSocket
|  | connected : Boolean [override] [read-only] | TLSSocket
|  | endian : String [override] | TLSSocket
|  | objectEncoding : uint [override] | TLSSocket

Public Methods

| Method | Defined By
--- | --- | ---
|  | TLSSocket(host:String = null, port:int = 0, config:TLSConfig = null) | TLSSocket
|  | acceptPeerCertificate(event:Event):void | TLSSocket
|  | close():void [override] | TLSSocket
|  | connect(host:String, port:int):void [override] | TLSSocket
|  | flush():void [override] | TLSSocket
|  | getPeerCertificate():X509Certificate | TLSSocket
|  | onAcceptCert(event:TLSEvent):void | TLSSocket
|  | readBoolean():Boolean [override] | TLSSocket
|  | readByte():int [override] | TLSSocket
|  | readBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void [override] | TLSSocket
|  | readDouble():Number [override] | TLSSocket
|  | readFloat():Number [override] | TLSSocket
|  | readInt():int [override] | TLSSocket
|  | readMultiByte(length:uint, charSet:String):String [override] | TLSSocket
|  | readObject():* [override] | TLSSocket
|  | readShort():int [override] | TLSSocket
|  | readUnsignedByte():uint [override] | TLSSocket
|  | readUnsignedInt():uint [override] | TLSSocket
|  | readUnsignedShort():uint [override] | TLSSocket
|  | readUTF():String [override] | TLSSocket
|  | readUTFBytes(length:uint):String [override] | TLSSocket
|  | reinitialize(host:String, config:TLSConfig):void | TLSSocket
|  | rejectPeerCertificate(event:Event):void | TLSSocket
|  | releaseSocket():void | TLSSocket
|  | setTLSConfig(config:TLSConfig):void | TLSSocket
|  | startTLS(socket:Socket, host:String, config:TLSConfig = null):void | TLSSocket
|  | writeBoolean(value:Boolean):void [override] | TLSSocket
|  | writeByte(value:int):void [override] | TLSSocket
|  | writeBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void [override] | TLSSocket
|  | writeDouble(value:Number):void [override] | TLSSocket
|  | writeFloat(value:Number):void [override] | TLSSocket
|  | writeInt(value:int):void [override] | TLSSocket
|  | writeMultiByte(value:String, charSet:String):void [override] | TLSSocket
|  | writeObject(object:*):void [override] | TLSSocket
|  | writeShort(value:int):void [override] | TLSSocket
|  | writeUnsignedInt(value:uint):void [override] | TLSSocket
|  | writeUTF(value:String):void [override] | TLSSocket
|  | writeUTFBytes(value:String):void [override] | TLSSocket

Events

| Event | Summary | Defined By
--- | --- | --- | ---
|  | acceptPeerCertificatePrompt |  | TLSSocket
|  | close |  | TLSSocket
|  | connect |  | TLSSocket
|  | ioError |  | TLSSocket
|  | securityError |  | TLSSocket
|  | socketData |  | TLSSocket

Public Constants

| Constant | Defined By
--- | --- | ---
|  | ACCEPT_PEER_CERT_PROMPT : String = acceptPeerCertificatePrompt [static] | TLSSocket

Property Detail

bytesAvailable | property

`bytesAvailable:uint` [read-only] [override]

Implementation
`public function get bytesAvailable():uint`

connected | property |

`connected:Boolean` [read-only] [override]

Implementation
`public function get connected():Boolean`

endian | property |

`endian:String`[override]

Implementation
`public function get endian():String`
`public function set endian(value:String):void`

objectEncoding | property |

`objectEncoding:uint`[override]

Implementation
`public function get objectEncoding():uint`
`public function set objectEncoding(value:uint):void`
Constructor Detail

TLSSocket | () | Constructor

`public function TLSSocket(host:String = null, port:int = 0, config:TLSConfig = null)`

Parameters

| `host:String` (default = `null`)``
| `port:int` (default = `0`)``
| `config:TLSConfig` (default = `null`)``

Method Detail

acceptPeerCertificate | () | method

`public function acceptPeerCertificate(event:Event):void`

Parameters

| `event:Event`

close | () | method |

`override public function close():void`

connect | () | method |

`override public function connect(host:String, port:int):void`

Parameters

| `host:String`
| `port:int`

flush | () | method |

`override public function flush():void`

getPeerCertificate | () | method |

`public function getPeerCertificate():X509Certificate`

Returns

| `X509Certificate`

onAcceptCert | () | method |

`public function onAcceptCert(event:TLSEvent):void`

Parameters

| `event:TLSEvent`

readBoolean | () | method |

`override public function readBoolean():Boolean`

Returns

| `Boolean`

readByte | () | method |

`override public function readByte():int`

Returns

| `int`

readBytes | () | method |

`override public function readBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void`

Parameters

| `bytes:ByteArray`
| `offset:uint` (default = `0`)``
| `length:uint` (default = `0`)``

readDouble | () | method |

`override public function readDouble():Number`

Returns

| `Number`

readFloat | () | method |

`override public function readFloat():Number`

Returns

| `Number`

readInt | () | method |

`override public function readInt():int`

Returns

| `int`

readMultiByte | () | method |

`override public function readMultiByte(length:uint, charSet:String):String`

Parameters

| `length:uint`
| `charSet:String`

Returns

| `String`

readObject | () | method |

`override public function readObject():*`

Returns

| `*`

readShort | () | method |

`override public function readShort():int`

Returns

| `int`

readUnsignedByte | () | method |

`override public function readUnsignedByte():uint`

Returns

| `uint`

readUnsignedInt | () | method |

`override public function readUnsignedInt():uint`

Returns

| `uint`

readUnsignedShort | () | method |

`override public function readUnsignedShort():uint`

Returns

| `uint`

readUTF | () | method |

`override public function readUTF():String`

Returns

| `String`

readUTFBytes | () | method |

`override public function readUTFBytes(length:uint):String`

Parameters

| `length:uint`

Returns

| `String`

reinitialize | () | method |

`public function reinitialize(host:String, config:TLSConfig):void`

Parameters

| `host:String`
| `config:TLSConfig`

rejectPeerCertificate | () | method |

`public function rejectPeerCertificate(event:Event):void`

Parameters

| `event:Event`

releaseSocket | () | method |

`public function releaseSocket():void`

setTLSConfig | () | method |

`public function setTLSConfig(config:TLSConfig):void`

Parameters

| `config:TLSConfig`

startTLS | () | method |

`public function startTLS(socket:Socket, host:String, config:TLSConfig = null):void`

Parameters

| `socket:Socket`
| `host:String`
| `config:TLSConfig` (default = `null`)``

writeBoolean | () | method |

`override public function writeBoolean(value:Boolean):void`

Parameters

| `value:Boolean`

writeByte | () | method |

`override public function writeByte(value:int):void`

Parameters

| `value:int`

writeBytes | () | method |

`override public function writeBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void`

Parameters

| `bytes:ByteArray`
| `offset:uint` (default = `0`)``
| `length:uint` (default = `0`)``

writeDouble | () | method |

`override public function writeDouble(value:Number):void`

Parameters

| `value:Number`

writeFloat | () | method |

`override public function writeFloat(value:Number):void`

Parameters

| `value:Number`

writeInt | () | method |

`override public function writeInt(value:int):void`

Parameters

| `value:int`

writeMultiByte | () | method |

`override public function writeMultiByte(value:String, charSet:String):void`

Parameters

| `value:String`
| `charSet:String`

writeObject | () | method |

`override public function writeObject(object:*):void`

Parameters

| `object:*`

writeShort | () | method |

`override public function writeShort(value:int):void`

Parameters

| `value:int`

writeUnsignedInt | () | method |

`override public function writeUnsignedInt(value:uint):void`

Parameters

| `value:uint`

writeUTF | () | method |

`override public function writeUTF(value:String):void`

Parameters

| `value:String`

writeUTFBytes | () | method |

`override public function writeUTFBytes(value:String):void`

Parameters

| `value:String`

Event Detail

acceptPeerCertificatePrompt | Event

Event Object Type: `flash.events.Event`

close | Event |

Event Object Type: `flash.events.Event`

connect | Event |

Event Object Type: `flash.events.Event`

ioError | Event |

Event Object Type: `flash.events.IOErrorEvent`

securityError | Event |

Event Object Type: `flash.events.SecurityErrorEvent`

socketData | Event |

Event Object Type: `flash.events.ProgressEvent`

Constant Detail

ACCEPT_PEER_CERT_PROMPT | Constant

`public static const ACCEPT_PEER_CERT_PROMPT:String = acceptPeerCertificatePrompt`

Mon May 20 2013, 09:16 PM +02:00