My domain name is assigned for a specific IP address(normal). Because in the same WebLogic server, in the same Unix box, under the same internal IP address are running 2 applications, if the http address is like a domain name(correct one) I redirect to my application.

Patrick Deloulay

The matching between the certificate and server hostname can be disbaled dynamically by adding this piece of code

URL jsseUrl = new URL( "https", host, Integer.valueOf(sport).intValue(), query);
java.net.HttpURLConnection sconnection =(java.net.HttpURLConnection)jsseUrl.openConnection();
if (sconnection instanceof com.sun.net.ssl.HttpsURLConnection)
      ((com.sun.net.ssl.HttpsURLConnection)sconnection)
          .setHostnameVerifier(new NullHostnameVerifier());

where NullHostnameVerifier implements com.sun.net.ssl.HostnameVerifier interface. just make the verify() method of you implementation to return true. I do not recommend this in production code, because your certificate you definitively match you server hostname, but it is very useful in during development.
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact