bc-csharp icon indicating copy to clipboard operation
bc-csharp copied to clipboard

HTTP2 Handshake Failed

Open kreationnext opened this issue 4 years ago • 5 comments

I am currently trying to implement HTTP/2.0 on this.

My current ja3 signature is 771,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,0-23-65281-10-11-35-16-5-13-18-51-45-43-27-21,29-23-24,0 which is same as google chrome. ALPN is implemented.

The issue is as and when I send the Http2 preface I get internal error [wireshark info] and then the server closes the connection.

Probably its a Http2 handshake error. Don't know though I could be wrong

kreationnext avatar Sep 28 '21 22:09 kreationnext

If you have a stack trace, please show it. Are you using BCJSSE or just the TLS library?

peterdettman avatar Sep 29 '21 03:09 peterdettman

I am just using the TLS library from org.bouncycastle.tls. It doesn't throw any error that I can stacktrace. This is what I get from wireshark image

The first Encrypted Alert comes after sending the Http2 preface PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n

kreationnext avatar Sep 29 '21 04:09 kreationnext

  1. Validate that the TLS handshake is succeeding by checking you are getting a call to notifyHandshakeComplete on your TlsClient instance.
  2. If possible, check that your application-level code is working by using HTTP/2 without TLS.
  3. Is there any attempt at TLS renegotiation happening?

peterdettman avatar Sep 29 '21 04:09 peterdettman

  1. Yes I am getting notifyHandshakeComplete.
  2. I want to implement h2 protocol not h2c.
  3. I am testing the site https://www.google.com and the signatures from https://ezdiscord.xyz/fingerprint. No TLS RENEGOTIATION happening.

Note: If I remove h2 from ALPN and use HTTP/1.1 it works perfectly. The Issue occurs only when I use HTTP/2.

Can you do a demo run at your end and test if HTTP/2 works?

kreationnext avatar Sep 29 '21 07:09 kreationnext

The issue regarding HTTP2 is solved. It was because of the frame contents which were rejected. So now it works good. Thanks your your help and support

kreationnext avatar Oct 01 '21 06:10 kreationnext