Skip to content

Commit 9e01628

Browse files
Version 3.15.0-v2.1-21.3.00.00 release (#210)
Co-authored-by: DevCenter-DocuSign <[email protected]>
1 parent 3d9f0bd commit 9e01628

File tree

469 files changed

+114831
-26144
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

469 files changed

+114831
-26144
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
# DocuSign Java Client Changelog
22
See [DocuSign Support Center](https://support.docusign.com/en/releasenotes/) for Product Release Notes.
33

4+
## [v3.15.0] - ESignature API v2.1-21.3.00.00 - 2021-09-29
5+
### Changed
6+
- Added support for version v2-21.3.00.00 of the DocuSign eSignature API.
7+
- Updated the SDK release version.
8+
### Added
9+
- SSL certificate chain-of-trust validation. (DCM-5802)
10+
### Removed
11+
- Removed jackson-datatype-joda dependency.
12+
413
## [v3.15.0-RC1] - ESignature API v2.1-21.2.02.00 - 2021-08-30
514
### Changed
615
- Added support for version v2.1-21.2.02.00 of the DocuSign ESignature API.

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ This SDK is provided as open source, which enables you to customize its function
2727
<dependency>
2828
<groupId>com.docusign</groupId>
2929
<artifactId>docusign-esign-java</artifactId>
30-
<version>3.15.0-RC1</version>
30+
<version>3.15.0</version>
3131
</dependency>
3232
```
3333
8. If your project is still open, restart Eclipse.
@@ -41,7 +41,6 @@ This client has the following external dependencies:
4141
* com.fasterxml.jackson.core:jackson-core:jar:2.12.1
4242
* com.fasterxml.jackson.core:jackson-annotations:jar:2.12.1
4343
* com.fasterxml.jackson.core:jackson-databind:2.12.1
44-
* com.fasterxml.jackson.datatype:jackson-datatype-joda:jar:2.12.1
4544
* com.brsanthu:migbase64:2.2
4645
* junit:junit:jar:4.13.1
4746
* com.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.2

build.gradle

Lines changed: 1 addition & 2 deletions
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 = '3.15.0-RC1'
5+
version = '3.15.0'
66

77
buildscript {
88
repositories {
@@ -133,7 +133,6 @@ dependencies {
133133
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
134134
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
135135
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
136-
compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version"
137136
compile "com.brsanthu:migbase64:2.2"
138137
testCompile "junit:junit:$junit_version"
139138
compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version"

pom.xml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<artifactId>docusign-esign-java</artifactId>
55
<packaging>jar</packaging>
66
<name>docusign-esign-java</name>
7-
<version>3.15.0-RC1</version>
7+
<version>3.15.0</version>
88
<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>
99
<url>https://developers.docusign.com</url>
1010

@@ -100,7 +100,7 @@
100100
<plugin>
101101
<groupId>org.apache.maven.plugins</groupId>
102102
<artifactId>maven-javadoc-plugin</artifactId>
103-
<version>2.10.4</version>
103+
<version>3.1.0</version>
104104
<executions>
105105
<execution>
106106
<id>attach-javadocs</id>
@@ -110,7 +110,9 @@
110110
</execution>
111111
</executions>
112112
<configuration>
113-
<additionalparam>-Xdoclint:none</additionalparam>
113+
<additionalOptions>
114+
<additionalOption>-Xdoclint:none</additionalOption>
115+
</additionalOptions>
114116
</configuration>
115117
</plugin>
116118

@@ -165,8 +167,8 @@
165167
<artifactId>maven-compiler-plugin</artifactId>
166168
<version>2.3.2</version>
167169
<configuration>
168-
<source>1.7</source>
169-
<target>1.7</target>
170+
<source>11</source>
171+
<target>11</target>
170172
</configuration>
171173
</plugin>
172174
</plugins>
@@ -264,11 +266,6 @@
264266
<artifactId>jackson-dataformat-csv</artifactId>
265267
<version>${jackson-version}</version>
266268
</dependency>
267-
<dependency>
268-
<groupId>com.fasterxml.jackson.datatype</groupId>
269-
<artifactId>jackson-datatype-joda</artifactId>
270-
<version>${jackson-version}</version>
271-
</dependency>
272269
<!-- Base64 encoding that works in both JVM and Android -->
273270
<dependency>
274271
<groupId>com.brsanthu</groupId>

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

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@
3838
import java.nio.file.Files;
3939
import java.nio.file.StandardCopyOption;
4040
import org.glassfish.jersey.logging.LoggingFeature;
41+
42+
import java.security.KeyStore;
43+
import java.security.KeyStoreException;
44+
import java.security.NoSuchAlgorithmException;
4145
import java.security.SecureRandom;
4246
import java.security.cert.CertificateException;
4347
import java.security.cert.X509Certificate;
@@ -84,7 +88,7 @@ public ApiClient() {
8488
this.dateFormat = new RFC3339DateFormat();
8589

8690
// Set default User-Agent.
87-
setUserAgent("Swagger-Codegen/3.15.0-RC1/java");
91+
setUserAgent("Swagger-Codegen/3.15.0/java");
8892

8993
// Setup authentications (key: authentication name, value: authentication).
9094
authentications = new HashMap<String, Authentication>();
@@ -1699,28 +1703,47 @@ public boolean verify(String hostname, SSLSession session) {
16991703
}
17001704

17011705
class SecureTrustManager implements X509TrustManager {
1706+
private X509TrustManager x509TrustManager = null;
1707+
1708+
SecureTrustManager() {
1709+
try {
1710+
TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
1711+
KeyStore ks = null;
1712+
trustManagerFactory.init(ks);
1713+
for (TrustManager trustManager: trustManagerFactory.getTrustManagers()) {
1714+
if (trustManager instanceof X509TrustManager) {
1715+
x509TrustManager = (X509TrustManager) trustManager;
1716+
break;
1717+
}
1718+
}
1719+
} catch (final Exception ex) {
1720+
System.err.println("failed to initialize SecureTrustManager: " + ex);
1721+
}
1722+
}
17021723

17031724
@Override
17041725
public void checkClientTrusted(X509Certificate[] arg0, String arg1)
17051726
throws CertificateException {
1727+
if (x509TrustManager == null) {
1728+
throw new CertificateException("x509TrustManager is null. certs could not be loaded.");
1729+
}
1730+
1731+
x509TrustManager.checkClientTrusted(arg0, arg1);
17061732
}
17071733

17081734
@Override
17091735
public void checkServerTrusted(X509Certificate[] arg0, String arg1)
17101736
throws CertificateException {
1737+
if (x509TrustManager == null) {
1738+
throw new CertificateException("x509TrustManager is null. certs could not be loaded.");
1739+
}
1740+
1741+
x509TrustManager.checkServerTrusted(arg0, arg1);
17111742
}
17121743

17131744
@Override
17141745
public X509Certificate[] getAcceptedIssuers() {
1715-
return new X509Certificate[0];
1716-
}
1717-
1718-
public boolean isClientTrusted(X509Certificate[] arg0) {
1719-
return true;
1720-
}
1721-
1722-
public boolean isServerTrusted(X509Certificate[] arg0) {
1723-
return true;
1746+
return x509TrustManager.getAcceptedIssuers();
17241747
}
17251748

17261749
}

0 commit comments

Comments
 (0)