RestEasy client with one-way SSL is getting unexpected SSL certificate

Solution Verified - Updated -

Issue

  • Getting following error because the server is returning the wrong certificate:

    javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    
  • Server Name Indication is not supported in RestEasy on EAP 6 prior to 6.4

Environment

  • Red Hat JBoss Enterprise Application Platform
    • 6.1
    • 6.2
    • 6.3
  • RestEasy client secured with SSL

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content