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

Prevent HttpConnectionError when getting JSON for Jenkins object #179

Conversation

keljos
Copy link
Contributor

@keljos keljos commented Oct 4, 2017

Add code to explicitly require either TLS 1.1 or 1.2. Also added a separate catch for the HttpHostConnectException to prevent it from being rethrown.

…perate catch for the HttpHostConnectException to prevent it from being rethrown.

SSLConnectionSocketFactory f = new SSLConnectionSocketFactory(
sslContext,
new String[]{"TLSv1.1", "TLSv1.2"},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there constants for TLSv1.1 and 1.2 strings?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There aren't. I didn't add any as these values aren't used elsewhere. That being said, it could certainly be added.

Copy link
Contributor

@jpricket jpricket left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good.

@jpricket jpricket merged commit 9f8f59b into jenkinsci:master Oct 12, 2017
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

Successfully merging this pull request may close these issues.

2 participants