gorealis v2 refactor (#5)

* Changing default timeout for start maintenance.

* Upgrading dependencies to gorealis v2 and thrift  0.12.0

* Refactored to update to gorealis v2.
This commit is contained in:
Renan DelValle 2018-12-27 11:31:51 -08:00 committed by GitHub
parent ad4dd9606e
commit 6ab5c9334d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1335 changed files with 137431 additions and 61530 deletions

71
vendor/git.apache.org/thrift.git/test/features/tls.sh generated vendored Executable file
View file

@ -0,0 +1,71 @@
#!/bin/bash
#
# Checks to make sure TLSv1.0 or later is allowed by a server.
#
THRIFTHOST=localhost
THRIFTPORT=9090
while [[ $# -ge 1 ]]; do
arg="$1"
argIN=(${arg//=/ })
case ${argIN[0]} in
-h|--host)
THRIFTHOST=${argIN[1]}
shift # past argument
;;
-p|--port)
THRIFTPORT=${argIN[1]}
shift # past argument
;;
*)
# unknown option ignored
;;
esac
shift # past argument or value
done
declare -A EXPECT_NEGOTIATE
EXPECT_NEGOTIATE[tls1]=1
EXPECT_NEGOTIATE[tls1_1]=1
EXPECT_NEGOTIATE[tls1_2]=1
failures=0
function tls
{
for PROTO in "${!EXPECT_NEGOTIATE[@]}"; do
local nego
local negodenied
local res
echo "openssl s_client -connect $THRIFTHOST:$THRIFTPORT -CAfile ../keys/CA.pem -$PROTO 2>&1 < /dev/null"
nego=$(openssl s_client -connect $THRIFTHOST:$THRIFTPORT -CAfile ../keys/CA.pem -$PROTO 2>&1 < /dev/null)
negodenied=$?
echo "result of command: $negodenied"
res="enabled"; if [[ ${EXPECT_NEGOTIATE[$PROTO]} -eq 0 ]]; then res="disabled"; fi
if [[ $negodenied -ne ${EXPECT_NEGOTIATE[$PROTO]} ]]; then
echo "$PROTO negotiation allowed"
else
echo "[warn] $PROTO negotiation did not work"
echo $nego
((failures++))
fi
done
}
tls
if [[ $failures -eq 3 ]]; then
echo "[fail] At least one of TLSv1.0, TLSv1.1, or TLSv1.2 needs to work, but does not"
exit $failures
fi
echo "[pass] At least one of TLSv1.0, TLSv1.1, or TLSv1.2 worked"
exit 0