Jump to Navigation

Me on Twitter

  • #OAuth on mobile : apps hide the location bar of the provider's page. How do we check if it's not phishing ? #fail #antipattern 11 years 3 days ago
  • http://t.co/6WtJmlWzkU Sometimes I wonder... #whataworld 11 years 3 days ago
  • #SwitchDataSwitch 2.1 released... This app is still useful today for stock ROMs if you want to save your battery ! http://t.co/QtoWFPqR5r 11 years 4 days ago
  • How I learned that my 3G #nexus7 did not offer #android.hardware.telephony : "adb shell pm list features" http://t.co/qdOV6afq1R 11 years 4 days ago
  • #SwitchDataSwitch just passed the 'subway' test. Releasing soon... 11 years 5 days ago
  • One day only: Free Android apps and games from Amazon - http://t.co/lVi8dkvn0b Downloading..! 11 years 1 week ago
  • @levelupstudio what I miss in #plume : offline favorites and quick add to @pocket (might be custom button in tweet's bar) 11 years 1 week ago
  • @TheBrousse aussi pour découvrir ou il faut déjà connaitre @appcelerator ? 11 years 1 week ago
  • RT @guerwan: Droidcon Paris : les 17/18 Juin 2013 ! http://t.co/vnR2Zk4VJl 11 years 1 week ago
  • RT @TheBrousse: 4e edition du Titanium Meetup Paris demain soir. #tiparis Venez nombreux! http://t.co/Qvnul6OSYr @appcelerator 11 years 1 week ago

https

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