+tls13 extensions; +Chrome 70, Firefox 63 parrots

Adds support for following TLS 1.3 extensions:
 - PSKKeyExchangeModes
 - SupportedVersions
 - KeyShare
and uses them to implement newest Chrome and Firefox parrots.

Tests for default Golang uTLS were regenerated because
they previously used TLS-1.2 as max version.
This commit is contained in:
Sergey Frolov 2018-12-07 18:30:34 -07:00 committed by sergeyfrolov
parent 04ef89985b
commit b84d7d5f05
36 changed files with 3149 additions and 335 deletions

View file

@ -21,6 +21,9 @@ const (
// extensions with 'fake' prefix break connection, if server echoes them back
fakeExtensionChannelID uint16 = 30032 // not IANA assigned
fakeCertCompressionAlgs uint16 = 0x001b
fakeRecordSizeLimit uint16 = 0x001c
)
const (
@ -49,6 +52,12 @@ var (
// fakeEd448 = SignatureAndHash{0x08, 0x08}
)
// fake curves(groups)
var (
FakeFFDHE2048 = uint16(0x0100)
FakeFFDHE3072 = uint16(0x0101)
)
type ClientHelloID struct {
Browser string
Version uint16
@ -107,13 +116,15 @@ var (
HelloRandomizedNoALPN = ClientHelloID{helloRandomized, helloRandomizedNoALPN}
// The rest will will parrot given browser.
HelloFirefox_Auto = HelloFirefox_56
HelloFirefox_Auto = HelloFirefox_63
HelloFirefox_55 = ClientHelloID{helloFirefox, 55}
HelloFirefox_56 = ClientHelloID{helloFirefox, 56}
HelloFirefox_63 = ClientHelloID{helloFirefox, 63}
HelloChrome_Auto = HelloChrome_62
HelloChrome_Auto = HelloChrome_70
HelloChrome_58 = ClientHelloID{helloChrome, 58}
HelloChrome_62 = ClientHelloID{helloChrome, 62}
HelloChrome_70 = ClientHelloID{helloChrome, 70}
HelloIOS_Auto = HelloIOS_11_1
HelloIOS_11_1 = ClientHelloID{helloIOS, 111}