mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-30 20:31:15 +01:00
Fix whitespace issues
This commit fixes incorrect indentations introduced in #2276 and #2278, and also removes the extra whitespace that would have been removed by #2279.
This commit is contained in:
parent
6ba21a937a
commit
e2942966d2
36
testssl.sh
36
testssl.sh
@ -874,22 +874,22 @@ strip_quote() (
|
||||
|
||||
# Converts a string containing PEM encoded data to one line.
|
||||
pem_to_one_line() {
|
||||
local pem="$1"
|
||||
local header="" footer=""
|
||||
local pem="$1"
|
||||
local header="" footer=""
|
||||
|
||||
if [[ "$pem" =~ .*-+BEGIN\ [A-Za-z0-9]+-+ ]]; then
|
||||
header="$BASH_REMATCH"
|
||||
pem="${pem/$header/}"
|
||||
fi
|
||||
if [[ "$pem" =~ -+END\ [A-Za-z0-9]+-+.* ]]; then
|
||||
footer="$BASH_REMATCH"
|
||||
pem="${pem/$footer/}"
|
||||
fi
|
||||
pem="$(strip_spaces "$(newline_to_spaces "$pem")")"
|
||||
[[ -n "$header" ]] && pem="$header\\\n$pem"
|
||||
[[ -n "$footer" ]] && pem+="\\\n$footer"
|
||||
printf -- "%s" "$pem"
|
||||
return 0
|
||||
if [[ "$pem" =~ .*-+BEGIN\ [A-Za-z0-9]+-+ ]]; then
|
||||
header="$BASH_REMATCH"
|
||||
pem="${pem/$header/}"
|
||||
fi
|
||||
if [[ "$pem" =~ -+END\ [A-Za-z0-9]+-+.* ]]; then
|
||||
footer="$BASH_REMATCH"
|
||||
pem="${pem/$footer/}"
|
||||
fi
|
||||
pem="$(strip_spaces "$(newline_to_spaces "$pem")")"
|
||||
[[ -n "$header" ]] && pem="$header\\\n$pem"
|
||||
[[ -n "$footer" ]] && pem+="\\\n$footer"
|
||||
printf -- "%s" "$pem"
|
||||
return 0
|
||||
}
|
||||
|
||||
is_ipv4addr() {
|
||||
@ -21354,9 +21354,9 @@ extract_calist() {
|
||||
certtypes="${certreq:2:len}"
|
||||
certreq="${certreq:$((len+2))}"
|
||||
if "$is_tls12"; then
|
||||
len=2*$(hex2dec "${certreq:0:4}")
|
||||
sigalgs="${certreq:4:len}"
|
||||
certreq="${certreq:$((len+4))}"
|
||||
len=2*$(hex2dec "${certreq:0:4}")
|
||||
sigalgs="${certreq:4:len}"
|
||||
certreq="${certreq:$((len+4))}"
|
||||
fi
|
||||
len=2*$(hex2dec "${certreq:0:4}")
|
||||
calist="${certreq:4:len}"
|
||||
|
Loading…
Reference in New Issue
Block a user