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

type PaddingExtension

source code


ClientHello message padding with a desired size.

Can be used to pad ClientHello messages to a desired size in order to avoid implementation bugs caused by certain ClientHello sizes.

See RFC7685.

Instance Methods [hide private]
 
__init__(self)
Create instance of class.
source code
TLSExtension
create(self, size)
Set the padding size and create null byte padding of defined size.
source code
TLSExtension
parse(self, p)
Deserialise extension from on the wire data.
source code

Inherited from TLSExtension: __eq__, __repr__, 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)
(Constructor)

source code 

Create instance of class.

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__

create(self, size)

source code 

Set the padding size and create null byte padding of defined size.

Parameters:
  • size (int) - required padding size in bytes
Returns: TLSExtension
Overrides: TLSExtension.create

parse(self, p)

source code 

Deserialise extension from on the wire data.

Parameters:
Returns: TLSExtension
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