Merge pull request #937 from dcooper16/fix_certificate_check

Fix check for whether certificates were found
This commit is contained in:
Dirk Wetter 2017-12-13 20:34:19 +01:00 committed by GitHub
commit 4339c27659
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5950,7 +5950,7 @@ get_server_certificate() {
local success local success
local npn_params="" line local npn_params="" line
local savedir local savedir
local nrsaved local nrsaved=0
"$HAS_SPDY" && [[ -z "$STARTTLS" ]] && npn_params="-nextprotoneg \"$NPN_PROTOs\"" "$HAS_SPDY" && [[ -z "$STARTTLS" ]] && npn_params="-nextprotoneg \"$NPN_PROTOs\""
@ -5975,7 +5975,7 @@ get_server_certificate() {
/-----BEGIN CERTIFICATE-----/{ if (start) {inc=1; n++} } /-----BEGIN CERTIFICATE-----/{ if (start) {inc=1; n++} }
inc { print > ("level" n ".crt") } inc { print > ("level" n ".crt") }
/---END CERTIFICATE-----/{ inc=0 }' $TMPFILE /---END CERTIFICATE-----/{ inc=0 }' $TMPFILE
nrsaved=$(count_words "$(echo level?.crt 2>/dev/null)") [[ -s level0.crt ]] && nrsaved=$(count_words "$(echo level?.crt 2>/dev/null)")
if [[ $nrsaved -eq 0 ]]; then if [[ $nrsaved -eq 0 ]]; then
success=1 success=1
else else
@ -6039,7 +6039,7 @@ get_server_certificate() {
/-----BEGIN CERTIFICATE-----/{ if (start) {inc=1; n++} } /-----BEGIN CERTIFICATE-----/{ if (start) {inc=1; n++} }
inc { print > ("level" n ".crt") } inc { print > ("level" n ".crt") }
/---END CERTIFICATE-----/{ inc=0 }' $TMPFILE /---END CERTIFICATE-----/{ inc=0 }' $TMPFILE
nrsaved=$(count_words "$(echo level?.crt 2>/dev/null)") [[ -s level0.crt ]] && nrsaved=$(count_words "$(echo level?.crt 2>/dev/null)")
if [[ $nrsaved -eq 0 ]]; then if [[ $nrsaved -eq 0 ]]; then
success=1 success=1
else else