I May Have a HTTP/2 Upgrade Request in ClientHello in Server App, But I Don't Know How to Parse ClientHello

Matt Caswell matt at openssl.org
Thu Jul 21 10:44:39 UTC 2022



On 21/07/2022 01:11, Osman Zakir wrote:
> Hello, everyone.
> 
> I have this C++ server app I'm hosting on my computer (source code on 
> GitHub <https://github.com/DragonOsman/currency_converter> -- I'm using 
> Google Maps as a GUI, and it's basically a currency converter app).  I 
> was recently having SSL issues on it, but after sorting them out I have 
> another issue: this error came up:
> 
>     Lines 625 and 626:
>     handshake: unsupported protocol (SSL routines,
>     tls_early_post_process_client_hello)
> 
> ​This is likely a HTTP/2 upgrade request inside a TLS ClientHello 
> message, no?  And if it is, how do I parse the ClientHello message to 
> extract it and respond?

The unsupported protocol error usually means there is a mismatch between 
the supported TLS versions on the client and the server. For example if 
the server only supports TLSv1.3 and the client only supports TLSv1.2.

Matt

> 
> Boost.Beast, the low-level HTTP/S and WebSocket on top of Boost.ASIO 
> that I'm using to handle HTTPS, doesn't support this and it also doesn't 
> directly support HTTP/2.  For HTTP/2 I could just relegate to a server 
> does support it, though I'll need one that supports POST requests unless 
> there's a way for me to use my own server code through a HTTP/2 proxy 
> server (hopefully this is possible).
> 
> Anyway, would someone please help me figure out how to parse the 
> ClientHello for the request in question?  Thanks.


More information about the openssl-users mailing list