Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge upstream crypto/tls #5

Merged
merged 30 commits into from
Jun 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a3bb151
crypto/tls: don't check whether an ec point is on a curve twice
May 26, 2017
b1d5de1
crypto/tls: add BenchmarkHandshakeServer
FiloSottile Jun 2, 2017
f3b1bbc
crypto/tls: disallow handshake messages fragmented across CCS
FiloSottile Jan 18, 2017
fe92b81
crypto/tls: fix docstring of Config.ClientSessionCache
artyom Aug 18, 2017
ff8dfba
crypto/tls: fix and expand TestVerifyPeerCertificate and TestGetClien…
FiloSottile Jul 4, 2017
c00813c
crypto/tls: fix clientHelloMsg fuzzer not to generate the RI SCSV
ekr Jan 11, 2017
fca29fb
all: fix article typos
namusyaka Sep 15, 2017
6e1bd19
all: prefer strings.LastIndexByte over strings.LastIndex
stemar94 Sep 25, 2017
61ea6f3
all: prefer bytes.IndexByte over bytes.Index
stemar94 Sep 21, 2017
53c5404
all: revert "all: prefer strings.LastIndexByte over strings.LastIndex"
stemar94 Oct 5, 2017
e3522a1
crypto/tls: fix first byte test for 255 CBC padding bytes
Lekensteyn Oct 4, 2017
b3caca6
crypto/tls: replace signatureAndHash by SignatureScheme.
Lekensteyn Sep 7, 2017
fd917e1
crypto/tls: remove bookkeeping code from pHash function
joekyo Oct 16, 2017
90f8fc9
archive/zip, crypto/tls: use rand.Read instead of casting ints to bytes
Jul 3, 2017
ca44103
crypto/tls: advertise support for SHA-512 signatures in 1.2
FiloSottile Oct 31, 2017
3fe5088
crypto/tls: limit number of consecutive warning alerts
filewalkwithme Nov 3, 2017
f940be3
crypto/tls: document VerifyPeerCertificate behavior in relation to Cl…
FiloSottile Dec 16, 2017
6489cd9
crypto/tls: optional "certificate_status" with OCSP
brad-burch Jan 4, 2018
a94b12d
crypto/tls: handle errors in generate_cert.go
kevinburke Feb 1, 2018
3ecc46e
all: use HTTPS for iana.org links
kevinburke Jan 24, 2018
a6e5081
crypto/tls: support keying material export
mikedanese Dec 21, 2017
3ec0b31
crypto/tls: parse certificate first in X509KeyPair to get better errors
FiloSottile Jan 28, 2018
d8f27b6
crypto/tls: simplify the Handshake locking strategy
FiloSottile Dec 2, 2016
498b176
go/printer, gofmt: tuned table alignment for better results
griesemer Apr 4, 2018
a7f5c08
crypto/tls: add examples for [Load]X509KeyPair
kevinburke Oct 20, 2017
2da7203
crypto/{aes,internal/cipherhw,tls}: use common internal/cpu in place …
anitgandhi May 23, 2018
99371c4
all: update comment URLs from HTTP to HTTPS, where possible
Jun 1, 2018
f6b235c
crypto/tls: expand docs on client-side session ticket support
FiloSottile Jun 7, 2018
567b737
crypto, internal/cpu: fix s390x AES feature detection and update SHA …
mundaym May 24, 2018
9656990
Merge branch 'golang-tls-upstream', remove Android
sergeyfrolov Jun 15, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,10 @@ This is not a problem, if you fully control the server and turn unsupported thin
* Parroting could be imperfect, and there is no parroting beyond ClientHello.
#### Compatibility risks of available parrots

| Parrot | Ciphers* | Signature* | Unsupported extensions |
| ------------- | -------- | ---------- | ---------------------- |
| Android 5.1 | low | very low | None |
| Android 6.0 | low | very low | None |
| Chrome 58 | no | low | ChannelID |
| Firefox 55 | very low | low | None |
| Parrot | Ciphers* | Signature* | Unsupported extensions | TLS Fingerprint ID |
| ------------- | -------- | ---------- | ---------------------- | --------------------------------------------- |
| Chrome 58 | no | no | ChannelID | [06e3579010335639](https://tlsfingerprint.io/id/06e3579010335639) |
| Firefox 55 | very low | no | None | [c8561687d9ecd83f](https://tlsfingerprint.io/id/c8561687d9ecd83f) |

\* Denotes very rough guesstimate of likelihood that unsupported things will get echoed back by the server in the wild,
*visibly breaking the connection*.
Expand All @@ -49,8 +47,6 @@ There sure are. If you found one that approaches practicality at line speed —
#### Things to implement in Golang to make parrots better
uTLS is fundamentially limited in parroting, because Golang's "crypto/tls" doesn't support many things. Would be nice to have:
* ChannelID extension
* Enable sha512 and sha224 hashes by default
* Implement RSA PSS signature algorithms
* In general, any modern crypto is likely to be useful going forward.
### Custom Handshake
It is possible to create custom handshake by
Expand Down Expand Up @@ -95,9 +91,9 @@ There are different behaviors you can get, depending on your `clientHelloID`:
3. ```utls.HelloCustom```
will prepare ClientHello with empty uconn.Extensions so you can fill it with TLSExtension's manually.
4. The rest will will parrot given browser. Such parrots include, for example:
* `utls.HelloChrome_Auto`- parrots recommended(latest) Google Chrome version
* `utls.HelloChrome_Auto`- parrots recommended(usually latest) Google Chrome version
* `utls.HelloChrome_58` - parrots Google Chrome 58
* `utls.HelloFirefox_Auto` - parrots recommended(latest) Firefox version
* `utls.HelloFirefox_Auto` - parrots recommended(usually latest) Firefox version
* `utls.HelloFirefox_55` - parrots Firefox 55

# Usage
Expand All @@ -119,7 +115,7 @@ Here's how default "crypto/tls" is typically used:
//...
```
To start using using uTLS:
1. Import this library (e.g. `import tls "github.com/Jigsaw-Code/utls"`)
1. Import this library (e.g. `import tls "github.com/refraction-networking/utls"`)
2. Pick the [Client Hello ID](#client-hello-ids)
3. Simply substitute `tlsConn := tls.Client(dialConn, &config)`
with `tlsConn := tls.UClient(dialConn, &config, tls.clientHelloID)`
Expand Down
2 changes: 1 addition & 1 deletion cipher_suites.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ func mutualCipherSuite(have []uint16, want uint16) *cipherSuite {
// A list of cipher suite IDs that are, or have been, implemented by this
// package.
//
// Taken from http://www.iana.org/assignments/tls-parameters/tls-parameters.xml
// Taken from https://www.iana.org/assignments/tls-parameters/tls-parameters.xml
const (
TLS_RSA_WITH_RC4_128_SHA uint16 = 0x0005
TLS_RSA_WITH_3DES_EDE_CBC_SHA uint16 = 0x000a
Expand Down
17 changes: 0 additions & 17 deletions cipherhw/asm_amd64.s

This file was deleted.

44 changes: 0 additions & 44 deletions cipherhw/asm_s390x.s

This file was deleted.

16 changes: 0 additions & 16 deletions cipherhw/cipherhw_amd64.go

This file was deleted.

18 changes: 0 additions & 18 deletions cipherhw/cipherhw_s390x.go

This file was deleted.

7 changes: 0 additions & 7 deletions cipherhw/doc.go

This file was deleted.

11 changes: 0 additions & 11 deletions cipherhw/generic.go

This file was deleted.

Loading