Ja.NET Standard Edition 5.0

Documentation API Specification

Contents

ConnectionStateTLS Class Reference

Inherits org::apache::harmony::xnet::provider::jsse::ConnectionState.

List of all members.


Detailed Description

This class incapsulates the operating environment of the TLS v1 (http://www.ietf.org/rfc/rfc2246.txt) Record Protocol and provides relating encryption/decryption functionality.

The work functionality is based on the security parameters negotiated during the handshake.


Protected Member Functions

 ConnectionStateTLS (SSLSessionImpl session)
 Creates the instance of TLS v1 Connection State.
byte[] encrypt (byte type, byte[] fragment, int offset, int len)
 Creates the GenericStreamCipher or GenericBlockCipher data structure for specified data of specified type.
byte[] decrypt (byte type, byte[] fragment, int offset, int len)
 Retrieves the fragment of the Plaintext structure of the specified type from the provided data representing the Generic[Stream|Block]Cipher structure.

Private Attributes

final Mac encMac
final Mac decMac
final byte[] mac_material_header = new byte[] {0, 3, 1, 0, 0}

Static Private Attributes

static byte[] KEY_EXPANSION_LABEL
static byte[] CLIENT_WRITE_KEY_LABEL
static byte[] SERVER_WRITE_KEY_LABEL
static byte[] IV_BLOCK_LABEL

Constructor & Destructor Documentation

ConnectionStateTLS ( SSLSessionImpl  session  )  [protected]

Creates the instance of TLS v1 Connection State.

All of the security parameters are provided by session object.

Parameters:
session,: the sessin object which incapsulates all of the security parameters established by handshake protocol. The key calculation for the state is done according to the TLS v 1.0 Protocol specification. (http://www.ietf.org/rfc/rfc2246.txt)


Member Function Documentation

byte [] encrypt ( byte  type,
byte[]  fragment,
int  offset,
int  len 
) [protected, virtual]

Creates the GenericStreamCipher or GenericBlockCipher data structure for specified data of specified type.

Exceptions:
org.apache.harmony.xnet.provider.jsse.AlertException if alert was occured.

Implements ConnectionState.

byte [] decrypt ( byte  type,
byte[]  fragment,
int  offset,
int  len 
) [protected, virtual]

Retrieves the fragment of the Plaintext structure of the specified type from the provided data representing the Generic[Stream|Block]Cipher structure.

Exceptions:
org.apache.harmony.xnet.provider.jsse.AlertException if alert was occured.

Implements ConnectionState.


Member Data Documentation

byte [] KEY_EXPANSION_LABEL [static, private]

Initial value:

 {
        (byte) 0x6B, (byte) 0x65, (byte) 0x79, (byte) 0x20, (byte) 0x65, 
        (byte) 0x78, (byte) 0x70, (byte) 0x61, (byte) 0x6E, (byte) 0x73, 
        (byte) 0x69, (byte) 0x6F, (byte) 0x6E }

byte [] CLIENT_WRITE_KEY_LABEL [static, private]

Initial value:

 {
        (byte) 0x63, (byte) 0x6C, (byte) 0x69, (byte) 0x65, (byte) 0x6E, 
        (byte) 0x74, (byte) 0x20, (byte) 0x77, (byte) 0x72, (byte) 0x69, 
        (byte) 0x74, (byte) 0x65, (byte) 0x20, (byte) 0x6B, (byte) 0x65, 
        (byte) 0x79 }

byte [] SERVER_WRITE_KEY_LABEL [static, private]

Initial value:

 {
        (byte) 0x73, (byte) 0x65, (byte) 0x72, (byte) 0x76, (byte) 0x65, 
        (byte) 0x72, (byte) 0x20, (byte) 0x77, (byte) 0x72, (byte) 0x69, 
        (byte) 0x74, (byte) 0x65, (byte) 0x20, (byte) 0x6B, (byte) 0x65, 
        (byte) 0x79 }

byte [] IV_BLOCK_LABEL [static, private]

Initial value:

 {
        (byte) 0x49, (byte) 0x56, (byte) 0x20, (byte) 0x62, (byte) 0x6C, 
        (byte) 0x6F, (byte) 0x63, (byte) 0x6B }

final Mac encMac [private]

final Mac decMac [private]

final byte [] mac_material_header = new byte[] {0, 3, 1, 0, 0} [private]