Skip to content

Add TLS SNI Extension in HTTP/2 Client request.#9937

Merged
normanmaurer merged 2 commits intonetty:4.1from
hyperxpro:4.1
Jan 10, 2020
Merged

Add TLS SNI Extension in HTTP/2 Client request.#9937
normanmaurer merged 2 commits intonetty:4.1from
hyperxpro:4.1

Conversation

@hyperxpro
Copy link
Copy Markdown
Contributor

Add TLS SNI Extension in HTTP/2 Client request.

Motivation:

Since "Http2ClientInitializer" creates a new SSLContext Handler without specifying Host, Netty does not add SNI Extension in TLS Client Hello request and the request fails if the server uses SNI to establish TLS Connection.

Modification:

Specified Host while creating a new SSLContext Handler in "Http2ClientInitializer".

Result:

Netty adds SNI Extension of the Host Specified in new SSLContext Handler and sends it with TLS Client Hello request.

Fixes #9815.

@netty-bot
Copy link
Copy Markdown

Can one of the admins verify this patch?

@normanmaurer
Copy link
Copy Markdown
Member

@netty-bot test this please

Split Comment and Code Line
@hyperxpro
Copy link
Copy Markdown
Contributor Author

@normanmaurer Fixed Line Length Error. Moved comment into another line.

@normanmaurer
Copy link
Copy Markdown
Member

@netty-bot test this please

@normanmaurer
Copy link
Copy Markdown
Member

@hyperxpro can you also sign our ICLA and let me know once done:

https://netty.io/s/icla

@hyperxpro
Copy link
Copy Markdown
Contributor Author

@hyperxpro can you also sign our ICLA and let me know once done:

https://netty.io/s/icla

Done

@normanmaurer normanmaurer changed the title HTTP/2 Client TLS SNI Extension Add TLS SNI Extension in HTTP/2 Client request. Jan 10, 2020
@normanmaurer normanmaurer merged commit f7d3573 into netty:4.1 Jan 10, 2020
@normanmaurer
Copy link
Copy Markdown
Member

@hyperxpro thanks a lot!

normanmaurer pushed a commit that referenced this pull request Jan 10, 2020
Motivation:

Since "Http2ClientInitializer" creates a new SSLContext Handler without specifying Host, Netty does not add SNI Extension in TLS Client Hello request and the request fails if the server uses SNI to establish TLS Connection. 

Modification:

Specified Host while creating a new SSLContext Handler in "Http2ClientInitializer".

Result:

Netty adds SNI Extension of the Host Specified in new SSLContext Handler and sends it with TLS Client Hello request.

Fixes #9815.
@normanmaurer normanmaurer added this to the 4.1.45.Final milestone Jan 10, 2020
ihanyong pushed a commit to ihanyong/netty that referenced this pull request Jul 31, 2020
Motivation:

Since "Http2ClientInitializer" creates a new SSLContext Handler without specifying Host, Netty does not add SNI Extension in TLS Client Hello request and the request fails if the server uses SNI to establish TLS Connection. 

Modification:

Specified Host while creating a new SSLContext Handler in "Http2ClientInitializer".

Result:

Netty adds SNI Extension of the Host Specified in new SSLContext Handler and sends it with TLS Client Hello request.

Fixes netty#9815.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Netty Http2 client in example not connecting to all h2 servers which browsers can connect to(SSL problem)

3 participants