Skip to content

Commit

Permalink
Merge pull request #21513 from ishumov/main
Browse files Browse the repository at this point in the history
Add support of mTLS in Spring Cloud Config Client
  • Loading branch information
geoand authored Nov 22, 2021
2 parents 0252173 + 1d40720 commit 4000361
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,16 @@ public static WebClient createHttpClient(Vertx vertx, SpringCloudConfigClientCon
}
} else if (trustAll) {
skipVerify(webClientOptions);
} else if (springCloudConfig.keyStore.isPresent()) {
Path trustStorePath = springCloudConfig.keyStore.get();
String type = determineStoreType(trustStorePath);
KeyStoreOptionsBase storeOptions = storeOptions(trustStorePath, springCloudConfig.keyStorePassword,
}
if (springCloudConfig.keyStore.isPresent()) {
Path keyStorePath = springCloudConfig.keyStore.get();
String type = determineStoreType(keyStorePath);
KeyStoreOptionsBase storeOptions = storeOptions(keyStorePath, springCloudConfig.keyStorePassword,
createStoreOptions(type));
if (isPfx(type)) {
webClientOptions.setPfxTrustOptions((PfxOptions) storeOptions);
webClientOptions.setPfxKeyCertOptions((PfxOptions) storeOptions);
} else {
webClientOptions.setTrustStoreOptions((JksOptions) storeOptions);
webClientOptions.setKeyStoreOptions((JksOptions) storeOptions);
}
}
} catch (Exception e) {
Expand Down

0 comments on commit 4000361

Please sign in to comment.