[utilities COMMIT] /java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/httpclient/HttpClientBuild...
noreply at shibboleth.net
noreply at shibboleth.net
Tue Dec 16 15:19:14 EST 2014
Author: putmanb
Date: Tue Dec 16 15:19:13 2014
New Revision: 709
URL: http://svn.shibboleth.net/view/utilities?rev=709&view=rev
Log:
Deprecate the connectionDisregardSslCertificate methods in favor of connectionDisregardTLSCertificate, both for case but also because of world moving from SSL -> TLS.
Modified:
java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/httpclient/HttpClientBuilder.java
Modified: java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/httpclient/HttpClientBuilder.java
URL: http://svn.shibboleth.net/view/utilities/java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/httpclient/HttpClientBuilder.java?rev=709&r1=708&r2=709&view=diff
==============================================================================
--- java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/httpclient/HttpClientBuilder.java (original)
+++ java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/httpclient/HttpClientBuilder.java Tue Dec 16 15:19:13 2014
@@ -145,8 +145,8 @@
*/
private int connectionTimeout;
- /** Whether the SSL certificates used by the responder should be ignored. Default value: false */
- private boolean connectionDisregardSslCertificate;
+ /** Whether the SSL/TLS certificates used by the responder should be ignored. Default value: false */
+ private boolean connectionDisregardTLSCertificate;
/** Whether to instruct the server to close the connection after it has sent its response. Default value: true */
private boolean connectionCloseAfterResponse;
@@ -203,7 +203,7 @@
socketTimeout = -1;
socketBufferSize = 8192;
connectionTimeout = -1;
- connectionDisregardSslCertificate = false;
+ connectionDisregardTLSCertificate = false;
connectionCloseAfterResponse = true;
connectionStalecheck = false;
connectionProxyHost = null;
@@ -303,21 +303,45 @@
}
/**
- * Gets whether the responder's SSL certificate should be ignored.
- *
- * @return whether the responder's SSL certificate should be ignored
- */
+ * Gets whether the responder's SSL/TLS certificate should be ignored.
+ *
+ * @return whether the responder's SSL/TLS certificate should be ignored
+ *
+ * @deprecated use {@link #isConnectionDisregardTLSCertificate()}
+ */
+ @Deprecated
public boolean isConnectionDisregardSslCertificate() {
- return connectionDisregardSslCertificate;
- }
-
- /**
- * Sets whether the responder's SSL certificate should be ignored.
- *
- * @param disregard whether the responder's SSL certificate should be ignored
- */
+ return isConnectionDisregardTLSCertificate();
+ }
+
+ /**
+ * Sets whether the responder's SSL/TLS certificate should be ignored.
+ *
+ * @param disregard whether the responder's SSL/TLS certificate should be ignored
+ *
+ * @deprecated use {@link #setConnectionDisregardTLSCertificate(boolean)}
+ */
+ @Deprecated
public void setConnectionDisregardSslCertificate(final boolean disregard) {
- connectionDisregardSslCertificate = disregard;
+ setConnectionDisregardTLSCertificate(disregard);
+ }
+
+ /**
+ * Gets whether the responder's SSL/TLS certificate should be ignored.
+ *
+ * @return whether the responder's SSL/TLS certificate should be ignored
+ */
+ public boolean isConnectionDisregardTLSCertificate() {
+ return connectionDisregardTLSCertificate;
+ }
+
+ /**
+ * Sets whether the responder's SSL/TLS certificate should be ignored.
+ *
+ * @param disregard whether the responder's SSL/TLS certificate should be ignored
+ */
+ public void setConnectionDisregardTLSCertificate(final boolean disregard) {
+ connectionDisregardTLSCertificate = disregard;
}
/**
@@ -509,7 +533,7 @@
protected void decorateApacheBuilder() throws Exception {
org.apache.http.impl.client.HttpClientBuilder builder = getApacheBuilder();
- if (connectionDisregardSslCertificate) {
+ if (connectionDisregardTLSCertificate) {
builder.setSSLSocketFactory(HttpClientSupport.buildNoTrustSSLConnectionSocketFactory());
}
More information about the commits
mailing list