Skip to content

With two-way-ssl exchange.getRequest().getSslInfo() always null [SPR-16507] #21050

@spring-projects-issues

Description

@spring-projects-issues

Henning Vogt opened SPR-16507 and commented

Affected spring-boot configurations: Tomcat or Jetty Embedded (netty works)
If using two-way-ssl, the getSslInfo() is always null due to apparently wrong attribute used. The spec notes a different attribute that contains the x509Certificate (see below)

class org.springframework.http.server.reactive.ServletServerHttpRequest, in method initSslInfo()

Instead of java.security.cert.X509Certificate it should read the attribute javax.servlet.request.X509Certificate to return the certificate. This is statet here https://tomcat.apache.org/tomcat-8.5-doc/servletapi/javax/servlet/ServletRequest.html and https://docs.oracle.com/javaee/7/api/javax/servlet/ServletRequest.html

I think it's safe, just to rename this, since the spec says it, and I had the problem in real life, too. Don't know where the initial property came from, see reference URL.


Affects: 5.0.3

Reference URL: #20516

Issue Links:

Referenced from: commits dcf5c64

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions