This is neither approved nor endorsed by the Jetty project, Eclispe Foundation, or similar. It's just a minimal project for reproducing and solving my personal jetty HTTP/2 issues. It has a very simple HTML5 file hard-coded in the Kotlin code.
Requires:
- Java (I use openjdk11)
- Maven
Command:
mvn clean package
java -jar target/ROOT.jar
or to debug javax.net:
java -Djavax.net.debug=all -jar target/ROOT.jar
Edit src/main/resources/logback.xml
and change <root level="info">
to <root level="debug">
sudo $JAVA_HOME/bin/keytool \
-alias jetty \
-dname "CN=jettyHttp2Sample.organicdesign.org, OU=Testing, O=OrganicDesign, L=Upstate, ST=South Carolina, C=US" \
-genkeypair \
-keyalg EC \
-keysize 256 \
-keystore src/main/resources/keystore \
-sigalg SHA256withECDSA \
-storetype pkcs12 \
-validity 1096
with curl (this is what success looks like):
$ curl --insecure https://localhost:8443 -D headers.txt
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Test Page</title>
</head>
<body>
<h1>It works!</h1>
<p>Working.</p>
</body>
</html>
$ cat headers.txt
HTTP/2 200
server: Jetty(9.4.20.v20190813)
content-type: text/html;charset=utf-8
with nmap (simple cipher test):
nmap --script ssl-enum-ciphers -p 8443 localhost
with testssl.sh (detalied cipher test):
testssl.sh localhost:8443
with browser: https://localhost:8443/