Skip to content

Commit 3e40e32

Browse files
Merge pull request openstack-k8s-operators#1459 from danpawlik/trim-value
Remove spaces on getting ISSUER details
2 parents de2c931 + d2f8244 commit 3e40e32

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/kuttl/common/osp_check_cert_issuer.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ for url in $(openstack endpoint list -c URL -f value | grep "$endpoint_filter");
6161

6262
echo "Checking $host_port ..."
6363
if [[ "$ENDPOINT_TYPE" == "public" ]]; then
64-
ISSUER=$(echo | openssl s_client -connect "$host_port" 2>/dev/null | openssl x509 -noout -issuer | sed -n 's/^.*CN=\([^,]*\).*$/\1/p')
64+
ISSUER=$(echo | openssl s_client -connect "$host_port" 2>/dev/null | openssl x509 -noout -issuer | sed -n 's/^.*CN=\([^,]*\).*$/\1/p' | sed 's/ //g')
6565
else
66-
ISSUER=$(openssl s_client -connect $host_port < /dev/null 2>/dev/null | openssl x509 -issuer -noout -in /dev/stdin)
66+
ISSUER=$(openssl s_client -connect $host_port </dev/null 2>/dev/null | openssl x509 -issuer -noout -in /dev/stdin | sed 's/ //g')
6767
fi
6868

6969
if [[ "$ISSUER" != "$EXPECTED_ISSUER" ]]; then

0 commit comments

Comments
 (0)