mmcgrana/clj-http — pull request #13 by hmanish (2013-09-24 18:24:22+00:00)
Title: SSLSocket factory with keystore = true and insecure = true

There are certain circumstances where a keystore/truststore is provided and :insecure? = true. This is done when the client is supposed to submit a certificate and accept an invalid (self signed) certificate from the server.

The clj-http.conn-mgr/get-keystore-scheme-registry function only sets the hostnameverifier to SSLSocketFactory/ALLOW_ALL_HOSTNAME_VERIFIER and does not set the TrustStrategy to override JSSE certificate verification.

I have modified this function to use a different SSLSocketFactory constructor that takes keystore,truststore,hostnameverifier and truststrategy