Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tris: integrate Haskell TLS in interop test #59

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ env:
- MODE=interop CLIENT=boring SERVER=boring
- MODE=interop CLIENT=tstclnt SERVER=tstclnt
- MODE=interop CLIENT=picotls ZRTT=1
- MODE=interop CLIENT=hs-tls ZRTT=1
# - MODE=interop CLIENT=mint # does not support draft 22
- MODE=bogo
- MODE=gotest
Expand Down
15 changes: 15 additions & 0 deletions _dev/hs-tls/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM haskell:8.0

RUN git clone https://github.com/kazu-yamamoto/hs-tls.git \
-b tls13 --single-branch

# branch tls13 (as of 12 December 2017)
ARG REVISION=a7936cfcf4ea95bb35b34b1640a356cee69157d6

RUN cd hs-tls && git fetch && git checkout $REVISION
RUN cd hs-tls && stack build

ADD run.sh /run.sh
ADD httpreq.txt /httpreq.txt
WORKDIR /hs-tls
ENTRYPOINT ["/run.sh"]
3 changes: 3 additions & 0 deletions _dev/hs-tls/httpreq.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
GET / HTTP/1.1
Host: example.com

14 changes: 14 additions & 0 deletions _dev/hs-tls/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#! /bin/bash
set -e

IFS=':' read -ra ADDR <<< "$1"
shift
HOST="${ADDR[0]}"
PORT="${ADDR[1]}"

# Documentation:
# https://github.com/vincenthz/hs-tls/issues/167#issuecomment-261823166
# "-g x25519" is used since HRR is not supported yet by tris.

exec stack exec tls-simpleclient -- --no-valid --http1.1 \
--session -Z /httpreq.txt -g x25519 "$HOST" "$PORT"