Jump to Navigation

Me on Twitter

  • Clever #rovio : they put the cartoons inside the #AngryBirds apps to gain more audience ! 11 years 4 weeks ago
  • @CedN “@DevoxxFR “@aagahi \o/ Prochain Paris Scala UG - @DevoxxFR le 28 mars, avec @odersky https://t.co/y4falcBDmq”” 11 years 4 weeks ago
  • @wadael #ORMLite a été listé à la fin (entre autres) mais vu le reste de la prez je n'ai pas tenté les questions :-) 11 years 4 weeks ago
  • @wadael dommage je suis parti dès la fin de la séance... Pas trop appris ce soir, c'était plus du design pattern général que de l'android... 11 years 4 weeks ago
  • @zenikaIt @android2ee point final de la conf ce soir : #maven n'est pas prêt pour #Android ;-) 11 years 4 weeks ago
  • RT @sam_et_max: Ils ont du temps libre un jour par semaine chez Google, et ça se voit. Annotations Java débiles, checked https://t.co/xO ... 11 years 4 weeks ago
  • If you didn't know about it : #Android API changes report http://t.co/RvvgNpZDae Very useful ! 11 years 4 weeks ago
  • Is it an #android up there ? Cannot access to check... http://t.co/pVTkRnD7vY 11 years 5 weeks ago
  • Ce livre blanc vaut pour tous les #CMS mais il donne aussi un bon aperçu de #Drupal solide, évolutif http://t.co/aLi9sWeuzz 11 years 5 weeks ago
  • Haven't noticed before that the true specification of attributes likes load-on-startup is in the XSD itself http://t.co/P2qQNCVdxn #JavaEE 11 years 5 weeks ago

java

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