-
Notifications
You must be signed in to change notification settings - Fork 95
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
New Cloudflare test "kills" other tests #282
Comments
Makes perfect sense. Easiest would be to check for presence of "HTTP_PROXY" env var and disable the test in such case. But disabling tests should be the last option: Could I ask you to check whether the openssl s_client |
Sure. It works - see the included patch.
:-) How about this (tested on my machines): diff --git a/scripts/oqsprovider-externalinterop.sh b/scripts/oqsprovider-externalinterop.sh
index d90dff6..fb75275 100755
--- a/scripts/oqsprovider-externalinterop.sh
+++ b/scripts/oqsprovider-externalinterop.sh
@@ -18,9 +18,15 @@ if [ -z "$DYLD_LIBRARY_PATH" ]; then
export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH
fi
+if [ ! -z "${HTTP_PROXY}" ]; then
+ export USE_PROXY="-proxy ${HTTP_PROXY#http://} -allow_proxy_certs"
+else
+ export USE_PROXY=""
+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
+(echo -e "GET /cdn-cgi/trace HTTP/1.1\nHost: cloudflare.com\n\n"; sleep 1; echo $'\cc') | "${OPENSSL_APP}" s_client ${USE_PROXY} -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 ${USE_PROXY} -connect pq.cloudflareresearch.com:443 -groups x25519_kyber512 -servername cloudflare.com -ign_eof 2>/dev/null | grep kex=X25519Kyber512Draft00 |
Describe the bug
Newly-added "External inter tests" totally fail to work on machines behind a firewall and Web proxy - unfortunately bringing all the other tests down with them.
To Reproduce
Steps to reproduce the behavior:
scripts/runtests.sh
Expected behavior
Environment (please complete the following information):
Please run the following commands to obtain the version information:
openssl version
openssl list -providers
Additional context
As far as I understand, the cause of the problem is that the tests, and probably OpenSSL by itself, does not recognize and deal with Web proxy, pointed at by
HTTP_PROXY=
andHTTPS_PROXY=
env vars.It means that either the "External interior" test-runs should be conditional on, e.g., absence of
HTTP_PROXY
variable, or somehow make the test correctly deal with Web proxy.The text was updated successfully, but these errors were encountered: