summaryrefslogtreecommitdiff
blob: cba1660ec62ccbd6ecad17baba436f23510d12d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
https://bugs.gentoo.org/832851
https://github.com/notroj/neon/pull/115
https://github.com/notroj/neon/commit/e02ead4d990e49c912ef053c46b55713685119ee

From e1bcf0e83012e0c1ff81c573d2650e1a4e40d955 Mon Sep 17 00:00:00 2001
From: orbea <orbea@riseup.net>
Date: Sat, 6 May 2023 20:50:50 -0700
Subject: [PATCH 1/2] 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
---
 test/makekeys.sh | 6 +++---
 1 file 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