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