zotregistry.io/zot@v1.4.4-0.20231124084042-02a8ed785457/test/scripts/tls_scan.sh (about) 1 #!/usr/bin/env bash 2 3 set -x 4 5 curl -kv --tls-max 1.0 https://localhost:8080/v2/ 6 if [[ "$?" -eq 0 ]]; then echo "TLSv1.0 detected"; exit 1; fi 7 8 curl -kv --tls-max 1.1 https://localhost:8080/v2/ 9 if [[ "$?" -eq 0 ]]; then echo "TLSv1.1 detected"; exit 1; fi 10 11 curl -kv --tls-max 1.2 https://localhost:8080/v2/ 12 if [[ "$?" -ne 0 ]]; then echo "TLSv1.2 missing"; exit 1; fi 13 14 curl -kv --tls-max 1.3 https://localhost:8080/v2/ 15 if [[ "$?" -ne 0 ]]; then echo "TLSv1.3 missing"; exit 1; fi 16 17 exit 0