Skip to content

NullPointerException in reactor-netty SniProvider and unmapped SSL bundle with RSocket#50640

Merged
snicoll merged 1 commit into
spring-projects:4.0.xfrom
dlwldnjs1009:rsocket-sni-fallback
May 31, 2026
Merged

NullPointerException in reactor-netty SniProvider and unmapped SSL bundle with RSocket#50640
snicoll merged 1 commit into
spring-projects:4.0.xfrom
dlwldnjs1009:rsocket-sni-fallback

Conversation

@dlwldnjs1009
Copy link
Copy Markdown
Contributor

@dlwldnjs1009 dlwldnjs1009 commented May 31, 2026

The RSocket WebSocket transport's HttpServerSslCustomizer returns null
from its SNI provider lookup when a server name has no mapped SSL bundle, so
reactor-netty calls promise.setSuccess(null) and throws a
NullPointerException during the TLS handshake.

This is the same failure fixed for the shared SslServerCustomizer in #50301,
but RSocket keeps its own copy of the lookup in the modularized layout and was
missed.

Changes:

  • Fall back to the default SslProvider via getOrDefault for unmapped server names

Testing:

  • NettyRSocketServerFactoryTests.websocketTransportSslProviderFallsBackToDefaultWhenServerNameIsUnmapped
  • NettyRSocketServerFactoryTests.websocketTransportSslProviderReturnsDefaultWhenServerNameIsNull

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 31, 2026
@dlwldnjs1009 dlwldnjs1009 force-pushed the rsocket-sni-fallback branch 2 times, most recently from af6fda4 to 0bd6f9f Compare May 31, 2026 08:39
The RSocket WebSocket transport's HttpServerSslCustomizer kept its own
copy of the SNI provider lookup that returned null for server names
without a mapped SSL bundle. This commit adapts the copy to fall back
to the default provider, as it is done in spring-projectsgh-50301.

See spring-projectsgh-50640

Signed-off-by: Lee JiWon <dlwldnjs1009@gmail.com>
@snicoll snicoll force-pushed the rsocket-sni-fallback branch from 0bd6f9f to 9446bd7 Compare May 31, 2026 14:32
@snicoll snicoll added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels May 31, 2026
@snicoll snicoll added this to the 4.0.7 milestone May 31, 2026
@snicoll snicoll changed the title Fall back to default SSL provider for unmapped SNI in RSocket NullPointerException in reactor-netty SniProvider and unmapped SSL bundle with RSocket May 31, 2026
@snicoll snicoll merged commit 89597d4 into spring-projects:4.0.x May 31, 2026
4 checks passed
@snicoll snicoll self-assigned this May 31, 2026
@dlwldnjs1009 dlwldnjs1009 deleted the rsocket-sni-fallback branch May 31, 2026 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug A general bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants