mirror of
https://github.com/drwetter/testssl.sh.git
synced 2024-12-31 22:09:44 +01:00
parent
0727a30456
commit
11d74d2f6e
@ -1226,7 +1226,7 @@ strip_trailing_space() {
|
||||
# retrieve cipher from ServerHello (via openssl)
|
||||
get_cipher() {
|
||||
local cipher=""
|
||||
local server_hello="$(cat "$1")"
|
||||
local server_hello="$(< "$1")"
|
||||
|
||||
if [[ "$server_hello" =~ Cipher\ *:\ ([A-Z0-9]+-[A-Z0-9\-]+|TLS_[A-Z0-9_]+) ]]; then
|
||||
cipher="${BASH_REMATCH##* }"
|
||||
@ -1239,7 +1239,7 @@ get_cipher() {
|
||||
# retrieve protocol from ServerHello (via openssl)
|
||||
get_protocol() {
|
||||
local protocol=""
|
||||
local server_hello="$(cat "$1")"
|
||||
local server_hello="$(< "$1")"
|
||||
|
||||
if [[ "$server_hello" =~ Protocol\ *:\ (SSLv[23]|TLSv1(\.[0-3])?) ]]; then
|
||||
protocol="${BASH_REMATCH##* }"
|
||||
|
Loading…
Reference in New Issue
Block a user