diff --git a/open-vulnerability-clients/src/main/java/io/github/jeremylong/openvulnerability/client/epss/EpssDataFeed.java b/open-vulnerability-clients/src/main/java/io/github/jeremylong/openvulnerability/client/epss/EpssDataFeed.java index 5632a3d8..21d16e2e 100644 --- a/open-vulnerability-clients/src/main/java/io/github/jeremylong/openvulnerability/client/epss/EpssDataFeed.java +++ b/open-vulnerability-clients/src/main/java/io/github/jeremylong/openvulnerability/client/epss/EpssDataFeed.java @@ -50,7 +50,8 @@ public List download() { List list = null; HttpGet request = new HttpGet(downloadUrl); SystemDefaultRoutePlanner planner = new SystemDefaultRoutePlanner(ProxySelector.getDefault()); - try (CloseableHttpClient client = HttpClientBuilder.create().setRoutePlanner(planner).build()) { + try (CloseableHttpClient client = HttpClientBuilder.create().setRoutePlanner(planner).useSystemProperties() + .build()) { list = client.execute(request, new EpssResponseHandler()); } catch (IOException e) { e.printStackTrace(); diff --git a/open-vulnerability-clients/src/main/java/io/github/jeremylong/openvulnerability/client/ghsa/GitHubSecurityAdvisoryClient.java b/open-vulnerability-clients/src/main/java/io/github/jeremylong/openvulnerability/client/ghsa/GitHubSecurityAdvisoryClient.java index 021f4de8..47c5eb32 100644 --- a/open-vulnerability-clients/src/main/java/io/github/jeremylong/openvulnerability/client/ghsa/GitHubSecurityAdvisoryClient.java +++ b/open-vulnerability-clients/src/main/java/io/github/jeremylong/openvulnerability/client/ghsa/GitHubSecurityAdvisoryClient.java @@ -158,7 +158,7 @@ public GitHubSecurityAdvisoryClient(String githubToken, String endpoint) { cwesTemplate = loadMustacheTemplate(CWES_TEMPLATE); SystemDefaultRoutePlanner planner = new SystemDefaultRoutePlanner(ProxySelector.getDefault()); - httpClient = HttpAsyncClients.custom().setRoutePlanner(planner).build(); + httpClient = HttpAsyncClients.custom().setRoutePlanner(planner).useSystemProperties().build(); httpClient.start(); objectMapper = new ObjectMapper(); objectMapper.registerModule(new JavaTimeModule()); diff --git a/open-vulnerability-clients/src/main/java/io/github/jeremylong/openvulnerability/client/kev/KevDataFeed.java b/open-vulnerability-clients/src/main/java/io/github/jeremylong/openvulnerability/client/kev/KevDataFeed.java index 7e6458c5..e5b37a42 100644 --- a/open-vulnerability-clients/src/main/java/io/github/jeremylong/openvulnerability/client/kev/KevDataFeed.java +++ b/open-vulnerability-clients/src/main/java/io/github/jeremylong/openvulnerability/client/kev/KevDataFeed.java @@ -58,7 +58,8 @@ public KevCatalog download() { HttpGet request = new HttpGet(downloadUrl); SystemDefaultRoutePlanner planner = new SystemDefaultRoutePlanner(ProxySelector.getDefault()); String json; - try (CloseableHttpClient client = HttpClientBuilder.create().setRoutePlanner(planner).build()) { + try (CloseableHttpClient client = HttpClientBuilder.create().setRoutePlanner(planner).useSystemProperties() + .build()) { json = client.execute(request, new BasicHttpClientResponseHandler()); } catch (IOException e) { throw new KevException("Unable to download the Known Exploitable Vulnerability Catalog", e); diff --git a/open-vulnerability-clients/src/main/java/io/github/jeremylong/openvulnerability/client/nvd/RateLimitedClient.java b/open-vulnerability-clients/src/main/java/io/github/jeremylong/openvulnerability/client/nvd/RateLimitedClient.java index f6af98d2..a9591678 100644 --- a/open-vulnerability-clients/src/main/java/io/github/jeremylong/openvulnerability/client/nvd/RateLimitedClient.java +++ b/open-vulnerability-clients/src/main/java/io/github/jeremylong/openvulnerability/client/nvd/RateLimitedClient.java @@ -125,7 +125,8 @@ class RateLimitedClient implements AutoCloseable { LOG.debug("rate limited call delay: {}", delay); NvdApiRetryStrategy retryStrategy = new NvdApiRetryStrategy(maxRetries, minimumDelay); SystemDefaultRoutePlanner planner = new SystemDefaultRoutePlanner(ProxySelector.getDefault()); - client = HttpAsyncClients.custom().setRoutePlanner(planner).setRetryStrategy(retryStrategy).build(); + client = HttpAsyncClients.custom().setRoutePlanner(planner).setRetryStrategy(retryStrategy) + .useSystemProperties().build(); client.start(); }