Package tlslite :: Module extensions :: Class VarListExtension
[hide private]
[frames] | no frames]

type VarListExtension

source code

Known Subclasses:

Abstract extension for handling extensions comprised only of a value list

Extension for handling arbitrary extensions comprising of just a list of same-sized elementes inside an array

Instance Methods [hide private]
 
__getattr__(self, name)
Return the special field name value
source code
 
__init__(self, elemLength, lengthLength, fieldName, extType)
Creates a generic TLS extension.
source code
str
__repr__(self)
Output human readable representation of object
source code
 
__setattr__(self, name, value)
Set the special field value
source code
TLSExtension
create(self, values)
Set the list to specified values
source code
Extension
parse(self, parser)
Deserialise extension from on-the-wire data
source code

Inherited from TLSExtension: __eq__, write

Inherited from TLSExtension (private): _newCreate, _oldCreate

Static Methods [hide private]

Inherited from TLSExtension (private): _parseExt

Class Variables [hide private]
Instance Variables [hide private]

Inherited from TLSExtension: extType, serverType

Properties [hide private]
bytearray extData
a byte array containing the value of the extension as to be written on the wire
Method Details [hide private]

__init__(self, elemLength, lengthLength, fieldName, extType)
(Constructor)

source code 

Creates a generic TLS extension.

You'll need to use create or parse methods to create an extension that is actually usable.

Parameters:
  • server - whether to select ClientHello or ServerHello version for parsing
  • extType - type of extension encoded as an integer, to be used by subclasses
Overrides: TLSExtension.__init__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

Output human readable representation of object

Child classes should override this method to support more appropriate string rendering of the extension.

Returns: str
Overrides: TLSExtension.__repr__
(inherited documentation)

__setattr__(self, name, value)

source code 

Set the special field value

Overrides: object.__setattr__

create(self, values)

source code 

Set the list to specified values

Parameters:
  • values (list of int) - list of values to save
Returns: TLSExtension
Overrides: TLSExtension.create

parse(self, parser)

source code 

Deserialise extension from on-the-wire data

Parameters:
  • p - data to be parsed
  • parser (Parser)
Returns: Extension
Raises:
  • SyntaxError - when the size of the passed element doesn't match the internal representation
Overrides: TLSExtension.parse

Property Details [hide private]

extData

a byte array containing the value of the extension as to be written on the wire
Type:
bytearray