diff options
Diffstat (limited to 'security/nss/tests/interop/interop.sh')
-rw-r--r-- | security/nss/tests/interop/interop.sh | 44 |
1 files changed, 37 insertions, 7 deletions
diff --git a/security/nss/tests/interop/interop.sh b/security/nss/tests/interop/interop.sh index 50c8bb3c1..18737c726 100644 --- a/security/nss/tests/interop/interop.sh +++ b/security/nss/tests/interop/interop.sh @@ -24,8 +24,8 @@ interop_init() cd "${HOSTDIR}/interop" INTEROP=${INTEROP:=tls_interop} if [ ! -d "$INTEROP" ]; then - git clone -q https://github.com/ttaubert/tls-interop "$INTEROP" - git -C "$INTEROP" checkout -q d07b28ac32b390dea1c9bcca5c56716247d23e5e + git clone -q https://github.com/mozilla/tls-interop "$INTEROP" + git -C "$INTEROP" checkout -q c00685aa953c49f1e844e614746aadc783e81b19 fi INTEROP=$(cd "$INTEROP";pwd -P) @@ -33,9 +33,34 @@ interop_init() BORING=${BORING:=boringssl} if [ ! -d "$BORING" ]; then git clone -q https://boringssl.googlesource.com/boringssl "$BORING" - git -C "$BORING" checkout -q ea80f9d5df4c302de391e999395e1c87f9c786b3 + git -C "$BORING" checkout -q 7f4f41fa81c03e0f8ef1ab5b3d1d566b5968f107 fi BORING=$(cd "$BORING";pwd -P) + mkdir "$BORING/build" + cd "$BORING/build" + + # Build boring explicitly with gcc because it fails on builds where + # CC=clang-5.0, for example on asan-builds. + export CC=gcc + cmake .. + make -j$(nproc) + + # Check out and build OpenSSL. + # Build with "enable-external-tests" to include the shim in the build. + cd "${HOSTDIR}" + OSSL=${OSSL:=openssl} + if [ ! -d "$OSSL" ]; then + git clone -q https://github.com/openssl/openssl.git "$OSSL" + git -C "$OSSL" checkout -q 7d38ca3f8bca58bf7b69e78c1f1ab69e5f429dff + fi + OSSL=$(cd "$OSSL";pwd -P) + cd "$OSSL" + ./config enable-external-tests + make -j$(nproc) + + #Some filenames in the OpenSSL repository contain "core". + #This prevents false positive "core file detected" errors. + detect_core SCRIPTNAME="interop.sh" html_head "interop test" @@ -56,21 +81,26 @@ interop_run() server=$3 (cd "$INTEROP"; - cargo run -- --client "$client" --server "$server" --rootdir "$BORING"/ssl/test/runner/ --test-cases cases.json) 2>interop-${test_name}.errors | tee interop-${test_name}.log + cargo run -- --client "$client" --server "$server" --rootdir "$BORING"/ssl/test/runner/ --test-cases cases.json $4 $5 ) 2>interop-${test_name}.errors | tee interop-${test_name}.log RESULT=${PIPESTATUS[0]} - html_msg "${RESULT}" 0 "Interop" "Run successfully" + html_msg "${RESULT}" 0 "Interop ${test_name}" "Run successfully" if [ $RESULT -ne 0 ]; then cat interop-${test_name}.errors cat interop-${test_name}.log fi grep -i 'FAILED\|Assertion failure' interop-${test_name}.errors - html_msg $? 1 "Interop" "No failures" + html_msg $? 1 "Interop ${test_name}" "No failures" } cd "$(dirname "$0")" -SOURCE_DIR="$PWD"/../.. interop_init NSS_SHIM="$BINDIR"/nss_bogo_shim BORING_SHIM="$BORING"/build/ssl/test/bssl_shim +OSSL_SHIM="$OSSL"/test/ossl_shim/ossl_shim +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"$OSSL" interop_run "nss_nss" ${NSS_SHIM} ${NSS_SHIM} +interop_run "bssl_nss" ${BORING_SHIM} ${NSS_SHIM} +interop_run "nss_bssl" ${NSS_SHIM} ${BORING_SHIM} "--client-writes-first" +interop_run "ossl_nss" ${OSSL_SHIM} ${NSS_SHIM} "--force-IPv4" +interop_run "nss_ossl" ${NSS_SHIM} ${OSSL_SHIM} "--client-writes-first" "--force-IPv4" interop_cleanup |