Initialized PEM directories for both client and server. Added [lib] section that was missing due to #11263. Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
parent
ee82c2b761
commit
e00a71a00f
|
@ -5,6 +5,9 @@ https://github.com/java-native-access/jna
|
|||
[files]
|
||||
maven://net.java.dev.jna/jna-jpms/${jna.version}|lib/http3/jna-jpms-${jna.version}.jar
|
||||
|
||||
[lib]
|
||||
lib/http3/jna-jpms-${jna.version}.jar
|
||||
|
||||
[ini]
|
||||
jna.version?=@jna.version@
|
||||
|
||||
|
|
|
@ -8,6 +8,9 @@ maven://org.mortbay.jetty.quiche/jetty-quiche-native/${jetty-quiche-native.versi
|
|||
[ini]
|
||||
jetty-quiche-native.version?=@jetty-quiche-native.version@
|
||||
|
||||
[lib]
|
||||
lib/http3/jetty-quiche-native-${jetty-quiche-native.version}.jar
|
||||
|
||||
[license]
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
|
|
@ -63,6 +63,7 @@ import org.eclipse.jetty.util.component.LifeCycle;
|
|||
import org.eclipse.jetty.util.ssl.SslContextFactory;
|
||||
import org.eclipse.jetty.util.thread.QueuedThreadPool;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
|
||||
@ExtendWith(WorkDirExtension.class)
|
||||
|
@ -71,6 +72,7 @@ public class AbstractTest
|
|||
public WorkDir workDir;
|
||||
|
||||
protected final HttpConfiguration httpConfig = new HttpConfiguration();
|
||||
protected Path pemDir;
|
||||
protected SslContextFactory.Server sslContextFactoryServer;
|
||||
protected ServerQuicConfiguration serverQuicConfig;
|
||||
protected Server server;
|
||||
|
@ -100,6 +102,12 @@ public class AbstractTest
|
|||
return transports;
|
||||
}
|
||||
|
||||
@BeforeEach
|
||||
public void prepare()
|
||||
{
|
||||
pemDir = workDir.getEmptyPathDir();
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
public void dispose()
|
||||
{
|
||||
|
@ -122,7 +130,8 @@ public class AbstractTest
|
|||
protected void prepareServer(Transport transport, HttpServlet servlet) throws Exception
|
||||
{
|
||||
sslContextFactoryServer = newSslContextFactoryServer();
|
||||
serverQuicConfig = new ServerQuicConfiguration(sslContextFactoryServer, workDir.getEmptyPathDir());
|
||||
Path serverPemDirectory = Files.createDirectories(pemDir.resolve("server"));
|
||||
serverQuicConfig = new ServerQuicConfiguration(sslContextFactoryServer, serverPemDirectory);
|
||||
if (server == null)
|
||||
server = newServer();
|
||||
connector = newConnector(transport, server);
|
||||
|
@ -262,7 +271,8 @@ public class AbstractTest
|
|||
clientConnector.setSelectors(1);
|
||||
SslContextFactory.Client sslContextFactory = newSslContextFactoryClient();
|
||||
clientConnector.setSslContextFactory(sslContextFactory);
|
||||
HTTP3Client http3Client = new HTTP3Client(new ClientQuicConfiguration(sslContextFactory, null));
|
||||
Path clientPemDirectory = Files.createDirectories(pemDir.resolve("client"));
|
||||
HTTP3Client http3Client = new HTTP3Client(new ClientQuicConfiguration(sslContextFactory, clientPemDirectory));
|
||||
yield new HttpClientTransportOverHTTP3(http3Client);
|
||||
}
|
||||
case FCGI -> new HttpClientTransportOverFCGI(1, "");
|
||||
|
|
|
@ -67,6 +67,7 @@ import org.eclipse.jetty.util.component.LifeCycle;
|
|||
import org.eclipse.jetty.util.ssl.SslContextFactory;
|
||||
import org.eclipse.jetty.util.thread.QueuedThreadPool;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
|
||||
@ExtendWith(WorkDirExtension.class)
|
||||
|
@ -75,6 +76,7 @@ public class AbstractTest
|
|||
public WorkDir workDir;
|
||||
|
||||
protected final HttpConfiguration httpConfig = new HttpConfiguration();
|
||||
protected Path pemDir;
|
||||
protected SslContextFactory.Server sslContextFactoryServer;
|
||||
protected ServerQuicConfiguration serverQuicConfig;
|
||||
protected Server server;
|
||||
|
@ -104,6 +106,12 @@ public class AbstractTest
|
|||
return transports;
|
||||
}
|
||||
|
||||
@BeforeEach
|
||||
public void prepare()
|
||||
{
|
||||
pemDir = workDir.getEmptyPathDir();
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
public void dispose()
|
||||
{
|
||||
|
@ -131,7 +139,8 @@ public class AbstractTest
|
|||
protected void prepareServer(Transport transport, HttpServlet servlet, String path) throws Exception
|
||||
{
|
||||
sslContextFactoryServer = newSslContextFactoryServer();
|
||||
serverQuicConfig = new ServerQuicConfiguration(sslContextFactoryServer, workDir.getEmptyPathDir());
|
||||
Path serverPemDirectory = Files.createDirectories(pemDir.resolve("server"));
|
||||
serverQuicConfig = new ServerQuicConfiguration(sslContextFactoryServer, serverPemDirectory);
|
||||
if (server == null)
|
||||
server = newServer();
|
||||
connector = newConnector(transport, server);
|
||||
|
@ -268,7 +277,8 @@ public class AbstractTest
|
|||
clientConnector.setSelectors(1);
|
||||
SslContextFactory.Client sslContextFactory = newSslContextFactoryClient();
|
||||
clientConnector.setSslContextFactory(sslContextFactory);
|
||||
HTTP3Client http3Client = new HTTP3Client(new ClientQuicConfiguration(sslContextFactory, null));
|
||||
Path clientPemDirectory = Files.createDirectories(pemDir.resolve("client"));
|
||||
HTTP3Client http3Client = new HTTP3Client(new ClientQuicConfiguration(sslContextFactory, clientPemDirectory));
|
||||
yield new HttpClientTransportOverHTTP3(http3Client);
|
||||
}
|
||||
case FCGI -> new HttpClientTransportOverFCGI(1, "");
|
||||
|
|
Loading…
Reference in New Issue