From ee73ca5b0087625849ddb187011ce567860c868b Mon Sep 17 00:00:00 2001 From: Michael Baentsch <57787676+baentsch@users.noreply.github.com> Date: Sat, 7 Oct 2023 19:17:43 +0200 Subject: [PATCH] add cloudflare interop tests --- scripts/oqsprovider-externalinterop.sh | 26 ++++++++++++++++++++++++++ scripts/runtests.sh | 4 ++++ 2 files changed, 30 insertions(+) create mode 100755 scripts/oqsprovider-externalinterop.sh diff --git a/scripts/oqsprovider-externalinterop.sh b/scripts/oqsprovider-externalinterop.sh new file mode 100755 index 00000000..d90dff68 --- /dev/null +++ b/scripts/oqsprovider-externalinterop.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +set -e + +# Use newly built oqsprovider to test interop with external sites + +if [ -z "$OPENSSL_APP" ]; then + echo "OPENSSL_APP env var not set. Exiting." + exit 1 +fi + +if [ -z "$OPENSSL_MODULES" ]; then + echo "Warning: OPENSSL_MODULES env var not set." +fi + +# Set OSX DYLD_LIBRARY_PATH if not already externally set +if [ -z "$DYLD_LIBRARY_PATH" ]; then + export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH +fi + +echo " Cloudflare:" +export OQS_CODEPOINT_X25519_KYBER512=65072 +(echo -e "GET /cdn-cgi/trace HTTP/1.1\nHost: cloudflare.com\n\n"; sleep 1; echo $'\cc') | $OPENSSL_APP s_client -connect pq.cloudflareresearch.com:443 -groups x25519_kyber768 -servername cloudflare.com -ign_eof 2>/dev/null | grep kex=X25519Kyber768Draft00 +(echo -e "GET /cdn-cgi/trace HTTP/1.1\nHost: cloudflare.com\n\n"; sleep 1; echo $'\cc') | $OPENSSL_APP s_client -connect pq.cloudflareresearch.com:443 -groups x25519_kyber512 -servername cloudflare.com -ign_eof 2>/dev/null | grep kex=X25519Kyber512Draft00 + + diff --git a/scripts/runtests.sh b/scripts/runtests.sh index 8d7d02d5..79762205 100755 --- a/scripts/runtests.sh +++ b/scripts/runtests.sh @@ -180,6 +180,10 @@ fi echo +# Run interop tests with external sites +echo "External interop tests commencing" +${OQS_PROVIDER_TESTSCRIPTS}/oqsprovider-externalinterop.sh + # Run built-in tests: # Without removing OPENSSL_CONF ctest hangs... ??? unset OPENSSL_CONF