[java-idp-plugin-jetty] 03/03: JJETTY-26 Hostname derivation seems different than IdP installer
Rod Widdowson
rdw at steadingsoftware.com
Wed Nov 12 20:08:51 UTC 2025
This is an automated email from the git hooks/post-receive script.
rdw pushed a commit to branch main
in repository java-idp-plugin-jetty.
View the commit online:
https://git.shibboleth.net/view/?p=java-idp-plugin-jetty.git;a=commit;h=38e84402a28745b4e298080f95b6594690bb3983
commit 38e84402a28745b4e298080f95b6594690bb3983
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Wed Nov 12 17:19:05 2025 +0000
JJETTY-26 Hostname derivation seems different than IdP installer
https://shibboleth.atlassian.net/browse/JJETTY-26
Generate crt file alongside the pkcs12 files
---
.../java/net/shibboleth/idp/module/jetty/JettyModule.java | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/jetty-impl/src/main/java/net/shibboleth/idp/module/jetty/JettyModule.java b/jetty-impl/src/main/java/net/shibboleth/idp/module/jetty/JettyModule.java
index 1db06d1..f3dcfa3 100644
--- a/jetty-impl/src/main/java/net/shibboleth/idp/module/jetty/JettyModule.java
+++ b/jetty-impl/src/main/java/net/shibboleth/idp/module/jetty/JettyModule.java
@@ -73,7 +73,7 @@ public class JettyModule extends PluginIdPModule {
final Path idpHome = Path.of(moduleContext.getInstallLocation());
final Path keystore= idpHome.resolve("credentials").resolve("idp-userfacing.p12");
if (!Files.exists(keystore)) {
- generateKeystore(keystore);
+ generateKeystore(keystore, idpHome.resolve("credentials").resolve("idp-userfacing.crt"));
}
handleLogbackJars(idpHome, "jetty-base-12");
return result;
@@ -170,16 +170,17 @@ public class JettyModule extends PluginIdPModule {
}
}
- /**
- * Generate an mock idp-userfacing.p12 keystore.
- *
- * @param keyStore where to put it
+ /**
+ * Generate an mock idp-userfacing.p12 keystore.
*
+ * @param keyStore where to put it
+ * @param crtFile where to put the crt file
* @throws ModuleException if the generator fails
*/
- private void generateKeystore(@Nonnull final Path keyStore) throws ModuleException {
+ private void generateKeystore(@Nonnull final Path keyStore, @Nonnull final Path crtFile) throws ModuleException {
final SelfSignedCertificateGenerator generator = new SelfSignedCertificateGenerator();
generator.setKeystoreFile(keyStore.toFile());
+ generator.setCertificateFile(crtFile.toFile());
generator.setKeySize(InstallerProperties.DEFAULT_KEY_SIZE);
final String hostName = getBestHostName();
generator.setHostName(hostName);
@@ -191,7 +192,7 @@ public class JettyModule extends PluginIdPModule {
try {
generator.generate();
} catch (final Exception e) {
- log.error("Error building ketstore files {}", keyStore, e);
+ log.error("Error building keystore andcrt files {}", keyStore, e);
throw new ModuleException("Error Key Store", e);
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list