Browse Source

Fix awk command for pebble

pull/643/head
Tim Kimber 5 years ago
parent
commit
da63cf3ac4
No known key found for this signature in database GPG Key ID: 3E1804964E76BD18
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      test/35-preferred-chain.bats

+ 4
- 3
test/35-preferred-chain.bats View File

@ -18,7 +18,7 @@ setup() {
PREFERRED_CHAIN="\(STAGING\) Pretend Pear X1"
CHECK_CHAIN="(STAGING) Pretend Pear X1"
else
PREFERRED_CHAIN=$(curl --silent https://pebble:15000/roots/2 | openssl x509 -text -noout | grep "Issuer:" | awk -F"CN=" '{ print $2 }')
PREFERRED_CHAIN=$(curl --silent https://pebble:15000/roots/2 | openssl x509 -text -noout | grep "Issuer:" | awk -F"CN *= *" '{ print $2 }')
PREFERRED_CHAIN="${PREFERRED_CHAIN# }" # remove leading whitespace
CHECK_CHAIN=$PREFERRED_CHAIN
fi
@ -51,8 +51,9 @@ EOF
PREFERRED_CHAIN="\(STAGING\) Doctored Durian Root CA X3"
CHECK_CHAIN="(STAGING) Doctored Durian Root CA X3"
else
PREFERRED_CHAIN=$(curl --silent https://pebble:15000/roots/0 | openssl x509 -text -noout | grep Issuer: | awk -F"CN=" '{ print $2 }')
PREFERRED_CHAIN=$(curl --silent https://pebble:15000/roots/0 | openssl x509 -text -noout | grep Issuer: | awk -F"CN *= *" '{ print $2 }')
PREFERRED_CHAIN="${PREFERRED_CHAIN# }" # remove leading whitespace
CHECK_CHAIN=$PREFERRED_CHAIN
fi
CONFIG_FILE="getssl-dns01.cfg"
@ -81,7 +82,7 @@ EOF
if [ -n "$STAGING" ]; then
FULL_PREFERRED_CHAIN="(STAGING) Pretend Pear X1"
else
FULL_PREFERRED_CHAIN=$(curl --silent https://pebble:15000/roots/2 | openssl x509 -text -noout | grep "Issuer:" | awk -F"CN=" '{ print $2 }')
FULL_PREFERRED_CHAIN=$(curl --silent https://pebble:15000/roots/2 | openssl x509 -text -noout | grep "Issuer:" | awk -F"CN *= *" '{ print $2 }')
FULL_PREFERRED_CHAIN="${FULL_PREFERRED_CHAIN# }" # remove leading whitespace
fi


Loading…
Cancel
Save