Skip to content

NullPointerException in reactor-netty SniProvider when SSL bundle uses client-auth or server truststore without server-name-bundles#50301

Merged
snicoll merged 2 commits into
spring-projects:3.5.xfrom
kwondh5217:fix/50246-sni-fallback
May 29, 2026
Merged

NullPointerException in reactor-netty SniProvider when SSL bundle uses client-auth or server truststore without server-name-bundles#50301
snicoll merged 2 commits into
spring-projects:3.5.xfrom
kwondh5217:fix/50246-sni-fallback

Conversation

@kwondh5217
Copy link
Copy Markdown
Contributor

@kwondh5217 kwondh5217 commented May 6, 2026

Falls back to the default SslProvider when the SNI hostname is not
present in server-name-bundles. The lookup logic is extracted into
a package-private getSslProvider(String) method to make it directly
testable.

A unit test is used instead of an end-to-end test because the
synchronous SNI lookup exception is silently swallowed inside Netty's
SslClientHelloHandler and the handshake falls back to the default
SslContext, so the NPE does not surface at the response level
(see netty/netty#16794).

Closes gh-50246

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 6, 2026
@kwondh5217 kwondh5217 force-pushed the fix/50246-sni-fallback branch from 5519425 to 5e0d655 Compare May 6, 2026 17:05
@kwondh5217 kwondh5217 changed the title Fall back to default SSL provider for unmapped SNI hostnames NullPointerException in reactor-netty SniProvider when SSL bundle uses client-auth or server truststore without server-name-bundles May 6, 2026
@kwondh5217 kwondh5217 force-pushed the fix/50246-sni-fallback branch from 5e0d655 to 3f6a910 Compare May 6, 2026 17:47
@wilkinsona wilkinsona added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels May 7, 2026
@wilkinsona wilkinsona added this to the 3.5.x milestone May 7, 2026
@snicoll snicoll self-assigned this May 29, 2026
@snicoll snicoll modified the milestones: 3.5.x, 3.5.15 May 29, 2026
@snicoll snicoll force-pushed the fix/50246-sni-fallback branch from 3f6a910 to 8221bdb Compare May 29, 2026 09:06
@sephiroth-j

This comment was marked as low quality.

@snicoll snicoll merged commit d33962f into spring-projects:3.5.x May 29, 2026
3 of 4 checks passed
@snicoll
Copy link
Copy Markdown
Member

snicoll commented May 29, 2026

Thanks again @kwondh5217

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.

5 participants