From 1c1e427efd0ec3fca941360f90440fe47018c301 Mon Sep 17 00:00:00 2001 From: anhefti Date: Tue, 8 Oct 2019 14:21:46 +0200 Subject: [PATCH] fixed secure startup --- .../seb/sebserver/ClientHttpRequestFactoryService.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/ClientHttpRequestFactoryService.java b/src/main/java/ch/ethz/seb/sebserver/ClientHttpRequestFactoryService.java index c5fdf4c3..a31418de 100644 --- a/src/main/java/ch/ethz/seb/sebserver/ClientHttpRequestFactoryService.java +++ b/src/main/java/ch/ethz/seb/sebserver/ClientHttpRequestFactoryService.java @@ -153,11 +153,15 @@ public class ClientHttpRequestFactoryService { sslContext = SSLContextBuilder .create() .loadTrustMaterial(trustStoreFile, password) - .setKeyStoreType("pkcs12") + .setKeyStoreType(this.environment.getProperty( + "server.ssl.key-store-type", + "pkcs12")) .build(); } - if (proxy.proxyAuthType != null && proxy.proxyAuthType != ProxyAuthType.NONE) { + if (proxy != null && + proxy.proxyAuthType != null && + proxy.proxyAuthType != ProxyAuthType.NONE) { log.info("Initialize ClientHttpRequestFactory with proxy auth: {} : {}", proxy.proxyAuthType,