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

Implement CertCompressionAlgo extension #48

Closed
yukinotenshi opened this issue Jul 9, 2020 · 12 comments
Closed

Implement CertCompressionAlgo extension #48

yukinotenshi opened this issue Jul 9, 2020 · 12 comments
Labels
help wanted Calling for community PR/volunteer

Comments

@yukinotenshi
Copy link

Env: Go 1.14, Windows amd64

Whenever I use the client hello of chrome for version 70, 72, or 83, the program will run into this error

HttpGetByHelloID(HelloChrome_70) failed: uTlsConn.Handshake() error: local error: tls: unexpected message

How to reproduce:

  1. Change the example to hello chrome of the versions mentioned above
  2. Run it
@yukinotenshi
Copy link
Author

the same issue persist in Ubuntu-18.04 amd64 using go version 1.8

@sergeyfrolov
Copy link
Member

Could be a server issue. Did you take a look at which unexpected message is it in wireshark?

@yukinotenshi
Copy link
Author

yukinotenshi commented Jul 10, 2020

@sergeyfrolov
image

This is what I got in wireshark

@yukinotenshi
Copy link
Author

Comparison when using CHROME_62
image

@sergeyfrolov
Copy link
Member

When I visit https://104.27.159.141 in Chrome 83 I get this:

This site can’t provide a secure connection
104.27.159.141 uses an unsupported protocol.
ERR_SSL_VERSION_OR_CIPHER_MISMATCH
Unsupported protocol
The client and server don't support a common SSL protocol version or cipher suite.

Looks like that server needs to update TLS config and/or implementation.

@yukinotenshi
Copy link
Author

yukinotenshi commented Jul 10, 2020

When I visit https://104.27.159.141 in Chrome 83 I get this:

This site can’t provide a secure connection
104.27.159.141 uses an unsupported protocol.
ERR_SSL_VERSION_OR_CIPHER_MISMATCH
Unsupported protocol
The client and server don't support a common SSL protocol version or cipher suite.

Looks like that server needs to update TLS config and/or implementation.

I got the same exact problem when running on google.com or even facebook as in the example as well, so I believe it's not a server side issue. Also for the problem you mentioned, it's due to the IP owned by cloudflare. You need to enter the hostname so it can resolve it and look if the domain is set with their SSL or not.

@rod-hynes
Copy link
Collaborator

I can confirm this issue with HelloChrome_83 and cloudflare.com:443. I believe this is due to this extension not being implemented:

utls/u_parrots.go

Lines 280 to 282 in ada0bb9

&FakeCertCompressionAlgsExtension{[]CertCompressionAlgo{
CertCompressionBrotli,
}},

When you comment this extension out, the TLS handshake succeeds. Of course, that's no longer Chrome 83.

Fwiw, a fix exists: #22. We cannot merge that here due to license issues.

Perhaps we can develop our own implementation of certificate compression, or check for another one.

@sergeyfrolov
Copy link
Member

Perhaps we can.

Or perhaps @Yawning can agree to dual license his uTLS changes so we can pull them here. I am pretty busy right now, since I have a thesis defense next month, so I would really appreciate help with the library.

@Yawning
Copy link

Yawning commented Jul 10, 2020

Or perhaps @Yawning can agree to dual license his uTLS changes so we can pull them here.

I'll need to think about this.

@yukinotenshi
Copy link
Author

I've resolved some of the issues that I received. It turns out that for some websites (example: www.something.com) I need to put something.com as the ServerName in tls.Config and dial the www.something.com. Putting the www. subdomain in tls.Config will result in handshake error

@VeNoMouS
Copy link
Contributor

VeNoMouS commented Sep 9, 2020

Confirmed, @Yawning works, UTLS fails with anything using TLS 1.3 with unexpected message on the handshake

@i542873057
Copy link

Confirmed, @Yawning works, UTLS fails with anything using TLS 1.3 with unexpected message on the handshake

I have meet the same problem like you. Do you have any solution?

Any help to me will be appreciated!

@sergeyfrolov sergeyfrolov changed the title uTlsConn.Handshake() error: local error: tls: unexpected message Implement CertCompressionAlgo extension Nov 12, 2020
@sergeyfrolov sergeyfrolov added the help wanted Calling for community PR/volunteer label Nov 12, 2020
@gaukas gaukas closed this as completed Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Calling for community PR/volunteer
Projects
None yet
Development

No branches or pull requests

7 participants