Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
1a19eaa87d | |||
a2dde38348 | |||
dfb6d0a37c |
@ -1,3 +1,11 @@
|
|||||||
|
## 0.9.2 (2021-01-24)
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
* Only initialize custom trust managers, if CA certificate is actually provided (#43)
|
||||||
|
|
||||||
|
### Improvements
|
||||||
|
* Minor dependency updates
|
||||||
|
|
||||||
## 0.9.1 (2021-01-03)
|
## 0.9.1 (2021-01-03)
|
||||||
|
|
||||||
### Improvements
|
### Improvements
|
||||||
|
@ -40,7 +40,7 @@ Java Vault Connector is a connector library for [Vault](https://www.vaultproject
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>de.stklcode.jvault</groupId>
|
<groupId>de.stklcode.jvault</groupId>
|
||||||
<artifactId>jvault-connector</artifactId>
|
<artifactId>jvault-connector</artifactId>
|
||||||
<version>0.9.1</version>
|
<version>0.9.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
16
pom.xml
16
pom.xml
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<groupId>de.stklcode.jvault</groupId>
|
<groupId>de.stklcode.jvault</groupId>
|
||||||
<artifactId>jvault-connector</artifactId>
|
<artifactId>jvault-connector</artifactId>
|
||||||
<version>0.9.1</version>
|
<version>0.9.2</version>
|
||||||
|
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
@ -111,7 +111,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
<artifactId>jackson-databind</artifactId>
|
<artifactId>jackson-databind</artifactId>
|
||||||
<version>2.12.0</version>
|
<version>2.12.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -129,13 +129,13 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mockito</groupId>
|
<groupId>org.mockito</groupId>
|
||||||
<artifactId>mockito-core</artifactId>
|
<artifactId>mockito-core</artifactId>
|
||||||
<version>3.6.28</version>
|
<version>3.7.7</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mockito</groupId>
|
<groupId>org.mockito</groupId>
|
||||||
<artifactId>mockito-inline</artifactId>
|
<artifactId>mockito-inline</artifactId>
|
||||||
<version>3.6.28</version>
|
<version>3.7.7</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -151,7 +151,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.sonarsource.scanner.maven</groupId>
|
<groupId>org.sonarsource.scanner.maven</groupId>
|
||||||
<artifactId>sonar-maven-plugin</artifactId>
|
<artifactId>sonar-maven-plugin</artifactId>
|
||||||
<version>3.7.0.1746</version>
|
<version>3.8.0.2131</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
@ -286,7 +286,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.owasp</groupId>
|
<groupId>org.owasp</groupId>
|
||||||
<artifactId>dependency-check-maven</artifactId>
|
<artifactId>dependency-check-maven</artifactId>
|
||||||
<version>6.0.4</version>
|
<version>6.0.5</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<goals>
|
<goals>
|
||||||
@ -317,11 +317,11 @@
|
|||||||
<id>local</id>
|
<id>local</id>
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
<repository>
|
<repository>
|
||||||
<id>local</id>
|
<id>stklcode</id>
|
||||||
<url>${dist.repo.local}</url>
|
<url>${dist.repo.local}</url>
|
||||||
</repository>
|
</repository>
|
||||||
<snapshotRepository>
|
<snapshotRepository>
|
||||||
<id>local</id>
|
<id>stklcode</id>
|
||||||
<url>${dist.repo.local.snapshot}</url>
|
<url>${dist.repo.local.snapshot}</url>
|
||||||
</snapshotRepository>
|
</snapshotRepository>
|
||||||
</distributionManagement>
|
</distributionManagement>
|
||||||
|
@ -367,6 +367,10 @@ public final class RequestHelper implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private SSLConnectionSocketFactory createSSLSocketFactory() throws TlsException {
|
private SSLConnectionSocketFactory createSSLSocketFactory() throws TlsException {
|
||||||
try {
|
try {
|
||||||
|
// Create context..
|
||||||
|
SSLContext context = SSLContext.getInstance(tlsVersion);
|
||||||
|
|
||||||
|
if (trustedCaCert != null) {
|
||||||
// Create Keystore with trusted certificate.
|
// Create Keystore with trusted certificate.
|
||||||
KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
|
KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
|
||||||
keyStore.load(null, null);
|
keyStore.load(null, null);
|
||||||
@ -375,10 +379,10 @@ public final class RequestHelper implements Serializable {
|
|||||||
// Initialize TrustManager.
|
// Initialize TrustManager.
|
||||||
TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
|
TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
|
||||||
tmf.init(keyStore);
|
tmf.init(keyStore);
|
||||||
|
context.init(null, tmf.getTrustManagers(), null);
|
||||||
// Create context using this TrustManager.
|
} else {
|
||||||
SSLContext context = SSLContext.getInstance(tlsVersion);
|
context.init(null, null, null);
|
||||||
context.init(null, tmf.getTrustManagers(), new SecureRandom());
|
}
|
||||||
|
|
||||||
return new SSLConnectionSocketFactory(
|
return new SSLConnectionSocketFactory(
|
||||||
context,
|
context,
|
||||||
|
Reference in New Issue
Block a user