From ae5d7a9ac18b18cd45e5f2038881be6189be46c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Guichard?= Date: Fri, 31 Jan 2025 14:56:41 +0100 Subject: [PATCH] Test with Filezilla docker and external server for SSL Session reuse (with SNI) in passive mode. --- pom.xml | 138 ++++++-- .../commons/net/ftp/AbstractFtpsTest.java | 82 +---- .../net/ftp/FTPSClientIntegrationTest.java | 311 ++++++++++++++++++ .../net/ftp/FTPSClientSSLSessionReuse.java | 80 +++++ .../commons/net/ftp/FTPSClientTest.java | 8 - src/test/resources/logback.xml | 33 ++ .../resources/logging.properties} | 16 +- .../net/filezillaserver/conf/settings.xml | 202 ++++++++++++ .../conf/settings_filezilla-server.xml | 203 ++++++++++++ .../filezillaserver.properties | 17 +- 10 files changed, 950 insertions(+), 140 deletions(-) create mode 100644 src/test/java/org/apache/commons/net/ftp/FTPSClientIntegrationTest.java create mode 100644 src/test/java/org/apache/commons/net/ftp/FTPSClientSSLSessionReuse.java create mode 100644 src/test/resources/logback.xml rename src/{dockerfile/filezilla-server/dockerfile => test/resources/logging.properties} (64%) create mode 100644 src/test/resources/org/apache/commons/net/filezillaserver/conf/settings.xml create mode 100644 src/test/resources/org/apache/commons/net/filezillaserver/conf/settings_filezilla-server.xml diff --git a/pom.xml b/pom.xml index 6200b6e41..233e2775b 100644 --- a/pom.xml +++ b/pom.xml @@ -99,6 +99,30 @@ Supported protocols include Echo, Finger, FTP, NNTP, NTP, POP3(S), SMTP(S), Teln + + ch.qos.logback + logback-classic + 1.2.13 + test + + + org.slf4j + jul-to-slf4j + 1.7.32 + test + + + + org.bouncycastle + bctls-debug-jdk18on + 1.79 + test + org.junit.jupiter junit-jupiter-api @@ -204,9 +228,12 @@ Supported protocols include Echo, Finger, FTP, NNTP, NTP, POP3(S), SMTP(S), Teln org.apache.maven.plugins maven-surefire-plugin + ${skipUnitTests} **/*FunctionalTest.java **/POP3*Test.java + **/*IntegrationTest.java + **/*IT.java ${commons.net.trace_calls} @@ -214,6 +241,34 @@ Supported protocols include Echo, Finger, FTP, NNTP, NTP, POP3(S), SMTP(S), Teln + + + org.apache.maven.plugins + maven-failsafe-plugin + + + + integration-tests + integration-test + + integration-test + + + + verify-tests + verify + + verify + + + + + + + **/*IntegrationTest.java + + + maven-assembly-plugin @@ -385,41 +440,54 @@ Supported protocols include Echo, Finger, FTP, NNTP, NTP, POP3(S), SMTP(S), Teln - io.fabric8 - docker-maven-plugin - 0.38.1 - - - - filezilla-server - - ${project.basedir}/Dockerfile - - - - 21:21 - - - - - - - - start-docker-container - pre-integration-test - - start - - - - stop-docker-container - post-integration-test - - stop - - - - + io.fabric8 + docker-maven-plugin + 0.45.1 + + + + mguichar/filezilla-server + + + 21:21 + 14148:14148 + 49152:49152 + 49153:49153 + 49154:49154 + 49155:49155 + 49156:49156 + 49157:49157 + 49158:49158 + 49159:49159 + 49160:49160 + + + + target/test-classes/org/apache/commons/net/test-data:/usr/test + target/test-classes/org/apache/commons/net/filezillaserver/conf:/opt/filezilla-server/etc + + + + + + + + + start-docker-container + pre-integration-test + + start + + + + stop-docker-container + post-integration-test + + stop + + + + diff --git a/src/test/java/org/apache/commons/net/ftp/AbstractFtpsTest.java b/src/test/java/org/apache/commons/net/ftp/AbstractFtpsTest.java index 6d785c6ce..88d7553e7 100644 --- a/src/test/java/org/apache/commons/net/ftp/AbstractFtpsTest.java +++ b/src/test/java/org/apache/commons/net/ftp/AbstractFtpsTest.java @@ -19,19 +19,14 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -import static org.junit.jupiter.api.Assertions.assertNotEquals; -import java.io.BufferedInputStream; import java.io.File; import java.io.IOException; -import java.io.InputStream; import java.net.SocketException; import java.net.URL; import java.time.Duration; -import java.util.Properties; import org.apache.commons.io.FileUtils; -import org.apache.commons.io.IOUtils; import org.apache.commons.io.output.NullOutputStream; import org.apache.commons.net.PrintCommandListener; import org.apache.ftpserver.FtpServer; @@ -61,7 +56,6 @@ public abstract class AbstractFtpsTest { private static int SocketPort; - private static int FZSocketPort = -1; private static FtpServer EmbeddedFtpServer; protected static final boolean IMPLICIT = false; protected static final long TEST_TIMEOUT = 10000; // individual test timeout @@ -78,15 +72,6 @@ protected static String getTestHomeDirectory(final String defaultHome) { return System.getProperty("test.basedir", defaultHome); } - protected static void initFZServer(String fzPropertiesResource) throws IOException { - final URL fzPropsResource = ClassLoader.getSystemClassLoader().getResource(fzPropertiesResource); - Properties prop = new Properties(); - try (InputStream in = fzPropsResource.openStream()) { - prop.load(in); - } - FZSocketPort = Integer.parseInt(prop.getProperty("filezillaserver.port")); - } - /** * Creates and starts an embedded Apache MINA FTP Server. * @@ -96,8 +81,8 @@ protected static void initFZServer(String fzPropertiesResource) throws IOExcepti * @param defaultHome default home folder * @throws FtpException Thrown when the FTP classes cannot fulfill a request. */ - protected synchronized static void setupServer(final boolean implicit, final String userPropertiesResource, final String serverJksResourceResource, - final String defaultHome) throws FtpException { + protected synchronized static void setupServer(final boolean implicit, final String userPropertiesResource, final String serverJksResourceResource, final String defaultHome) + throws FtpException { if (EmbeddedFtpServer != null) { return; } @@ -211,57 +196,6 @@ protected FTPSClient loginClient() throws SocketException, IOException { return client; } - protected FTPSClient loginClientToFZ() throws SocketException, IOException { - trace(">>loginClientToFZ"); - assertNotEquals(FZSocketPort, -1, "initFZServer not called"); - final FTPSClient client = new FTPSClient(IMPLICIT); - if (ADD_LISTENER) { - client.addProtocolCommandListener(new PrintCommandListener(System.err)); - } - // - client.setControlKeepAliveReplyTimeout(null); - assertEquals(0, client.getControlKeepAliveReplyTimeoutDuration().getSeconds()); - client.setControlKeepAliveReplyTimeout(Duration.ofSeconds(60)); - assertEquals(60, client.getControlKeepAliveReplyTimeoutDuration().getSeconds()); - // - client.setControlKeepAliveTimeout(null); - assertEquals(0, client.getControlKeepAliveTimeoutDuration().getSeconds()); - client.setControlKeepAliveTimeout(Duration.ofSeconds(61)); - assertEquals(61, client.getControlKeepAliveTimeoutDuration().getSeconds()); - // - client.setDataTimeout(null); - assertEquals(0, client.getDataTimeout().getSeconds()); - client.setDataTimeout(Duration.ofSeconds(62)); - assertEquals(62, client.getDataTimeout().getSeconds()); - // - client.setEndpointCheckingEnabled(endpointCheckingEnabled); - client.connect("localhost", FZSocketPort); - // - assertClientCode(client); - assertEquals(FZSocketPort, client.getRemotePort()); - // - try { - // HACK: Without this sleep, the user command sometimes does not reach the ftpserver - // This only seems to affect GitHub builds, and only Java 11+ - Thread.sleep(200); // 100 seems to be not always enough - } catch (final InterruptedException ignore) { - // ignore - } - assertTrue(client.login("test", "test")); - assertClientCode(client); - // - client.setFileType(FTP.BINARY_FILE_TYPE); - assertClientCode(client); - // - client.execPBSZ(0); - assertClientCode(client); - // - client.execPROT("P"); - assertClientCode(client); - trace("< + * To get our test cert to work on Java 11, this test must be run with: + *

+ * + *
+ * -Djdk.tls.client.protocols="TLSv1.1"
+ * 
+ *

+ * This test does the above programmatically. + *

+ */ +@RunWith(Parameterized.class) +public class FTPSClientIntegrationTest { + + private static final String FILEZILLA_PROPS_RES = "org/apache/commons/net/filezillaserver/filezillaserver.properties"; + private static final String LOGGING_PROPS_RES = "logging.properties"; + private static int FZSocketPort = -1; + private static String FZServerHost = ""; + + private static boolean UseExtFZServer = false; + private static String ExtFZServerHost = ""; + private static int ExtFZServerPort = -1; + + private static final boolean ADD_LISTENER = Boolean.parseBoolean(System.getenv("ADD_LISTENER")); + private final boolean endpointCheckingEnabled; + private static final boolean TRACE_CALLS = Boolean.parseBoolean(System.getenv("TRACE_CALLS")); + private static final long startTime = System.nanoTime(); + protected static final boolean IMPLICIT = false; + private static final Logger LOGGER = Logger.getLogger(FTPSClientIntegrationTest.class.getPackage().getName()); + protected static final long TEST_TIMEOUT = 10000; // individual test timeout + + // Configure java.util.logging for lib bouncy castle + // Redirect log to logback via org.slf4j.bridge.SLF4JBridgeHandler + // So, we can check log to see if session really resumed + static { + try { + LogManager logManager = LogManager.getLogManager(); + final URL logPropsFile = ClassLoader.getSystemClassLoader().getResource(LOGGING_PROPS_RES); + logManager.readConfiguration(logPropsFile.openStream()); + } catch (IOException exception) { + System.out.println("Cannot read configuration file " + LOGGING_PROPS_RES); + exception.printStackTrace(); + } + } + + protected void assertClientCode(final FTPSClient client) { + final int replyCode = client.getReplyCode(); + assertTrue(FTPReply.isPositiveCompletion(replyCode)); + } + + protected static void initFZServer(String fzPropertiesResource) throws IOException { + // Make a try to activate SNI (using a real hostname for control connection) + // with docker but don't work. +// Map hostAliases = new LinkedHashMap<>(); +// hostAliases.put("filezilla-server", "127.0.0.1"); +// +// // Installing the host resolvers +// HostResolutionRequestInterceptor.INSTANCE.install(new MappedHostResolver(hostAliases), +// // This is the system default resolving wrapper +// DefaultHostResolver.INSTANCE); + + final URL fzPropsResource = ClassLoader.getSystemClassLoader().getResource(fzPropertiesResource); + Properties prop = new Properties(); + try (InputStream in = fzPropsResource.openStream()) { + prop.load(in); + } + FZSocketPort = Integer.parseInt(prop.getProperty("filezillaserver.port")); + FZServerHost = prop.getProperty("filezillaserver.host"); + + UseExtFZServer = Boolean.valueOf(prop.getProperty("filezillaserver.external.enable")); + if (UseExtFZServer) { + ExtFZServerHost = prop.getProperty("filezillaserver.external.host"); + ExtFZServerPort = Integer.parseInt(prop.getProperty("filezillaserver.external.port")); + } + + } + + @BeforeClass + public static void setupServer() throws Exception { + initFZServer(FILEZILLA_PROPS_RES); + } + + @Parameters(name = "endpointCheckingEnabled={0}") + public static Boolean[] testConstructurData() { + return new Boolean[] { Boolean.FALSE, Boolean.TRUE }; + } + + public FTPSClientIntegrationTest(final boolean endpointCheckingEnabled) { + this.endpointCheckingEnabled = endpointCheckingEnabled; + } + + protected static void trace(final String msg) { + if (TRACE_CALLS) { + System.err.println(msg + " " + (System.nanoTime() - startTime)); + } + } + + // Only passive mode tested + protected FTPSClient loginClientTo(String hostname, int port, boolean withSSLSessionReuse) throws Exception { + trace(">>loginClientTo"); + LOGGER.fine("Server " + FZServerHost); + LOGGER.fine("Port " + FZSocketPort); + FTPSClient client = null; + if (withSSLSessionReuse) { + client = new FTPSClientSSLSessionReuse(IMPLICIT); + } else { + client = new FTPSClient(IMPLICIT); + } + if (ADD_LISTENER) { + client.addProtocolCommandListener(new PrintCommandListener(System.err)); + } + + // HttpsURLConnection.setDefaultHostnameVerifier((hostname, session) -> true); + + // + client.setControlKeepAliveReplyTimeout(null); + assertEquals(0, client.getControlKeepAliveReplyTimeoutDuration().getSeconds()); + client.setControlKeepAliveReplyTimeout(Duration.ofSeconds(60)); + assertEquals(60, client.getControlKeepAliveReplyTimeoutDuration().getSeconds()); + // + client.setControlKeepAliveTimeout(null); + assertEquals(0, client.getControlKeepAliveTimeoutDuration().getSeconds()); + client.setControlKeepAliveTimeout(Duration.ofSeconds(61)); + assertEquals(61, client.getControlKeepAliveTimeoutDuration().getSeconds()); + // + client.setDataTimeout(null); + assertEquals(0, client.getDataTimeout().getSeconds()); + client.setDataTimeout(Duration.ofSeconds(62)); + assertEquals(62, client.getDataTimeout().getSeconds()); + + client.setUseClientMode(true); + // + client.setEndpointCheckingEnabled(endpointCheckingEnabled); + client.connect(hostname, port); + // + assertClientCode(client); + assertEquals(port, client.getRemotePort()); + // + try { + // HACK: Without this sleep, the user command sometimes does not reach the ftpserver + // This only seems to affect GitHub builds, and only Java 11+ + Thread.sleep(200); // 100 seems to be not always enough + } catch (final InterruptedException ignore) { + // ignore + } + assertTrue(client.login("test", "test")); + assertClientCode(client); + // + client.setFileType(FTP.BINARY_FILE_TYPE); + assertClientCode(client); + // + client.execPBSZ(0); + assertClientCode(client); + // + client.execPROT("P"); + assertClientCode(client); + // + // Only passive mode tested + client.enterLocalPassiveMode(); + + trace("<>loginClientToFZ"); + assertNotEquals(FZSocketPort, -1, "initFZServer not called"); + final FTPSClient client = loginClientTo(FZServerHost, FZSocketPort, withSSLSessionReuse); + trace("< client.retrieveFile(pathname, NullOutputStream.INSTANCE)); + } + } finally { + client.disconnect(); + } + } + + @Test(timeout = TEST_TIMEOUT) + public void testFileZillaTlsResume() throws Exception { + trace(">>testFileZillaTlsResume"); + retrieveFile("/file.txt", true); + trace("<>testFileZillaNoTlsResume"); + final FTPSClient client = loginClientToFZ(false); + try { + // Do it twice. + // Just testing that we are not getting an SSL error (the file MUST be present). + assertFalse("/file.txt", client.retrieveFile("/file.txt", NullOutputStream.INSTANCE)); + assertFalse("/file.txt", client.retrieveFile("/file.txt", NullOutputStream.INSTANCE)); + } finally { + client.disconnect(); + } + trace("<>testExtFileZillaServerForSNI"); + retrieveFileOnExtServer("/file.txt", true); + trace("<>testExtFileZillaServerNoSNI"); + retrieveFileOnExtServer("/file.txt", false); + trace("<>testFileZillaTlsResume"); - retrieveFileOnFZ("/file.txt"); - trace("< + + + + %d{yyyy-MM-dd HH:mm:ss} %-5level %logger{36} - %msg%n + + + + + + + + + + + \ No newline at end of file diff --git a/src/dockerfile/filezilla-server/dockerfile b/src/test/resources/logging.properties similarity index 64% rename from src/dockerfile/filezilla-server/dockerfile rename to src/test/resources/logging.properties index c88096c5d..9f5c93e81 100644 --- a/src/dockerfile/filezilla-server/dockerfile +++ b/src/test/resources/logging.properties @@ -15,17 +15,5 @@ # specific language governing permissions and limitations # under the License. -# Utiliser une image de base Debian ou Ubuntu -FROM ubuntu:latest - -# Installer les mises à jour et FileZilla Server -RUN apt-get update && \ - apt-get install -y filezilla && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -# Exposer le port par défaut de FileZilla Server -EXPOSE 21 - -# Commande pour démarrer FileZilla Server (remplacez cette commande avec la commande appropriée pour démarrer le serveur) -CMD ["filezilla-server"] +handlers = org.slf4j.bridge.SLF4JBridgeHandler +.level=FINEST diff --git a/src/test/resources/org/apache/commons/net/filezillaserver/conf/settings.xml b/src/test/resources/org/apache/commons/net/filezillaserver/conf/settings.xml new file mode 100644 index 000000000..7df8d5b2c --- /dev/null +++ b/src/test/resources/org/apache/commons/net/filezillaserver/conf/settings.xml @@ -0,0 +1,202 @@ + + + + + + + + + + + + 1 + + 9223372036854775807 + + 15 + + 0 + + false + + false + + + + + + + 300000 + + 0 + + 0 + + + + + 0 + + -1 + + -1 + + + + + 60000 + + 3600000 + + + + + + +
0.0.0.0
+ 21 + 2 +
+ +
::
+ 21 + 2 +
+ + + + + + + + true + + + + 49152 + + 49160 + + + + + + + -----BEGIN EC PRIVATE KEY----- +MHcCAQEEIHrmnc8p/0SjT2aZEK2h9hoO0CHadEF8PMt36MhOkv+woAoGCCqGSM49 +AwEHoUQDQgAEhy4e3BORejV3n4lg1I+NeS4zQKhxk7/M9a/8Z5VWC7PJVWtb+Zjq +J6PQLO9FMgYE0bP4UKkRb0CaGYvwExvX6A== +-----END EC PRIVATE KEY----- + + + + -----BEGIN CERTIFICATE----- +MIIBSjCB8KADAgECAhTRYlWUGps1ZPgAQ/XJXOtLyxQ0pDAKBggqhkjOPQQDAjAU +MRIwEAYDVQQDEwlsb2NhbGhvc3QwHhcNMjUwMTMxMTAzMzE1WhcNMjYwMjAxMTAz +ODE1WjAUMRIwEAYDVQQDEwlsb2NhbGhvc3QwWTATBgcqhkjOPQIBBggqhkjOPQMB +BwNCAASHLh7cE5F6NXefiWDUj415LjNAqHGTv8z1r/xnlVYLs8lVa1v5mOono9As +70UyBgTRs/hQqRFvQJoZi/ATG9fooyAwHjAOBgNVHQ8BAf8EBAMCBaAwDAYDVR0T +AQH/BAIwADAKBggqhkjOPQQDAgNJADBGAiEA02yK+o42pFyVjDHRKQUiN8zK9hEc +cTlFYCefw0CrT34CIQC0S07ZLWDSXLLQEMHRfmFVeHRIYP51XxOK+6BWvehE5Q== +-----END CERTIFICATE----- + + + + + + + + + +
+ + + + 300000 + + 1296000000 + + 15000 + + 30000 + + + + + + + 14148 + true + +
0.0.0.0
+ 14148 + true +
+ +
::
+ 14148 + true +
+ + IVUV2eYKYKRFW2rZX0AEJWuZPp5BeNKX+YEXI8susmo + 1b92/rHKRi3Q8utZI8gugyUNKKHFRfdqo9ySdpEu0bs + 100000 + + + + + -----BEGIN EC PRIVATE KEY----- +MHcCAQEEIAaSQdoEL4PbTqzb4KY3ZOF71mSIrBdFWZx7m9ra4FIDoAoGCCqGSM49 +AwEHoUQDQgAES9fGv8Yp05XUU483Xxnc17VuE7VsHXFd2vdi2NyhMRNLZowT8qlS +ANnG7LFfhTmcS+vJ7pavBPYV9HdKUfy0og== +-----END EC PRIVATE KEY----- + + + -----BEGIN CERTIFICATE----- +MIIBiDCCAS6gAwIBAgIUoF7wXnXF9PXDHwqZVLPjWedGhUYwCgYIKoZIzj0EAwIw +MzExMC8GA1UEAxMoZmlsZXppbGxhLXNlcnZlciBzZWxmIHNpZ25lZCBjZXJ0aWZp +Y2F0ZTAeFw0yNTAxMTcwOTAyNTVaFw0yNjAxMTgwOTA3NTVaMDMxMTAvBgNVBAMT +KGZpbGV6aWxsYS1zZXJ2ZXIgc2VsZiBzaWduZWQgY2VydGlmaWNhdGUwWTATBgcq +hkjOPQIBBggqhkjOPQMBBwNCAARL18a/xinTldRTjzdfGdzXtW4TtWwdcV3a92LY +3KExE0tmjBPyqVIA2cbssV+FOZxL68nulq8E9hX0d0pR/LSioyAwHjAOBgNVHQ8B +Af8EBAMCBaAwDAYDVR0TAQH/BAIwADAKBggqhkjOPQQDAgNIADBFAiEA6wDLKiIC +ko0Plie8tYfIsH32JcOnU0Uw0F1ssGQYSOkCIGBe0G7hUEWOZW9X0DEs7E5BGchP +gAdv9Rivb4uwoBi+ +-----END CERTIFICATE----- + + + + + +
+ + + + + + + + 0 + 604800000 + + + + + + +
diff --git a/src/test/resources/org/apache/commons/net/filezillaserver/conf/settings_filezilla-server.xml b/src/test/resources/org/apache/commons/net/filezillaserver/conf/settings_filezilla-server.xml new file mode 100644 index 000000000..d91044996 --- /dev/null +++ b/src/test/resources/org/apache/commons/net/filezillaserver/conf/settings_filezilla-server.xml @@ -0,0 +1,203 @@ + + + + + + + + + + + + 1 + + 9223372036854775807 + + 15 + + 0 + + false + + false + + + + + + + 300000 + + 0 + + 0 + + + + + 0 + + -1 + + -1 + + + + + 60000 + + 3600000 + + + + + + +
0.0.0.0
+ 21 + 2 +
+ +
::
+ 21 + 2 +
+ + + + + + + + true + + + + 49152 + + 49160 + + + + + + + -----BEGIN EC PRIVATE KEY----- +MHgCAQEEIQD6DEpLcmisEIpl5zh6R2cgPRRUkUGNNFB2hqywH1zxlqAKBggqhkjO +PQMBB6FEA0IABIWdR7RYqnF6ygAIlj/w/3G/D5hyQ9DCkBkZmauknS6I8JkMvWqk +7DGF4FmN931V7+/tOWJNzEGfO8rnsErmqso= +-----END EC PRIVATE KEY----- + + + + -----BEGIN CERTIFICATE----- +MIIBVzCB/qADAgECAhTMl4SxTF8JmJ3F09VSmO+WIuPZ9TAKBggqhkjOPQQDAjAb +MRkwFwYDVQQDExBmaWxlemlsbGEtc2VydmVyMB4XDTI1MDEyMDE1Mjk0N1oXDTI2 +MDEyMTE1MzQ0N1owGzEZMBcGA1UEAxMQZmlsZXppbGxhLXNlcnZlcjBZMBMGByqG +SM49AgEGCCqGSM49AwEHA0IABIWdR7RYqnF6ygAIlj/w/3G/D5hyQ9DCkBkZmauk +nS6I8JkMvWqk7DGF4FmN931V7+/tOWJNzEGfO8rnsErmqsqjIDAeMA4GA1UdDwEB +/wQEAwIFoDAMBgNVHRMBAf8EAjAAMAoGCCqGSM49BAMCA0gAMEUCIQCFH1HewfMo +1NMxzYIFPV1uZpT+3qAg9+lBw9a8268MfwIgYg9GGu8lhP5lpMu7jOowJmtcDYeX +cSfSt2iB8lyLtf0= +-----END CERTIFICATE----- + + + + + + + + + +
+ + + + 300000 + + 1296000000 + + 15000 + + 30000 + + + + + + + 14148 + true + +
0.0.0.0
+ 14148 + true +
+ +
::
+ 14148 + true +
+ + IVUV2eYKYKRFW2rZX0AEJWuZPp5BeNKX+YEXI8susmo + 1b92/rHKRi3Q8utZI8gugyUNKKHFRfdqo9ySdpEu0bs + 100000 + + + + + -----BEGIN EC PRIVATE KEY----- +MHcCAQEEIAaSQdoEL4PbTqzb4KY3ZOF71mSIrBdFWZx7m9ra4FIDoAoGCCqGSM49 +AwEHoUQDQgAES9fGv8Yp05XUU483Xxnc17VuE7VsHXFd2vdi2NyhMRNLZowT8qlS +ANnG7LFfhTmcS+vJ7pavBPYV9HdKUfy0og== +-----END EC PRIVATE KEY----- + + + -----BEGIN CERTIFICATE----- +MIIBiDCCAS6gAwIBAgIUoF7wXnXF9PXDHwqZVLPjWedGhUYwCgYIKoZIzj0EAwIw +MzExMC8GA1UEAxMoZmlsZXppbGxhLXNlcnZlciBzZWxmIHNpZ25lZCBjZXJ0aWZp +Y2F0ZTAeFw0yNTAxMTcwOTAyNTVaFw0yNjAxMTgwOTA3NTVaMDMxMTAvBgNVBAMT +KGZpbGV6aWxsYS1zZXJ2ZXIgc2VsZiBzaWduZWQgY2VydGlmaWNhdGUwWTATBgcq +hkjOPQIBBggqhkjOPQMBBwNCAARL18a/xinTldRTjzdfGdzXtW4TtWwdcV3a92LY +3KExE0tmjBPyqVIA2cbssV+FOZxL68nulq8E9hX0d0pR/LSioyAwHjAOBgNVHQ8B +Af8EBAMCBaAwDAYDVR0TAQH/BAIwADAKBggqhkjOPQQDAgNIADBFAiEA6wDLKiIC +ko0Plie8tYfIsH32JcOnU0Uw0F1ssGQYSOkCIGBe0G7hUEWOZW9X0DEs7E5BGchP +gAdv9Rivb4uwoBi+ +-----END CERTIFICATE----- + + + + + +
+ + + + + + + + 0 + 604800000 + + + + + + +
diff --git a/src/test/resources/org/apache/commons/net/filezillaserver/filezillaserver.properties b/src/test/resources/org/apache/commons/net/filezillaserver/filezillaserver.properties index 8b84702b5..1af2a84bb 100644 --- a/src/test/resources/org/apache/commons/net/filezillaserver/filezillaserver.properties +++ b/src/test/resources/org/apache/commons/net/filezillaserver/filezillaserver.properties @@ -15,8 +15,19 @@ # specific language governing permissions and limitations # under the License. -filezillaserver.port=221 +filezillaserver.port=21 +# Tried to use a hostname (other than localhost) to activate SNI but don't work... +# Test realised with HostResolutionRequestInterceptor of BurningWave library +# to give a hostname to docker filezilla server +# see FTPSClientIntegrationTest.initFZServer() +# Need another certificate in server configuration (with CN=filezilla-server) +# Use src\test\resources\org\apache\commons\net\filezillaserver\conf\settings_filezilla-server.xml +# filezillaserver.host=filezila-server +filezillaserver.host=localhost # password is "test" -ftpserver.user.test.userpassword=098f6bcd4621d373cade4e832627b4f6 -ftpserver.user.test.homedirectory=target/test-classes/org/apache/commons/net/test-data +filezillaserver.user.test.userpassword=098f6bcd4621d373cade4e832627b4f6 + +filezillaserver.external.enable=false +filezillaserver.external.host= +filezillaserver.external.port=