Home | Trees | Indices | Help |
---|
|
Class for handling Server Name Indication (server_name) extension from RFC 4366.
Note that while usually the client does advertise just one name, it is possible to provide a list of names, each of different type. The type is a single byte value (represented by ints), the names are opaque byte strings, in case of DNS host names (records of type 0) they are UTF-8 encoded domain names (without the ending dot).
|
|||
ServerName ServerName(name_type, name) |
|
|||
|
|||
str |
|
||
SNIExtension |
|
||
SNIExtension |
|
||
bytearray |
|
||
Inherited from Inherited from |
|
|||
Inherited from |
|
|||
bytearray |
extData a byte array containing the value of the extension as to be written on the wire |
||
int |
extType a 2^16-1 limited integer specifying the type of the extension that it contains, e.g. |
||
tuple of bytearrays |
hostNames tuple of hostnames (server name records of type 0) advertised in the extension. |
||
list of ServerName |
serverNames list of all names advertised in extension. |
||
Inherited from |
|
|||
Inherited from |
|
Create an instance of SNIExtension.
|
Return programmer-readable representation of extension
|
Initializes an instance with provided hostname, host names or raw server names. Any of the parameters may be None, in that case the list inside the extension won't be defined, if either hostNames or serverNames is an empty list, then the extension will define a list of lenght 0. If multiple parameters are specified at the same time, then the resulting list of names will be concatenated in order of hostname, hostNames and serverNames last.
|
Deserialise the extension from on-the-wire data The parser should not include the type or length of extension!
|
Returns encoded extension, as encoded on the wire
|
|
extDataa byte array containing the value of the extension as to be written on the wire
|
extTypea 2^16-1 limited integer specifying the type of the extension that it contains, e.g. 0 indicates server name extension
|
serverNameslist of all names advertised in extension. ServerName is a namedtuple with two elements, the first element (type) defines the type of the name (encoded as int) while the other (name) is a bytearray that carries the value. Known types are defined in tlslite.constants.NameType. The list will be empty if the on the wire extension had and empty list while it will be None if the extension was empty.
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Wed Sep 9 18:17:37 2015 | http://epydoc.sourceforge.net |