Skip to content

Commit

Permalink
Fix #359: Add option to set AcceptInvalidSslCertificate for RestOnboa…
Browse files Browse the repository at this point in the history
…rdingProvider
  • Loading branch information
banterCZ committed Sep 6, 2022
1 parent ba719b6 commit b7c7fd9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ public RestClient restClient(
config.setHandshakeTimeout(configuration.getHandshakeTimeout());
config.setDefaultHttpHeaders(headers);

if (configuration.isAcceptInvalidSslCertificate()) {
logger.warn("Allowed usage of invalid ssl certificate for RestOnboardingProvider");
config.setAcceptInvalidSslCertificate(configuration.isAcceptInvalidSslCertificate());
}

return new DefaultRestClient(config);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,6 @@ class RestOnboardingProviderConfiguration {
private Duration handshakeTimeout = Duration.ofSeconds(5);

private Duration responseTimeout = Duration.ofSeconds(5);

private boolean acceptInvalidSslCertificate;
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ enrollment-server-onboarding.onboarding-process.max-error-score=15
#enrollment-server-onboarding.onboarding-adapter.connection-timeout=2s
#enrollment-server-onboarding.onboarding-adapter.handshake-timeout=5s
#enrollment-server-onboarding.onboarding-adapter.response-timeout=5s
#enrollment-server-onboarding.onboarding-adapter.accept-invalid-ssl-certificate=false

# Client Evaluation Configuration
enrollment-server-onboarding.client-evaluation.processClientEvaluations.cron=0/5 * * * * *
Expand Down

0 comments on commit b7c7fd9

Please sign in to comment.