1
0
mirror of https://github.com/pcvolkmer/etl-processor.git synced 2025-04-19 17:26:51 +00:00

fix: custom rest template generation after ssl context creation

This commit is contained in:
Paul-Christian Volkmer 2024-04-23 15:52:40 +02:00
parent 26b415f336
commit 7b3151d227

View File

@ -72,13 +72,6 @@ public class GpasPseudonymGenerator implements Generator {
public GpasPseudonymGenerator(GPasConfigProperties gpasCfg, RetryTemplate retryTemplate, RestTemplate restTemplate) {
this.retryTemplate = retryTemplate;
if (customSslContext == null) {
this.restTemplate = restTemplate;
} else {
this.restTemplate = getCustomRestTemplate();
}
this.gPasUrl = gpasCfg.getUri();
this.psnTargetDomain = gpasCfg.getTarget();
httpHeader = getHttpHeaders(gpasCfg.getUsername(), gpasCfg.getPassword());
@ -88,6 +81,14 @@ public class GpasPseudonymGenerator implements Generator {
customSslContext = getSslContext(gpasCfg.getSslCaLocation());
log.warn(String.format("%s has been initialized with SSL certificate %s. This is deprecated in favor of including Root CA.",
this.getClass().getName(), gpasCfg.getSslCaLocation()));
if (customSslContext == null) {
this.restTemplate = restTemplate;
} else {
this.restTemplate = getCustomRestTemplate();
}
} else {
this.restTemplate = restTemplate;
}
} catch (IOException | KeyManagementException | KeyStoreException | CertificateException |
NoSuchAlgorithmException e) {