Skip to content

Commit 21a0ff7

Browse files
authored
Merge pull request #77 from docusign/force-tls-1.2
Forcing TLS v1.2 as earlier versions are vulnerable
2 parents c12603f + f89cdda commit 21a0ff7

File tree

10 files changed

+50
-24
lines changed

10 files changed

+50
-24
lines changed

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
sudo: false
1+
sudo: required
2+
dist: trusty
23
install: true
34

45
branches:
@@ -16,6 +17,7 @@ notifications:
1617

1718
jdk:
1819
- oraclejdk8
20+
- openjdk7
1921

2022
script: mvn -X clean test
2123

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@ See [DocuSign Support Center](https://support.docusign.com/en/releasenotes/) for
77
### Changed
88
- Updated the package with the latest API monthly release.
99

10-
## [2.6.0] - 2018-05-16
1110

11+
## [2.6.1] - 2018-06-06
12+
### Security
13+
- Forced support of TLS v1.2. See [this post](https://support.docusign.com/en/articles/End-of-TLS-1-0-and-weak-cipher-support) on the DocuSign Support Center for more information.
14+
15+
## [2.6.0] - 2018-05-16
1216
### Added
1317
- Support for OAuth implicit grant.
1418
- Support for OAuth Get User Info.

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ You can sign up for a free [developer sandbox](https://developers.docusign.com/)
88
Requirements
99
============
1010

11-
Java 1.7 or later.
11+
Java 1.7 or later.
1212

1313
Installation
1414
============
@@ -21,7 +21,7 @@ Add this dependency to your project's POM:
2121
<dependency>
2222
<groupId>com.docusign</groupId>
2323
<artifactId>docusign-esign-java</artifactId>
24-
<version>2.6.0</version>
24+
<version>2.6.1</version>
2525
</dependency>
2626
```
2727

@@ -30,7 +30,7 @@ Add this dependency to your project's POM:
3030
Add this dependency to your project's build file:
3131

3232
```groovy
33-
compile "com.docusign:docusign-esign-java:2.6.0"
33+
compile "com.docusign:docusign-esign-java:2.6.1"
3434
```
3535

3636
#### Dependencies
@@ -73,8 +73,8 @@ android {
7373

7474
This client is available through the following Java package managers:
7575

76-
- [Nexus Repository Manager](https://oss.sonatype.org/#nexus-search;quick~docusign-esign-java) (oss.sonatype.org). You can search for com.docusign or docusign-esign-java. The current version is 2.6.0.
77-
- [JFrog Bintray](https://bintray.com/dsdevcenter/maven/docusign-esign-java) (bintray.com). You can search for com.docusign or docusign-esign-java. The current version is 2.6.0.
76+
- [Nexus Repository Manager](https://oss.sonatype.org/#nexus-search;quick~docusign-esign-java) (oss.sonatype.org). You can search for com.docusign or docusign-esign-java. The current version is 2.6.1.
77+
- [JFrog Bintray](https://bintray.com/dsdevcenter/maven/docusign-esign-java) (bintray.com). You can search for com.docusign or docusign-esign-java. The current version is 2.6.1.
7878

7979

8080
Usage

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apply plugin: 'idea'
22
apply plugin: 'eclipse'
33

44
group = 'com.docusign'
5-
version = '2.6.0'
5+
version = '2.6.1'
66

77
buildscript {
88
repositories {

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>docusign-esign-java</artifactId>
66
<packaging>jar</packaging>
77
<name>docusign-esign-java</name>
8-
<version>2.6.0</version>
8+
<version>2.6.1</version>
99
<description>The official DocuSign eSignature JAVA client is based on version 2 of the DocuSign REST API and provides libraries for JAVA application integration. It is recommended that you use this version of the library for new development.</description>
1010
<url>https://www.docusign.com/developer-center</url>
1111

src/main/java/com/docusign/esign/client/ApiClient.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import com.sun.jersey.api.client.WebResource;
1313
import com.sun.jersey.api.client.config.DefaultClientConfig;
1414
import com.sun.jersey.api.client.filter.LoggingFilter;
15+
import com.sun.jersey.client.urlconnection.HTTPSProperties;
1516
import com.sun.jersey.core.util.MultivaluedMapImpl;
1617
import com.sun.jersey.api.client.WebResource.Builder;
1718

@@ -22,6 +23,8 @@
2223
import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder;
2324
import org.apache.oltu.oauth2.common.exception.OAuthSystemException;
2425

26+
import javax.net.ssl.HttpsURLConnection;
27+
import javax.net.ssl.SSLContext;
2528
import javax.ws.rs.core.Response.Status.Family;
2629
import javax.ws.rs.core.UriBuilder;
2730
import javax.ws.rs.core.MediaType;
@@ -1002,6 +1005,23 @@ private Client buildHttpClient(boolean debugging) {
10021005
JacksonJsonProvider jsonProvider = new JacksonJsonProvider(mapper);
10031006
DefaultClientConfig conf = new DefaultClientConfig();
10041007
conf.getSingletons().add(jsonProvider);
1008+
1009+
// Force TLS v1.2
1010+
try {
1011+
System.setProperty("https.protocols", "TLSv1.2");
1012+
} catch (SecurityException se) {
1013+
System.err.println("failed to set https.protocols property");
1014+
}
1015+
SSLContext ctx = null;
1016+
try {
1017+
ctx = SSLContext.getInstance("TLSv1.2");
1018+
ctx.init(null, null, null);
1019+
} catch (final Exception ex) {
1020+
System.err.println("failed to initialize SSL context");
1021+
}
1022+
conf.getProperties().put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES, new HTTPSProperties(null, ctx));
1023+
HttpsURLConnection.setDefaultSSLSocketFactory(ctx.getSocketFactory());
1024+
10051025
Client client = Client.create(conf);
10061026
if (debugging) {
10071027
client.addFilter(new LoggingFilter());
1.17 KB
Binary file not shown.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#Generated by Maven
2-
#Tue May 15 23:56:46 PDT 2018
3-
version=2.6.0
2+
#Wed Jun 06 15:48:09 PDT 2018
3+
version=2.6.1
44
groupId=com.docusign
55
artifactId=docusign-esign-java
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
-------------------------------------------------------------------------------
22
Test set: SdkUnitTests
33
-------------------------------------------------------------------------------
4-
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 63.306 sec
4+
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 60.9 sec

target/surefire-reports/TEST-SdkUnitTests.xml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
2-
<testsuite failures="0" time="63.306" errors="0" skipped="0" tests="11" name="SdkUnitTests">
2+
<testsuite failures="0" time="60.9" errors="0" skipped="0" tests="11" name="SdkUnitTests">
33
<properties>
44
<property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
55
<property name="sun.boot.library.path" value="/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib"/>
@@ -62,15 +62,15 @@
6262
<property name="ftp.nonProxyHosts" value="local|*.local|169.254/16|*.169.254/16"/>
6363
<property name="sun.cpu.isalist" value=""/>
6464
</properties>
65-
<testcase time="7.607" classname="SdkUnitTests" name="GetDiagnosticLogsTest"/>
66-
<testcase time="8.014" classname="SdkUnitTests" name="ResendEnvelopeTest"/>
67-
<testcase time="7.707" classname="SdkUnitTests" name="DownLoadEnvelopeDocumentsTest"/>
68-
<testcase time="1.576" classname="SdkUnitTests" name="ImplicitLoginTest"/>
69-
<testcase time="6.56" classname="SdkUnitTests" name="RequestSignatureFromTemplate"/>
70-
<testcase time="4.572" classname="SdkUnitTests" name="JWTLoginTest"/>
71-
<testcase time="1.569" classname="SdkUnitTests" name="AuthorizationCodeLoginTest"/>
72-
<testcase time="7.076" classname="SdkUnitTests" name="EmbeddedSigningTest"/>
73-
<testcase time="6.288" classname="SdkUnitTests" name="CreateTemplateTest"/>
74-
<testcase time="6.905" classname="SdkUnitTests" name="RequestASignatureTest"/>
75-
<testcase time="5.432" classname="SdkUnitTests" name="ListDocumentsTest"/>
65+
<testcase time="5.097" classname="SdkUnitTests" name="JWTLoginTest"/>
66+
<testcase time="8" classname="SdkUnitTests" name="ResendEnvelopeTest"/>
67+
<testcase time="5.596" classname="SdkUnitTests" name="RequestSignatureFromTemplate"/>
68+
<testcase time="1.656" classname="SdkUnitTests" name="AuthorizationCodeLoginTest"/>
69+
<testcase time="7.593" classname="SdkUnitTests" name="DownLoadEnvelopeDocumentsTest"/>
70+
<testcase time="5.456" classname="SdkUnitTests" name="ListDocumentsTest"/>
71+
<testcase time="5.671" classname="SdkUnitTests" name="RequestASignatureTest"/>
72+
<testcase time="6.068" classname="SdkUnitTests" name="CreateTemplateTest"/>
73+
<testcase time="1.651" classname="SdkUnitTests" name="ImplicitLoginTest"/>
74+
<testcase time="6.923" classname="SdkUnitTests" name="GetDiagnosticLogsTest"/>
75+
<testcase time="7.189" classname="SdkUnitTests" name="EmbeddedSigningTest"/>
7676
</testsuite>

0 commit comments

Comments
 (0)