Jump to Navigation

Me on Twitter

  • Nowadays you have to use a #passwordmanager, that makes no doubt. It's a pitty because this builds up a very sensit… https://t.co/JYPA7qbGve 1 year 32 weeks ago
  • RT @esascience: 1 year 42 weeks ago
  • RT @lexfridman: I don't trust my brain. It often generates weird, contradictory, and confusing thoughts. Plus it randomly interrupts a cohe… 1 year 45 weeks ago
  • énergie gratuite ! 1 year 48 weeks ago
  • @DianeDCD énergie gratuite ! 1 year 48 weeks ago
  • RT @clochix: Ça y est, MDN Plus est disponible en france, vous pouvez à présent soutenir financièrement cet effort pour proposer une docume… 1 year 50 weeks ago
  • @elonmusk @BTC_Archive Don't spend your money, there is already a platform for freedom of speech #mastodon https://t.co/0MXYtfx1HP 2 years 3 days ago
  • RT @LavanyaSunder: Grateful and humbled to announce that I am one of the most powerful humans in the world https://t.co/z6eVcg5JIX https://… 2 years 4 weeks ago
  • RT @Fighters_Gen: 2 years 8 weeks ago
  • RT @StreetArtUtopia: This mural reveals its full meaning when looking at its reflection in the water. https://t.co/jzfaqF6xng 2 years 11 weeks ago

ssl

java HttpClient 3.x : a portable SSL Socket Factory implementation

I was just trying to implement client and server authentication over SSL on IBM Websphere 6 (JRE 1.4.2)...

[...]

It may sound awkward in 2012, but if you wish the HTTPS server to identify your Java client (versus : only the server is identified), you will have to write your own implementation of a socket factory.

The Java Runtime Environment doesn't provide ready-to-use classes to do this. Yes : there is javax.net.ssl.SSLSocketFactory.getDefault() but it requires to set some system (therefore global) properties to point to the certificates files !!!

Even with Apache's HttpClient (at least version 3.x), you have to use a custom SSLProtocolSocketFactory.

The HttpClient SSL Guide provides sample code to implement mutual client and server authentication ; unfortunately the latest stable release of it (contrib 3.1) is bound to Sun's API with imports such as com.sun.net.ssl.KeyManagerFactory. Needless to say that this will not work on an IBM Websphere JRE...

This article contains an implementation of a SSLProtocolSocketFactory for HttpClient, to whom may be interested...

Syndicate content