2021-05-31 09:27:37 +02:00
|
|
|
#!/usr/bin/env bash
|
2017-04-21 11:29:20 +02:00
|
|
|
|
2021-09-14 11:05:48 +02:00
|
|
|
# simple check for session resumption 1) by SID, 2) by tickets
|
2017-04-21 11:29:20 +02:00
|
|
|
# Author: Dirk Wetter, GPLv2 see https://testssl.sh/LICENSE.txt
|
|
|
|
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo "####################### session ID ######################"
|
|
|
|
openssl s_client -connect $1:443 -servername $1 -bugs -no_ssl2 -no_ticket -sess_out /tmp/ssl_s </dev/null &>/dev/null
|
|
|
|
|
|
|
|
echo "--------------------------------------------------------"
|
2022-09-12 22:12:28 +02:00
|
|
|
openssl s_client -connect $1:443 -servername $1 -bugs -no_ssl2 -no_ticket -sess_in /tmp/ssl_s </dev/null 2>/dev/null | grep -E "New|Reused|SSL handshake has read"
|
2017-04-21 11:29:20 +02:00
|
|
|
echo "--------------------------------------------------------"
|
|
|
|
|
|
|
|
echo "####################### session ticket ######################"
|
|
|
|
openssl s_client -connect $1:443 -servername $1 -bugs -no_ssl2 -sess_out /tmp/ssl_s </dev/null &>/dev/null
|
|
|
|
echo "--------------------------------------------------------"
|
2022-09-12 22:12:28 +02:00
|
|
|
openssl s_client -connect $1:443 -servername $1 -bugs -no_ssl2 -sess_in /tmp/ssl_s </dev/null 2>/dev/null | grep -E "New|Reused|SSL handshake has read"
|
2017-04-21 11:29:20 +02:00
|
|
|
|
|
|
|
echo
|
2021-05-31 22:39:22 +02:00
|
|
|
|
|
|
|
# vim:ts=5:sw=5:expandtab
|