• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

AXIS over SSL trusting all certificates

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks natasha
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much natasha!

this solution works for me!
 
Without subsidies, chem-ag food costs four times more than organic. Or this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic