C# Class Zoompf.SPDYAnalysis.TlsHandshaker

显示文件 Open project: zoompf/SPDYCheck

Public Methods

Method Description
ExchangeHellos ( string hostname, int port, SslProtocols protocol, int mSecTimeout = 8000 ) : ServerHello

Protected Methods

Method Description
buildALPNExtension ( ) : byte[]
buildDateTimeBytes ( ) : byte[]

Gets the CTime bytes in proper endian-ness for use in random parameter of Client Hello

buildNPNExtension ( ) : byte[]
buildRandomBytes ( ) : byte[]
buildSNIRecord ( string hostname ) : byte[]

Builds the SNI extension bytes for a hostname (SNI is the length of the hostname + 9 bytes)

readAsInt ( byte array, int offset, int len ) : int
removeWhitespace ( string s ) : string
toInt16 ( int num ) : byte[]

Private Methods

Method Description
createTLSClientHello ( String hostname, SslProtocols protocol ) : byte[]

Method Details

ExchangeHellos() public static method

public static ExchangeHellos ( string hostname, int port, SslProtocols protocol, int mSecTimeout = 8000 ) : ServerHello
hostname string
port int
protocol SslProtocols
mSecTimeout int
return ServerHello

buildALPNExtension() protected static method

protected static buildALPNExtension ( ) : byte[]
return byte[]

buildDateTimeBytes() protected static method

Gets the CTime bytes in proper endian-ness for use in random parameter of Client Hello
protected static buildDateTimeBytes ( ) : byte[]
return byte[]

buildNPNExtension() protected static method

protected static buildNPNExtension ( ) : byte[]
return byte[]

buildRandomBytes() protected static method

protected static buildRandomBytes ( ) : byte[]
return byte[]

buildSNIRecord() protected static method

Builds the SNI extension bytes for a hostname (SNI is the length of the hostname + 9 bytes)
protected static buildSNIRecord ( string hostname ) : byte[]
hostname string
return byte[]

readAsInt() protected static method

protected static readAsInt ( byte array, int offset, int len ) : int
array byte
offset int
len int
return int

removeWhitespace() protected static method

protected static removeWhitespace ( string s ) : string
s string
return string

toInt16() protected static method

protected static toInt16 ( int num ) : byte[]
num int
return byte[]