diff --git a/extensions/spring-cloud-config-client/runtime/src/main/java/io/quarkus/spring/cloud/config/client/runtime/VertxSpringCloudConfigGateway.java b/extensions/spring-cloud-config-client/runtime/src/main/java/io/quarkus/spring/cloud/config/client/runtime/VertxSpringCloudConfigGateway.java index 39c01eb02c600..081a525469ecf 100644 --- a/extensions/spring-cloud-config-client/runtime/src/main/java/io/quarkus/spring/cloud/config/client/runtime/VertxSpringCloudConfigGateway.java +++ b/extensions/spring-cloud-config-client/runtime/src/main/java/io/quarkus/spring/cloud/config/client/runtime/VertxSpringCloudConfigGateway.java @@ -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) {