Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

AXIS over SSL trusting all certificates  RSS feed

 
Tasja Mango
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I had serious problems making work AXIS over SSL (1.1, JDK14). All the time, I got "javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found".

The first thing to try was the well known solution:

TrustManager[] tm = new TrustManager[ 1 ];
tm[0]=new NaiveTrustManager( ); // accepts all
context.init(null, tm, new SecureRandom());
HttpsURLConnection.setDefaultSSLSocketFactory(context.getSocketFactory());

But AXIS absolutely refused to take setting this into account, the SUN default class got called every time.

On the net, google, AXIS mailing lists, etc no one had really a solution. Either there was never an answer, "use CommonsHttpSender & config HttpClient" (too complicated since need to rebuild AXIS), or "import server certs to your keyring" (not a acceptable solution for me)...

After some hours in the AXIS source codes, I stumbled over the SocketFactoryFactory...

All what's needed is provided by AXIS:

AxisProperties.setProperty("axis.socketSecureFactory","org.apache.axis.components.net.SunFakeTrustSocketFactory");

et voila...

This post just to share a useful information...
Natasha
 
Lukas Bradley
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Natasha,

I could use your help on setting up this same service. I'm more than willing to pay you for your time.

Would you please contact me at lukas at somnia.com? Thanks.

Lukas
 
biraj joshi
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks natasha
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!