From ea3b6d50cbef86a03ebe22a081ea25a0c1db449b Mon Sep 17 00:00:00 2001 From: Stefan Kalscheuer Date: Wed, 21 Dec 2016 20:22:26 +0100 Subject: [PATCH] Fix #6 Factory Null-tolerant for trusted certificate --- CHANGELOG.md | 5 +++++ README.md | 2 +- pom.xml | 2 +- .../jvault/connector/factory/HTTPVaultConnectorFactory.java | 4 +++- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 249479a..71c967d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.4.1 [in progress] +* [fix] Factory Null-tolerant for trusted certificate (#6) +* [test] StackTraces testet for secret leaks +* [test] Tested against Vault 0.6.4 + ## 0.4.0 [2016-11-06] * [feature] Option to provide a trusted CA certificate (#2) * [feature] Deletion, revocation and renewal of secrets (#3) diff --git a/README.md b/README.md index abc0f3d..f7baced 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Java Vault Connector is a connector library for [Vault](https://www.vaultproject * Renew/revoke leases * Raw secret content or JSON decoding * Connector Factory with builder pattern -* Tested against Vault 0.6.3 +* Tested against Vault 0.6.4 **Usage Example** diff --git a/pom.xml b/pom.xml index d6583ae..672d923 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ de.stklcode.jvault connector - 0.5.0-SNAPSHOT + 0.4.1-SNAPSHOT UTF-8 diff --git a/src/main/java/de/stklcode/jvault/connector/factory/HTTPVaultConnectorFactory.java b/src/main/java/de/stklcode/jvault/connector/factory/HTTPVaultConnectorFactory.java index fe73710..5c20a74 100644 --- a/src/main/java/de/stklcode/jvault/connector/factory/HTTPVaultConnectorFactory.java +++ b/src/main/java/de/stklcode/jvault/connector/factory/HTTPVaultConnectorFactory.java @@ -131,7 +131,9 @@ public class HTTPVaultConnectorFactory extends VaultConnectorFactory { * @since 0.4.0 */ public HTTPVaultConnectorFactory withTrustedCA(Path cert) throws VaultConnectorException { - return withSslContext(createSslContext(cert)); + if (cert != null) + return withSslContext(createSslContext(cert)); + return this; } /**