Skip to content

Commit

Permalink
Patch for test: bootstrap making a new cert
Browse files Browse the repository at this point in the history
  • Loading branch information
BryceStevenWilley committed Oct 12, 2023
1 parent c10a6cc commit fd8b5bb
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import jakarta.ws.rs.core.HttpHeaders;
import jakarta.ws.rs.core.Response;
import jakarta.xml.ws.BindingProvider;
import java.io.File;
import java.sql.SQLException;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -49,6 +50,8 @@ public class ServiceHelpers {

static {
Optional<String> certPassword = GetEnv("CERT_PASSWORD");
File CERT_KEY_STORE = new File("src/main/config/tls_server_cert.jks");

// The 9000 is hard coded (we'll always be running on 9000 inside the docker
// container,
// but might be mapped to other things outside of it)
Expand All @@ -58,7 +61,7 @@ public class ServiceHelpers {
if (EXTERNAL_DOMAIN.startsWith("https://")) {
EXTERNAL_DOMAIN = EXTERNAL_DOMAIN.substring(8);
}
if (certPassword.isPresent()) {
if (certPassword.isPresent() && CERT_KEY_STORE.isFile()) {
EXTERNAL_URL = "https://" + EXTERNAL_DOMAIN;
BASE_LOCAL_URL = "https://0.0.0.0:9000";
BASE_ACME_URL = "http://0.0.0.0:9009";
Expand Down

0 comments on commit fd8b5bb

Please sign in to comment.