httpbuilder icon indicating copy to clipboard operation
httpbuilder copied to clipboard

A way to coerce this to use a certain set of https protocols?

Open seanleblanc opened this issue 9 years ago • 3 comments

I'm trying to get an application that is using Java 1.7 + httpbuilder to honor the ideas here:

https://blogs.oracle.com/java-platform-group/entry/diagnosing_tls_ssl_and_https

It seems that https.protocols is not inspected by httpclient, or at least the version that httpbuilder is using.

Any other ideas on how to make it honor a given set of https protocols?

seanleblanc avatar Feb 22 '16 22:02 seanleblanc

Were you ever able to find a fork that accomplished this? If not I'm about to attempt it.

kairas avatar Jun 29 '16 13:06 kairas

I don't think so.

seanleblanc avatar Jun 29 '16 13:06 seanleblanc

This worked for me:

def http = new HTTPBuilder(baseUrl)
SSLContext ctx = SSLContext.getInstance("TLSv1.2")
ctx.init(null, null, null)
def scheme = new Scheme("https", 443, new SSLSocketFactory(ctx))
http.client.connectionManager.schemeRegistry.register(scheme)

Hope it helps someone else...

lamon avatar Jun 04 '18 20:06 lamon