From 37437f6fe85af073218eb0d7075d5e88d80f8ee1 Mon Sep 17 00:00:00 2001 From: Roman Strobl Date: Tue, 31 Dec 2024 12:57:11 +0100 Subject: [PATCH] Fix #339: REST client should allow key store and trust store in memory configuration --- .../rest/client/base/DefaultRestClient.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/rest-client-base/src/main/java/com/wultra/core/rest/client/base/DefaultRestClient.java b/rest-client-base/src/main/java/com/wultra/core/rest/client/base/DefaultRestClient.java index a64e19c..4e8f5a6 100644 --- a/rest-client-base/src/main/java/com/wultra/core/rest/client/base/DefaultRestClient.java +++ b/rest-client-base/src/main/java/com/wultra/core/rest/client/base/DefaultRestClient.java @@ -1296,6 +1296,16 @@ public CertificateAuthBuilder keyStoreLocation(String keyStoreLocation) { return this; } + /** + * Set keystore bytes. + * @param keyStoreBytes Keystore bytes. + * @return Builder. + */ + public CertificateAuthBuilder keyStoreBytes(byte[] keyStoreBytes) { + mainBuilder.config.setKeyStoreBytes(keyStoreBytes); + return this; + } + /** * Set keystore password. * @param keyStorePassword Keystore password. @@ -1345,6 +1355,16 @@ public CertificateAuthBuilder trustStoreLocation(String trustStoreLocation) { return this; } + /** + * Set truststore bytes. + * @param trustStoreBytes Truststore bytes. + * @return Builder. + */ + public CertificateAuthBuilder trustStoreBytes(byte[] trustStoreBytes) { + mainBuilder.config.setTrustStoreBytes(trustStoreBytes); + return this; + } + /** * Set truststore password. * @param trustStorePassword Truststore password.