forked from microsoft/msquic
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build QND interop image (microsoft#461)
- Loading branch information
1 parent
11c6437
commit b62cc45
Showing
3 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
* | ||
!CMakeLists.txt | ||
!run_endpoint.sh | ||
!src | ||
!submodules/openssl | ||
submodules/openssl/pyca-cryptography | ||
submodules/openssl/boringssl | ||
**/*.o | ||
**/*.a | ||
**/*.d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM martenseemann/quic-network-simulator-endpoint as source | ||
RUN apt-get update -y \ | ||
&& apt-get install -y \ | ||
build-essential \ | ||
cmake \ | ||
&& apt-get clean | ||
COPY . /src | ||
|
||
FROM source as build | ||
WORKDIR /src/Debug | ||
RUN cmake -DQUIC_ENABLE_LOGGING=OFF -DQUIC_BUILD_TEST=OFF .. | ||
RUN cmake --build . | ||
RUN openssl ecparam -out server.eckey -noout -name prime256v1 -genkey | ||
RUN openssl pkcs8 -topk8 -inform pem -in server.eckey -nocrypt \ | ||
-out server.key | ||
RUN openssl req -batch -new -key server.key -days 9365 -nodes -x509 \ | ||
-subj "/" -addext "subjectAltName = DNS:server" -out server.crt | ||
|
||
FROM martenseemann/quic-network-simulator-endpoint | ||
RUN apt-get update -y \ | ||
&& apt-get install -y \ | ||
libatomic1 \ | ||
&& apt-get clean | ||
COPY --from=build /src/Debug/bin/Release /bin | ||
COPY --from=build /src/Debug/bin/Release/*.so /lib/x86_64-linux-gnu | ||
COPY --from=source /src/run_endpoint.sh /run_endpoint.sh | ||
COPY --from=build /src/Debug/server.* / | ||
RUN chmod +x /run_endpoint.sh | ||
ENTRYPOINT [ "/run_endpoint.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#! /usr/bin/env bash | ||
|
||
# Set up the routing needed for the simulation | ||
/setup.sh | ||
|
||
if [ -n "$TESTCASE" ]; then | ||
case "$TESTCASE" in | ||
# TODO: add supported test cases here | ||
"versionnegotiation"|"handshake"|"transfer"|"retry"|"resumption"|\ | ||
"multiconnect"|"zerortt"|"chacha20") | ||
;; | ||
*) | ||
exit 127 | ||
;; | ||
esac | ||
fi | ||
|
||
# The following variables are available for use: | ||
# - ROLE contains the role of this execution context, client or server | ||
# - SERVER_PARAMS contains user-supplied command line parameters | ||
# - CLIENT_PARAMS contains user-supplied command line parameters | ||
|
||
if [ "$ROLE" == "client" ]; then | ||
# Wait for the simulator to start up. | ||
/wait-for-it.sh sim:57832 -s -t 30 | ||
cd /downloads || exit | ||
|
||
# TODO: add client support | ||
# I am not sure if the msquic codebase has an h09 client? | ||
exit 127 | ||
|
||
elif [ "$ROLE" == "server" ]; then | ||
case "$TESTCASE" in | ||
"retry") | ||
SERVER_PARAMS="-retry:1 $SERVER_PARAMS" | ||
;; | ||
*) | ||
;; | ||
esac | ||
|
||
quicinteropserver ${SERVER_PARAMS} -root:/www -listen:* -port:443 \ | ||
-file:/server.crt -key:/server.key 2>&1 | ||
fi |