Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Validating server certificates in Jetty HTTP Client 9.3.5.v20151012

Hi,

On Thu, Apr 14, 2016 at 7:02 PM, Alaric Snell-Pym
<alaric@xxxxxxxxxxxxxxxx> wrote:
> Hi there!
>
> I'm writing some software that needs to connect to HTTPS servers. I'm
> using Jetty HTTP client, and it works fine, except that I can't seem to
> get it to validate the server's certificate.

Use:

SslContextFactory.setEndpointIdentificationAlgorithm("HTTPS");

Test case that shows this is:

https://github.com/eclipse/jetty.project/blob/jetty-9.3.8.v20160314/jetty-client/src/test/java/org/eclipse/jetty/client/HostnameVerificationTest.java

-- 
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.


Back to the top