Skip to content

SNI + VirtualHost != success #927

@jxtps

Description

@jxtps

I need to make local https requests to servers that run multiple websites. This means that the url is something like https://localhost/..., with the virtual host set to example.com. Can't go to example.com as the purpose is to test the current server which is behind the load balancer that actually serves example.com, and can't use http since the nginx configuration redirects to https since otherwise our actual site visitors wouldn't get https.

The certificate returned is indeed for example.com (in case we ever remove the load balancer, and well, it's a great certificate), but the hostname verification fails with a java.security.cert.CertificateException: No subject alternative DNS name matching localhost found..

It would be great if the hostname verification took the virtual host specified into account.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions