diff --git a/.travis.yml b/.travis.yml index 5af35eb..4745598 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,19 +10,20 @@ go: env: - MODE=interop CLIENT=boring - MODE=interop CLIENT=bogo - - MODE=interop CLIENT=tstclnt + - MODE=interop CLIENT=tstclnt # added while ZRTT=1 is broken + - MODE=interop CLIENT=picotls ZRTT=1 - MODE=interop CLIENT=mint - MODE=gotest + - MODE=interop CLIENT=tstclnt ZRTT=1 - MODE=interop CLIENT=boring REVISION=origin/master - - MODE=interop CLIENT=bogo REVISION=origin/master - - MODE=interop CLIENT=tstclnt REVISION=default + - MODE=interop CLIENT=tstclnt REVISION=default ZRTT=1 matrix: fast_finish: true allow_failures: - env: MODE=interop CLIENT=boring REVISION=origin/master - - env: MODE=interop CLIENT=bogo REVISION=origin/master - - env: MODE=interop CLIENT=tstclnt REVISION=default + - env: MODE=interop CLIENT=tstclnt ZRTT=1 # tstclnt races and doesn't resend + - env: MODE=interop CLIENT=tstclnt REVISION=default ZRTT=1 - env: MODE=interop CLIENT=mint # broken resumption client install: @@ -31,7 +32,7 @@ install: script: - if [ "$MODE" = "interop" ]; then ./_dev/interop.sh RUN $CLIENT; fi - - if [ "$MODE" = "interop" ] && [ "$CLIENT" = "tstclnt" ]; then ./_dev/interop.sh 0-RTT $CLIENT; fi + - if [ "$MODE" = "interop" ] && [ "$ZRTT" = "1" ]; then ./_dev/interop.sh 0-RTT $CLIENT; fi - if [ "$MODE" = "gotest" ]; then ./_dev/go.sh test -race crypto/tls; fi after_script: diff --git a/_dev/picotls/Dockerfile b/_dev/picotls/Dockerfile new file mode 100644 index 0000000..d63b177 --- /dev/null +++ b/_dev/picotls/Dockerfile @@ -0,0 +1,21 @@ +FROM alpine + +RUN apk add --update \ + git \ + cmake \ + build-base \ + openssl-dev \ + bash \ + && rm -rf /var/cache/apk/* + +RUN git clone https://github.com/h2o/picotls + +ARG REVISION=a6c1c65 +RUN cd picotls && git fetch && git checkout $REVISION + +RUN cd picotls && git submodule update --init +RUN cd picotls && cmake . && make + +ADD httpreq.txt /httpreq.txt +ADD run.sh /run.sh +ENTRYPOINT ["/run.sh"] diff --git a/_dev/picotls/httpreq.txt b/_dev/picotls/httpreq.txt new file mode 100644 index 0000000..e4e6ac1 --- /dev/null +++ b/_dev/picotls/httpreq.txt @@ -0,0 +1,5 @@ +GET / HTTP/1.1 +Host: example.com +Connection: close + + diff --git a/_dev/picotls/run.sh b/_dev/picotls/run.sh new file mode 100755 index 0000000..e7e278c --- /dev/null +++ b/_dev/picotls/run.sh @@ -0,0 +1,10 @@ +#! /bin/bash +set -e + +IFS=':' read -ra ADDR <<< "$1" +shift +HOST="${ADDR[0]}" +PORT="${ADDR[1]}" + +/picotls/cli -s /session -e "$@" $HOST $PORT < /httpreq.txt +/picotls/cli -s /session -e "$@" $HOST $PORT < /httpreq.txt diff --git a/handshake_client_test.go b/handshake_client_test.go index c839926..083036a 100644 --- a/handshake_client_test.go +++ b/handshake_client_test.go @@ -68,8 +68,8 @@ func (i opensslInput) Read(buf []byte) (n int, err error) { // log message from a completed server handshake. type opensslOutputSink struct { handshakeConfirmed chan struct{} - all []byte - line []byte + all []byte + line []byte } func newOpensslOutputSink() *opensslOutputSink {