Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-dev] Fwd: Ssl handshake exception

Hi Joakim,


We are developing Rest services for one of our client. It is deployed in jetty server which is in AWS(amazon cloud) instance.


There is one requirement that invoking external API with https.


When we tried , We got the exception in Aws instance before having the below code,

 

javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No name matching il-aw-ext-elb01-644385514.us-west-2.elb.amazonaws.com found

 

 

 

void getHostnameVerifier(final String url) {

                                // for localhost testing only

                                javax.net.ssl.HttpsURLConnection

                                                                .setDefaultHostnameVerifier(new javax.net.ssl.HostnameVerifier() {

 

                                                                                public boolean verify(String hostname,

                                                                                                                javax.net.ssl.SSLSession sslSession) {

                                                                                                if (hostname.equals(url)) {

                                                                                                                return true;

                                                                                                }

                                                                                                return false;

                                                                                }

                                                                });

                }

 

After adding the above block of code, we got exception in Aws instance

 

 

 

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException:

 

 

 Is jetty playing any role for doing SSL certificate verification?



If yes, Please help us to resolve.


Thanks & Regards,


Mohan Ramu



Back to the top