Jump to Navigation

Me on Twitter

  • Requirements for coronavirus disease 2019 (COVID-19) apps - Play Console Help - https://t.co/v6hbjtjAH5 2 years 14 weeks ago
  • Pas sûr que le père Noël passe cette année ? Rachetez-vous une conscience – Rallumez les ombres, faites un don à la… https://t.co/sb640Kp2e0 2 years 16 weeks ago
  • Alors que l'on critique l'hégémonie de #Google... https://t.co/0qlVXabFi0 2 years 16 weeks ago
  • @InfernoSchnapp ça fait un moment que je cherche comment le dire :-D 2 years 16 weeks ago
  • @petapixel you're right, stop depending a company and get back control on your photos : https://t.co/VAqBPAA2Uh @Pixelfed 2 years 19 weeks ago
  • RT @scott_kerr: Meanwhile, by Columbus Circle https://t.co/FRzWiCIqfa 2 years 20 weeks ago
  • @GregWildSmith Then continue to use it a lot... Maybe it's just that you haven't used it long enough ;-) 2 years 21 weeks ago
  • RT @iceland: Some said an open-world experience this immersive wasn’t possible. But it’s already here. And you don’t even need silly VR hea… 2 years 22 weeks ago
  • RT @okjanelle: I find this @snowden quote relevant. https://t.co/8VCBRbECta 2 years 23 weeks ago
  • Oh. My. God. Thx for this good laughing session 2 years 26 weeks ago

SSLProtocolSocketFactory

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