mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-03 23:39:45 +01:00
Merge branch '2.9dev' of github.com:drwetter/testssl.sh into 2.9dev
This commit is contained in:
commit
39822d89e9
@ -1227,7 +1227,7 @@ strip_trailing_space() {
|
|||||||
# retrieve cipher from ServerHello (via openssl)
|
# retrieve cipher from ServerHello (via openssl)
|
||||||
get_cipher() {
|
get_cipher() {
|
||||||
local 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
|
if [[ "$server_hello" =~ Cipher\ *:\ ([A-Z0-9]+-[A-Z0-9\-]+|TLS_[A-Z0-9_]+) ]]; then
|
||||||
cipher="${BASH_REMATCH##* }"
|
cipher="${BASH_REMATCH##* }"
|
||||||
@ -1240,7 +1240,7 @@ get_cipher() {
|
|||||||
# retrieve protocol from ServerHello (via openssl)
|
# retrieve protocol from ServerHello (via openssl)
|
||||||
get_protocol() {
|
get_protocol() {
|
||||||
local protocol=""
|
local protocol=""
|
||||||
local server_hello="$(cat "$1")"
|
local server_hello="$(< "$1")"
|
||||||
|
|
||||||
if [[ "$server_hello" =~ Protocol\ *:\ (SSLv[23]|TLSv1(\.[0-3])?) ]]; then
|
if [[ "$server_hello" =~ Protocol\ *:\ (SSLv[23]|TLSv1(\.[0-3])?) ]]; then
|
||||||
protocol="${BASH_REMATCH##* }"
|
protocol="${BASH_REMATCH##* }"
|
||||||
|
Loading…
Reference in New Issue
Block a user