You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2024/09/09 14:49:41 UTC

(tomcat) branch main updated: Add missing password for tests

This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
     new f58a8ed0a4 Add missing password for tests
f58a8ed0a4 is described below

commit f58a8ed0a40b5e22d6d6e4b9997e9233ea57f19d
Author: remm <re...@apache.org>
AuthorDate: Mon Sep 9 16:49:12 2024 +0200

    Add missing password for tests
---
 test/org/apache/tomcat/util/net/TestSSLHostConfigCompat.java | 4 ++++
 test/org/apache/tomcat/util/net/TesterSupport.java           | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/test/org/apache/tomcat/util/net/TestSSLHostConfigCompat.java b/test/org/apache/tomcat/util/net/TestSSLHostConfigCompat.java
index 47676bf118..3c185ea3fe 100644
--- a/test/org/apache/tomcat/util/net/TestSSLHostConfigCompat.java
+++ b/test/org/apache/tomcat/util/net/TestSSLHostConfigCompat.java
@@ -244,6 +244,7 @@ public class TestSSLHostConfigCompat extends TomcatBaseTest {
         case KEYSTORE: {
             SSLHostConfigCertificate sslHostConfigCertificateRsa = new SSLHostConfigCertificate(sslHostConfig, Type.RSA);
             sslHostConfigCertificateRsa.setCertificateKeystoreFile(getPath(TesterSupport.LOCALHOST_RSA_JKS));
+            sslHostConfigCertificateRsa.setCertificateKeystorePassword("changeit");
             sslHostConfig.addCertificate(sslHostConfigCertificateRsa);
             break;
         }
@@ -251,6 +252,7 @@ public class TestSSLHostConfigCompat extends TomcatBaseTest {
             SSLHostConfigCertificate sslHostConfigCertificateRsa = new SSLHostConfigCertificate(sslHostConfig, Type.RSA);
             sslHostConfigCertificateRsa.setCertificateFile(getPath(TesterSupport.LOCALHOST_RSA_CERT_PEM));
             sslHostConfigCertificateRsa.setCertificateKeyFile(getPath(TesterSupport.LOCALHOST_RSA_KEY_PEM));
+            sslHostConfigCertificateRsa.setCertificateKeyPassword("changeit");
             sslHostConfig.addCertificate(sslHostConfigCertificateRsa);
             break;
         }
@@ -264,6 +266,7 @@ public class TestSSLHostConfigCompat extends TomcatBaseTest {
         case KEYSTORE: {
             SSLHostConfigCertificate sslHostConfigCertificateEc = new SSLHostConfigCertificate(sslHostConfig, Type.EC);
             sslHostConfigCertificateEc.setCertificateKeystoreFile(getPath(TesterSupport.LOCALHOST_EC_JKS));
+            sslHostConfigCertificateEc.setCertificateKeystorePassword("changeit");
             sslHostConfig.addCertificate(sslHostConfigCertificateEc);
             break;
         }
@@ -271,6 +274,7 @@ public class TestSSLHostConfigCompat extends TomcatBaseTest {
             SSLHostConfigCertificate sslHostConfigCertificateEc = new SSLHostConfigCertificate(sslHostConfig, Type.EC);
             sslHostConfigCertificateEc.setCertificateFile(getPath(TesterSupport.LOCALHOST_EC_CERT_PEM));
             sslHostConfigCertificateEc.setCertificateKeyFile(getPath(TesterSupport.LOCALHOST_EC_KEY_PEM));
+            sslHostConfigCertificateEc.setCertificateKeyPassword("changeit");
             sslHostConfig.addCertificate(sslHostConfigCertificateEc);
             break;
         }
diff --git a/test/org/apache/tomcat/util/net/TesterSupport.java b/test/org/apache/tomcat/util/net/TesterSupport.java
index 3bbaff9c32..ca3a4cee6d 100644
--- a/test/org/apache/tomcat/util/net/TesterSupport.java
+++ b/test/org/apache/tomcat/util/net/TesterSupport.java
@@ -140,6 +140,8 @@ public final class TesterSupport {
         }
         if (keystorePass != null) {
             certificate.setCertificateKeystorePassword(keystorePass);
+        } else {
+            certificate.setCertificateKeystorePassword("changeit");
         }
         if (keyPassFile != null) {
             certificate.setCertificateKeyPasswordFile(new File(keyPassFile).getAbsolutePath());


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org