Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
seanleblanc opened this issue Feb 22, 2016 · 3 comments
Open

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

seanleblanc opened this issue Feb 22, 2016 · 3 comments

Comments

@seanleblanc
Copy link

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?

@kairas
Copy link

kairas commented Jun 29, 2016

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

@seanleblanc
Copy link
Author

I don't think so.

kairas added a commit to kairas/httpbuilder that referenced this issue Jun 30, 2016
API's are disabling TLS v1 in favor of the more secure protocols TLS 1.1 or TLS 1.2. Java has a system property for setting this,  https.protocols, that this library completely ignores. Updating the library so that this property is used to set the transport protocols.

Upgrading http-client version to 4.5.2 for the SSLConnectionSocketFactory builder

Fixing testRedirect() - google redirects http - https now

Fixes issue jgritman#56
@lamon
Copy link

lamon commented Jun 4, 2018

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants