create(self,
version,
random,
session_id,
cipher_suites,
certificate_types=None,
srpUsername=None,
tack=False,
supports_npn=None,
serverName=None,
extensions=None)
| source code
|
Create a ClientHello message for sending.
- Parameters:
version (tuple) - the highest supported TLS version encoded as two int tuple
random (bytearray) - client provided random value, in old versions of TLS (before 1.2)
the first 32 bits should include system time, also used as the
"challenge" field in SSLv2
session_id (bytearray) - ID of session, set when doing session resumption
cipher_suites (list) - list of ciphersuites advertised as supported
certificate_types (list) - list of supported certificate types, uses TLS extension for
signalling, as such requires TLS1.0 to work
srpUsername (bytearray) - utf-8 encoded username for SRP, TLS extension
tack (boolean) - whatever to advertise support for TACK, TLS extension
supports_npn (boolean) - whatever to advertise support for NPN, TLS extension
serverName (bytearray) - the hostname to request in server name indication extension, TLS
extension. Note that SNI allows to set multiple hostnames and
values that are not hostnames, use SNIExtension together with extensions to use it.
extensions (list of TLSExtension) - list of extensions to advertise
|