Skip to content

Commit

Permalink
Fix NLnetLabs#729: omit use of escape sequences in echo since they ar…
Browse files Browse the repository at this point in the history
…e not portable (unbound-control-setup)

git-svn-id: http://unbound.nlnetlabs.nl/svn/trunk@3587 be551aaa-1e26-0410-a405-d3ace91eadb9
  • Loading branch information
ralph committed Dec 15, 2015
1 parent aabc0d1 commit 6ae738d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
4 changes: 4 additions & 0 deletions doc/Changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
15 December 2015: Ralph
- Fix #729: omit use of escape sequences in echo since they are not
portable (unbound-control-setup).

11 December 2015: Wouter
- remove NULL-checks before free, patch from Michael McConville.
- updated ax_pthread.m4 to version 21 with clang support, this
Expand Down
30 changes: 15 additions & 15 deletions smallapp/unbound-control-setup.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@ else
fi

# create self-signed cert for server
echo "[req]\n" > request.cfg
echo "default_bits=$BITS\n" >> request.cfg
echo "default_md=$HASH\n" >> request.cfg
echo "prompt=no\n" >> request.cfg
echo "distinguished_name=req_distinguished_name\n" >> request.cfg
echo "\n" >> request.cfg
echo "[req_distinguished_name]\n" >> request.cfg
echo "commonName=$SERVERNAME\n" >> request.cfg
echo "[req]" > request.cfg
echo "default_bits=$BITS" >> request.cfg
echo "default_md=$HASH" >> request.cfg
echo "prompt=no" >> request.cfg
echo "distinguished_name=req_distinguished_name" >> request.cfg
echo "" >> request.cfg
echo "[req_distinguished_name]" >> request.cfg
echo "commonName=$SERVERNAME" >> request.cfg

test -f request.cfg || error "could not create request.cfg"

Expand All @@ -124,13 +124,13 @@ openssl req -key $SVR_BASE.key -config request.cfg -new -x509 -days $DAYS -out
openssl x509 -in $SVR_BASE.pem -addtrust serverAuth -out $SVR_BASE"_trust.pem"

# create client request and sign it, piped
echo "[req]\n" > request.cfg
echo "default_bits=$BITS\n" >> request.cfg
echo "default_md=$HASH\n" >> request.cfg
echo "prompt=no\n" >> request.cfg
echo "distinguished_name=req_distinguished_name\n" >> request.cfg
echo "\n" >> request.cfg
echo "[req_distinguished_name]\n" >> request.cfg
echo "[req]" > request.cfg
echo "default_bits=$BITS" >> request.cfg
echo "default_md=$HASH" >> request.cfg
echo "prompt=no" >> request.cfg
echo "distinguished_name=req_distinguished_name" >> request.cfg
echo "" >> request.cfg
echo "[req_distinguished_name]" >> request.cfg
echo "commonName=$CLIENTNAME" >> request.cfg

test -f request.cfg || error "could not create request.cfg"
Expand Down

0 comments on commit 6ae738d

Please sign in to comment.