Created
July 4, 2025 07:05
-
-
Save TyeolRik/1f4fe025737f35a4b2cd309f632aea3e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
HOSTNAME=<SOME_HOSTNAME> | |
PORT=<SOME_PORT> | |
CACERT=/etc/cloudia/certs/ca/ca-certificate.crt | |
CERT=/etc/cloudia/certs/my.crt | |
KEY=/etc/cloudia/certs/my.id_ecc.pkcs8.pem | |
echo "===== TLSv1.2 Cipher Test =====" | |
for CIPHER in $(openssl ciphers -tls1_2 | tr ':' ' '); do | |
echo -n "[TLSv1.2] $CIPHER ... " | |
openssl s_client -connect ${HOSTNAME}:${PORT} \ | |
-CAfile "$CACERT" -cert "$CERT" -key "$KEY" \ | |
-cipher "$CIPHER" -tls1_2 -brief < /dev/null > /dev/null 2>&1 | |
if [ $? -eq 0 ]; then | |
echo "성공" | |
else | |
echo "실패" | |
fi | |
done | |
echo "" | |
echo "===== TLSv1.3 Cipher Test =====" | |
for CIPHER in $(openssl ciphers -tls1_3 | tr ':' ' '); do | |
echo -n "[TLSv1.3] $CIPHER ... " | |
openssl s_client -connect ${HOSTNAME}:${PORT} \ | |
-CAfile "$CACERT" -cert "$CERT" -key "$KEY" \ | |
-ciphersuites "$CIPHER" -tls1_3 -brief < /dev/null > /dev/null 2>&1 | |
if [ $? -eq 0 ]; then | |
echo "성공" | |
else | |
echo "실패" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment