diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..26647f3 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,18 @@ +name: Build +on: push +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + java_version: ['8', '11', '15'] + os: ['ubuntu-latest','macos-latest','windows-latest'] + steps: + - uses: actions/checkout@v2 + - name: Set up JDK + uses: actions/setup-java@v1.4.3 + with: + java-version: ${{ matrix.java_version }} + - name: Build + run: mvn -B -V -ntp verify diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..11b4c2a --- /dev/null +++ b/pom.xml @@ -0,0 +1,48 @@ + + + 4.0.0 + com.github.joschi + jetty-5531 + 1.0.0-SNAPSHOT + jar + https://github.com/eclipse/jetty.project/issues/5531 + + 1.8 + 1.8 + UTF-8 + + + + org.eclipse.jetty + jetty-util + 9.4.33.v20201020 + + + org.junit.jupiter + junit-jupiter + 5.7.0 + + + org.assertj + assertj-core + 3.18.0 + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + + org.apache.maven.plugins + maven-surefire-plugin + 2.22.2 + + + + + diff --git a/src/test/java/SslContextFactoryTest.java b/src/test/java/SslContextFactoryTest.java new file mode 100644 index 0000000..4def57b --- /dev/null +++ b/src/test/java/SslContextFactoryTest.java @@ -0,0 +1,21 @@ +import org.eclipse.jetty.util.ssl.SslContextFactory; +import org.junit.jupiter.api.Test; + +import java.util.Arrays; + +import static org.assertj.core.api.Assertions.assertThat; + +public class SslContextFactoryTest { + @Test + public void testDumpExcludedProtocols() throws Exception { + SslContextFactory.Server cf = new SslContextFactory.Server(); + cf.setKeyStorePassword("storepwd"); + cf.setKeyManagerPassword("keypwd"); + cf.setExcludeProtocols("SSL.*", "TLSv1", "TLSv1\\.[01]"); + cf.start(); + + // Confirm behavior in engine + String[] enabledProtocols = cf.newSSLEngine().getEnabledProtocols(); + assertThat(enabledProtocols).doesNotContain("TLSv1.1"); + } +}