summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororbea <orbea@riseup.net>2023-05-06 20:50:50 -0700
committerJoe Orton <jorton@apache.org>2023-05-09 08:26:08 +0100
commite02ead4d990e49c912ef053c46b55713685119ee (patch)
tree43423aff460e97a606cf1ad9a095b472f94e7dcd
parent18e868e4449cd46d494944ced798f9dcd01f65c5 (diff)
downloadneon-git-e02ead4d990e49c912ef053c46b55713685119ee.tar.gz
test/makekeys.sh: fix POSIX compliance
Not all shells provide 'echo -e' and using printf is more portable. One shell that will fail is dash(1). ssl................... 10/63 FAIL - dname_readable (certificate subject dname was `-e H\0350llo World, Neon Hackers Ltd, Cambridge, Cambridgeshire, GB' not `Hèllo World, Neon Hackers Ltd, Cambridge, Cambridgeshire, GB' Gentoo-Issue: https://bugs.gentoo.org/832851
-rwxr-xr-xtest/makekeys.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/makekeys.sh b/test/makekeys.sh
index 88dc7b3..8ee90ae 100755
--- a/test/makekeys.sh
+++ b/test/makekeys.sh
@@ -123,15 +123,15 @@ csr_fields "Self-Signed" | \
${MKCERT} -key server.key -out ssigned.pem
# default => T61String
-csr_fields "`echo -e 'H\0350llo World'`" localhost |
+csr_fields "$(printf 'H%bllo World\n' '\0350')" localhost |
${REQ} -new -key server.key -out t61subj.csr
STRMASK=pkix # => BMPString
-csr_fields "`echo -e 'H\0350llo World'`" localhost |
+csr_fields "$(printf 'H%bllo World\n' '\0350')" localhost |
${REQ} -new -key server.key -out bmpsubj.csr
STRMASK=utf8only # => UTF8String
-csr_fields "`echo -e 'H\0350llo World'`" localhost |
+csr_fields "$(printf 'H%bllo World\n' '\0350')" localhost |
${REQ} -new -key server.key -out utf8subj.csr
STRMASK=default